uploadcare-rails 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +5 -5
  2. data/lib/generators/templates/uploadcare_config_template.yml +3 -7
  3. data/lib/uploadcare/rails/active_record/has_file.rb +18 -15
  4. data/lib/uploadcare/rails/active_record/has_group.rb +18 -13
  5. data/lib/uploadcare/rails/version.rb +1 -1
  6. data/spec/dummy/app/models/post.rb +1 -0
  7. data/spec/dummy/app/models/post_with_collection.rb +1 -0
  8. data/spec/dummy/config/uploadcare.yml +3 -7
  9. data/spec/dummy/db/migrate/20181001132710_add_other_file_to_post.rb +8 -0
  10. data/spec/dummy/db/migrate/20181001141434_add_other_file_to_post_with_collections.rb +8 -0
  11. data/spec/dummy/db/schema.rb +3 -1
  12. data/spec/models/has_several_files_spec.rb +55 -0
  13. data/spec/models/has_several_groups_spec.rb +62 -0
  14. data/spec/spec_helper.rb +9 -1
  15. metadata +87 -107
  16. data/spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml +0 -419
  17. data/spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml +0 -419
  18. data/spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml +0 -419
  19. data/spec/cassettes/group_cahsing_file_load.yml +0 -419
  20. data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml +0 -2243
  21. data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml +0 -705
  22. data/spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml +0 -835
  23. data/spec/cassettes/has_uploadcare_group_save.yml +0 -867
  24. data/spec/cassettes/load_group.yml +0 -419
  25. data/spec/dummy/db/test.sqlite3 +0 -0
  26. data/spec/dummy/log/test.log +0 -552
  27. data/spec/dummy/tmp/cache/457/D71/https%3A%2F%2Fucarecdn.com%2F04058c13-549a-495a-bab8-83a5deaae0a0%7E2%2F +0 -0
  28. data/spec/dummy/tmp/cache/49B/481/https%3A%2F%2Fucarecdn.com%2F2d40a7e9-bab4-446d-8d7a-b9fc5438c04c%7E2%2F +0 -0
  29. data/spec/tmp/config/uploadcare.yml +0 -71
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 0d9f2d61692cc4edb71f8d1b66c75de09718625e8cb439dd66e9ed72a11629a9
4
- data.tar.gz: d03027c3676fe282067f7c9908631f81c8d64cb1e4e27b6e60c22ec3512ee70c
2
+ SHA1:
3
+ metadata.gz: 51e5e1bed076e6d97a1ea78f70545bf4e6e1820f
4
+ data.tar.gz: 8f50c72f63c5a8dfc7fed84861468868eb5477a3
5
5
  SHA512:
6
- metadata.gz: 9dbfc28f7a8591be25fea7df4e8b60a21b81d47239b9cf4332aeb6bae6e5eadc8de30b1065348bd894f3e8fdc1f507639b428f6d965ff11eb0ca5ed8e6320a82
7
- data.tar.gz: 7b0068282e31f49c9c36197a5efd32336ddb1d6938556394c48709ba2320ed9eb32066d57cd8b4cdc01943206dacacce8bf012f4a9b9d13fb4ffad4b7ace695c
6
+ metadata.gz: b7221fac254b9ff175acafcb165131fffc356520132a5dea2b76b62592e9ebe1995641ae126b758e04ab37059bc2abcec6109fc0a6ca682267d5029383df3cc7
7
+ data.tar.gz: 0daf1d6084931be84f042650ff2f5fa4f9f948d631574bfc7cb32670cb79561bbdc28a7a3f69167b66de7c06296076543159e85298ac8537b04aa5d29b0ca25d
@@ -17,8 +17,8 @@ defaults: &defaults
17
17
  # deletes file or group after model object is deleted
18
18
  delete_after_destroy: true
19
19
 
20
- # Avaliable options are listed at https://uploadcare.com/documentation/widget/#advanced-configuration
21
- # please note, that for options marker as Global: N/A - there is no practical meaning
20
+ # Avaliable options are listed at https://uploadcare.com/docs/uploads/widget/config/
21
+ # please note, that for options marked as Global: N/A there is no practical meaning
22
22
  # of putting this option here, as it will not have any effect.
23
23
  # But it also will not break anything.
