sufia 6.6.0 → 6.6.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +12 -0
- data/.travis.yml +2 -2
- data/Gemfile +1 -1
- data/History.md +8 -0
- data/SUFIA_VERSION +1 -1
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +2 -2
- data/app/helpers/generic_file_helper.rb +1 -1
- data/app/helpers/sufia/sufia_helper_behavior.rb +1 -1
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/users_controller_spec.rb +13 -0
- data/spec/helpers/generic_file_helper_spec.rb +11 -0
- data/spec/helpers/sufia_helper_spec.rb +14 -0
- data/spec/models/ability_spec.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ebe5a7ba6376387d3c17bfa1f4faaf98d43bb5
|
4
|
+
data.tar.gz: 313535cd837f9640ad3d5c0b2b1d26157d006c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dccece1330a5ee29a1232710a63e31188f306ee4f6e1552e5e8522fa59a7bf420d2215f4b8a6ec3f96be5f8c53109fa9f01167a7a842d2967a517cfdab935bcf
|
7
|
+
data.tar.gz: e489a1d9a56ad351fb46106e30e8818ce8d8930b703ea01efad2eb22afa870dcd7e0449de36563f8f6771d00a76a55cc5f743dd5d6ebe100f92cb1f754da0c54
|
data/.rubocop.yml
CHANGED
@@ -124,6 +124,12 @@ Style/ClassVars:
|
|
124
124
|
Style/SignalException:
|
125
125
|
Enabled: false
|
126
126
|
|
127
|
+
Style/ZeroLengthPredicate:
|
128
|
+
Exclude:
|
129
|
+
- 'app/controllers/concerns/sufia/files_controller_behavior.rb'
|
130
|
+
- 'sufia-models/app/services/sufia/generic_file_audit_service.rb'
|
131
|
+
- 'sufia-models/app/models/concerns/sufia/file_stat_utils.rb'
|
132
|
+
|
127
133
|
Rails:
|
128
134
|
Enabled: true
|
129
135
|
|
@@ -162,3 +168,9 @@ RSpec/DescribeClass:
|
|
162
168
|
- 'spec/views/**/*'
|
163
169
|
- 'spec/routing/**/*'
|
164
170
|
- 'spec/inputs/**/*'
|
171
|
+
|
172
|
+
RSpec/AnyInstance:
|
173
|
+
Enabled: false
|
174
|
+
|
175
|
+
RSpec/NotToNot:
|
176
|
+
Enabled: false
|
data/.travis.yml
CHANGED
@@ -6,12 +6,12 @@ rvm:
|
|
6
6
|
matrix:
|
7
7
|
include:
|
8
8
|
- rvm: 2.1
|
9
|
-
env: "RAILS_VERSION=4.2.
|
9
|
+
env: "RAILS_VERSION=4.2.6"
|
10
10
|
env:
|
11
11
|
global:
|
12
12
|
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
13
13
|
matrix:
|
14
|
-
- "RAILS_VERSION=4.2.
|
14
|
+
- "RAILS_VERSION=4.2.6"
|
15
15
|
notifications:
|
16
16
|
irc:
|
17
17
|
channels:
|
data/Gemfile
CHANGED
@@ -12,7 +12,7 @@ group :development, :test do
|
|
12
12
|
gem "simplecov", require: false
|
13
13
|
gem 'byebug' unless ENV['CI']
|
14
14
|
gem 'coveralls', require: false
|
15
|
-
gem 'rubocop', '~> 0.
|
15
|
+
gem 'rubocop', '~> 0.37.2', require: false
|
16
16
|
gem 'rubocop-rspec', require: false
|
17
17
|
end
|
18
18
|
|
data/History.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
# History of Sufia releases
|
2
|
+
## 6.6.1
|
3
|
+
* Upping the versions for 6.6.1 release [Carolyn Cole]
|
4
|
+
* Removing group and login from profile update [Carolyn Cole]
|
5
|
+
* Test with Rails 4.2.6 [Justin Coyne]
|
6
|
+
* Add auto-fix + exclusions for new Rubocop violations [Michael J. Giarlo]
|
7
|
+
* Temporarily pin Rubocop to get past broken 0.38.0 error [Michael J. Giarlo]
|
8
|
+
* Hydra-Jetty should be the default service container in 6.x. [Michael J. Giarlo]
|
9
|
+
* Escape property values before presenting them with auto_link. [Olli Lyytinen]
|
2
10
|
|
3
11
|
## 6.6.0
|
4
12
|
* Update background workers doc [E. Lynette Rayle]
|
data/SUFIA_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.6.
|
1
|
+
6.6.1
|
@@ -106,9 +106,9 @@ module Sufia::UsersControllerBehavior
|
|
106
106
|
protected
|
107
107
|
|
108
108
|
def user_params
|
109
|
-
params.require(:user).permit(:
|
109
|
+
params.require(:user).permit(:display_name, :address, :admin_area,
|
110
110
|
:department, :title, :office, :chat_id, :website, :affiliation,
|
111
|
-
:telephone, :avatar, :
|
111
|
+
:telephone, :avatar, :facebook_handle,
|
112
112
|
:twitter_handle, :googleplus_handle, :linkedin_handle, :remove_avatar, :orcid)
|
113
113
|
end
|
114
114
|
|
@@ -116,7 +116,7 @@ module Sufia
|
|
116
116
|
def iconify_auto_link(text, show_link = true)
|
117
117
|
# this block is only executed when a link is inserted;
|
118
118
|
# if we pass text containing no links, it just returns text.
|
119
|
-
auto_link(text) do |value|
|
119
|
+
auto_link(html_escape(text)) do |value|
|
120
120
|
"<i class='glyphicon glyphicon-new-window'></i>#{(' ' + value) if show_link}<br />"
|
121
121
|
end
|
122
122
|
end
|
data/lib/sufia/version.rb
CHANGED
@@ -220,6 +220,19 @@ describe UsersController, type: :controller do
|
|
220
220
|
expect(u.orcid).to eq 'http://orcid.org/0000-0000-1111-2222'
|
221
221
|
end
|
222
222
|
|
223
|
+
it "does not allow groups to be set" do
|
224
|
+
user.group_list = 'private group'
|
225
|
+
user.save
|
226
|
+
post :update, id: user.user_key, user: { group_list: ['my group'] }
|
227
|
+
expect(user.reload.group_list).to eq 'private group'
|
228
|
+
end
|
229
|
+
|
230
|
+
it "does not allow email to be set" do
|
231
|
+
original_email = user.email
|
232
|
+
post :update, id: user.user_key, user: { email: ['myemail.email.com'] }
|
233
|
+
expect(user.reload.email).to eq original_email
|
234
|
+
end
|
235
|
+
|
223
236
|
it 'displays a flash when invalid ORCID is entered' do
|
224
237
|
expect(user.orcid).to be_blank
|
225
238
|
post :update, id: user.user_key, user: { orcid: 'foobar' }
|
@@ -62,4 +62,15 @@ describe GenericFileHelper do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
65
|
+
|
66
|
+
describe '#display_multiple' do
|
67
|
+
subject { helper.display_multiple(['Title with < 50Hz frequency. http://www.example.com. & More text', 'Other title']) }
|
68
|
+
it "escapes input" do
|
69
|
+
expect(subject).to start_with('Title with < 50Hz frequency. ')
|
70
|
+
expect(subject).to end_with('. & More text | Other title')
|
71
|
+
end
|
72
|
+
it "adds links" do
|
73
|
+
expect(subject).to include('<a href="http://www.example.com">')
|
74
|
+
end
|
75
|
+
end
|
65
76
|
end
|
@@ -198,4 +198,18 @@ describe SufiaHelper, type: :helper do
|
|
198
198
|
expect(helper.is_url?(url)).to be_truthy
|
199
199
|
end
|
200
200
|
end
|
201
|
+
|
202
|
+
describe "#iconify_auto_link" do
|
203
|
+
subject { helper.iconify_auto_link('Foo < http://www.example.com. & More text') }
|
204
|
+
it "escapes input" do
|
205
|
+
expect(subject).to start_with('Foo <')
|
206
|
+
expect(subject).to end_with('. & More text')
|
207
|
+
end
|
208
|
+
it "adds links" do
|
209
|
+
expect(subject).to include('<a href="http://www.example.com">')
|
210
|
+
end
|
211
|
+
it "adds icons" do
|
212
|
+
expect(subject).to include('class="glyphicon glyphicon-new-window"')
|
213
|
+
end
|
214
|
+
end
|
201
215
|
end
|
data/spec/models/ability_spec.rb
CHANGED
@@ -43,7 +43,7 @@ describe Sufia::Ability, type: :model do
|
|
43
43
|
let(:sender) { FactoryGirl.find_or_create(:jill) }
|
44
44
|
let(:user) { FactoryGirl.find_or_create(:archivist) }
|
45
45
|
let(:file) do
|
46
|
-
GenericFile.new.tap do|file|
|
46
|
+
GenericFile.new.tap do |file|
|
47
47
|
file.apply_depositor_metadata(sender.user_key)
|
48
48
|
file.save!
|
49
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sufia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.6.
|
4
|
+
version: 6.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sufia-models
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 6.6.
|
20
|
+
version: 6.6.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 6.6.
|
27
|
+
version: 6.6.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: blacklight_advanced_search
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1247,7 +1247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1247
1247
|
version: '0'
|
1248
1248
|
requirements: []
|
1249
1249
|
rubyforge_project:
|
1250
|
-
rubygems_version: 2.
|
1250
|
+
rubygems_version: 2.4.5
|
1251
1251
|
signing_key:
|
1252
1252
|
specification_version: 4
|
1253
1253
|
summary: Sufia was extracted from ScholarSphere developed by Penn State University
|