serrano 0.6.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,28 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'faraday'
4
- require 'multi_json'
3
+ require "faraday"
4
+ require "multi_json"
5
5
 
6
6
  def fetch_styles
7
- base = 'https://api.github.com/repos/citation-style-language/styles'
8
- conn = Faraday.new(url: base) do |f|
7
+ base = "https://api.github.com/repos/citation-style-language/styles"
8
+ conn = Faraday.new(url: base) { |f|
9
9
  f.use FaradayMiddleware::RaiseHttpException
10
10
  f.adapter Faraday.default_adapter
11
- end
12
- args = { per_page: 1 }
13
- tt = conn.get 'commits', args
11
+ }
12
+ args = {per_page: 1}
13
+ tt = conn.get "commits", args
14
14
  commres = MultiJson.load(tt.body)
15
- sha = commres[0]['sha']
16
- sty = conn.get 'git/trees/' + sha
15
+ sha = commres[0]["sha"]
16
+ sty = conn.get "git/trees/" + sha
17
17
  res = MultiJson.load(sty.body)
18
- files = res['tree'].collect { |x| x['path'] }
19
- matches = files.collect do |x|
20
- if x.match('csl').nil?
18
+ files = res["tree"].collect { |x| x["path"] }
19
+ matches = files.collect { |x|
20
+ if x.match("csl").nil?
21
21
  nil
22
22
  else
23
- x.match('csl').string
23
+ x.match("csl").string
24
24
  end
25
- end
25
+ }
26
26
  csls = matches.compact
27
- csls.collect { |z| z.gsub('.csl', '') }
27
+ csls.collect { |z| z.gsub(".csl", "") }
28
28
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  def make_ua
4
- requa = 'Faraday/v' + Faraday::VERSION
5
- habua = 'Serrano/v' + Serrano::VERSION
6
- ua = requa + ' ' + habua
4
+ requa = "Faraday/v" + Faraday::VERSION
5
+ habua = "Serrano/v" + Serrano::VERSION
6
+ ua = requa + " " + habua
7
7
  if Serrano.mailto
8
- ua = ua + " (mailto:%s)" % Serrano.mailto
8
+ ua += " (mailto:%s)" % Serrano.mailto
9
9
  end
10
10
  # ua += format(' (mailto:%s)', Serrano.mailto) if Serrano.mailto
11
11
  ua
@@ -18,9 +18,8 @@ end
18
18
 
19
19
  def rename_query_filters(foo)
20
20
  foo = foo.tostrings
21
- foo = foo.map { |x, y| [x.to_s.sub('container_title', 'container-title'), y] }.to_h
22
- foo = foo.map { |x, y| [x.to_s.sub('query_', 'query.'), y] }.to_h
23
- foo
21
+ foo = foo.map { |x, y| [x.to_s.sub("container_title", "container-title"), y] }.to_h
22
+ foo.map { |x, y| [x.to_s.sub("query_", "query."), y] }.to_h
24
23
  end
25
24
 
26
25
  class Hash
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Serrano
4
- VERSION = '0.6.2'
4
+ VERSION = "1.0.0"
5
5
  end
@@ -1,51 +1,51 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'serrano/version'
5
+ require "serrano/version"
6
6
 
7
7
  Gem::Specification.new do |s|
8
- s.name = 'serrano'
9
- s.version = Serrano::VERSION
10
- s.platform = Gem::Platform::RUBY
11
- s.required_ruby_version = '>= 2.1'
12
- s.date = '2020-05-29'
13
- s.summary = 'Crossref Client'
14
- s.description = 'Low Level Ruby Client for the Crossref Search API'
15
- s.authors = 'Scott Chamberlain'
16
- s.email = 'myrmecocystus@gmail.com'
17
- s.homepage = 'https://github.com/sckott/serrano'
18
- s.licenses = 'MIT'
8
+ s.name = "serrano"
9
+ s.version = Serrano::VERSION
10
+ s.platform = Gem::Platform::RUBY
11
+ s.required_ruby_version = ">= 2.1"
12
+ s.date = "2020-10-19"
13
+ s.summary = "Crossref Client"
14
+ s.description = "Low Level Ruby Client for the Crossref Search API"
15
+ s.authors = "Scott Chamberlain"
16
+ s.email = "myrmecocystus@gmail.com"
17
+ s.homepage = "https://github.com/sckott/serrano"
18
+ s.licenses = "MIT"
19
19
 