24
24
 
@@ -30,7 +30,7 @@ defaults: &defaults
30
30
 
31
31
  # for setting tabs use tabs option:
32
32
  # tabs: "url file facebook" # etc
33
- # read more here: https://uploadcare.com/documentation/widget/#tabs
33
+ # read more here: https://uploadcare.com/docs/uploads/widget/upload_sources/
34
34
  #
35
35
  # Full list of tabs:
36
36
  # |----------------------------------------|
@@ -57,10 +57,6 @@ defaults: &defaults
57
57
  # for manual start (which means you will need to initialize uploaders yourself) use:
58
58
  # manual_start: false # true or false
59
59
 
60
- # for path value use:
61
- # path_value: true # true or false
62
- # (important for input values - see https://uploadcare.com/documentation/widget/#input-value)
63
-
64
60
  development:
65
61
  <<: *defaults
66
62
 
@@ -3,17 +3,8 @@ require "uploadcare/rails/objects/file"
3
3
  module Uploadcare
4
4
  module Rails
5
5
  module ActiveRecord
6
- def has_uploadcare_file(attribute, options={})
7
-
8
- define_method "has_#{attribute}_as_uploadcare_file?" do
9
- true
10
- end
11
-
12
- define_method "has_#{attribute}_as_uploadcare_group?" do
13
- false
14
- end
15
-
16
- define_method 'build_file' do
6
+ module InstanceMethods
7
+ def build_file(attribute)
17
8
  cdn_url = attributes[attribute.to_s].to_s
18
9
  return nil if cdn_url.empty?
19
10
 
@@ -26,13 +17,25 @@ module Uploadcare
26
17
  Uploadcare::Rails::File.new(api, cdn_url)
27
18
  end
28
19
  end
20
+ end
21
+
22
+ def has_uploadcare_file(attribute, options={})
23
+ include Uploadcare::Rails::ActiveRecord::InstanceMethods
24
+
25
+ define_method "has_#{attribute}_as_uploadcare_file?" do
26
+ true
27
+ end
28
+
29
+ define_method "has_#{attribute}_as_uploadcare_group?" do
30
+ false
31
+ end
29
32
 
30
33
  # attribute method - return file object
31
34
  # it is not the ::File but ::Rails::File
32
35
  # it has some helpers for rails enviroment
33
36
  # but it also has all the methods of Uploadcare::File so no worries.
34
37
  define_method "#{ attribute }" do
35
- build_file
38
+ build_file attribute
36
39
  end
37
40
 
38
41
  define_method "check_#{ attribute }_for_uuid" do
@@ -44,8 +47,7 @@ module Uploadcare
44
47
  end
45
48
 
46
49
  define_method "store_#{ attribute }" do
47
- file = build_file
48
-
50
+ file = build_file attribute
49
51
  return unless file
50
52
 
51
53
  begin
@@ -60,7 +62,8 @@ module Uploadcare
60
62
  end
61
63
 
62
64
  define_method "delete_#{ attribute }" do
63
- file = build_file
65
+ file = build_file attribute
66
+ return unless file
64
67
 
65
68
  begin
66
69
  file.delete
@@ -3,16 +3,8 @@ require 'uploadcare/rails/objects/group'
3
3
  module Uploadcare
4
4
  module Rails
5
5
  module ActiveRecord
6
- def has_uploadcare_group(attribute, options = {})
7
- define_method "has_#{ attribute }_as_uploadcare_file?" do
8
- false
9
- end
10
-
11
- define_method "has_#{ attribute }_as_uploadcare_group?" do
12
- true
13
- end
14
-
15
- define_method 'build_group' do
6
+ module InstanceMethods
7
+ def build_group(attribute)
16
8
  cdn_url = attributes[attribute.to_s].to_s
17
9
  return nil if cdn_url.empty?
18
10
 
@@ -25,10 +17,22 @@ module Uploadcare
25
17
  Uploadcare::Rails::Group.new(api, cdn_url)
26
18
  end
27
19
  end
20
+ end
21
+
22
+ def has_uploadcare_group(attribute, options = {})
23
+ include Uploadcare::Rails::ActiveRecord::InstanceMethods
24
+
25
+ define_method "has_#{ attribute }_as_uploadcare_file?" do
26
+ false
27
+ end
28
+
29
+ define_method "has_#{ attribute }_as_uploadcare_group?" do
30
+ true
31
+ end
28
32
 
