refinerycms-resources 4.0.2 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +5 -5
  2. data/app/controllers/refinery/admin/resources_controller.rb +17 -9
  3. data/app/helpers/refinery/admin/resource_helper.rb +10 -0
  4. data/app/models/refinery/resource.rb +17 -12
  5. data/app/views/refinery/admin/resources/_existing_resource.html.erb +21 -14
  6. data/app/views/refinery/admin/resources/_form.html.erb +2 -2
  7. data/app/views/refinery/admin/resources/_resource.html.erb +8 -26
  8. data/app/views/refinery/admin/resources/_resources.html.erb +2 -2
  9. data/config/locales/en.yml +3 -1
  10. data/config/locales/fr.yml +3 -1
  11. data/config/locales/sk.yml +5 -0
  12. data/db/migrate/20150430180959_add_translated_title_to_refinery_resources.rb +13 -7
  13. data/lib/generators/refinery/resources/templates/config/initializers/refinery/resources.rb.erb +3 -0
  14. data/lib/refinery/resources/configuration.rb +40 -4
  15. data/lib/refinery/resources/validators/file_size_validator.rb +3 -4
  16. data/lib/refinery/resources.rb +3 -3
  17. data/lib/refinerycms/resources.rb +1 -0
  18. data/refinerycms-resources.gemspec +13 -22
  19. data/spec/factories/resource.rb +4 -2
  20. data/spec/fixtures/cape-town-tide-table.pdf +0 -0
  21. data/spec/fixtures/cape-town-tide-table2.pdf +0 -0
  22. data/spec/fixtures/refinery_is_secure.html +1 -0
  23. data/spec/lib/refinery/resources/engine_spec.rb +12 -0
  24. data/spec/models/refinery/resource_spec.rb +80 -54
  25. data/spec/system/refinery/admin/resources_spec.rb +213 -0
  26. metadata +20 -115
  27. checksums.yaml.gz.sig +0 -0
  28. data/spec/features/refinery/admin/resources_spec.rb +0 -172
  29. data/spec/fixtures/refinery_is_awesome.txt +0 -1
  30. data/spec/fixtures/refinery_is_awesome2.txt +0 -1
  31. data.tar.gz.sig +0 -1
  32. metadata.gz.sig +0 -0
@@ -1,63 +1,67 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  module Refinery
4
- describe Resource, :type => :model do
6
+ describe Resource, type: :model do
5
7
  let(:resource) { FactoryBot.create(:resource) }
6
- let(:titled_resource) { FactoryBot.create(:resource, resource_title: 'Resource Title')}
8
+ let(:titled_resource) { FactoryBot.create(:resource, resource_title: 'Resource Title') }
7
9
 
8
- context "with valid attributes" do
9
- it "should create successfully" do
10
+ context 'with valid attributes' do
11
+ it 'should create successfully' do
10
12
  expect(resource.errors).to be_empty
11
13
  end
12
14
  end
13
15
 
14
- context "resource url" do
15
- it "should respond to .url" do
16
+ context 'resource url' do
17
+ it 'should respond to .url' do
16
18
  expect(resource).to respond_to(:url)
17
19
  end
18
20
 
19
- it "should not support thumbnailing like images do" do
21
+ it 'should not support thumbnailing like images do' do
20
22
  expect(resource).not_to respond_to(:thumbnail)
21
23
  end
22
24
 
