umlaut 4.1.0 → 4.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 10ee00671d4ada36a612ab886c0dba3169b0c5f5
4
- data.tar.gz: c13eccc534870dbcd6b35335adb3ab6edd3d8acd
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2YxZDZjOGJmZjQ0MWUwZTgxN2UwYzlmMWQ4ZjRhNGIyM2YyNjI5OQ==
5
+ data.tar.gz: !binary |-
6
+ M2IwZjIzMGIyYjc4MmJjZGFlOWUwMTllMDg1MGM4NDMwNDM2NTIyMQ==
5
7
  SHA512:
6
- metadata.gz: bd230f38e80c13e192e0c91001bc38a3628c9908eef08b9c5d035883c5f911d910f147a679283ed3c6bfac9db5a6bb4fa59e616ff6de7b66189030313d339c18
7
- data.tar.gz: df56e4a11ea2955b53463d9902c7a889b4a6860c7dd33a49dda259338e87c9d88dd83c328b51ef6ed1cbdbd2c407ce07aebfd6d974db63967361bb7a9a74ebdd
8
+ metadata.gz: !binary |-
9
+ ZmJlMGZkMTM1ZTJiYjBlOGQ1YzQ5NjRlYWFhZjNiNGE5MGY0OTNiMmU4ODFj
10
+ YmVlN2EyN2FhYTI3OTk2MmE0M2UwNGZiNzVhZDc4NWE5MTc4ZDU4NmMyYmIx
11
+ NWUxOWJkYjJlMTY3ODgxOTQ5MDUxNzU1MTAyOTQxYTA4YzE5MTU=
12
+ data.tar.gz: !binary |-
13
+ NzEyYjllYzYzZDQ2Y2Q0YmYxNzVhNTNhN2JjYWQ2ZDM0Mjg5N2UwZmMyOTVl
14
+ N2U1NmVlYTRiNjU3ZjJmNDY0ODUxYWQzNDFiMzg0NTljMWJmYmY5OGFlYTYw
15
+ MzY3Y2JmNzgxY2I1NjU0ZmExY2E2MmI5MzMxYTVjZTNmZDhlMjM=
@@ -197,7 +197,7 @@ module ResolveHelper
197
197
  # background updates.
198
198
  def bg_update_sections
199
199
  unless (@@bg_update_sections)
200
- @@bg_update_sections = umlaut_config.lookup!("resolve_sections", []).find_all do |section|
200
+ @@bg_update_sections = config_resolve_sections.find_all do |section|
201
201
  section[:bg_update] != false
202
202
  end
203
203
  end
@@ -208,7 +208,7 @@ module ResolveHelper
208
208
  # that should be included in the partial_html_sections api response.
209
209
  def partial_html_sections
210
210
  unless (@@partial_update_sections)
211
- @@partial_update_sections = umlaut_config.lookup!("resolve_sections", []).find_all do |section|
211
+ @@partial_update_sections = config_resolve_sections.find_all do |section|
212
212
  section[:partial_html_api] != false
213
213
  end
214
214
  end
@@ -230,10 +230,10 @@ module ResolveHelper
230
230
  def config_resolve_sections
231
231
  unless defined? @_config_resolve_sections
232
232
  @_config_resolve_sections = umlaut_config.lookup!("resolve_sections", UmlautConfigurable::ResolveSectionsArray.new)
233
+ # deep dup it, so we aren't reordering the original
234
+ @_config_resolve_sections = @_config_resolve_sections.deep_dup
233
235
 
234
236
  umlaut_config.lookup!("resolve_sections_filter", []).each do |reorder_proc|
235
- # deep dup it, so we aren't reordering the original
236
- @_config_resolve_sections = @_config_resolve_sections.deep_dup
237
237
  reorder_proc.call(@user_request, @_config_resolve_sections)
238
238
  end
239
239
  end
@@ -242,7 +242,7 @@ module ResolveHelper
242
242
  end
243
243
 
244
244
  def html_section_by_div_id(div_id)
245
- umlaut_config.lookup!("resolve_sections", []).find do |defn|
245
+ config_resolve_sections.find do |defn|
246
246
  defn[:div_id] == div_id
247
247
  end
248
248
  end
@@ -402,11 +402,13 @@ class GoogleBookSearch < Service
402
402
  type = nil
403
403
  if (viewability == ViewPartialValue &&
404
404
  url = iv["volumeInfo"]["previewLink"])