29
33
  # attribute method - return file object
30
34
  define_method "#{ attribute }" do
31
- build_group
35
+ build_group attribute
32
36
  end
33
37
 
34
38
  define_method "check_#{ attribute }_for_uuid" do
@@ -44,7 +48,7 @@ module Uploadcare
44
48
  end
45
49
 
46
50
  define_method "store_#{ attribute }" do
47
- group = build_group
51
+ group = build_group attribute
48
52
  return unless group.present?
49
53
 
50
54
  begin
@@ -57,7 +61,8 @@ module Uploadcare
57
61
  end
58
62
 
59
63
  define_method "delete_#{ attribute }" do
60
- group = build_group
64
+ group = build_group attribute
65
+ return unless group
61
66
 
62
67
  begin
63
68
  group.delete
@@ -1,5 +1,5 @@
1
1
  module Uploadcare
2
2
  module Rails
3
- VERSION = '1.2.0'.freeze
3
+ VERSION = '1.2.1'.freeze
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
1
  class Post < ActiveRecord::Base
2
2
  has_uploadcare_file :file
3
+ has_uploadcare_file :other_file
3
4
  end
@@ -1,3 +1,4 @@
1
1
  class PostWithCollection < ActiveRecord::Base
2
2
  has_uploadcare_group :file
3
+ has_uploadcare_group :other_file
3
4
  end
@@ -12,8 +12,8 @@ defaults: &defaults
12
12
  # deletes file or group after model object is deleted
13
13
  delete_after_destroy: true
14
14
 
15
- # Avaliable options are listed at https://uploadcare.com/documentation/widget/#advanced-configuration
16
- # please note, that for options marker as Global: N/A - there is no practical meaning
15
+ # Avaliable options are listed at https://uploadcare.com/docs/uploads/widget/config/
16
+ # please note, that for options marked as Global: N/A there is no practical meaning
17
17
  # of putting this option here, as it will not have any effect.
18
18
  # But it also will not break anything.
19
19
 
@@ -25,7 +25,7 @@ defaults: &defaults
25
25
 
26
26
  # for setting tabs use tabs option:
27
27
  tabs: "url file facebook" # etc
28
- # read more here: https://uploadcare.com/documentation/widget/#tabs
28
+ # read more here: https://uploadcare.com/docs/uploads/widget/upload_sources/
29
29
  #
30
30
  # Full list of tabs:
31
31
  # |----------------------------------------|
@@ -52,10 +52,6 @@ defaults: &defaults
52
52
  # for manual start (which means you will need to initialize uploaders yourself) use:
53
53
  manual_start: false # true or false
54
54
 
55
- # for path value use:
56
- path_value: true # true or false
57
- # (important for input values - see https://uploadcare.com/documentation/widget/#input-value)
58
-
59
55
  live: true
60
56
 
61
57
  development:
@@ -0,0 +1,8 @@
1
+ superclass = ActiveRecord::Migration
2
+ superclass = ActiveRecord::Migration[5.0] if superclass.respond_to?(:[])
3
+
4
+ class AddOtherFileToPost < superclass
5
+ def change
6
+ add_column :posts, :other_file, :string
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ superclass = ActiveRecord::Migration
2
+ superclass = ActiveRecord::Migration[5.0] if superclass.respond_to?(:[])
3
+
4
+ class AddOtherFileToPostWithCollections < superclass
5
+ def change
6
+ add_column :post_with_collections, :other_file, :string
7
+ end
8
+ end
@@ -10,13 +10,14 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20171012001801) do
13
+ ActiveRecord::Schema.define(version: 2018_10_01_141434) do
14
14
 
15
15
  create_table "post_with_collections", force: :cascade do |t|
16
16
  t.string "title"
17
17
  t.string "file"
18
18
  t.datetime "created_at", null: false
19
19
  t.datetime "updated_at", null: false
20
+ t.string "other_file"
20
21
  end
21
22
 
22
23
  create_table "posts", force: :cascade do |t|
@@ -24,6 +25,7 @@ ActiveRecord::Schema.define(version: 20171012001801) do
24
25
  t.string "file"