20
20
  s.files = `git ls-files -z`.split("\x0").reject do |f|
21
21
  f.match(%r{^(test|spec|features)/})
22
22
  end
23
- s.require_paths = ['lib']
23
+ s.require_paths = ["lib"]
24
24
 
25
- s.bindir = 'bin'
26
- s.executables = ['serrano']
25
+ s.bindir = "bin"
26
+ s.executables = ["serrano"]
27
27
 
28
- s.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.2'
29
- s.add_development_dependency 'codecov', '~> 0.1.10'
30
- s.add_development_dependency 'json', '~> 2.1'
31
- s.add_development_dependency 'rake', '>= 12.3.1', '~> 13.0'
32
- s.add_development_dependency 'rubocop', '~> 0.84.0'
33
- s.add_development_dependency 'simplecov', '~> 0.18.5'
34
- s.add_development_dependency 'test-unit', '~> 3.2', '>= 3.2.7'
35
- s.add_development_dependency 'vcr', '~> 6.0'
36
- s.add_development_dependency 'webmock', '~> 3.4', '>= 3.4.1'
28
+ s.add_development_dependency "bundler", '~> 2.1', '>= 2.1.4'
29
+ s.add_development_dependency "codecov", "~> 0.2.0"
30
+ s.add_development_dependency "json", '~> 2.3', '>= 2.3.1'
31
+ s.add_development_dependency "rake", '~> 13.0', '>= 13.0.1'
32
+ s.add_development_dependency "standard", "~> 0.7"
33
+ s.add_development_dependency "simplecov", "~> 0.19.0"
34
+ s.add_development_dependency "test-unit", '~> 3.3', '>= 3.3.6'
35
+ s.add_development_dependency "vcr", "~> 6.0"
36
+ s.add_development_dependency "webmock", '~> 3.9', '>= 3.9.3'
37
37
 
38
- s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1'
39
- s.add_runtime_dependency 'faraday_middleware', '~> 1.0'
40
- s.add_runtime_dependency 'multi_json', '~> 1.13', '>= 1.13.1'
41
- s.add_runtime_dependency 'thor', '>= 0.20', '< 1.1'
38
+ s.add_runtime_dependency "faraday", "~> 1.1"
39
+ s.add_runtime_dependency "faraday_middleware", "~> 1.0"
40
+ s.add_runtime_dependency "multi_json", '~> 1.15'
41
+ s.add_runtime_dependency 'thor', '~> 1.0', '>= 1.0.1'
42
42
 
43
43
  s.metadata = {
44
- 'homepage_uri' => 'https://github.com/sckott/serrano',
45
- 'documentation_uri' => 'https://www.rubydoc.info/gems/serrano',
46
- 'changelog_uri' =>
44
+ "homepage_uri" => "https://github.com/sckott/serrano",
45
+ "documentation_uri" => "https://www.rubydoc.info/gems/serrano",
46
+ "changelog_uri" =>
47
47
  "https://github.com/sckott/serrano/releases/tag/v#{s.version}",
48
- 'source_code_uri' => 'https://github.com/sckott/serrano',
49
- 'bug_tracker_uri' => 'https://github.com/sckott/serrano/issues'
48
+ "source_code_uri" => "https://github.com/sckott/serrano",
49
+ "bug_tracker_uri" => "https://github.com/sckott/serrano/issues"
50
50
  }
51
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chamberlain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-29 00:00:00.000000000 Z
11
+ date: 2020-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,116 +16,122 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.1'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 2.0.2
22
+ version: 2.1.4
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '2.0'
29
+ version: '2.1'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 2.0.2
32
+ version: 2.1.4
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: codecov
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.1.10
39
+ version: 0.2.0
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.1.10
46
+ version: 0.2.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: json
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '2.1'
53
+ version: '2.3'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 2.3.1
54
57
  type: :development
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
61
  - - "~>"
59
62
  - !ruby/object:Gem::Version
60
- version: '2.1'
63
+ version: '2.3'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 2.3.1
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: rake
63
69
  requirement: !ruby/object:Gem::Requirement
64
70
  requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: 12.3.1
68
71
  - - "~>"
69
72
  - !ruby/object:Gem::Version