405
+ url = fix_pg_gbs_link(url)
405
406
  display_text = @display_name
406
407
  display_text_i18n = "display_name"
407
408
  type = ServiceTypeValue[:excerpts]
408
409
  else
409
- url = url = iv["volumeInfo"]["infoLink"]
410
+ url = iv["volumeInfo"]["infoLink"]
411
+ url = fix_pg_gbs_link(url)
410
412
  display_text = "Book Information"
411
413
  display_text_i18n = "book_information"
412
414
  type = ServiceTypeValue[:highlighted_link]
@@ -422,6 +424,14 @@ class GoogleBookSearch < Service
422
424
  )
423
425
  end
424
426
 
427
+ # google books direct links do weird things with linking to
428
+ # internal pages, perhaps intending to be based on our
429
+ # search criteria, which pages matched, but we're not
430
+ # using it like that for links to excerpts or full page.
431
+ # reverse engineer it to go to full page.
432
+ def fix_pg_gbs_link(url)
433
+ url.sub(/([\?\;\&])(pg=[^;&]+)/, '\1pg=1')
434
+ end
425
435
 
426
436
 
427
437
 
@@ -1,5 +1,5 @@
1
1
  module Umlaut
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
 
4
4
  # This is used in Umlaut's .gemspec for generating the gem,
5
5
  # and is also used in the umlaut app generator to make sure
metadata CHANGED
@@ -1,275 +1,275 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umlaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind, et al
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.12
20
- - - "<"
20
+ - - <
21
21
  - !ruby/object:Gem::Version
22
22
  version: 4.3.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 3.2.12
30
- - - "<"
30
+ - - <
31
31
  - !ruby/object:Gem::Version
32
32
  version: 4.3.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: jquery-rails
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - ! '>='
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: nokogiri
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - ! '>='
52
52
  - !ruby/object:Gem::Version
53
53
  version: 1.5.3
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - ! '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: 1.5.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: openurl
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - ~>
66
66
  - !ruby/object:Gem::Version
67
67
  version: '1.0'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - ~>
73
73
  - !ruby/object:Gem::Version
74
74
  version: '1.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: httpclient
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ~>
80
80
  - !ruby/object:Gem::Version
81
81
  version: '2.4'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ~>
87
87
  - !ruby/object:Gem::Version
88
88
  version: '2.4'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: marc
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ">="
93
+ - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: 0.5.0
96
- - - "<"
96
+ - - <
97
97
  - !ruby/object:Gem::Version
98
98
  version: '1.1'
99
99
  type: :runtime
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ">="
103
+ - - ! '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: 0.5.0
106
- - - "<"
106
+ - - <
107
107
  - !ruby/object:Gem::Version
108
108
  version: '1.1'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: isbn
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - "~>"
113
+ - - ~>
114
114
  - !ruby/object:Gem::Version
115
115
  version: 2.0.9
116
116
  type: :runtime
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - "~>"
120
+ - - ~>
121
121
  - !ruby/object:Gem::Version
122
122
  version: 2.0.9
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: htmlentities
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ">="
127
+ - - ! '>='
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  type: :runtime
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ">="
134
+ - - ! '>='
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: multi_json
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ">="
141
+ - - ! '>='
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  type: :runtime
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ">="
148
+ - - ! '>='
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: confstruct
153
153
  requirement: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - "~>"
155
+ - - ~>
156
156
  - !ruby/object:Gem::Version
157
157
  version: '1.0'
158
- - - ">="
158
+ - - ! '>='
159
159
  - !ruby/object:Gem::Version
160
160
  version: 1.0.1
161
161
  type: :runtime
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - "~>"
165
+ - - ~>
166
166
  - !ruby/object:Gem::Version
167
167
  version: '1.0'
168
- - - ">="
168
+ - - ! '>='
169
169
  - !ruby/object:Gem::Version
170
170
  version: 1.0.1
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: scrub_rb
173
173
  requirement: !ruby/object:Gem::Requirement
174
174
  requirements:
175
- - - ">="
175
+ - - ! '>='
176
176
  - !ruby/object:Gem::Version
177
177
  version: 1.0.1
178
- - - "<"
178
+ - - <
179
179
  - !ruby/object:Gem::Version
180
180
  version: '2'
181
181
  type: :runtime
182
182
  prerelease: false
183
183
  version_requirements: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - ! '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: 1.0.1
188
- - - "<"
188
+ - - <
189
189
  - !ruby/object:Gem::Version