23
- it "should contain its filename at the end" do
25
+ it 'should contain its filename at the end' do
24
26
  expect(resource.url.split('/').last).to match(/\A#{resource.file_name}/)
25
27
  end
26
28
 
27
- context "when Dragonfly.verify_urls is true" do
29
+ context 'when Dragonfly.verify_urls is true' do
28
30
  before do
29
31
  allow(Refinery::Resources).to receive(:dragonfly_verify_urls).and_return(true)
30
32
  ::Refinery::Dragonfly.configure!(Refinery::Resources)
31
33
  end
32
34
 
33
- it "returns a url with an SHA parameter" do
35
+ it 'returns a url with an SHA parameter' do
34
36
  expect(resource.url).to match(/\?sha=[\da-fA-F]{16}\z/)
35
37
  end
36
38
  end
37
39
 
38
- context "when Dragonfly.verify_urls is false" do
40
+ context 'when Dragonfly.verify_urls is false' do
39
41
  before do
40
42
  allow(Refinery::Resources).to receive(:dragonfly_verify_urls).and_return(false)
41
43
  ::Refinery::Dragonfly.configure!(Refinery::Resources)
42
44
  end
43
- it "returns a url without an SHA parameter" do
45
+
46
+ it 'returns a url without an SHA parameter' do
44
47
  expect(resource.url).not_to match(/\?sha=[\da-fA-F]{16}\z/)
45
48
  end
46
49
  end
47
50
  end
48
51
 
49
- describe "#type_of_content" do
50
- it "returns formated mime type" do
51
- expect(resource.type_of_content).to eq("text plain")
52
+ describe '#type_of_content' do
53
+ it 'returns formated mime type' do
54
+ expect(resource.type_of_content).to eq('application pdf')
52
55
  end
53
56
  end
54
57
 
55
- describe "#title" do
58
+ describe '#title' do
56
59
  context 'when a specific title has not been given' do
57
- it "returns a titleized version of the filename" do
58
- expect(resource.title).to eq("Refinery Is Awesome")
60
+ it 'returns a titleized version of the filename' do
61
+ expect(resource.title).to eq('Cape Town Tide Table')
59
62
  end
60
63
  end
64
+
61
65
  context 'when a specific title has been given' do
62
66
  it 'returns that title' do
63
67
  expect(titled_resource.title).to eq('Resource Title')
@@ -65,93 +69,115 @@ module Refinery
65
69
  end
66
70
  end
67
71
 
68
- describe ".per_page" do
69
- context "dialog is true" do
70
- it "returns resource count specified by Resources.pages_per_dialog option" do
72
+ describe '.per_page' do
73
+ context 'dialog is true' do
74
+ it 'returns resource count specified by Resources.pages_per_dialog option' do
71
75
  expect(Resource.per_page(true)).to eq(Resources.pages_per_dialog)
72
76
  end
73
77
  end
74
78
 
75
- context "dialog is false" do
76
- it "returns resource count specified by Resources.pages_per_admin_index constant" do
79
+ context 'dialog is false' do
80
+ it 'returns resource count specified by Resources.pages_per_admin_index constant' do
77
81
  expect(Resource.per_page).to eq(Resources.pages_per_admin_index)
78
82
  end
79
83
  end
80
84
  end
81
85
 
82
- describe ".create_resources" do
83
- let(:file) { Refinery.roots('refinery/resources').join("spec/fixtures/refinery_is_awesome.txt") }
86
+ describe '.create_resources' do
87
+ let(:file) { Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table.pdf') }
84
88
 
85
- context "only one resource uploaded" do
86
- it "returns an array containing one resource" do
87
- expect(Resource.create_resources(:file => file).size).to eq(1)
89
+ context 'only one resource uploaded' do
90
+ it 'returns an array containing one resource' do
91
+ expect(Resource.create_resources(file: file).size).to eq(1)
88
92
  end
89
93
  end
90
94
 
91
- context "many resources uploaded at once" do
92
- it "returns an array containing all those resources" do
93
- expect(Resource.create_resources(:file => [file, file, file]).size).to eq(3)
95
+ context 'many resources uploaded at once' do
96
+ it 'returns an array containing all those resources' do
97
+ expect(Resource.create_resources(file: [file, file, file]).size).to eq(3)
94
98
  end
95
99
  end
96
100
 
97
- specify "each returned array item should be an instance of resource" do
98
- Resource.create_resources(:file => [file, file, file]).each do |r|
99
- expect(r).to be_an_instance_of(Resource)
101
+ specify 'each returned item should be an instance of resource' do
102
+ Resource.create_resources(file: [file, file, file]).each do |resource|
103
+ expect(resource).to be_an_instance_of(Resource)
100
104
  end
101
105
  end
102
106
 
103
- specify "each returned array item should be passed form parameters" do
104
- params = {:file => [file, file, file], :fake_param => 'blah'}
107
+ specify 'each returned array item should should be processed with other form parameters' do
108
+ params = { file: [file, file, file], file_mime_type: 'application/pdf' }
105
109
 
106
- expect(Resource).to receive(:create).exactly(3).times.with({:file => file, :fake_param => 'blah'})
110
+ expect(Resource).to receive(:create).exactly(3).times.with({file: file,
111
+ file_mime_type: 'application/pdf'
112
+ })
107
113
  Resource.create_resources(params)
108
114
  end
109
115
  end
110
116
 
111
- describe "validations" do
112
- describe "valid #file" do
117
+ describe 'validations' do
118
+ describe 'valid #file' do
113
119
  before do
114
- @file = Refinery.roots('refinery/resources').join("spec/fixtures/refinery_is_awesome.txt")
120
+ @file = Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table.pdf')
121
+ Resources.max_file_size = (File.read(@file).size + 1000)
122
+ end
123
+
124
+ it 'should be valid when size does not exceed .max_file_size' do
125
+ expect(Resource.new(file: @file)).to be_valid
126
+ end
127
+ end
128
+
129
+ describe 'wrong mime_type #file' do
130
+ before do
131
+ @file = Refinery.roots('refinery/resources').join('spec/fixtures/refinery_is_secure.html')
115
132
  Resources.max_file_size = (File.read(@file).size + 10)
133
+ @resource = Resource.new(file: @file)
134
+ end
135
+
136
+ it 'should not be valid when mime_type is not in .whitelisted_mime_types' do
137
+ expect(@resource).not_to be_valid
116
138
  end
117
139
 
118
- it "should be valid when size does not exceed .max_file_size" do
119
- expect(Resource.new(:file => @file)).to be_valid
140
+ it 'should contain an error message' do
141
+ @resource.valid?
142
+ expect(@resource.errors).not_to be_empty
143
+ expect(@resource.errors[:file]).to eq(Array(::I18n.t(
144
+ 'incorrect_format', scope: 'activerecord.errors.models.refinery/resource'
145
+ )))
120
146
  end
121
147
  end
122
148
 
123
- describe "too large #file" do
149
+ describe 'too large #file' do
124
150
  before do
125
- @file = Refinery.roots('refinery/resources').join("spec/fixtures/refinery_is_awesome.txt")
151
+ @file = Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table.pdf')
126
152
  Resources.max_file_size = (File.read(@file).size - 10)
127
- @resource = Resource.new(:file => @file)
153
+ @resource = Resource.new(file: @file)
128
154
  end
129
155
 
130
- it "should not be valid when size exceeds .max_file_size" do
156
+ it 'should not be valid when size exceeds .max_file_size' do
131
157
  expect(@resource).not_to be_valid
132
158
  end
133
159
 
134
- it "should contain an error message" do
160
+ it 'should contain an error message' do
135
161
  @resource.valid?
136
162
  expect(@resource.errors).not_to be_empty
137
163
  expect(@resource.errors[:file]).to eq(Array(::I18n.t(
138
- 'too_big', :scope => 'activerecord.errors.models.refinery/resource',
139
- :size => Resources.max_file_size
140
- )))
164
+ 'too_big', scope: 'activerecord.errors.models.refinery/resource',
165
+ size: Resources.max_file_size
166
+ )))
141
167
  end