70
73
  version: '13.0'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 13.0.1
71
77
  type: :development
72
78
  prerelease: false
73
79
  version_requirements: !ruby/object:Gem::Requirement
74
80
  requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: 12.3.1
78
81
  - - "~>"
79
82
  - !ruby/object:Gem::Version
80
83
  version: '13.0'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 13.0.1
81
87
  - !ruby/object:Gem::Dependency
82
- name: rubocop
88
+ name: standard
83
89
  requirement: !ruby/object:Gem::Requirement
84
90
  requirements:
85
91
  - - "~>"
86
92
  - !ruby/object:Gem::Version
87
- version: 0.84.0
93
+ version: '0.7'
88
94
  type: :development
89
95
  prerelease: false
90
96
  version_requirements: !ruby/object:Gem::Requirement
91
97
  requirements:
92
98
  - - "~>"
93
99
  - !ruby/object:Gem::Version
94
- version: 0.84.0
100
+ version: '0.7'
95
101
  - !ruby/object:Gem::Dependency
96
102
  name: simplecov
97
103
  requirement: !ruby/object:Gem::Requirement
98
104
  requirements:
99
105
  - - "~>"
100
106
  - !ruby/object:Gem::Version
101
- version: 0.18.5
107
+ version: 0.19.0
102
108
  type: :development
103
109
  prerelease: false
104
110
  version_requirements: !ruby/object:Gem::Requirement
105
111
  requirements:
106
112
  - - "~>"
107
113
  - !ruby/object:Gem::Version
108
- version: 0.18.5
114
+ version: 0.19.0
109
115
  - !ruby/object:Gem::Dependency
110
116
  name: test-unit
111
117
  requirement: !ruby/object:Gem::Requirement
112
118
  requirements:
113
119
  - - "~>"
114
120
  - !ruby/object:Gem::Version
115
- version: '3.2'
121
+ version: '3.3'
116
122
  - - ">="
117
123
  - !ruby/object:Gem::Version
118
- version: 3.2.7
124
+ version: 3.3.6
119
125
  type: :development
120
126
  prerelease: false
121
127
  version_requirements: !ruby/object:Gem::Requirement
122
128
  requirements:
123
129
  - - "~>"
124
130
  - !ruby/object:Gem::Version
125
- version: '3.2'
131
+ version: '3.3'
126
132
  - - ">="
127
133
  - !ruby/object:Gem::Version
128
- version: 3.2.7
134
+ version: 3.3.6
129
135
  - !ruby/object:Gem::Dependency
130
136
  name: vcr
131
137
  requirement: !ruby/object:Gem::Requirement
@@ -146,40 +152,34 @@ dependencies:
146
152
  requirements:
147
153
  - - "~>"
148
154
  - !ruby/object:Gem::Version
149
- version: '3.4'
155
+ version: '3.9'
150
156
  - - ">="
151
157
  - !ruby/object:Gem::Version
152
- version: 3.4.1
158
+ version: 3.9.3
153
159
  type: :development
154
160
  prerelease: false
155
161
  version_requirements: !ruby/object:Gem::Requirement
156
162
  requirements:
157
163
  - - "~>"
158
164
  - !ruby/object:Gem::Version
159
- version: '3.4'
165
+ version: '3.9'
160
166
  - - ">="
161
167
  - !ruby/object:Gem::Version
162
- version: 3.4.1
168
+ version: 3.9.3
163
169
  - !ruby/object:Gem::Dependency
164
170
  name: faraday
165
171
  requirement: !ruby/object:Gem::Requirement
166
172
  requirements:
167
173
  - - "~>"
168
174
  - !ruby/object:Gem::Version
169
- version: '1.0'
170
- - - ">="
171
- - !ruby/object:Gem::Version
172
- version: 1.0.1
175
+ version: '1.1'
173
176
  type: :runtime
174
177
  prerelease: false
175
178
  version_requirements: !ruby/object:Gem::Requirement
176
179
  requirements:
177
180
  - - "~>"
178
181
  - !ruby/object:Gem::Version
179
- version: '1.0'
180
- - - ">="
181
- - !ruby/object:Gem::Version
182
- version: 1.0.1
182
+ version: '1.1'
183
183
  - !ruby/object:Gem::Dependency
184
184
  name: faraday_middleware
