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
@@ -1,71 +0,0 @@
1
- defaults: &defaults
2
- public_key: "demopublickey" # replace it with your public key
3
- private_key: "demoprivatekey" # replace it with your private key
4
-
5
- # instances of widget initialized for you on page load
6
- live: true
7
-
8
- # cache files json dumps to prevent calling to server if it posible
9
- cache_files: true
10
-
11
- # cache groups json dumps to prevent calling to server if it posible
12
- cache_groups: true
13
-
14
- # store file or group after model is created or updated
15
- store_after_save: true
16
-
17
- # deletes file or group after model object is deleted
18
- delete_after_destroy: true
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
22
- # of putting this option here, as it will not have any effect.
23
- # But it also will not break anything.
24
-
25
- # for preview step use:
26
- # preview_step: false # true or false
27
-
28
- # for clearable option (allows user to remove uploaded file from widget) use:
29
- # clearable: false # true or false
30
-
31
- # for setting tabs use tabs option:
32
- # tabs: "url file facebook" # etc
33
- # read more here: https://uploadcare.com/documentation/widget/#tabs
34
- #
35
- # Full list of tabs:
36
- # |----------------------------------------|
37
- # | Code | File Source | Default |
38
- # |------------|-----------------|---------|
39
- # | url | Any URL | On |
40
- # | file | Local disk | On |
41
- # | facebook | Facebook | On |
42
- # | dropbox | Dropbox | Off |
43
- # | gdrive | Google Drive | On |
44
- # | box | Box | On |
45
- # | skydrive | SkyDrive | On |
46
- # | instagram | Instagram | On |
47
- # | evernote | Evernote | On |
48
- # | vk | VK | Off |
49
- # |________________________________________|
50
-
51
- # for locale option use:
52
- # locale: "en"
53
-
54
- # for autostore option use:
55
- # autostore: true #true or false
56
-
57
- # for manual start (which means you will need to initialize uploaders yourself) use:
58
- # manual_start: false # true or false
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
- development:
65
- <<: *defaults
66
-
67
- test:
68
- <<: *defaults
69
-
70
- production:
71
- <<: *defaults