uploadcare-rails 1.0.6 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/uploadcare.rb +22 -23
- data/lib/uploadcare-rails.rb +6 -5
- data/lib/uploadcare/rails/action_view/include_tags.rb +35 -26
- data/lib/uploadcare/rails/action_view/uploader_tags.rb +31 -29
- data/lib/uploadcare/rails/active_record/has_file.rb +14 -26
- data/lib/uploadcare/rails/active_record/has_group.rb +23 -22
- data/lib/uploadcare/rails/active_record/has_object.rb +3 -4
- data/lib/uploadcare/rails/engine.rb +3 -3
- data/lib/uploadcare/rails/formtastic/formtastic.rb +19 -15
- data/lib/uploadcare/rails/objects/file.rb +13 -25
- data/lib/uploadcare/rails/objects/group.rb +45 -22
- data/lib/uploadcare/rails/operations.rb +57 -0
- data/lib/uploadcare/rails/settings.rb +26 -30
- data/lib/uploadcare/rails/simple_form/simple_form.rb +22 -20
- data/lib/uploadcare/rails/version.rb +1 -1
- data/spec/caching/file_caching_spec.rb +16 -24
- data/spec/caching/group_caching_spec.rb +23 -26
- data/{app → spec/dummy/app}/assets/javascripts/uploadcare-1.5.5.min.js +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/config/routes.rb +2 -2
- data/spec/helpers/include_tags_spec.rb +41 -29
- data/spec/models/has_both_file_and_group_spec.rb +19 -17
- data/spec/models/has_file_spec.rb +46 -47
- data/spec/models/has_group_spec.rb +46 -32
- data/spec/objects/file_spec.rb +9 -11
- data/spec/objects/group_spec.rb +40 -29
- data/spec/operations_spec.rb +28 -0
- data/spec/spec_helper.rb +17 -5
- metadata +235 -199
- data/MIT-LICENSE +0 -20
- data/app/assets/javascripts/uploadcare-0.17.0.js +0 -8248
- data/app/assets/javascripts/uploadcare-0.17.0.min.js +0 -17
- data/app/assets/javascripts/uploadcare-0.18.3.js +0 -8484
- data/app/assets/javascripts/uploadcare-0.18.3.min.js +0 -17
- data/app/assets/javascripts/uploadcare-1.0.1.js +0 -8430
- data/app/assets/javascripts/uploadcare-1.0.1.min.js +0 -17
- data/app/assets/javascripts/uploadcare-1.3.1.js +0 -8563
- data/app/assets/javascripts/uploadcare-1.3.1.min.js +0 -17
- data/app/assets/javascripts/uploadcare-1.5.5.js +0 -9278
- data/app/assets/javascripts/uploadcare.js +0 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -2166
data/spec/objects/file_spec.rb
CHANGED
@@ -1,29 +1,27 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe Uploadcare::Rails::File do
|
4
|
-
|
5
|
-
|
6
|
-
@file = @post.file
|
7
|
-
end
|
3
|
+
describe Uploadcare::Rails::File, :vcr do
|
4
|
+
let(:post) { Post.new(title: "Post title", file: FILE_CDN_URL) }
|
5
|
+
let(:file) { post.file }
|
8
6
|
|
9
7
|
after :each do
|
10
8
|
Rails.cache.delete FILE_CDN_URL
|
11
9
|
end
|
12
10
|
|
13
11
|
it "should be Uploadcare::Rails::File" do
|
14
|
-
|
12
|
+
expect(file).to be_a(Uploadcare::Rails::File)
|
15
13
|
end
|
16
14
|
|
17
15
|
it "should be not loaded by default" do
|
18
|
-
|
16
|
+
expect(file).not_to be_loaded
|
19
17
|
end
|
20
18
|
|
21
19
|
it "should load itself" do
|
22
|
-
|
23
|
-
|
20
|
+
file.load
|
21
|
+
expect(file).to be_loaded
|
24
22
|
end
|
25
23
|
|
26
24
|
it "file should respond to :cdn_url and :to_s methods" do
|
27
|
-
|
25
|
+
expect(file.to_s).to eq file.cdn_url
|
28
26
|
end
|
29
|
-
end
|
27
|
+
end
|
data/spec/objects/group_spec.rb
CHANGED
@@ -1,40 +1,51 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Uploadcare::Rails::Group do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
3
|
+
describe Uploadcare::Rails::Group, :vcr do
|
4
|
+
let(:post) { PostWithCollection.new(title: 'Title', file: GROUP_CDN_URL) }
|
5
|
+
let(:group) { post.file }
|
6
|
+
let(:subject) { group }
|
8
7
|
|
9
|
-
|
10
|
-
Rails
|
11
|
-
|
8
|
+
describe 'instance' do
|
9
|
+
it 'is Uploadcare::Rails::Gropu' do
|
10
|
+
is_expected.to be_an(Uploadcare::Rails::Group)
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
it 'is not loaded by default' do
|
14
|
+
is_expected.not_to be_loaded
|
15
|
+
end
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
it 'responds to :uuid and :to_s methods' do
|
18
|
+
expect(group.to_s).to eq(subject.uuid)
|
19
|
+
end
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
@group.loaded?.should == true
|
24
|
-
end
|
22
|
+
describe 'loaded group', vcr: { cassette_name: :load_group} do
|
23
|
+
let(:subject) { group.load }
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
it 'loads itself' do
|
26
|
+
is_expected.to be_loaded
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'has files' do
|
30
|
+
expect(subject.files).to be_an(Array)
|
31
|
+
expect(subject.files.sample).to be_an(Uploadcare::Rails::File)
|
32
|
+
end
|
29
33
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@group.files.sample.should be_kind_of(Uploadcare::Rails::File)
|
34
|
+
it 'loaded group files should be loaded too' do
|
35
|
+
expect(subject.files.sample).to be_loaded
|
36
|
+
end
|
34
37
|
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
describe 'images workaround' do
|
40
|
+
it 'is an array' do
|
41
|
+
expect(subject.urls).to be_an(Array)
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'builds images url' do
|
45
|
+
expect(subject.urls(size: '200x200').first).
|
46
|
+
to eq(
|
47
|
+
"http://www.ucarecdn.com/#{ subject.uuid }/nth/0/-/resize/200x200/"
|
48
|
+
)
|
49
|
+
end
|
39
50
|
end
|
40
|
-
end
|
51
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Uploadcare::Rails do
|
4
|
+
let(:operations) do
|
5
|
+
{
|
6
|
+
format: :jpeg,
|
7
|
+
quality: :normal,
|
8
|
+
progressive: :yes,
|
9
|
+
preview: '200x150',
|
10
|
+
resize: '150x',
|
11
|
+
inline: '//overlay/:uuid/50%x50%/center/'
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
let(:subject) { Uploadcare::Rails::Operations.new(operations).to_s }
|
16
|
+
|
17
|
+
it { is_expected.to include('format/jpeg') }
|
18
|
+
it { is_expected.to include('quality/normal') }
|
19
|
+
it { is_expected.to include('progressive/yes') }
|
20
|
+
it { is_expected.to include('preview/200x150') }
|
21
|
+
it { is_expected.to include('resize/150x') }
|
22
|
+
it { is_expected.to include('/overlay/:uuid/50%x50%/center/') }
|
23
|
+
|
24
|
+
it do
|
25
|
+
is_expected.
|
26
|
+
to eq('-/format/jpeg/-/quality/normal/-/progressive/yes/-/preview/200x150/-/resize/150x/-/overlay/:uuid/50%x50%/center/')
|
27
|
+
end
|
28
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
-
ENV[
|
2
|
+
ENV['RAILS_ENV'] ||= 'test'
|
3
3
|
|
4
4
|
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
|
5
5
|
$LOAD_PATH << File.join(File.dirname(__FILE__))
|
@@ -8,14 +8,14 @@ require 'pry'
|
|
8
8
|
require File.expand_path("../dummy/config/environment", __FILE__)
|
9
9
|
require 'rspec/rails'
|
10
10
|
require 'rspec/autorun'
|
11
|
-
|
11
|
+
require 'vcr'
|
12
12
|
|
13
13
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
14
14
|
# in spec/support/ and its subdirectories.
|
15
|
-
Dir[Rails.root.join(
|
15
|
+
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
16
16
|
|
17
17
|
@file = File.open(File.join(File.dirname(__FILE__), 'view.png'))
|
18
|
-
@uploaded_file = UPLOADCARE_SETTINGS.api.upload
|
18
|
+
@uploaded_file = UPLOADCARE_SETTINGS.api.upload(@file)
|
19
19
|
@file_cdn_url = @uploaded_file.cdn_url
|
20
20
|
|
21
21
|
@file = File.open(File.join(File.dirname(__FILE__), 'view.png'))
|
@@ -50,10 +50,22 @@ RSpec.configure do |config|
|
|
50
50
|
# rspec-rails.
|
51
51
|
config.infer_base_class_for_anonymous_controllers = false
|
52
52
|
config.infer_spec_type_from_file_location!
|
53
|
-
|
53
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
54
54
|
# Run specs in random order to surface order dependencies. If you find an
|
55
55
|
# order dependency and want to debug it, you can fix the order by providing
|
56
56
|
# the seed, which is printed after each run.
|
57
57
|
# --seed 1234
|
58
58
|
# config.order = "random"
|
59
|
+
|
60
|
+
VCR.configure do |c|
|
61
|
+
c.cassette_library_dir = 'spec/cassettes'
|
62
|
+
c.hook_into :webmock
|
63
|
+
c.debug_logger = File.open('vcs.log', 'w')
|
64
|
+
c.default_cassette_options = {
|
65
|
+
match_requests_on: %i(method host path)
|
66
|
+
}
|
67
|
+
c.default_cassette_options = { record: :new_episodes }
|
68
|
+
c.configure_rspec_metadata!
|
69
|
+
end
|
59
70
|
end
|
71
|
+
|
metadata
CHANGED
@@ -1,319 +1,356 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uploadcare-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
7
|
+
- '@rastyagaev (Vadim Rastyagaev)'
|
8
|
+
- '@dimituri (Dimitry Solovyov)'
|
9
|
+
- '@romanonthego (Roman Dubinin)'
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '4'
|
22
|
+
- - <
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 5.1.0
|
22
25
|
type: :runtime
|
23
26
|
prerelease: false
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
25
28
|
requirements:
|
26
|
-
- -
|
29
|
+
- - '>='
|
27
30
|
- !ruby/object:Gem::Version
|
28
31
|
version: '4'
|
32
|
+
- - <
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 5.1.0
|
29
35
|
- !ruby/object:Gem::Dependency
|
30
36
|
name: uploadcare-ruby
|
31
37
|
requirement: !ruby/object:Gem::Requirement
|
32
38
|
requirements:
|
33
|
-
- -
|
39
|
+
- - ~>
|
34
40
|
- !ruby/object:Gem::Version
|
35
41
|
version: '1.0'
|
36
42
|
type: :runtime
|
37
43
|
prerelease: false
|
38
44
|
version_requirements: !ruby/object:Gem::Requirement
|
39
45
|
requirements:
|
40
|
-
- -
|
46
|
+
- - ~>
|
41
47
|
- !ruby/object:Gem::Version
|
42
48
|
version: '1.0'
|
43
49
|
- !ruby/object:Gem::Dependency
|
44
50
|
name: bundler
|
45
51
|
requirement: !ruby/object:Gem::Requirement
|
46
52
|
requirements:
|
47
|
-
- -
|
53
|
+
- - ~>
|
48
54
|
- !ruby/object:Gem::Version
|
49
55
|
version: '1.6'
|
50
56
|
type: :development
|
51
57
|
prerelease: false
|
52
58
|
version_requirements: !ruby/object:Gem::Requirement
|
53
59
|
requirements:
|
54
|
-
- -
|
60
|
+
- - ~>
|
55
61
|
- !ruby/object:Gem::Version
|
56
62
|
version: '1.6'
|
57
63
|
- !ruby/object:Gem::Dependency
|
58
64
|
name: sqlite3
|
59
65
|
requirement: !ruby/object:Gem::Requirement
|
60
66
|
requirements:
|
61
|
-
- -
|
67
|
+
- - '>='
|
62
68
|
- !ruby/object:Gem::Version
|
63
69
|
version: '0'
|
64
70
|
type: :development
|
65
71
|
prerelease: false
|
66
72
|
version_requirements: !ruby/object:Gem::Requirement
|
67
73
|
requirements:
|
68
|
-
- -
|
74
|
+
- - '>='
|
69
75
|
- !ruby/object:Gem::Version
|
70
76
|
version: '0'
|
71
77
|
- !ruby/object:Gem::Dependency
|
72
78
|
name: rspec
|
73
79
|
requirement: !ruby/object:Gem::Requirement
|
74
80
|
requirements:
|
75
|
-
- -
|
81
|
+
- - ~>
|
76
82
|
- !ruby/object:Gem::Version
|
77
83
|
version: '2'
|
78
84
|
type: :development
|
79
85
|
prerelease: false
|
80
86
|
version_requirements: !ruby/object:Gem::Requirement
|
81
87
|
requirements:
|
82
|
-
- -
|
88
|
+
- - ~>
|
83
89
|
- !ruby/object:Gem::Version
|
84
90
|
version: '2'
|
85
91
|
- !ruby/object:Gem::Dependency
|
86
92
|
name: rspec-rails
|
87
93
|
requirement: !ruby/object:Gem::Requirement
|
88
94
|
requirements:
|
89
|
-
- -
|
95
|
+
- - '>='
|
90
96
|
- !ruby/object:Gem::Version
|
91
97
|
version: '0'
|
92
98
|
type: :development
|
93
99
|
prerelease: false
|
94
100
|
version_requirements: !ruby/object:Gem::Requirement
|
95
101
|
requirements:
|
96
|
-
- -
|
102
|
+
- - '>='
|
97
103
|
- !ruby/object:Gem::Version
|
98
104
|
version: '0'
|
99
105
|
- !ruby/object:Gem::Dependency
|
100
106
|
name: webrat
|
101
107
|
requirement: !ruby/object:Gem::Requirement
|
102
108
|
requirements:
|
103
|
-
- -
|
109
|
+
- - '>='
|
104
110
|
- !ruby/object:Gem::Version
|
105
111
|
version: '0'
|
106
112
|
type: :development
|
107
113
|
prerelease: false
|
108
114
|
version_requirements: !ruby/object:Gem::Requirement
|
109
115
|
requirements:
|
110
|
-
- -
|
116
|
+
- - '>='
|
111
117
|
- !ruby/object:Gem::Version
|
112
118
|
version: '0'
|
113
119
|
- !ruby/object:Gem::Dependency
|
114
120
|
name: pry
|
115
121
|
requirement: !ruby/object:Gem::Requirement
|
116
122
|
requirements:
|
117
|
-
- -
|
123
|
+
- - '>='
|
118
124
|
- !ruby/object:Gem::Version
|
119
125
|
version: '0'
|
120
126
|
type: :development
|
121
127
|
prerelease: false
|
122
128
|
version_requirements: !ruby/object:Gem::Requirement
|
123
129
|
requirements:
|
124
|
-
- -
|
130
|
+
- - '>='
|
125
131
|
- !ruby/object:Gem::Version
|
126
132
|
version: '0'
|
127
133
|
- !ruby/object:Gem::Dependency
|
128
134
|
name: pry-rails
|
129
135
|
requirement: !ruby/object:Gem::Requirement
|
130
136
|
requirements:
|
131
|
-
- -
|
137
|
+
- - '>='
|
132
138
|
- !ruby/object:Gem::Version
|
133
139
|
version: '0'
|
134
140
|
type: :development
|
135
141
|
prerelease: false
|
136
142
|
version_requirements: !ruby/object:Gem::Requirement
|
137
143
|
requirements:
|
138
|
-
- -
|
144
|
+
- - '>='
|
139
145
|
- !ruby/object:Gem::Version
|
140
146
|
version: '0'
|
141
147
|
- !ruby/object:Gem::Dependency
|
142
148
|
name: better_errors
|
143
149
|
requirement: !ruby/object:Gem::Requirement
|
144
150
|
requirements:
|
145
|
-
- -
|
151
|
+
- - '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
type: :development
|
155
|
+
prerelease: false
|
156
|
+
version_requirements: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - '>='
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
- !ruby/object:Gem::Dependency
|
162
|
+
name: guard-rspec
|
163
|
+
requirement: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - '>='
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
type: :development
|
169
|
+
prerelease: false
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - '>='
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: webmock
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - '>='
|
146
180
|
- !ruby/object:Gem::Version
|
147
181
|
version: '0'
|
148
182
|
type: :development
|
149
183
|
prerelease: false
|
150
184
|
version_requirements: !ruby/object:Gem::Requirement
|
151
185
|
requirements:
|
152
|
-
- -
|
186
|
+
- - '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
- !ruby/object:Gem::Dependency
|
190
|
+
name: vcr
|
191
|
+
requirement: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
type: :development
|
197
|
+
prerelease: false
|
198
|
+
version_requirements: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - '>='
|
153
201
|
- !ruby/object:Gem::Version
|
154
202
|
version: '0'
|
155
203
|
- !ruby/object:Gem::Dependency
|
156
204
|
name: simple_form
|
157
205
|
requirement: !ruby/object:Gem::Requirement
|
158
206
|
requirements:
|
159
|
-
- -
|
207
|
+
- - '>='
|
160
208
|
- !ruby/object:Gem::Version
|
161
209
|
version: '0'
|
162
210
|
type: :development
|
163
211
|
prerelease: false
|
164
212
|
version_requirements: !ruby/object:Gem::Requirement
|
165
213
|
requirements:
|
166
|
-
- -
|
214
|
+
- - '>='
|
167
215
|
- !ruby/object:Gem::Version
|
168
216
|
version: '0'
|
169
217
|
- !ruby/object:Gem::Dependency
|
170
218
|
name: formtastic
|
171
219
|
requirement: !ruby/object:Gem::Requirement
|
172
220
|
requirements:
|
173
|
-
- -
|
221
|
+
- - ~>
|
174
222
|
- !ruby/object:Gem::Version
|
175
223
|
version: '3.0'
|
176
224
|
type: :development
|
177
225
|
prerelease: false
|
178
226
|
version_requirements: !ruby/object:Gem::Requirement
|
179
227
|
requirements:
|
180
|
-
- -
|
228
|
+
- - ~>
|
181
229
|
- !ruby/object:Gem::Version
|
182
230
|
version: '3.0'
|
183
|
-
description:
|
184
|
-
|
231
|
+
description: |2
|
232
|
+
Rails wrapper for Uploadcare service.
|
233
|
+
Based on uploadcare-ruby gem (https://github.com/uploadcare/uploadcare-ruby)
|
185
234
|
email:
|
186
235
|
- hello@uploadcare.com
|
187
236
|
executables: []
|
188
237
|
extensions: []
|
189
238
|
extra_rdoc_files: []
|
190
239
|
files:
|
191
|
-
- MIT-LICENSE
|
192
|
-
- Rakefile
|
193
|
-
- app/assets/javascripts/uploadcare-0.17.0.js
|
194
|
-
- app/assets/javascripts/uploadcare-0.17.0.min.js
|
195
|
-
- app/assets/javascripts/uploadcare-0.18.3.js
|
196
|
-
- app/assets/javascripts/uploadcare-0.18.3.min.js
|
197
|
-
- app/assets/javascripts/uploadcare-1.0.1.js
|
198
|
-
- app/assets/javascripts/uploadcare-1.0.1.min.js
|
199
|
-
- app/assets/javascripts/uploadcare-1.3.1.js
|
200
|
-
- app/assets/javascripts/uploadcare-1.3.1.min.js
|
201
|
-
- app/assets/javascripts/uploadcare-1.5.5.js
|
202
|
-
- app/assets/javascripts/uploadcare-1.5.5.min.js
|
203
|
-
- app/assets/javascripts/uploadcare.js
|
204
|
-
- config/initializers/uploadcare.rb
|
205
240
|
- config/uploadcare_defaults.yml
|
206
|
-
-
|
241
|
+
- config/initializers/uploadcare.rb
|
207
242
|
- lib/generators/uploadcare_config_generator.rb
|
243
|
+
- lib/generators/templates/uploadcare_config_template.yml
|
208
244
|
- lib/tasks/uploadcare_rails_tasks.rake
|
209
245
|
- lib/uploadcare-rails.rb
|
210
|
-
- lib/uploadcare/rails/
|
246
|
+
- lib/uploadcare/rails/settings.rb
|
211
247
|
- lib/uploadcare/rails/action_view/uploader_tags.rb
|
248
|
+
- lib/uploadcare/rails/action_view/include_tags.rb
|
249
|
+
- lib/uploadcare/rails/formtastic/formtastic.rb
|
212
250
|
- lib/uploadcare/rails/active_record/has_file.rb
|
213
|
-
- lib/uploadcare/rails/active_record/has_group.rb
|
214
251
|
- lib/uploadcare/rails/active_record/has_object.rb
|
215
|
-
- lib/uploadcare/rails/
|
216
|
-
- lib/uploadcare/rails/
|
252
|
+
- lib/uploadcare/rails/active_record/has_group.rb
|
253
|
+
- lib/uploadcare/rails/version.rb
|
217
254
|
- lib/uploadcare/rails/objects/file.rb
|
218
255
|
- lib/uploadcare/rails/objects/group.rb
|
219
|
-
- lib/uploadcare/rails/
|
256
|
+
- lib/uploadcare/rails/engine.rb
|
257
|
+
- lib/uploadcare/rails/operations.rb
|
220
258
|
- lib/uploadcare/rails/simple_form/simple_form.rb
|
221
|
-
-
|
259
|
+
- Rakefile
|
260
|
+
- spec/view2.jpg
|
261
|
+
- spec/spec_helper.rb
|
262
|
+
- spec/operations_spec.rb
|
263
|
+
- spec/uploadcare_rails_settings_spec.rb
|
222
264
|
- spec/caching/file_caching_spec.rb
|
223
265
|
- spec/caching/group_caching_spec.rb
|
224
|
-
- spec/dummy/
|
225
|
-
- spec/dummy/
|
226
|
-
- spec/dummy/app/
|
227
|
-
- spec/dummy/app/
|
228
|
-
- spec/dummy/app/
|
229
|
-
- spec/dummy/app/
|
230
|
-
- spec/dummy/app/
|
231
|
-
- spec/dummy/app/
|
232
|
-
- spec/dummy/app/
|
233
|
-
- spec/dummy/app/
|
234
|
-
- spec/dummy/app/
|
266
|
+
- spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
|
267
|
+
- spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
|
268
|
+
- spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
|
269
|
+
- spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
|
270
|
+
- spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
|
271
|
+
- spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
|
272
|
+
- spec/dummy/app/views/post_with_collections/edit.html.erb
|
273
|
+
- spec/dummy/app/views/post_with_collections/_form.html.erb
|
274
|
+
- spec/dummy/app/views/post_with_collections/show.json.jbuilder
|
275
|
+
- spec/dummy/app/views/post_with_collections/new.html.erb
|
276
|
+
- spec/dummy/app/views/post_with_collections/index.html.erb
|
277
|
+
- spec/dummy/app/views/post_with_collections/show.html.erb
|
278
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
279
|
+
- spec/dummy/app/views/posts/edit.html.erb
|
280
|
+
- spec/dummy/app/views/posts/_form.html.erb
|
281
|
+
- spec/dummy/app/views/posts/post.json.builder
|
282
|
+
- spec/dummy/app/views/posts/new.html.erb
|
283
|
+
- spec/dummy/app/views/posts/index.html.erb
|
284
|
+
- spec/dummy/app/views/posts/show.html.erb
|
285
|
+
- spec/dummy/app/models/posts_with_collection_and_file.rb
|
286
|
+
- spec/dummy/app/models/post_with_collection.rb
|
287
|
+
- spec/dummy/app/models/post.rb
|
288
|
+
- spec/dummy/app/controllers/posts_controller.rb
|
235
289
|
- spec/dummy/app/controllers/application_controller.rb
|
236
290
|
- spec/dummy/app/controllers/post_with_collections_controller.rb
|
237
|
-
- spec/dummy/app/controllers/posts_controller.rb
|
238
291
|
- spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb
|
239
292
|
- spec/dummy/app/helpers/application_helper.rb
|
240
293
|
- spec/dummy/app/helpers/post_with_collections_helper.rb
|
241
294
|
- spec/dummy/app/helpers/posts_helper.rb
|
242
295
|
- spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb
|
243
|
-
- spec/dummy/app/
|
244
|
-
- spec/dummy/app/
|
245
|
-
- spec/dummy/app/
|
246
|
-
- spec/dummy/app/
|
247
|
-
- spec/dummy/app/
|
248
|
-
- spec/dummy/app/
|
249
|
-
- spec/dummy/app/
|
250
|
-
- spec/dummy/app/
|
251
|
-
- spec/dummy/app/
|
252
|
-
- spec/dummy/app/
|
253
|
-
- spec/dummy/app/views/posts/_form.html.erb
|
254
|
-
- spec/dummy/app/views/posts/edit.html.erb
|
255
|
-
- spec/dummy/app/views/posts/index.html.erb
|
256
|
-
- spec/dummy/app/views/posts/new.html.erb
|
257
|
-
- spec/dummy/app/views/posts/post.json.builder
|
258
|
-
- spec/dummy/app/views/posts/show.html.erb
|
259
|
-
- spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
|
260
|
-
- spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
|
261
|
-
- spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
|
262
|
-
- spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
|
263
|
-
- spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
|
264
|
-
- spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
|
265
|
-
- spec/dummy/bin/bundle
|
266
|
-
- spec/dummy/bin/rails
|
296
|
+
- spec/dummy/app/assets/javascripts/post_with_collections.js
|
297
|
+
- spec/dummy/app/assets/javascripts/posts.js
|
298
|
+
- spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js
|
299
|
+
- spec/dummy/app/assets/javascripts/uploadcare-1.5.5.min.js
|
300
|
+
- spec/dummy/app/assets/javascripts/application.js
|
301
|
+
- spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css
|
302
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
303
|
+
- spec/dummy/app/assets/stylesheets/post_with_collections.css
|
304
|
+
- spec/dummy/app/assets/stylesheets/posts.css
|
305
|
+
- spec/dummy/app/assets/stylesheets/scaffold.css
|
267
306
|
- spec/dummy/bin/rake
|
307
|
+
- spec/dummy/bin/rails
|
308
|
+
- spec/dummy/bin/bundle
|
309
|
+
- spec/dummy/README.rdoc
|
268
310
|
- spec/dummy/config.ru
|
269
|
-
- spec/dummy/
|
270
|
-
- spec/dummy/
|
271
|
-
- spec/dummy/
|
311
|
+
- spec/dummy/db/migrate/20131119080328_create_posts.rb
|
312
|
+
- spec/dummy/db/migrate/20131220083857_create_post_with_collections.rb
|
313
|
+
- spec/dummy/db/migrate/20140320092807_create_posts_with_collection_and_files.rb
|
314
|
+
- spec/dummy/db/schema.rb
|
315
|
+
- spec/dummy/public/404.html
|
316
|
+
- spec/dummy/public/422.html
|
317
|
+
- spec/dummy/public/favicon.ico
|
318
|
+
- spec/dummy/public/500.html
|
319
|
+
- spec/dummy/lib/templates/erb/scaffold/_form.html.erb
|
272
320
|
- spec/dummy/config/environment.rb
|
321
|
+
- spec/dummy/config/application.rb
|
273
322
|
- spec/dummy/config/environments/development.rb
|
274
323
|
- spec/dummy/config/environments/production.rb
|
275
324
|
- spec/dummy/config/environments/test.rb
|
325
|
+
- spec/dummy/config/locales/en.yml
|
326
|
+
- spec/dummy/config/locales/simple_form.en.yml
|
327
|
+
- spec/dummy/config/routes.rb
|
328
|
+
- spec/dummy/config/boot.rb
|
329
|
+
- spec/dummy/config/initializers/simple_form.rb
|
276
330
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
277
|
-
- spec/dummy/config/initializers/
|
331
|
+
- spec/dummy/config/initializers/session_store.rb
|
278
332
|
- spec/dummy/config/initializers/formtastic.rb
|
333
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
334
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
335
|
+
- spec/dummy/config/initializers/secret_token.rb
|
279
336
|
- spec/dummy/config/initializers/inflections.rb
|
280
337
|
- spec/dummy/config/initializers/mime_types.rb
|
281
|
-
- spec/dummy/config/initializers/secret_token.rb
|
282
|
-
- spec/dummy/config/initializers/session_store.rb
|
283
|
-
- spec/dummy/config/initializers/simple_form.rb
|
284
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
285
|
-
- spec/dummy/config/locales/en.yml
|
286
|
-
- spec/dummy/config/locales/simple_form.en.yml
|
287
|
-
- spec/dummy/config/routes.rb
|
288
338
|
- spec/dummy/config/uploadcare.yml
|
289
|
-
- spec/dummy/
|
290
|
-
- spec/dummy/
|
291
|
-
- spec/
|
292
|
-
- spec/
|
293
|
-
- spec/
|
294
|
-
- spec/dummy/lib/templates/erb/scaffold/_form.html.erb
|
295
|
-
- spec/dummy/log/development.log
|
296
|
-
- spec/dummy/log/test.log
|
297
|
-
- spec/dummy/public/404.html
|
298
|
-
- spec/dummy/public/422.html
|
299
|
-
- spec/dummy/public/500.html
|
300
|
-
- spec/dummy/public/favicon.ico
|
301
|
-
- spec/helpers/form_helpers_has_file_spec.rb
|
302
|
-
- spec/helpers/form_helpers_has_group_spec.rb
|
303
|
-
- spec/helpers/form_helpers_spec.rb
|
304
|
-
- spec/helpers/formtastic_spec.rb
|
305
|
-
- spec/helpers/include_tags_spec.rb
|
306
|
-
- spec/helpers/simple_form_spec.rb
|
307
|
-
- spec/helpers/uploader_tags_spec.rb
|
339
|
+
- spec/dummy/config/database.yml
|
340
|
+
- spec/dummy/Rakefile
|
341
|
+
- spec/objects/group_spec.rb
|
342
|
+
- spec/objects/file_spec.rb
|
343
|
+
- spec/models/has_group_spec.rb
|
308
344
|
- spec/models/has_both_file_and_group_spec.rb
|
309
345
|
- spec/models/has_file_spec.rb
|
310
|
-
- spec/models/has_group_spec.rb
|
311
|
-
- spec/objects/file_spec.rb
|
312
|
-
- spec/objects/group_spec.rb
|
313
|
-
- spec/spec_helper.rb
|
314
|
-
- spec/uploadcare_rails_settings_spec.rb
|
315
346
|
- spec/view.png
|
316
|
-
- spec/
|
347
|
+
- spec/helpers/include_tags_spec.rb
|
348
|
+
- spec/helpers/simple_form_spec.rb
|
349
|
+
- spec/helpers/form_helpers_spec.rb
|
350
|
+
- spec/helpers/form_helpers_has_group_spec.rb
|
351
|
+
- spec/helpers/formtastic_spec.rb
|
352
|
+
- spec/helpers/form_helpers_has_file_spec.rb
|
353
|
+
- spec/helpers/uploader_tags_spec.rb
|
317
354
|
homepage: https://uploadcare.com/documentation/libs/
|
318
355
|
licenses:
|
319
356
|
- MIT
|
@@ -326,113 +363,112 @@ require_paths:
|
|
326
363
|
- lib
|
327
364
|
required_ruby_version: !ruby/object:Gem::Requirement
|
328
365
|
requirements:
|
329
|
-
- -
|
366
|
+
- - '>='
|
330
367
|
- !ruby/object:Gem::Version
|
331
368
|
version: '0'
|
332
369
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
333
370
|
requirements:
|
334
|
-
- -
|
371
|
+
- - '>='
|
335
372
|
- !ruby/object:Gem::Version
|
336
373
|
version: '0'
|
337
374
|
requirements: []
|
338
375
|
rubyforge_project:
|
339
|
-
rubygems_version: 2.
|
376
|
+
rubygems_version: 2.0.14
|
340
377
|
signing_key:
|
341
378
|
specification_version: 4
|
342
379
|
summary: Rails gem for Uploadcare
|
343
380
|
test_files:
|
381
|
+
- spec/view2.jpg
|
382
|
+
- spec/spec_helper.rb
|
383
|
+
- spec/operations_spec.rb
|
384
|
+
- spec/uploadcare_rails_settings_spec.rb
|
344
385
|
- spec/caching/file_caching_spec.rb
|
345
386
|
- spec/caching/group_caching_spec.rb
|
346
|
-
- spec/dummy/app/
|
347
|
-
- spec/dummy/app/
|
348
|
-
- spec/dummy/app/
|
349
|
-
- spec/dummy/app/
|
350
|
-
- spec/dummy/app/
|
351
|
-
- spec/dummy/app/
|
352
|
-
- spec/dummy/app/
|
353
|
-
- spec/dummy/app/
|
354
|
-
- spec/dummy/app/
|
387
|
+
- spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
|
388
|
+
- spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
|
389
|
+
- spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
|
390
|
+
- spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
|
391
|
+
- spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
|
392
|
+
- spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
|
393
|
+
- spec/dummy/app/views/post_with_collections/edit.html.erb
|
394
|
+
- spec/dummy/app/views/post_with_collections/_form.html.erb
|
395
|
+
- spec/dummy/app/views/post_with_collections/show.json.jbuilder
|
396
|
+
- spec/dummy/app/views/post_with_collections/new.html.erb
|
397
|
+
- spec/dummy/app/views/post_with_collections/index.html.erb
|
398
|
+
- spec/dummy/app/views/post_with_collections/show.html.erb
|
399
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
400
|
+
- spec/dummy/app/views/posts/edit.html.erb
|
401
|
+
- spec/dummy/app/views/posts/_form.html.erb
|
402
|
+
- spec/dummy/app/views/posts/post.json.builder
|
403
|
+
- spec/dummy/app/views/posts/new.html.erb
|
404
|
+
- spec/dummy/app/views/posts/index.html.erb
|
405
|
+
- spec/dummy/app/views/posts/show.html.erb
|
406
|
+
- spec/dummy/app/models/posts_with_collection_and_file.rb
|
407
|
+
- spec/dummy/app/models/post_with_collection.rb
|
408
|
+
- spec/dummy/app/models/post.rb
|
409
|
+
- spec/dummy/app/controllers/posts_controller.rb
|
355
410
|
- spec/dummy/app/controllers/application_controller.rb
|
356
411
|
- spec/dummy/app/controllers/post_with_collections_controller.rb
|
357
|
-
- spec/dummy/app/controllers/posts_controller.rb
|
358
412
|
- spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb
|
359
413
|
- spec/dummy/app/helpers/application_helper.rb
|
360
414
|
- spec/dummy/app/helpers/post_with_collections_helper.rb
|
361
415
|
- spec/dummy/app/helpers/posts_helper.rb
|
362
416
|
- spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb
|
363
|
-
- spec/dummy/app/
|
364
|
-
- spec/dummy/app/
|
365
|
-
- spec/dummy/app/
|
366
|
-
- spec/dummy/app/
|
367
|
-
- spec/dummy/app/
|
368
|
-
- spec/dummy/app/
|
369
|
-
- spec/dummy/app/
|
370
|
-
- spec/dummy/app/
|
371
|
-
- spec/dummy/app/
|
372
|
-
- spec/dummy/app/
|
373
|
-
- spec/dummy/app/views/posts/_form.html.erb
|
374
|
-
- spec/dummy/app/views/posts/edit.html.erb
|
375
|
-
- spec/dummy/app/views/posts/index.html.erb
|
376
|
-
- spec/dummy/app/views/posts/new.html.erb
|
377
|
-
- spec/dummy/app/views/posts/post.json.builder
|
378
|
-
- spec/dummy/app/views/posts/show.html.erb
|
379
|
-
- spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb
|
380
|
-
- spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb
|
381
|
-
- spec/dummy/app/views/posts_with_collection_and_files/index.html.erb
|
382
|
-
- spec/dummy/app/views/posts_with_collection_and_files/new.html.erb
|
383
|
-
- spec/dummy/app/views/posts_with_collection_and_files/show.html.erb
|
384
|
-
- spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder
|
385
|
-
- spec/dummy/bin/bundle
|
386
|
-
- spec/dummy/bin/rails
|
417
|
+
- spec/dummy/app/assets/javascripts/post_with_collections.js
|
418
|
+
- spec/dummy/app/assets/javascripts/posts.js
|
419
|
+
- spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js
|
420
|
+
- spec/dummy/app/assets/javascripts/uploadcare-1.5.5.min.js
|
421
|
+
- spec/dummy/app/assets/javascripts/application.js
|
422
|
+
- spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css
|
423
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
424
|
+
- spec/dummy/app/assets/stylesheets/post_with_collections.css
|
425
|
+
- spec/dummy/app/assets/stylesheets/posts.css
|
426
|
+
- spec/dummy/app/assets/stylesheets/scaffold.css
|
387
427
|
- spec/dummy/bin/rake
|
388
|
-
- spec/dummy/
|
389
|
-
- spec/dummy/
|
390
|
-
- spec/dummy/
|
428
|
+
- spec/dummy/bin/rails
|
429
|
+
- spec/dummy/bin/bundle
|
430
|
+
- spec/dummy/README.rdoc
|
431
|
+
- spec/dummy/config.ru
|
432
|
+
- spec/dummy/db/migrate/20131119080328_create_posts.rb
|
433
|
+
- spec/dummy/db/migrate/20131220083857_create_post_with_collections.rb
|
434
|
+
- spec/dummy/db/migrate/20140320092807_create_posts_with_collection_and_files.rb
|
435
|
+
- spec/dummy/db/schema.rb
|
436
|
+
- spec/dummy/public/404.html
|
437
|
+
- spec/dummy/public/422.html
|
438
|
+
- spec/dummy/public/favicon.ico
|
439
|
+
- spec/dummy/public/500.html
|
440
|
+
- spec/dummy/lib/templates/erb/scaffold/_form.html.erb
|
391
441
|
- spec/dummy/config/environment.rb
|
442
|
+
- spec/dummy/config/application.rb
|
392
443
|
- spec/dummy/config/environments/development.rb
|
393
444
|
- spec/dummy/config/environments/production.rb
|
394
445
|
- spec/dummy/config/environments/test.rb
|
446
|
+
- spec/dummy/config/locales/en.yml
|
447
|
+
- spec/dummy/config/locales/simple_form.en.yml
|
448
|
+
- spec/dummy/config/routes.rb
|
449
|
+
- spec/dummy/config/boot.rb
|
450
|
+
- spec/dummy/config/initializers/simple_form.rb
|
395
451
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
396
|
-
- spec/dummy/config/initializers/
|
452
|
+
- spec/dummy/config/initializers/session_store.rb
|
397
453
|
- spec/dummy/config/initializers/formtastic.rb
|
454
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
455
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
456
|
+
- spec/dummy/config/initializers/secret_token.rb
|
398
457
|
- spec/dummy/config/initializers/inflections.rb
|
399
458
|
- spec/dummy/config/initializers/mime_types.rb
|
400
|
-
- spec/dummy/config/initializers/secret_token.rb
|
401
|
-
- spec/dummy/config/initializers/session_store.rb
|
402
|
-
- spec/dummy/config/initializers/simple_form.rb
|
403
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
404
|
-
- spec/dummy/config/locales/en.yml
|
405
|
-
- spec/dummy/config/locales/simple_form.en.yml
|
406
|
-
- spec/dummy/config/routes.rb
|
407
459
|
- spec/dummy/config/uploadcare.yml
|
408
|
-
- spec/dummy/config.
|
409
|
-
- spec/dummy/db/migrate/20131119080328_create_posts.rb
|
410
|
-
- spec/dummy/db/migrate/20131220083857_create_post_with_collections.rb
|
411
|
-
- spec/dummy/db/migrate/20140320092807_create_posts_with_collection_and_files.rb
|
412
|
-
- spec/dummy/db/schema.rb
|
413
|
-
- spec/dummy/db/test.sqlite3
|
414
|
-
- spec/dummy/lib/templates/erb/scaffold/_form.html.erb
|
415
|
-
- spec/dummy/log/development.log
|
416
|
-
- spec/dummy/log/test.log
|
417
|
-
- spec/dummy/public/404.html
|
418
|
-
- spec/dummy/public/422.html
|
419
|
-
- spec/dummy/public/500.html
|
420
|
-
- spec/dummy/public/favicon.ico
|
460
|
+
- spec/dummy/config/database.yml
|
421
461
|
- spec/dummy/Rakefile
|
422
|
-
- spec/
|
423
|
-
- spec/
|
424
|
-
- spec/
|
425
|
-
- spec/helpers/form_helpers_spec.rb
|
426
|
-
- spec/helpers/formtastic_spec.rb
|
427
|
-
- spec/helpers/include_tags_spec.rb
|
428
|
-
- spec/helpers/simple_form_spec.rb
|
429
|
-
- spec/helpers/uploader_tags_spec.rb
|
462
|
+
- spec/objects/group_spec.rb
|
463
|
+
- spec/objects/file_spec.rb
|
464
|
+
- spec/models/has_group_spec.rb
|
430
465
|
- spec/models/has_both_file_and_group_spec.rb
|
431
466
|
- spec/models/has_file_spec.rb
|
432
|
-
- spec/models/has_group_spec.rb
|
433
|
-
- spec/objects/file_spec.rb
|
434
|
-
- spec/objects/group_spec.rb
|
435
|
-
- spec/spec_helper.rb
|
436
|
-
- spec/uploadcare_rails_settings_spec.rb
|
437
467
|
- spec/view.png
|
438
|
-
- spec/
|
468
|
+
- spec/helpers/include_tags_spec.rb
|
469
|
+
- spec/helpers/simple_form_spec.rb
|
470
|
+
- spec/helpers/form_helpers_spec.rb
|
471
|
+
- spec/helpers/form_helpers_has_group_spec.rb
|
472
|
+
- spec/helpers/formtastic_spec.rb
|
473
|
+
- spec/helpers/form_helpers_has_file_spec.rb
|
474
|
+
- spec/helpers/uploader_tags_spec.rb
|