brightcontent-assets 2.0.3 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -3
- data/app/assets/javascripts/brightcontent/assets.js +5 -1
- data/app/controllers/brightcontent/assets_controller.rb +9 -10
- data/app/models/brightcontent/asset.rb +2 -0
- data/app/views/brightcontent/assets/_form_field.html.erb +3 -3
- data/config/routes.rb +1 -1
- data/lib/brightcontent/assets.rb +1 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/001/original/icon-socialmedia.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/002/original/bg_direction_nav.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/003/original/icon-android.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/004/original/icon-calendar.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/005/original/icon-iphone.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/006/original/icon-socialmedia.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/007/original/iphone.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/008/original/logo.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/009/original/menu-button.png +0 -0
- data/spec/dummy/public/system/brightcontent/assets/assets/000/000/010/original/bestuur.jpg +0 -0
- metadata +26 -6
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
brightcontent-assets (2.0.
|
5
|
-
brightcontent-core (= 2.0.
|
4
|
+
brightcontent-assets (2.0.5)
|
5
|
+
brightcontent-core (= 2.0.5)
|
6
6
|
jquery-fileupload-rails
|
7
7
|
paperclip
|
8
8
|
|
9
9
|
PATH
|
10
10
|
remote: ../core
|
11
11
|
specs:
|
12
|
-
brightcontent-core (2.0.
|
12
|
+
brightcontent-core (2.0.5)
|
13
13
|
bcrypt-ruby
|
14
14
|
bootstrap-wysihtml5-rails
|
15
15
|
has_scope
|
@@ -1,16 +1,15 @@
|
|
1
1
|
require_dependency "brightcontent/application_controller"
|
2
2
|
|
3
3
|
module Brightcontent
|
4
|
-
class
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
class AssetsController < ApplicationController
|
5
|
+
|
6
|
+
def create
|
7
|
+
@asset = Asset.new(params.slice(:attachable_id, :attachable_type, :asset))
|
8
|
+
if @asset.save
|
9
|
+
render json: @asset.to_json, status: :created
|
10
|
+
else
|
11
|
+
render json: @asset.errors, status: :unprocessable_entity
|
12
|
+
end
|
13
13
|
end
|
14
|
-
|
15
14
|
end
|
16
15
|
end
|
@@ -5,9 +5,9 @@
|
|
5
5
|
<% end %>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
<input id="fileupload" type="file" name="asset" data-url="<%= brightcontent_assets_path %>" multiple>
|
9
|
+
<%= hidden_field_tag "attachable_id", item.id %>
|
10
|
+
<%= hidden_field_tag "attachable_type", item.class.to_s %>
|
11
11
|
<% else %>
|
12
12
|
First save to enable uploads
|
13
13
|
<% end %>
|
data/config/routes.rb
CHANGED
data/lib/brightcontent/assets.rb
CHANGED
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/001/original/icon-socialmedia.png
ADDED
Binary file
|
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/002/original/bg_direction_nav.png
ADDED
Binary file
|
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/003/original/icon-android.png
ADDED
Binary file
|
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/004/original/icon-calendar.png
ADDED
Binary file
|
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/005/original/icon-iphone.png
ADDED
Binary file
|
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/006/original/icon-socialmedia.png
ADDED
Binary file
|
Binary file
|
Binary file
|
data/spec/dummy/public/system/brightcontent/assets/assets/000/000/009/original/menu-button.png
ADDED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcontent-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: brightcontent-core
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.0.
|
21
|
+
version: 2.0.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.0.
|
29
|
+
version: 2.0.5
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: paperclip
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,6 +202,16 @@ files:
|
|
202
202
|
- spec/dummy/public/422.html
|
203
203
|
- spec/dummy/public/500.html
|
204
204
|
- spec/dummy/public/favicon.ico
|
205
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/001/original/icon-socialmedia.png
|
206
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/002/original/bg_direction_nav.png
|
207
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/003/original/icon-android.png
|
208
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/004/original/icon-calendar.png
|
209
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/005/original/icon-iphone.png
|
210
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/006/original/icon-socialmedia.png
|
211
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/007/original/iphone.png
|
212
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/008/original/logo.png
|
213
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/009/original/menu-button.png
|
214
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/010/original/bestuur.jpg
|
205
215
|
- spec/dummy/script/rails
|
206
216
|
- spec/factories.rb
|
207
217
|
- spec/features/assets_spec.rb
|
@@ -222,7 +232,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
222
232
|
version: '0'
|
223
233
|
segments:
|
224
234
|
- 0
|
225
|
-
hash:
|
235
|
+
hash: 3665897338164839893
|
226
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
237
|
none: false
|
228
238
|
requirements:
|
@@ -231,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
241
|
version: '0'
|
232
242
|
segments:
|
233
243
|
- 0
|
234
|
-
hash:
|
244
|
+
hash: 3665897338164839893
|
235
245
|
requirements: []
|
236
246
|
rubyforge_project:
|
237
247
|
rubygems_version: 1.8.24
|
@@ -277,6 +287,16 @@ test_files:
|
|
277
287
|
- spec/dummy/public/422.html
|
278
288
|
- spec/dummy/public/500.html
|
279
289
|
- spec/dummy/public/favicon.ico
|
290
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/001/original/icon-socialmedia.png
|
291
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/002/original/bg_direction_nav.png
|
292
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/003/original/icon-android.png
|
293
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/004/original/icon-calendar.png
|
294
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/005/original/icon-iphone.png
|
295
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/006/original/icon-socialmedia.png
|
296
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/007/original/iphone.png
|
297
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/008/original/logo.png
|
298
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/009/original/menu-button.png
|
299
|
+
- spec/dummy/public/system/brightcontent/assets/assets/000/000/010/original/bestuur.jpg
|
280
300
|
- spec/dummy/script/rails
|
281
301
|
- spec/factories.rb
|
282
302
|
- spec/features/assets_spec.rb
|