25
26
  t.datetime "created_at", null: false
26
27
  t.datetime "updated_at", null: false
28
+ t.string "other_file"
27
29
  end
28
30
 
29
31
  create_table "posts_with_collection_and_files", force: :cascade do |t|
@@ -0,0 +1,55 @@
1
+ require 'spec_helper'
2
+
3
+ describe :has_two_uploadcare_files, :vcr do
4
+ let(:post) { Post.new(title: 'Post title', file: FILE_CDN_URL, other_file: FILE_2_CDN_URL) }
5
+ let(:subject) { post }
6
+
7
+ describe 'object with uploadcare_files' do
8
+ it 'creates blank post' do
9
+ Post.create!
10
+ end
11
+
12
+ it 'responds to has_uploadcare_file? method' do
13
+ is_expected.to respond_to(:has_file_as_uploadcare_file?)
14
+ is_expected.to respond_to(:has_other_file_as_uploadcare_file?)
15
+ end
16
+
17
+ it 'responds to has_uploadcare_group? method' do
18
+ is_expected.to respond_to(:has_file_as_uploadcare_group?)
19
+ is_expected.to respond_to(:has_other_file_as_uploadcare_group?)
20
+ end
21
+
22
+ it 'has Uploadcare::Rails::File' do
23
+ expect(post.file).to be_an(Uploadcare::Rails::File)
24
+ expect(post.other_file).to be_an(Uploadcare::Rails::File)
25
+ expect(post.file.cdn_url).not_to be(post.other_file.cdn_url)
26
+ end
27
+
28
+ it 'stores file after save' do
29
+ post.save
30
+
31
+ expect(post.file).to be_stored
32
+ expect(post.other_file).to be_stored
33
+ end
34
+
35
+ it 'deletes file after destroy', vcr: 'has_upload_care_file_destroy_file' do
36
+ post.save
37
+ post.destroy
38
+
39
+ expect(post.file).to be_deleted
40
+ expect(post.other_file).to be_deleted
41
+ end
42
+ end
43
+
44
+ context 'instance methods' do
45
+ it '#has_uploadcare_file? returns true' do
46
+ expect(post.has_file_as_uploadcare_file?).to be_truthy
47
+ expect(post.has_other_file_as_uploadcare_file?).to be_truthy
48
+ end
49
+
50
+ it '#has_uploadcare_group? returns false' do
51
+ expect(post.has_file_as_uploadcare_group?).to be_falsey
52
+ expect(post.has_other_file_as_uploadcare_group?).to be_falsey
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,62 @@
1
+ require 'spec_helper'
2
+
3
+ describe :has_uploadcare_group, :vcr do
4
+ let(:post) { PostWithCollection.new(
5
+ title: 'Title',
6
+ file: GROUP_CDN_URL,
7
+ other_file: GROUP_2_CDN_URL
8
+ ) }
9
+ let(:subject) { post }
10
+
11
+ after :each do
12
+ Rails.cache.delete(GROUP_CDN_URL)
13
+ Rails.cache.delete(GROUP_2_CDN_URL)
14
+ end
15
+
16
+ describe 'object with two groups' do
17
+ it 'should respond to has_uploadcare_file? method' do
18
+ is_expected.to respond_to('has_file_as_uploadcare_file?'.to_sym)
19
+ is_expected.to respond_to('has_other_file_as_uploadcare_file?'.to_sym)
20
+ end
21
+
22
+ it 'should respond to has_uploadcare_group? method' do
23
+ is_expected.to respond_to('has_file_as_uploadcare_group?'.to_sym)
24
+ is_expected.to respond_to('has_other_file_as_uploadcare_group?'.to_sym)
25
+ end
26
+
27
+ it ':has_uploadcare_file? should return true' do
28
+ is_expected.not_to be_has_file_as_uploadcare_file
29
+ is_expected.not_to be_has_other_file_as_uploadcare_file
30
+ end
31
+
32
+ it ':has_uploadcare_group? should return false' do
33
+ is_expected.to be_has_file_as_uploadcare_group
34
+ is_expected.to be_has_other_file_as_uploadcare_group
35
+ end
36
+ end
37
+
38
+ describe 'object attachment' do
39
+ it 'should have uploadcare file' do
40
+ expect(post.file).to be_an(Uploadcare::Rails::Group)
41
+ expect(post.other_file).to be_an(Uploadcare::Rails::Group)
42
+ expect(post.file.cdn_url).not_to be(post.other_file.cdn_url)
43
+ end
44
+
45
+ it 'does not load group by default' do
46
+ expect(post.file).not_to be_loaded
47
+ expect(post.other_file).not_to be_loaded
48
+ end
49
+
50
+ it 'contains files inside' do
51
+ expect(post.file.load.files.last).to be_an(Uploadcare::Rails::File)
52
+ expect(post.other_file.load.files.last).to be_an(Uploadcare::Rails::File)
53
+ end
54
+
55
+ it 'stores group after save', vcr: { cassette_name: 'has_uploadcare_group_save' } do
56
+ post.save
57
+
58
+ expect(post.file).to be_stored
59
+ expect(post.other_file).to be_stored
60
+ end
61
+ end
62
+ end
@@ -17,15 +17,23 @@ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
17
17
  @uploaded_file = UPLOADCARE_SETTINGS.api.upload(@file)