185
185
  requirement: !ruby/object:Gem::Requirement
@@ -200,40 +200,34 @@ dependencies:
200
200
  requirements:
201
201
  - - "~>"
202
202
  - !ruby/object:Gem::Version
203
- version: '1.13'
204
- - - ">="
205
- - !ruby/object:Gem::Version
206
- version: 1.13.1
203
+ version: '1.15'
207
204
  type: :runtime
208
205
  prerelease: false
209
206
  version_requirements: !ruby/object:Gem::Requirement
210
207
  requirements:
211
208
  - - "~>"
212
209
  - !ruby/object:Gem::Version
213
- version: '1.13'
214
- - - ">="
215
- - !ruby/object:Gem::Version
216
- version: 1.13.1
210
+ version: '1.15'
217
211
  - !ruby/object:Gem::Dependency
218
212
  name: thor
219
213
  requirement: !ruby/object:Gem::Requirement
220
214
  requirements:
221
- - - ">="
215
+ - - "~>"
222
216
  - !ruby/object:Gem::Version
223
- version: '0.20'
224
- - - "<"
217
+ version: '1.0'
218
+ - - ">="
225
219
  - !ruby/object:Gem::Version
226
- version: '1.1'
220
+ version: 1.0.1
227
221
  type: :runtime
228
222
  prerelease: false
229
223
  version_requirements: !ruby/object:Gem::Requirement
230
224
  requirements:
231
- - - ">="
225
+ - - "~>"
232
226
  - !ruby/object:Gem::Version
233
- version: '0.20'
234
- - - "<"
227
+ version: '1.0'
228
+ - - ">="
235
229
  - !ruby/object:Gem::Version
236
- version: '1.1'
230
+ version: 1.0.1
237
231
  description: Low Level Ruby Client for the Crossref Search API
238
232
  email: myrmecocystus@gmail.com
239
233
  executables:
@@ -243,12 +237,9 @@ extra_rdoc_files: []
243
237
  files:
244
238
  - ".github/workflows/ruby.yml"
245
239
  - ".gitignore"
246
- - ".rubocop.yml"
247
- - ".rubocop_todo.yml"
248
240
  - CHANGELOG.md
249
241
  - CODE_OF_CONDUCT.md
250
242
  - Gemfile
251
- - Gemfile.lock
252
243
  - LICENSE
253
244
  - README.md
254
245
  - Rakefile
@@ -273,7 +264,7 @@ licenses:
273
264
  metadata:
274
265
  homepage_uri: https://github.com/sckott/serrano
275
266
  documentation_uri: https://www.rubydoc.info/gems/serrano
276
- changelog_uri: https://github.com/sckott/serrano/releases/tag/v0.6.2
267
+ changelog_uri: https://github.com/sckott/serrano/releases/tag/v1.0.0
277
268
  source_code_uri: https://github.com/sckott/serrano
278
269
  bug_tracker_uri: https://github.com/sckott/serrano/issues
279
270
  post_install_message:
@@ -1,50 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- Naming/FileName:
4
- Exclude:
5
- - 'test/test-helper.rb'
6
-
7
- Metrics/ParameterLists:
8
- Max: 18
9
-
10
- Metrics/ModuleLength:
11
- Max: 800
12
-
13
- # Offense count: 22
14
- # Configuration parameters: AllowedVariables.
15
- Lint/UselessAssignment:
16
- Exclude:
17
- - 'lib/serrano/filters.rb'
18
-
19
- Lint/RaiseException:
20
- Enabled: true
21
-
22
- Lint/StructNewOverride:
23
- Enabled: true
24
-
25
- Style/HashEachMethods:
26
- Enabled: true
27
-
28
- Style/HashTransformKeys:
29
- Enabled: true
30
-
31
- Style/HashTransformValues:
32
- Enabled: true
33
-
34
- Layout/LineLength:
35
- Max: 525
36
-
37
- Layout/SpaceAroundMethodCallOperator:
38
- Enabled: true
39
-
40
- Style/ExponentialNotation:
41
- Enabled: true
42
-
43
- Layout/EmptyLinesAroundAttributeAccessor:
44
- Enabled: true
45
-
46
- Style/SlicingWithRange:
47
- Enabled: true
48
-
49
- Lint/DeprecatedOpenSSLConstant:
50
- Enabled: false