refinerycms-resources 4.0.3 → 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 +4 -4
  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 -119
  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 -0
  32. metadata.gz.sig +0 -1
@@ -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,131 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
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
- MIIEMjCCApqgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhnZW1z
16
- L0RDPXAvREM9YXJuZHQvREM9aW8wHhcNMTgxMDI5MDk0MjQ5WhcNMTkxMDI5MDk0
17
- MjQ5WjAjMSEwHwYDVQQDDBhnZW1zL0RDPXAvREM9YXJuZHQvREM9aW8wggGiMA0G
18
- CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQClF0/voptshDoTILFgUjvkViCOPe3W
19
- uuDwfSep+gc5AI83MmrmonN3L/dwm60D3HhZOtVt9el1n5E5b5aPzJngjdF9sFPX
20
- OIx3UlYde+WkzbG4iR2U0/8dMZ6DYuz6ijgPEpU1UKodUJVqEmt3Vc+rzDET9zoK
21
- TkIALNbSaV2G32ZDhoabeQJoJ0ce/2vjDqhM7awG7CYGRqRq4c0NOKKm0bGh+LOo
22
- vQNDvRjXPs0yp5i3keCgf6IcQ26nluqILYGPjuTExJj+k6AKfq6SPWDVtzSqdfiH
23
- STs/W85rwrKdLfEzfXxNsHvJ6Ryx+0A0hsNbfTTOhp4dkYm/6fyOejp7Of7qWRw/
24
- kJhI/PTq1gqh+Irpr+wUz04xItGE8WglKv1ydTUqBlCz2l9NfVTChtUpYlrk4FvN
25
- r7s6fcXH5cNX1ll2D1X2XLxmYEUgbAv5xApspvmpdRY5zlmSXZapi2KbW5iqpOV2
26
- luxRjhjfcOKfMugvGrMUFiqDaDi5IXS25KECAwEAAaNxMG8wCQYDVR0TBAIwADAL
27
- BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFLzeU7GH0rvnvDchSWtJhceiUDDTMBoGA1Ud
28
- EQQTMBGBD2dlbXNAcC5hcm5kdC5pbzAaBgNVHRIEEzARgQ9nZW1zQHAuYXJuZHQu
29
- aW8wDQYJKoZIhvcNAQELBQADggGBABMRA737G23Oiy1xBgVJsDW5LgGbeK9JQCC9
30
- eRdx22TDyrJ5vviqB22k13+zp/tq5fgeCsrk5iLAt5F/GgcP82p7pPm3qKi1QWip
31
- cnQvy5fLKcl+PaIX/+PYGVKUfV/wA+NuP06RSnzvNPepcUvbTJdAr6nQVdIh/ftB
32
- 64QhOWuk2CuGlt+tLMGbjR65W3SppBkvVd4yYHArbl4Z0qPG+TVrVrj2JEjo82rT
33
- jIUDLkdUlQ/FmH5fHhbrtn5PMCXjto414YBC7aQUxQsiNCN2qhsjwiyzVBbBTjnA
34
- 1sA043YnGOd1XylVtnrARK5eT7DhFGrMGMp/KvOg+T7q19+65jaopvHH4zFXzBcY
35
- MxlH/7tMQ5+DdHcqbu3SOAe1/VaaRk28J0CdPZS6Y60YuRqL17Zg2WOODiBkA9WE
36
- JjcyzdERZXsSPh+DT5PrllEbTNTZPbBcnAWjqdEWLtBIxD3JpgZHTmYP4I2ExAeu
37
- 2Oqsxsw30MIZnh2Cw/xLRkc1I50luA==
38
- -----END CERTIFICATE-----
39
- date: 2018-10-29 00:00:00.000000000 Z
12
+ cert_chain: []
13
+ date: 1980-01-02 00:00:00.000000000 Z
40
14
  dependencies:
41
- - !ruby/object:Gem::Dependency
42
- name: acts_as_indexed
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.8.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.8.0
55
- - !ruby/object:Gem::Dependency
56
- name: dragonfly
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.1'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 1.1.0
65
- type: :runtime
66
- prerelease: false
67
- version_requirements: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: '1.1'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 1.1.0
75
- - !ruby/object:Gem::Dependency
76
- name: globalize
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: 5.1.0.beta1
82
- - - "<"
83
- - !ruby/object:Gem::Version
84
- version: '5.2'
85
- type: :runtime
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: 5.1.0.beta1
92
- - - "<"
93
- - !ruby/object:Gem::Version
94
- version: '5.2'
95
- - !ruby/object:Gem::Dependency
96
- name: activemodel-serializers-xml
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - "~>"
100
- - !ruby/object:Gem::Version
101
- version: '1.0'
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 1.0.1
105
- type: :runtime
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '1.0'
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: 1.0.1
115
15
  - !ruby/object:Gem::Dependency
