Skip to content

Commit 3ba29a5

Browse files
committed
Merge branch 'bug/strong-parameters'. Fixes #88
2 parents 4e147f2 + fb3056a commit 3ba29a5

75 files changed

Lines changed: 1532 additions & 142 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ spec/dummy/config/cloudinary.yml
1010
bin/
1111

1212
.rspec
13+
config/cloudinary.yml

Gemfile.lock

Lines changed: 174 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -2,188 +2,222 @@ PATH
22
remote: .
33
specs:
44
attachinary (1.3.0)
5-
cloudinary (~> 1.0.69)
5+
cloudinary (~> 1.1.0)
66
rails (>= 3.2)
77

88
GEM
99
remote: http://rubygems.org/
1010
specs:
11-
actionmailer (4.0.3)
12-
actionpack (= 4.0.3)
13-
mail (~> 2.5.4)
14-
actionpack (4.0.3)
15-
activesupport (= 4.0.3)
16-
builder (~> 3.1.0)
17-
erubis (~> 2.7.0)
18-
rack (~> 1.5.2)
11+
actionmailer (4.2.3)
12+
actionpack (= 4.2.3)
13+
actionview (= 4.2.3)
14+
activejob (= 4.2.3)
15+
mail (~> 2.5, >= 2.5.4)
16+
rails-dom-testing (~> 1.0, >= 1.0.5)
17+
actionpack (4.2.3)
18+
actionview (= 4.2.3)
19+
activesupport (= 4.2.3)
20+
rack (~> 1.6)
1921
rack-test (~> 0.6.2)
20-
activemodel (4.0.3)
21-
activesupport (= 4.0.3)
22-
builder (~> 3.1.0)
23-
activerecord (4.0.3)
24-
activemodel (= 4.0.3)
25-
activerecord-deprecated_finders (~> 1.0.2)
26-
activesupport (= 4.0.3)
27-
arel (~> 4.0.0)
28-
activerecord-deprecated_finders (1.0.3)
29-
activesupport (4.0.3)
30-
i18n (~> 0.6, >= 0.6.4)
31-
minitest (~> 4.2)
32-
multi_json (~> 1.3)
33-
thread_safe (~> 0.1)
34-
tzinfo (~> 0.3.37)
35-
addressable (2.3.5)
36-
arel (4.0.2)
37-
atomic (1.1.14)
38-
aws_cf_signer (0.1.2)
39-
bson (1.9.2)
40-
builder (3.1.4)
41-
capybara (2.2.1)
22+
rails-dom-testing (~> 1.0, >= 1.0.5)
23+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
24+
actionview (4.2.3)
25+
activesupport (= 4.2.3)
26+
builder (~> 3.1)
27+
erubis (~> 2.7.0)
28+
rails-dom-testing (~> 1.0, >= 1.0.5)
29+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
30+
activejob (4.2.3)
31+
activesupport (= 4.2.3)
32+
globalid (>= 0.3.0)
33+
activemodel (4.2.3)
34+
activesupport (= 4.2.3)
35+
builder (~> 3.1)
36+
activerecord (4.2.3)
37+
activemodel (= 4.2.3)
38+
activesupport (= 4.2.3)
39+
arel (~> 6.0)
40+
activesupport (4.2.3)
41+
i18n (~> 0.7)
42+
json (~> 1.7, >= 1.7.7)
43+
minitest (~> 5.1)
44+
thread_safe (~> 0.3, >= 0.3.4)
45+
tzinfo (~> 1.1)
46+
addressable (2.3.8)
47+
arel (6.0.2)
48+
aws_cf_signer (0.1.3)
49+
bson (3.1.2)
50+
builder (3.2.2)
51+
capybara (2.4.4)
4252
mime-types (>= 1.16)
4353
nokogiri (>= 1.3.3)
4454
rack (>= 1.0.0)
4555
rack-test (>= 0.5.4)
4656
xpath (~> 2.0)
47-
capybara-webkit (1.1.0)
48-
capybara (~> 2.0, >= 2.0.2)
57+
capybara-webkit (1.6.0)
58+
capybara (>= 2.3.0, < 2.5.0)
4959
json
50-
celluloid (0.15.2)
51-
timers (~> 1.1.0)
52-
celluloid-io (0.15.0)
53-
celluloid (>= 0.15.0)
54-
nio4r (>= 0.5.0)
55-
cloudinary (1.0.69)
60+
cloudinary (1.1.0)
5661
aws_cf_signer
5762
rest-client
5863
coderay (1.1.0)
59-
coffee-rails (4.0.1)
64+
coffee-rails (4.1.0)
6065
coffee-script (>= 2.2.0)
6166
railties (>= 4.0.0, < 5.0)
62-
coffee-script (2.2.0)
67+
coffee-script (2.4.1)
6368
coffee-script-source
6469
execjs
65-
coffee-script-source (1.7.0)
66-
database_cleaner (1.2.0)
70+
coffee-script-source (1.9.1.1)
71+
connection_pool (2.2.0)
72+
database_cleaner (1.4.1)
6773
diff-lcs (1.2.5)
68-
durran-validatable (2.0.1)
74+
domain_name (0.5.24)
75+
unf (>= 0.0.5, < 1.0.0)
6976
erubis (2.7.0)
70-
execjs (2.0.2)
71-
factory_girl (4.4.0)
77+
execjs (2.5.2)
78+
factory_girl (4.5.0)
7279
activesupport (>= 3.0.0)
73-
factory_girl_rails (4.4.0)
74-
factory_girl (~> 4.4.0)
80+
factory_girl_rails (4.5.0)
81+
factory_girl (~> 4.5.0)
7582
railties (>= 3.0.0)
76-
ffi (1.9.3)
77-
formatador (0.2.4)
78-
guard (2.5.1)
83+
ffi (1.9.10)
84+
formatador (0.2.5)
85+
globalid (0.3.5)
86+
activesupport (>= 4.1.0)
87+
guard (2.12.8)
7988
formatador (>= 0.2.4)
80-
listen (~> 2.6)
89+
listen (>= 2.7, <= 4.0)
8190
lumberjack (~> 1.0)
91+
nenv (~> 0.1)
92+
notiffany (~> 0.0)
8293
pry (>= 0.9.12)
94+
shellany (~> 0.0)
8395
thor (>= 0.18.1)
84-
guard-rspec (4.2.7)
96+
guard-compat (1.2.1)
97+
guard-rspec (4.6.2)
8598
guard (~> 2.1)
86-
rspec (>= 2.14, < 4.0)
87-
hike (1.2.3)
88-
i18n (0.6.9)
89-
jquery-rails (3.1.0)
90-
railties (>= 3.0, < 5.0)
99+
guard-compat (~> 1.1)
100+
rspec (>= 2.99.0, < 4.0)
101+
http-cookie (1.0.2)
102+
domain_name (~> 0.5)
103+
i18n (0.7.0)
104+
jquery-rails (4.0.4)
105+
rails-dom-testing (~> 1.0)
106+
railties (>= 4.2.0)
91107
thor (>= 0.14, < 2.0)
92-
json (1.8.1)
93-
launchy (2.4.2)
108+
json (1.8.3)
109+
launchy (2.4.3)
94110
addressable (~> 2.3)
95-
leshill-will_paginate (2.3.11)
96-
listen (2.6.1)
97-
celluloid (>= 0.15.2)
98-
celluloid-io (>= 0.15.0)
111+
listen (3.0.2)
99112
rb-fsevent (>= 0.9.3)
100113
rb-inotify (>= 0.9)
101-
lumberjack (1.0.4)
102-
mail (2.5.4)
103-
mime-types (~> 1.16)
104-
treetop (~> 1.4.8)
114+
loofah (2.0.2)
115+
nokogiri (>= 1.5.9)
116+
lumberjack (1.0.9)
117+
mail (2.6.3)
118+
mime-types (>= 1.16, < 3)
105119
method_source (0.8.2)
106-
mime-types (1.25.1)
107-
mini_portile (0.5.2)
108-
minitest (4.7.5)
109-
mongo (1.9.2)
110-
bson (~> 1.9.2)
111-
mongoid (1.0.6)
112-
activesupport (>= 2.2.2)
113-
durran-validatable (>= 2.0.1)
114-
leshill-will_paginate (>= 2.3.11)
115-
mongo (>= 0.18.2)
116-
multi_json (1.8.4)
117-
nio4r (1.0.0)
118-
nokogiri (1.6.1)
119-
mini_portile (~> 0.5.0)
120-
polyglot (0.3.4)
121-
pry (0.9.12.6)
122-
coderay (~> 1.0)
123-
method_source (~> 0.8)
120+
mime-types (2.6.1)
121+
mini_portile (0.6.2)
122+
minitest (5.7.0)
123+
mongoid (4.0.2)
124+
activemodel (~> 4.0)
125+
moped (~> 2.0.0)
126+
origin (~> 2.1)
127+
tzinfo (>= 0.3.37)
128+
moped (2.0.6)
129+
bson (~> 3.0)
130+
connection_pool (~> 2.0)
131+
optionable (~> 0.2.0)
132+
nenv (0.2.0)
133+
netrc (0.10.3)
134+
nokogiri (1.6.6.2)
135+
mini_portile (~> 0.6.0)
136+
notiffany (0.0.6)
137+
nenv (~> 0.1)
138+
shellany (~> 0.0)
139+
optionable (0.2.0)
140+
origin (2.1.1)
141+
pry (0.10.1)
142+
coderay (~> 1.1.0)
143+
method_source (~> 0.8.1)
124144
slop (~> 3.4)
125-
rack (1.5.2)
126-
rack-test (0.6.2)
145+
rack (1.6.4)
146+
rack-test (0.6.3)
127147
rack (>= 1.0)
128-
rails (4.0.3)
129-
actionmailer (= 4.0.3)
130-
actionpack (= 4.0.3)
131-
activerecord (= 4.0.3)
132-
activesupport (= 4.0.3)
148+
rails (4.2.3)
149+
actionmailer (= 4.2.3)
150+
actionpack (= 4.2.3)
151+
actionview (= 4.2.3)
152+
activejob (= 4.2.3)
153+
activemodel (= 4.2.3)
154+
activerecord (= 4.2.3)
155+
activesupport (= 4.2.3)
133156
bundler (>= 1.3.0, < 2.0)
134-
railties (= 4.0.3)
135-
sprockets-rails (~> 2.0.0)
136-
railties (4.0.3)
137-
actionpack (= 4.0.3)
138-
activesupport (= 4.0.3)
157+
railties (= 4.2.3)
158+
sprockets-rails
159+
rails-deprecated_sanitizer (1.0.3)
160+
activesupport (>= 4.2.0.alpha)
161+
rails-dom-testing (1.0.6)
162+
activesupport (>= 4.2.0.beta, < 5.0)
163+
nokogiri (~> 1.6.0)
164+
rails-deprecated_sanitizer (>= 1.0.1)
165+
rails-html-sanitizer (1.0.2)
166+
loofah (~> 2.0)
167+
railties (4.2.3)
168+
actionpack (= 4.2.3)
169+
activesupport (= 4.2.3)
139170
rake (>= 0.8.7)
140171
thor (>= 0.18.1, < 2.0)
141-
rake (10.1.1)
142-
rb-fsevent (0.9.4)
143-
rb-inotify (0.9.3)
172+
rake (10.4.2)
173+
rb-fsevent (0.9.5)
174+
rb-inotify (0.9.5)
144175
ffi (>= 0.5.0)
145-
rest-client (1.6.7)
146-
mime-types (>= 1.16)
147-
rspec (2.14.1)
148-
rspec-core (~> 2.14.0)
149-
rspec-expectations (~> 2.14.0)
150-
rspec-mocks (~> 2.14.0)
151-
rspec-core (2.14.7)
152-
rspec-expectations (2.14.5)
153-
diff-lcs (>= 1.1.3, < 2.0)
154-
rspec-mocks (2.14.6)
155-
rspec-rails (2.14.1)
156-
actionpack (>= 3.0)
157-
activemodel (>= 3.0)
158-
activesupport (>= 3.0)
159-
railties (>= 3.0)
160-
rspec-core (~> 2.14.0)
161-
rspec-expectations (~> 2.14.0)
162-
rspec-mocks (~> 2.14.0)
163-
simple_form (3.0.1)
164-
actionpack (>= 4.0.0, < 4.1)
165-
activemodel (>= 4.0.0, < 4.1)
166-
slop (3.4.7)
167-
sprockets (2.11.0)
168-
hike (~> 1.2)
169-
multi_json (~> 1.0)
176+
rest-client (1.8.0)
177+
http-cookie (>= 1.0.2, < 2.0)
178+
mime-types (>= 1.16, < 3.0)
179+
netrc (~> 0.7)
180+
rspec (3.3.0)
181+
rspec-core (~> 3.3.0)
182+
rspec-expectations (~> 3.3.0)
183+
rspec-mocks (~> 3.3.0)
184+
rspec-core (3.3.2)
185+
rspec-support (~> 3.3.0)
186+
rspec-expectations (3.3.1)
187+
diff-lcs (>= 1.2.0, < 2.0)
188+
rspec-support (~> 3.3.0)
189+
rspec-mocks (3.3.2)
190+
diff-lcs (>= 1.2.0, < 2.0)
191+
rspec-support (~> 3.3.0)
192+
rspec-rails (3.3.3)
193+
actionpack (>= 3.0, < 4.3)
194+
activesupport (>= 3.0, < 4.3)
195+
railties (>= 3.0, < 4.3)
196+
rspec-core (~> 3.3.0)
197+
rspec-expectations (~> 3.3.0)
198+
rspec-mocks (~> 3.3.0)
199+
rspec-support (~> 3.3.0)
200+
rspec-support (3.3.0)
201+
shellany (0.0.1)
202+
simple_form (3.1.0)
203+
actionpack (~> 4.0)
204+
activemodel (~> 4.0)
205+
slop (3.6.0)
206+
sprockets (3.2.0)
170207
rack (~> 1.0)
171-
tilt (~> 1.1, != 1.3.0)
172-
sprockets-rails (2.0.1)
208+
sprockets-rails (2.3.2)
173209
actionpack (>= 3.0)
174210
activesupport (>= 3.0)
175-
sprockets (~> 2.8)
176-
sqlite3 (1.3.9)
177-
thor (0.18.1)
178-
thread_safe (0.1.3)
179-
atomic
180-
tilt (1.4.1)
181-
timers (1.1.0)
182-
treetop (1.4.15)
183-
polyglot
184-
polyglot (>= 0.3.1)
185-
tzinfo (0.3.38)
186-
valid_attribute (1.3.1)
211+
sprockets (>= 2.8, < 4.0)
212+
sqlite3 (1.3.10)
213+
thor (0.19.1)
214+
thread_safe (0.3.5)
215+
tzinfo (1.2.2)
216+
thread_safe (~> 0.1)
217+
unf (0.1.4)
218+
unf_ext
219+
unf_ext (0.0.7.1)
220+
valid_attribute (2.0.0)
187221
xpath (2.0.0)
188222
nokogiri (~> 1.3)
189223

attachinary.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
1717
s.test_files = Dir["test/**/*"]
1818

1919
s.add_dependency 'rails', '>= 3.2'
20-
s.add_dependency 'cloudinary', '~> 1.0.69'
20+
s.add_dependency 'cloudinary', '~> 1.1.0'
2121

2222
s.add_development_dependency 'sqlite3'
2323
s.add_development_dependency 'rspec-rails'

lib/attachinary/utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def self.process_hash(hash, scope=nil)
1414
file = if Rails::VERSION::MAJOR == 3
1515
Attachinary::File.new hash.slice(*Attachinary::File.attr_accessible[:default].to_a)
1616
else
17-
permitted_params = ActionController::Parameters.new(hash).permit(:public_id, :version, :width, :height, :format, :resource_type)
17+
permitted_params = ActionController::Parameters.new(hash.slice(:public_id, :version, :width, :height, :format, :resource_type)).permit!
1818
Attachinary::File.new(permitted_params)
1919
end
2020
file.scope = scope.to_s if scope && file.respond_to?(:scope=)

spec/dummy4/.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "vendor/assets/components"
3+
}

0 commit comments

Comments
 (0)