190
190
  version: '2'
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: bootstrap-sass
193
193
  requirement: !ruby/object:Gem::Requirement
194
194
  requirements:
195
- - - "~>"
195
+ - - ~>
196
196
  - !ruby/object:Gem::Version
197
197
  version: '3.2'
198
198
  type: :runtime
199
199
  prerelease: false
200
200
  version_requirements: !ruby/object:Gem::Requirement
201
201
  requirements:
202
- - - "~>"
202
+ - - ~>
203
203
  - !ruby/object:Gem::Version
204
204
  version: '3.2'
205
205
  - !ruby/object:Gem::Dependency
206
206
  name: sass-rails
207
207
  requirement: !ruby/object:Gem::Requirement
208
208
  requirements:
209
- - - ">="
209
+ - - ! '>='
210
210
  - !ruby/object:Gem::Version
211
211
  version: 3.2.5
212
212
  type: :runtime
213
213
  prerelease: false
214
214
  version_requirements: !ruby/object:Gem::Requirement
215
215
  requirements:
216
- - - ">="
216
+ - - ! '>='
217
217
  - !ruby/object:Gem::Version
218
218
  version: 3.2.5
219
219
  - !ruby/object:Gem::Dependency
220
220
  name: uglifier
221
221
  requirement: !ruby/object:Gem::Requirement
222
222
  requirements:
223
- - - "~>"
223
+ - - ~>
224
224
  - !ruby/object:Gem::Version
225
225
  version: '1.3'
226
226
  type: :development
227
227
  prerelease: false
228
228
  version_requirements: !ruby/object:Gem::Requirement
229
229
  requirements:
230
- - - "~>"
230
+ - - ~>
231
231
  - !ruby/object:Gem::Version
232
232
  version: '1.3'
233
233
  - !ruby/object:Gem::Dependency
234
234
  name: vcr
235
235
  requirement: !ruby/object:Gem::Requirement
236
236
  requirements:
237
- - - "~>"
237
+ - - ~>
238
238
  - !ruby/object:Gem::Version
239
239
  version: '2.9'
240
240
  type: :development
241
241
  prerelease: false
242
242
  version_requirements: !ruby/object:Gem::Requirement
243
243
  requirements:
244
- - - "~>"
244
+ - - ~>
245
245
  - !ruby/object:Gem::Version
246
246
  version: '2.9'
247
247
  - !ruby/object:Gem::Dependency
248
248
  name: webmock
249
249
  requirement: !ruby/object:Gem::Requirement
250
250
  requirements:
251
- - - "~>"
251
+ - - ~>
252
252
  - !ruby/object:Gem::Version
253
253
  version: '1.18'
254
254
  type: :development
255
255
  prerelease: false
256
256
  version_requirements: !ruby/object:Gem::Requirement
257
257
  requirements:
258
- - - "~>"
258
+ - - ~>
259
259
  - !ruby/object:Gem::Version
260
260
  version: '1.18'
261
261
  - !ruby/object:Gem::Dependency
262
262
  name: minitest
263
263
  requirement: !ruby/object:Gem::Requirement
264
264
  requirements:
265
- - - ">="
265
+ - - ! '>='
266
266
  - !ruby/object:Gem::Version
267
267
  version: '0'
268
268
  type: :development
269
269
  prerelease: false
270
270
  version_requirements: !ruby/object:Gem::Requirement
271
271
  requirements:
272
- - - ">="
272
+ - - ! '>='
273
273
  - !ruby/object:Gem::Version
274
274
  version: '0'
275
275
  description:
@@ -514,17 +514,17 @@ require_paths:
514
514
  - lib
515
515
  required_ruby_version: !ruby/object:Gem::Requirement
516
516
  requirements:
517
- - - ">="
517
+ - - ! '>='
518
518
  - !ruby/object:Gem::Version
519
519
  version: '0'
520
520
  required_rubygems_version: !ruby/object:Gem::Requirement
521
521
  requirements:
522
- - - ">="
522
+ - - ! '>='
523
523
  - !ruby/object:Gem::Version
524
524
  version: '0'
525
525
  requirements: []
526
526
  rubyforge_project:
527
- rubygems_version: 2.4.5
527
+ rubygems_version: 2.4.4
528
528
  signing_key:
529
529
  specification_version: 4
530
530
  summary: For Libraries, a just-in-time last-mile service aggregator, taking OpenURL