18
18
  @file_cdn_url = @uploaded_file.cdn_url
19
19
 
20
- @file = File.open(File.join(File.dirname(__FILE__), 'view.png'))
21
20
  @file2 = File.open(File.join(File.dirname(__FILE__), 'view2.jpg'))
21
+ @uploaded_file2 = UPLOADCARE_SETTINGS.api.upload(@file2)
22
+ @file2_cdn_url = @uploaded_file2.cdn_url
23
+
22
24
  @files_ary = [@file, @file2]
25
+ @files_ary2 = [@file, @file2]
23
26
  @files = UPLOADCARE_SETTINGS.api.upload @files_ary
27
+ @files2 = UPLOADCARE_SETTINGS.api.upload @files_ary2
24
28
  @uploaded_group = UPLOADCARE_SETTINGS.api.create_group @files
29
+ @uploaded_group2 = UPLOADCARE_SETTINGS.api.create_group @files2
25
30
  @group_cdn_url = @uploaded_group.cdn_url
31
+ @group2_cdn_url = @uploaded_group2.cdn_url
26
32
 
27
33
  GROUP_CDN_URL = @group_cdn_url
34
+ GROUP_2_CDN_URL = @group2_cdn_url
28
35
  FILE_CDN_URL = @file_cdn_url
36
+ FILE_2_CDN_URL = @file2_cdn_url
29
37
 
30
38
  RSpec.configure do |config|
31
39
  # ## Mock Framework
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadcare-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@rastyagaev (Vadim Rastyagaev)"
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-06-03 00:00:00.000000000 Z
14
+ date: 2019-03-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -274,15 +274,6 @@ files:
274
274
  - lib/uploadcare/rails/version.rb
275
275
  - spec/caching/file_caching_spec.rb
276
276
  - spec/caching/group_caching_spec.rb
277
- - spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml
278
- - spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml
279
- - spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml
280
- - spec/cassettes/group_cahsing_file_load.yml
281
- - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml
282
- - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml
283
- - spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml
284
- - spec/cassettes/has_uploadcare_group_save.yml
285
- - spec/cassettes/load_group.yml
286
277
  - spec/dummy/README.rdoc
287
278
  - spec/dummy/Rakefile
288
279
  - spec/dummy/app/assets/javascripts/application.js
@@ -349,16 +340,14 @@ files:
349
340
  - spec/dummy/config/routes.rb
350
341
  - spec/dummy/config/uploadcare.yml
351
342
  - spec/dummy/db/migrate/20171012001801_create_tables.rb
343
+ - spec/dummy/db/migrate/20181001132710_add_other_file_to_post.rb
344
+ - spec/dummy/db/migrate/20181001141434_add_other_file_to_post_with_collections.rb
352
345
  - spec/dummy/db/schema.rb
353
- - spec/dummy/db/test.sqlite3
354
346
  - spec/dummy/lib/templates/erb/scaffold/_form.html.erb
355
- - spec/dummy/log/test.log
356
347
  - spec/dummy/public/404.html
357
348
  - spec/dummy/public/422.html
358
349
  - spec/dummy/public/500.html
