refinerycms-resources 4.0.4 → 4.1.1

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 (29) 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 -17
  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 +21 -90
  27. data/spec/features/refinery/admin/resources_spec.rb +0 -172
  28. data/spec/fixtures/refinery_is_awesome.txt +0 -1
  29. data/spec/fixtures/refinery_is_awesome2.txt +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,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.4
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Arndt
8
+ - David Jones
8
9
  - Uģis Ozols
9
- - Rob Yurkowski
10
+ - Brice Sanchez
10
11
  bindir: bin
11
12
  cert_chain: []
12
13
  date: 1980-01-02 00:00:00.000000000 Z
13
14
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: acts_as_indexed
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: 0.8.0
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: 0.8.0
28
- - !ruby/object:Gem::Dependency
29
- name: dragonfly
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '1.1'
35
- - - ">="
36
- - !ruby/object:Gem::Version
37
- version: 1.1.0
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- requirements:
42
- - - "~>"
43
- - !ruby/object:Gem::Version
44
- version: '1.1'
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 1.1.0
48
- - !ruby/object:Gem::Dependency
49
- name: globalize
50
- requirement: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 5.1.0.beta1
55
- - - "<"
56
- - !ruby/object:Gem::Version
57
- version: '5.2'
58
- type: :runtime
59
- prerelease: false
60
- version_requirements: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 5.1.0.beta1
65
- - - "<"
66
- - !ruby/object:Gem::Version
67
- version: '5.2'
68
- - !ruby/object:Gem::Dependency
69
- name: activemodel-serializers-xml
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '1.0'
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: 1.0.1
78
- type: :runtime
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "~>"
83
- - !ruby/object:Gem::Version
84
- version: '1.0'
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: 1.0.1
88
15
  - !ruby/object:Gem::Dependency
89
16
  name: refinerycms-core
90
17
  requirement: !ruby/object:Gem::Requirement
91
18
  requirements:
92
19
  - - '='
93
20
  - !ruby/object:Gem::Version
94
- version: 4.0.4
21
+ version: 4.1.1
95
22
  type: :runtime
96
23
  prerelease: false
97
24
  version_requirements: !ruby/object:Gem::Requirement
98
25
  requirements:
99
26
  - - '='
100
27
  - !ruby/object:Gem::Version
101
- version: 4.0.4
28
+ version: 4.1.1
102
29
  - !ruby/object:Gem::Dependency
103
30
  name: refinerycms-dragonfly
104
31
  requirement: !ruby/object:Gem::Requirement
105
32
  requirements:
106
33
  - - "~>"
107
34
  - !ruby/object:Gem::Version
108
- version: '1.0'
35
+ version: '1.1'
109
36
  - - ">="
110
37
  - !ruby/object:Gem::Version
111
- version: 1.0.2
38
+ version: 1.1.1
112
39
  type: :runtime
113
40
  prerelease: false
114
41
  version_requirements: !ruby/object:Gem::Requirement
115
42
  requirements:
116
43
  - - "~>"
117
44
  - !ruby/object:Gem::Version
118
- version: '1.0'
45
+ version: '1.1'
119
46
  - - ">="
120
47
  - !ruby/object:Gem::Version
121
- version: 1.0.2
48
+ version: 1.1.1
122
49
  description: Handles all file upload and processing functionality in Refinery CMS.
123
- email: refinerycms@p.arndt.io
50
+ email: gems@p.arndt.io
124
51
  executables: []
125
52
  extensions: []
126
53
  extra_rdoc_files: []
127
54
  files:
128
55
  - app/controllers/refinery/admin/resources_controller.rb
56
+ - app/helpers/refinery/admin/resource_helper.rb
129
57
  - app/models/refinery/resource.rb
130
58
  - app/views/refinery/admin/resources/_actions.html.erb
131
59
  - app/views/refinery/admin/resources/_existing_resource.html.erb
@@ -181,16 +109,18 @@ files:
181
109
  - lib/refinery/resources/validators.rb
182
110
  - lib/refinery/resources/validators/file_size_validator.rb
183
111
  - lib/refinerycms-resources.rb
112
+ - lib/refinerycms/resources.rb
184
113
  - license.md
185
114
  - refinerycms-resources.gemspec
186
115
  - spec/factories/resource.rb
187
- - spec/features/refinery/admin/resources_spec.rb
188
- - spec/fixtures/refinery_is_awesome.txt
189
- - spec/fixtures/refinery_is_awesome2.txt
116
+ - spec/fixtures/cape-town-tide-table.pdf
117
+ - spec/fixtures/cape-town-tide-table2.pdf
118
+ - spec/fixtures/refinery_is_secure.html
190
119
  - spec/lib/generators/refinery/resources/resources_generator_spec.rb
191
120
  - spec/lib/refinery/resources/engine_spec.rb
192
121
  - spec/models/refinery/resource_spec.rb
193
122
  - spec/spec_helper.rb
123
+ - spec/system/refinery/admin/resources_spec.rb
194
124
  homepage: https://www.refinerycms.com
195
125
  licenses:
196
126
  - MIT
@@ -202,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
132
  requirements:
203
133
  - - ">="
204
134
  - !ruby/object:Gem::Version
205
- version: 2.2.2
135
+ version: '3.1'
206
136
  required_rubygems_version: !ruby/object:Gem::Requirement
207
137
  requirements:
208
138
  - - ">="
@@ -214,10 +144,11 @@ specification_version: 4
214
144
  summary: Resources extension for Refinery CMS
215
145
  test_files:
216
146
  - spec/factories/resource.rb
217
- - spec/features/refinery/admin/resources_spec.rb
218
- - spec/fixtures/refinery_is_awesome.txt
219
- - spec/fixtures/refinery_is_awesome2.txt
147
+ - spec/fixtures/cape-town-tide-table.pdf
148
+ - spec/fixtures/cape-town-tide-table2.pdf
149
+ - spec/fixtures/refinery_is_secure.html
220
150
  - spec/lib/generators/refinery/resources/resources_generator_spec.rb
221
151
  - spec/lib/refinery/resources/engine_spec.rb
222
152
  - spec/models/refinery/resource_spec.rb
223
153
  - spec/spec_helper.rb
154
+ - spec/system/refinery/admin/resources_spec.rb