116
16
  name: refinerycms-core
117
17
  requirement: !ruby/object:Gem::Requirement
118
18
  requirements:
119
19
  - - '='
120
20
  - !ruby/object:Gem::Version
121
- version: 4.0.3
21
+ version: 4.1.0
122
22
  type: :runtime
123
23
  prerelease: false
124
24
  version_requirements: !ruby/object:Gem::Requirement
125
25
  requirements:
126
26
  - - '='
127
27
  - !ruby/object:Gem::Version
128
- version: 4.0.3
28
+ version: 4.1.0
129
29
  - !ruby/object:Gem::Dependency
130
30
  name: refinerycms-dragonfly
131
31
  requirement: !ruby/object:Gem::Requirement
@@ -141,12 +41,13 @@ dependencies:
141
41
  - !ruby/object:Gem::Version
142
42
  version: '1.0'
143
43
  description: Handles all file upload and processing functionality in Refinery CMS.
144
- email: refinerycms@p.arndt.io
44
+ email: gems@p.arndt.io
145
45
  executables: []
146
46
  extensions: []
147
47
  extra_rdoc_files: []
148
48
  files:
149
49
  - app/controllers/refinery/admin/resources_controller.rb
50
+ - app/helpers/refinery/admin/resource_helper.rb
150
51
  - app/models/refinery/resource.rb
151
52
  - app/views/refinery/admin/resources/_actions.html.erb
152
53
  - app/views/refinery/admin/resources/_existing_resource.html.erb
@@ -202,21 +103,22 @@ files:
202
103
  - lib/refinery/resources/validators.rb
203
104
  - lib/refinery/resources/validators/file_size_validator.rb
204
105
  - lib/refinerycms-resources.rb
106
+ - lib/refinerycms/resources.rb
205
107
  - license.md
206
108
  - refinerycms-resources.gemspec
207
109
  - spec/factories/resource.rb
208
- - spec/features/refinery/admin/resources_spec.rb
209
- - spec/fixtures/refinery_is_awesome.txt
210
- - 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
211
113
  - spec/lib/generators/refinery/resources/resources_generator_spec.rb
212
114
  - spec/lib/refinery/resources/engine_spec.rb
213
115
  - spec/models/refinery/resource_spec.rb
214
116
  - spec/spec_helper.rb
117
+ - spec/system/refinery/admin/resources_spec.rb
215
118
  homepage: https://www.refinerycms.com
216
119
  licenses:
217
120
  - MIT
218
121
  metadata: {}
219
- post_install_message:
220
122
  rdoc_options: []
221
123
  require_paths:
222
124
  - lib
@@ -224,24 +126,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
126
  requirements:
225
127
  - - ">="
226
128
  - !ruby/object:Gem::Version
227
- version: 2.2.2
129
+ version: '3.1'
228
130
  required_rubygems_version: !ruby/object:Gem::Requirement
229
131
  requirements:
230
132
  - - ">="
231
133
  - !ruby/object:Gem::Version
232
134
  version: '0'
233
135
  requirements: []
234
- rubyforge_project: refinerycms
235
- rubygems_version: 2.7.6
236
- signing_key:
136
+ rubygems_version: 4.0.6
237
137
  specification_version: 4
238
138
  summary: Resources extension for Refinery CMS
239
139
  test_files:
240
140
  - spec/factories/resource.rb
241
- - spec/features/refinery/admin/resources_spec.rb
242
- - spec/fixtures/refinery_is_awesome.txt
243
- - 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
244
144
  - spec/lib/generators/refinery/resources/resources_generator_spec.rb
245
145
  - spec/lib/refinery/resources/engine_spec.rb
246
146
  - spec/models/refinery/resource_spec.rb
247
147
  - spec/spec_helper.rb
148
+ - spec/system/refinery/admin/resources_spec.rb
checksums.yaml.gz.sig DELETED
Binary file