359
350
  - spec/dummy/public/favicon.ico
360
- - spec/dummy/tmp/cache/457/D71/https%3A%2F%2Fucarecdn.com%2F04058c13-549a-495a-bab8-83a5deaae0a0%7E2%2F
361
- - spec/dummy/tmp/cache/49B/481/https%3A%2F%2Fucarecdn.com%2F2d40a7e9-bab4-446d-8d7a-b9fc5438c04c%7E2%2F
362
351
  - spec/generators/uploadcare_config_generator_spec.rb
363
352
  - spec/helpers/form_helpers_has_file_spec.rb
364
353
  - spec/helpers/form_helpers_has_group_spec.rb
@@ -370,12 +359,13 @@ files:
370
359
  - spec/models/has_both_file_and_group_spec.rb
371
360
  - spec/models/has_file_spec.rb
372
361
  - spec/models/has_group_spec.rb
362
+ - spec/models/has_several_files_spec.rb
363
+ - spec/models/has_several_groups_spec.rb
373
364
  - spec/objects/file_spec.rb
374
365
  - spec/objects/group_spec.rb
375
366
  - spec/operations_spec.rb
376
367
  - spec/spec_helper.rb
377
368
  - spec/support/generators.rb
378
- - spec/tmp/config/uploadcare.yml
379
369
  - spec/uploadcare/rails/settings_spec.rb
380
370
  - spec/uploadcare_rails_settings_spec.rb
381
371
  - spec/view.png
@@ -402,116 +392,106 @@ required_rubygems_version: !ruby/object:Gem::Requirement
402
392
  version: '0'
403
393
  requirements: []
404
394
  rubyforge_project:
405
- rubygems_version: 2.7.7
395
+ rubygems_version: 2.5.2.3
406
396
  signing_key:
407
397
  specification_version: 4
408
398
  summary: Rails gem for Uploadcare
409
399
  test_files:
410
- - spec/helpers/simple_form_spec.rb
411
- - spec/helpers/form_helpers_has_group_spec.rb
412
- - spec/helpers/include_tags_spec.rb
413
- - spec/helpers/uploader_tags_spec.rb
414
- - spec/helpers/form_helpers_spec.rb
415
- - spec/helpers/form_helpers_has_file_spec.rb
416
- - spec/helpers/formtastic_spec.rb
417
- - spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml
418
- - spec/cassettes/has_uploadcare_group_save.yml
419
- - spec/cassettes/group_cahsing_file_load.yml
420
- - spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml
421
- - spec/cassettes/load_group.yml
422
- - spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml
423
- - spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml
424
- - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml
425
- - spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml
426
- - spec/objects/file_spec.rb
427
- - spec/objects/group_spec.rb
428
- - spec/uploadcare/rails/settings_spec.rb
429
- - spec/dummy/log/test.log
430
- - spec/dummy/public/404.html
431
- - spec/dummy/public/422.html
432
- - spec/dummy/public/favicon.ico
433
- - spec/dummy/public/500.html
434
- - spec/dummy/config/routes.rb
435
- - spec/dummy/config/initializers/wrap_parameters.rb
436
- - spec/dummy/config/initializers/formtastic.rb
437
- - spec/dummy/config/initializers/filter_parameter_logging.rb
438
- - spec/dummy/config/initializers/session_store.rb
439
- - spec/dummy/config/initializers/backtrace_silencers.rb
440
- - spec/dummy/config/initializers/simple_form.rb
441
- - spec/dummy/config/initializers/inflections.rb
442
- - spec/dummy/config/initializers/secret_token.rb
443
- - spec/dummy/config/initializers/mime_types.rb
444
- - spec/dummy/config/uploadcare.yml
445
- - spec/dummy/config/environment.rb
446
- - spec/dummy/config/application.rb
447
- - spec/dummy/config/database.yml
448
- - spec/dummy/config/locales/en.yml
449
- - spec/dummy/config/locales/simple_form.en.yml
450
- - spec/dummy/config/environments/test.rb
451
- - spec/dummy/config/environments/development.rb
452
- - spec/dummy/config/environments/production.rb
453
- - spec/dummy/config/boot.rb
454
- - spec/dummy/app/views/layouts/application.html.erb
455
- - spec/dummy/app/views/posts/new.html.erb
456
- - spec/dummy/app/views/posts/show.html.erb
457
- - spec/dummy/app/views/posts/edit.html.erb
458
- - spec/dummy/app/views/posts/_form.html.erb
400
+ - spec/spec_helper.rb
401
+ - spec/dummy/app/models/posts_with_collection_and_file.rb
402
+ - spec/dummy/app/models/post_with_collection.rb
403
+ - spec/dummy/app/models/post.rb
404
+ - spec/dummy/app/controllers/application_controller.rb
405
+ - spec/dummy/app/controllers/post_with_collections_controller.rb
406
+ - spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb
407
+ - spec/dummy/app/controllers/posts_controller.rb
459
408
  - spec/dummy/app/views/posts/index.html.erb