142
168
  end
143
169
 
144
- describe "invalid argument for #file" do
170
+ describe 'invalid argument for #file' do
145
171
  before do
146
172
  @resource = Resource.new
147
173
  end
148
174
 
149
- it "has an error message" do
175
+ it 'has an error message' do
150
176
  @resource.valid?
151
177
  expect(@resource.errors).not_to be_empty
152
178
  expect(@resource.errors[:file]).to eq(Array(::I18n.t(
153
- 'blank', :scope => 'activerecord.errors.models.refinery/resource'
154
- )))
179
+ 'blank', scope: 'activerecord.errors.models.refinery/resource'
180
+ )))
155
181
  end
156
182
  end
157
183
  end
@@ -0,0 +1,213 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ module Refinery
6
+ module Admin
7
+ describe 'Resources', type: :system do
8
+ refinery_login
9
+
10
+ context 'when no files' do
11
+ it 'invites to upload file' do
12
+ visit refinery.admin_resources_path
13
+ expect(page).to have_content('There are no files yet. Click "Upload new file" to add your first file.')
14
+ end
15
+
16
+ it 'shows flash notice after successful upload' do
17
+ visit refinery.new_admin_resource_path
18
+
19
+ attach_file 'resource_file', Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table.pdf')
20
+ fill_in 'resource_resource_title', with: 'Tide Table'
21
+ click_button 'Save'
22
+
23
+ expect(page).to have_content("'Tide Table' was successfully added.")
24
+ expect(page).to have_current_path(refinery.admin_resources_path)
25
+ end
26
+ end
27
+
28
+ it 'shows upload file link' do
29
+ visit refinery.admin_resources_path
30
+ expect(page).to have_content('Upload new file')
31
+ expect(page).to have_selector('a[href*="/refinery/resources/new"]')
32
+ end
33
+
34
+ context 'new/create' do
35
+ def uploading_a_file
36
+ visit refinery.admin_resources_path
37
+ find('a', text: 'Upload new file').click
38
+ page.within_frame('dialog_iframe') do
39
+ attach_file 'resource_file', file_path
40
+ click_button ::I18n.t('save', scope: 'refinery.admin.form_actions')
41
+ end
42
+ end
43
+
44
+ context 'when the file mime_type is acceptable' do
45
+ let(:file_path) { Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table.pdf') }
46
+
47
+ it 'the file is uploaded', js: true do
48
+ expect { uploading_a_file }.to change(Refinery::Resource, :count).by(1)
49
+ end
50
+ end
51
+
52
+ context 'when the file mime_type is not acceptable' do
53
+ let(:file_path) { Refinery.roots('refinery/resources').join('spec/fixtures/refinery_is_secure.html') }
54
+
55
+ it 'the file is rejected', js: true do
56
+ expect { uploading_a_file }.to_not change(Refinery::Resource, :count)
57
+ page.within_frame('dialog_iframe') do
58
+ expect(page).to have_content(::I18n.t('incorrect_format', scope: 'activerecord.errors.models.refinery/resource'))
59
+ end
60
+ end
61
+ end
62
+
63
+ describe 'max file size' do
64
+ before do
65
+ allow(Refinery::Resources).to receive(:max_file_size).and_return('1224')
66
+ end
67
+
68
+ context 'in english' do
69
+ before do
70
+ allow(Refinery::I18n).to receive(:current_locale).and_return(:en)
71
+ end
72
+
73
+ it 'is shown in English' do
74
+ visit refinery.admin_resources_path
75
+ click_link 'Upload new file'
76
+
77
+ within '#file' do
78
+ expect(page).to have_selector('a[tooltip="The maximum file size is 1.2 KB."]')
79
+ end
80
+ end
81
+ end
82
+
83
+ context 'in danish' do
84
+ before do
85
+ allow(Refinery::I18n).to receive(:current_locale).and_return(:da)
86
+ end
87
+
88
+ it 'is shown in Danish' do
89
+ visit refinery.admin_resources_path
90
+
91
+ click_link 'Tilføj en ny fil'
92
+ within '#file' do
93
+ expect(page).to have_selector('a[tooltip="Filen må maksimalt fylde 1,2 kB."]')
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
99
+
100
+ context 'edit/update' do
101
+ let!(:resource) { FactoryBot.create(:resource) }
102
+
103
+ it 'updates file' do
104
+ visit refinery.admin_resources_path
105
+ expect(page).to have_content('Cape Town Tide Table')
106
+ expect(page).to have_selector("a[href='/refinery/resources/#{resource.id}/edit']")
107
+
108
+ click_link 'Edit this file'
109
+
110
+ expect(page).to have_content('Cape Town Tide Table or replace it with this one...')
111
+ expect(page).to have_selector("a[href*='/refinery/resources']")
112
+
113
+ attach_file 'resource_file', Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table2.pdf')
114
+ click_button 'Save'
115
+
116
+ expect(page).to have_content('Cape Town Tide Table2')
117
+ expect(Refinery::Resource.count).to eq(1)
118
+ end
119
+
120
+ describe 'translate' do
121
+ before do
122
+ allow(Refinery::I18n).to receive(:frontend_locales).and_return(%i[en fr])
123
+ end
124
+
125
+ it 'can have a second locale added to it' do
126
+ visit refinery.admin_resources_path
127
+ expect(page).to have_content('Cape Town Tide Table')
128
+ expect(page).to have_selector("a[href='/refinery/resources/#{resource.id}/edit']")
129
+
130
+ click_link 'Edit this file'
131
+
132
+ within '#switch_locale_picker' do
133
+ click_link 'fr'
134
+ end
135
+
136
+ fill_in 'Title', with: 'Premier fichier'
137
+ click_button 'Save'
138
+
139
+ expect(page).to have_content("'Premier fichier' was successfully updated.")
140
+ expect(Resource::Translation.count).to eq(1)
141
+ end
142
+ end
143
+ end
144
+
145
+ context 'destroy' do
146
+ context 'when resource_title is empty' do
147
+ let!(:resource) { FactoryBot.create(:resource) }
148
+
149
+ it 'shows filename in confirmation', js: true do
150
+ visit refinery.admin_resources_path
151
+ delete_link = find('a[tooltip="Remove this file forever"]')
152
+ expect(delete_link['data-confirm']).to eq("Are you sure you want to remove 'Cape Town Tide Table'?")
153
+ end
154
+
155
+ it 'removes file' do
156
+ visit refinery.admin_resources_path
157
+ expect(page).to have_selector("a[href='/refinery/resources/#{resource.id}']")
158
+
159
+ click_link 'Remove this file forever'
160
+
161
+ expect(page).to have_content("'Cape Town Tide Table' was successfully removed.")
162
+ expect(Refinery::Resource.count).to eq(0)
163
+ end
164
+ end
165
+
166
+ context 'when resource_title is set' do
167
+ let!(:resource) { FactoryBot.create(:resource, resource_title: 'My Custom Title') }
168
+
169
+ it 'shows resource_title in confirmation', js: true do
170
+ visit refinery.admin_resources_path
171
+ delete_link = find('a[tooltip="Remove this file forever"]')
172
+ expect(delete_link['data-confirm']).to eq("Are you sure you want to remove 'My Custom Title'?")
173
+ end
174
+ end
175
+ end
176
+
177
+ context 'download' do
178
+ let!(:resource) { FactoryBot.create(:resource) }
179
+
180
+ it 'succeeds' do
181
+ visit refinery.admin_resources_path
182
+
183
+ click_link 'Download this file'
184
+
185
+ expect(page.body[0, 4]).to eq('%PDF')
186
+ end
187
+
188
+ context 'when the extension is mounted with a named space' do
189
+ before do
190
+ Rails.application.routes.draw do
191
+ mount Refinery::Core::Engine, at: '/about'
192
+ end
193
+ Rails.application.routes_reloader.reload!
194
+ end
195
+
196
+ after do
197
+ Rails.application.routes.draw do
198
+ mount Refinery::Core::Engine, at: '/'
199
+ end
200
+ end
201
+
202
+ it 'succeeds' do
203
+ visit refinery.admin_resources_path
204
+
205
+ click_link 'Download this file'
206
+
207
+ expect(page.body[0, 4]).to eq('%PDF')
208
+ end
209
+ end
210
+ end
211
+ end
212
+ end
213
+ end
metadata CHANGED
@@ -1,127 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Arndt
8
+ - David Jones
8
9
  - Uģis Ozols
9
- - Rob Yurkowski
10
- autorequire:
10
+ - Brice Sanchez
11
11
  bindir: bin
12
- cert_chain:
13
- - |
14
- -----BEGIN CERTIFICATE-----
15
- MIIDhjCCAm6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBNMQ0wCwYDVQQDDARnZW1z
16
- MREwDwYKCZImiZPyLGQBGRYBcDEVMBMGCgmSJomT8ixkARkWBWFybmR0MRIwEAYK
17
- CZImiZPyLGQBGRYCaW8wHhcNMTcwNzI1MTMxMjIwWhcNMTgwNzI1MTMxMjIwWjBN
18
- MQ0wCwYDVQQDDARnZW1zMREwDwYKCZImiZPyLGQBGRYBcDEVMBMGCgmSJomT8ixk
19
- ARkWBWFybmR0MRIwEAYKCZImiZPyLGQBGRYCaW8wggEiMA0GCSqGSIb3DQEBAQUA
20
- A4IBDwAwggEKAoIBAQDrjwB8be48TFEvGweP7BwWFnmsL2IMU9Ts2UKKWK9GYr7Z
21
- 5uNZFmO1yVBCrmUQHHDlpku6SN6HDO8ChDL7LNugz/4eapRTifHZl8jhPRsOLBcF
22
- 1hANy/V2v5NNkL5Zvb+vsUa7lyjbIOoD5yYzSDl4/T0nOe6xYzxJgBuxZK/nWSOe
23
- Db8Uffc7B4yhA2kuayUiQUXPYAoPdfUSxoTKDohw17Sm6LKTpg8GkT0ttof1a/xu
24
- vdsTvZHIcTsYv16e+8SrwLRZ/iBVVsyZFkMYPMxemw7WHxmWElWIgW9S7pUK5Q7J
25
- oMS5uJVbtV2EmV+cOnhOWDz1A16P7QRFmGje5L+vAgMBAAGjcTBvMAkGA1UdEwQC
26
- MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ7G/yxuQIzgszkOkaZBgoKBJ1rozAa
27
- BgNVHREEEzARgQ9nZW1zQHAuYXJuZHQuaW8wGgYDVR0SBBMwEYEPZ2Vtc0BwLmFy
28
- bmR0LmlvMA0GCSqGSIb3DQEBBQUAA4IBAQB12WMsC+yuuIeM0Ib6HUYZ2IbhRnuW
29
- 4uydNRvKDPdwzjChnOI0POGpcL8O1s1gh+19o/ITq6zRfTLhkwR2ir7XfwHJNppJ
30
- yg48wbdL5gpZwggKWggKX5G9pqv9LjRsSAew6r0WB+5KW+ArCl/iNo9+AdeR3nUx
31
- I+L/QiUxYU6XAXSrczL/i7kF5Xc3ZXQYuFsyGW9plA3i9faWUMvGKQc6pvUHIUZC
32
- jOQmH9VbgbfUrXYM1YOKdlwW5sPR1f4PKLDlvEE+bppIUgKOgLOIv3i7KwrGvFOq
33
- 5r7Wz/HY31SM47mkK21saPJG4NvUFEycf0wlpzP657Pl9aVo47aKKbxX
34
- -----END CERTIFICATE-----
35
- date: 2018-05-21 00:00:00.000000000 Z
12
+ cert_chain: []
13
+ date: 1980-01-02 00:00:00.000000000 Z
36
14
  dependencies:
37
- - !ruby/object:Gem::Dependency
38
- name: acts_as_indexed
39
- requirement: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: 0.8.0
44
- type: :runtime
45
- prerelease: false
46
- version_requirements: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - "~>"
49
- - !ruby/object:Gem::Version
50
- version: 0.8.0
51
- - !ruby/object:Gem::Dependency
52
- name: dragonfly
53
- requirement: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - "~>"
56
- - !ruby/object:Gem::Version
57
- version: '1.1'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 1.1.0
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '1.1'
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: 1.1.0
71
- - !ruby/object:Gem::Dependency
72
- name: globalize
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: 5.1.0.beta1
78
- - - "<"
79
- - !ruby/object:Gem::Version
80
- version: '5.2'
81
- type: :runtime
82
- prerelease: false
83
- version_requirements: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: 5.1.0.beta1
88
- - - "<"
89
- - !ruby/object:Gem::Version
90
- version: '5.2'
91
- - !ruby/object:Gem::Dependency
92
- name: activemodel-serializers-xml
93
- requirement: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: '1.0'
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: 1.0.1
101
- type: :runtime
102
- prerelease: false
103
- version_requirements: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - "~>"
106
- - !ruby/object:Gem::Version
107
- version: '1.0'
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: 1.0.1
111
15
  - !ruby/object:Gem::Dependency
112
16
  name: refinerycms-core
113
17
  requirement: !ruby/object:Gem::Requirement
114
18
  requirements:
115
19
  - - '='
116
20
  - !ruby/object:Gem::Version
117
- version: 4.0.2
21
+ version: 4.1.0
118
22
  type: :runtime
119
23
  prerelease: false
120
24
  version_requirements: !ruby/object:Gem::Requirement
121
25
  requirements:
122
26
  - - '='
123
27
  - !ruby/object:Gem::Version
124
- version: 4.0.2
28
+ version: 4.1.0
125
29
  - !ruby/object:Gem::Dependency
126
30
  name: refinerycms-dragonfly
127
31
  requirement: !ruby/object:Gem::Requirement
@@ -137,12 +41,13 @@ dependencies:
137
41
  - !ruby/object:Gem::Version
138
42
  version: '1.0'
139
43
  description: Handles all file upload and processing functionality in Refinery CMS.
140
- email: refinerycms@p.arndt.io
44
+ email: gems@p.arndt.io
141
45
  executables: []
142
46
  extensions: []
143
47
  extra_rdoc_files: []
144
48
  files:
145
49
  - app/controllers/refinery/admin/resources_controller.rb
50
+ - app/helpers/refinery/admin/resource_helper.rb
146
51
  - app/models/refinery/resource.rb
147
52
  - app/views/refinery/admin/resources/_actions.html.erb
148
53
  - app/views/refinery/admin/resources/_existing_resource.html.erb
@@ -198,21 +103,22 @@ files:
198
103
  - lib/refinery/resources/validators.rb
199
104
  - lib/refinery/resources/validators/file_size_validator.rb
200
105
  - lib/refinerycms-resources.rb
106
+ - lib/refinerycms/resources.rb
201
107
  - license.md
202
108
  - refinerycms-resources.gemspec
203
109
  - spec/factories/resource.rb
204
- - spec/features/refinery/admin/resources_spec.rb
205
- - spec/fixtures/refinery_is_awesome.txt
206
- - spec/fixtures/refinery_is_awesome2.txt
110
+ - spec/fixtures/cape-town-tide-table.pdf
111
+ - spec/fixtures/cape-town-tide-table2.pdf
112
+ - spec/fixtures/refinery_is_secure.html
207
113
  - spec/lib/generators/refinery/resources/resources_generator_spec.rb
208
114
  - spec/lib/refinery/resources/engine_spec.rb
209
115
  - spec/models/refinery/resource_spec.rb
210
116
  - spec/spec_helper.rb
117
+ - spec/system/refinery/admin/resources_spec.rb
211
118
  homepage: https://www.refinerycms.com
212
119
  licenses:
213
120
  - MIT
214
121
  metadata: {}
215
- post_install_message:
216
122
  rdoc_options: []
217
123
  require_paths:
218
124
  - lib
@@ -220,24 +126,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
126
  requirements:
221
127
  - - ">="
222
128
  - !ruby/object:Gem::Version
223
- version: 2.2.2
129
+ version: '3.1'
224
130
  required_rubygems_version: !ruby/object:Gem::Requirement
225
131
  requirements:
226
132
  - - ">="
227
133
  - !ruby/object:Gem::Version
228
134
  version: '0'
229
135
  requirements: []
230
- rubyforge_project: refinerycms
231
- rubygems_version: 2.6.13
232
- signing_key:
136
+ rubygems_version: 4.0.6
233
137
  specification_version: 4
234
138
  summary: Resources extension for Refinery CMS
235
139
  test_files:
236
140
  - spec/factories/resource.rb
237
- - spec/features/refinery/admin/resources_spec.rb
238
- - spec/fixtures/refinery_is_awesome.txt
239
- - spec/fixtures/refinery_is_awesome2.txt
141
+ - spec/fixtures/cape-town-tide-table.pdf
142
+ - spec/fixtures/cape-town-tide-table2.pdf
143
+ - spec/fixtures/refinery_is_secure.html
240
144
  - spec/lib/generators/refinery/resources/resources_generator_spec.rb
241
145
  - spec/lib/refinery/resources/engine_spec.rb
242
146
  - spec/models/refinery/resource_spec.rb
243
147
  - spec/spec_helper.rb
148
+ - spec/system/refinery/admin/resources_spec.rb
checksums.yaml.gz.sig DELETED
Binary file