460
409
  - spec/dummy/app/views/posts/post.json.builder
461
- - spec/dummy/app/views/post_with_collections/new.html.erb
462
- - spec/dummy/app/views/post_with_collections/show.html.erb
463
- - spec/dummy/app/views/post_with_collections/edit.html.erb
464
- - spec/dummy/app/views/post_with_collections/_form.html.erb
465
- - spec/dummy/app/views/post_with_collections/index.html.erb
466
- - spec/dummy/app/views/post_with_collections/show.json.jbuilder
467
- - spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
468
- - spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
469
- - spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
470
- - spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
410
+ - spec/dummy/app/views/posts/edit.html.erb
411
+ - spec/dummy/app/views/posts/show.html.erb
412
+ - spec/dummy/app/views/posts/_form.html.erb
413
+ - spec/dummy/app/views/posts/new.html.erb
471
414
  - spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
472
415
  - spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
473
- - spec/dummy/app/helpers/posts_helper.rb
474
- - spec/dummy/app/helpers/application_helper.rb
475
- - spec/dummy/app/helpers/post_with_collections_helper.rb
476
- - spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb
477
- - spec/dummy/app/assets/javascripts/application.js
416
+ - spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
417
+ - spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
418
+ - spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
419
+ - spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
420
+ - spec/dummy/app/views/post_with_collections/index.html.erb
421
+ - spec/dummy/app/views/post_with_collections/show.json.jbuilder
422
+ - spec/dummy/app/views/post_with_collections/edit.html.erb
423
+ - spec/dummy/app/views/post_with_collections/show.html.erb
424
+ - spec/dummy/app/views/post_with_collections/_form.html.erb
425
+ - spec/dummy/app/views/post_with_collections/new.html.erb
426
+ - spec/dummy/app/views/layouts/application.html.erb
478
427
  - spec/dummy/app/assets/javascripts/post_with_collections.js
479
- - spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js
480
428
  - spec/dummy/app/assets/javascripts/posts.js
481
- - spec/dummy/app/assets/stylesheets/posts.css
482
- - spec/dummy/app/assets/stylesheets/scaffold.css
483
- - spec/dummy/app/assets/stylesheets/post_with_collections.css
429
+ - spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js
430
+ - spec/dummy/app/assets/javascripts/application.js
484
431
  - spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css
485
432
  - spec/dummy/app/assets/stylesheets/application.css
486
- - spec/dummy/app/models/post.rb
487
- - spec/dummy/app/models/post_with_collection.rb
488
- - spec/dummy/app/models/posts_with_collection_and_file.rb
489
- - spec/dummy/app/controllers/posts_controller.rb
490
- - spec/dummy/app/controllers/post_with_collections_controller.rb
491
- - spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb
492
- - spec/dummy/app/controllers/application_controller.rb
493
- - spec/dummy/README.rdoc
494
- - spec/dummy/tmp/cache/49B/481/https%3A%2F%2Fucarecdn.com%2F2d40a7e9-bab4-446d-8d7a-b9fc5438c04c%7E2%2F
495
- - spec/dummy/tmp/cache/457/D71/https%3A%2F%2Fucarecdn.com%2F04058c13-549a-495a-bab8-83a5deaae0a0%7E2%2F
433
+ - spec/dummy/app/assets/stylesheets/scaffold.css
434
+ - spec/dummy/app/assets/stylesheets/post_with_collections.css
435
+ - spec/dummy/app/assets/stylesheets/posts.css
436
+ - spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb
437
+ - spec/dummy/app/helpers/posts_helper.rb
438
+ - spec/dummy/app/helpers/post_with_collections_helper.rb
439
+ - spec/dummy/app/helpers/application_helper.rb
440
+ - spec/dummy/bin/rake
441
+ - spec/dummy/bin/bundle
442
+ - spec/dummy/bin/rails
443
+ - spec/dummy/config/uploadcare.yml
444
+ - spec/dummy/config/routes.rb
445
+ - spec/dummy/config/locales/en.yml
446
+ - spec/dummy/config/locales/simple_form.en.yml
447
+ - spec/dummy/config/environments/production.rb
448
+ - spec/dummy/config/environments/development.rb
449
+ - spec/dummy/config/environments/test.rb
450
+ - spec/dummy/config/environment.rb
451
+ - spec/dummy/config/application.rb
452
+ - spec/dummy/config/database.yml
453
+ - spec/dummy/config/boot.rb
454
+ - spec/dummy/config/initializers/backtrace_silencers.rb
455
+ - spec/dummy/config/initializers/mime_types.rb
456
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
457
+ - spec/dummy/config/initializers/session_store.rb
458
+ - spec/dummy/config/initializers/wrap_parameters.rb
459
+ - spec/dummy/config/initializers/simple_form.rb
460
+ - spec/dummy/config/initializers/formtastic.rb
461
+ - spec/dummy/config/initializers/secret_token.rb
462
+ - spec/dummy/config/initializers/inflections.rb
496
463
  - spec/dummy/config.ru
497
- - spec/dummy/lib/templates/erb/scaffold/_form.html.erb
498
464
  - spec/dummy/Rakefile
499
- - spec/dummy/db/migrate/20171012001801_create_tables.rb
500
- - spec/dummy/db/test.sqlite3
465
+ - spec/dummy/public/favicon.ico
466
+ - spec/dummy/public/422.html
467
+ - spec/dummy/public/500.html
468
+ - spec/dummy/public/404.html
469
+ - spec/dummy/lib/templates/erb/scaffold/_form.html.erb
501
470
  - spec/dummy/db/schema.rb
502
- - spec/dummy/bin/bundle
503
- - spec/dummy/bin/rake
504
- - spec/dummy/bin/rails
505
- - spec/models/has_group_spec.rb
506
- - spec/models/has_both_file_and_group_spec.rb
507
- - spec/models/has_file_spec.rb
471
+ - spec/dummy/db/migrate/20171012001801_create_tables.rb
472
+ - spec/dummy/db/migrate/20181001132710_add_other_file_to_post.rb
473
+ - spec/dummy/db/migrate/20181001141434_add_other_file_to_post_with_collections.rb
474
+ - spec/dummy/README.rdoc
508
475
  - spec/operations_spec.rb
509
- - spec/generators/uploadcare_config_generator_spec.rb
510
- - spec/spec_helper.rb
511
476
  - spec/view2.jpg
512
- - spec/tmp/config/uploadcare.yml
477
+ - spec/objects/file_spec.rb
478
+ - spec/objects/group_spec.rb
479
+ - spec/models/has_file_spec.rb
480
+ - spec/models/has_several_files_spec.rb
481
+ - spec/models/has_several_groups_spec.rb
482
+ - spec/models/has_group_spec.rb
483
+ - spec/models/has_both_file_and_group_spec.rb
513
484
  - spec/support/generators.rb
514
485
  - spec/view.png
515
486
  - spec/uploadcare_rails_settings_spec.rb
487
+ - spec/generators/uploadcare_config_generator_spec.rb
516
488
  - spec/caching/group_caching_spec.rb
517
489
  - spec/caching/file_caching_spec.rb
490
+ - spec/helpers/uploader_tags_spec.rb
491
+ - spec/helpers/formtastic_spec.rb
492
+ - spec/helpers/form_helpers_has_file_spec.rb
493
+ - spec/helpers/include_tags_spec.rb
494
+ - spec/helpers/form_helpers_has_group_spec.rb
495
+ - spec/helpers/form_helpers_spec.rb
496
+ - spec/helpers/simple_form_spec.rb
497
+ - spec/uploadcare/rails/settings_spec.rb