lowered-expectations 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5598c5def9d9ab355cb246c5c80823c222c3209d
4
- data.tar.gz: 9c5c91fa08a995dc767d295ae281e9dc8cbcb3ae
3
+ metadata.gz: 2fd98bbb73967a109a601bfead6bcbe8f3431646
4
+ data.tar.gz: cc882dfd03ebec15f64e7b1ad7e50d7d1e12c353
5
5
  SHA512:
6
- metadata.gz: 05321eb404425a6ce9858a6b11e4f8b0db99abad15a5aca106c6d181a26de3d83357c82ebb6c7a63e01d8bbaa7f3047c73e16bdfa1808b99e9caa031f2922536
7
- data.tar.gz: e29aa87ce0365b2f6312a085a3ccbb08d1741cc38a6cac94293046d920ce9879d8c970cf777332096573f049a391e665e73cc5d11af55cf172bcf0e76830e6d5
6
+ metadata.gz: 8546cbb024fa93345bf7a258368dc957184ef4cce5ea02730c87a804a64ff1dd3bf316402831b094409b52c2b25af59d377033a82134252a67363971ae02d72b
7
+ data.tar.gz: 1cace52623498e077b6ac55c6d5980d7e886d3b73e151c5b81e88dda708f2557e517729d514b64768d170a46ba3ef7a2bc41371137d4ae61336ac9f3ba9f299b
@@ -29,7 +29,7 @@ DeprecatedClassMethods:
29
29
 
30
30
  # Offense count: 19
31
31
  # Cop supports --auto-correct.
32
- DeprecatedHashMethods:
32
+ Style/PreferredHashMethods:
33
33
  Enabled: false
34
34
 
35
35
  Documentation:
@@ -145,10 +145,10 @@ StringLiterals:
145
145
  - double_quotes
146
146
 
147
147
  # disabling a bunch of style linters
148
- Lint/BlockAlignment:
148
+ Layout/BlockAlignment:
149
149
  Enabled: false
150
150
 
151
- Lint/EndAlignment:
151
+ Layout/EndAlignment:
152
152
  Enabled: false
153
153
 
154
154
  Lint/Loop:
@@ -158,19 +158,22 @@ Lint/Void:
158
158
  Exclude:
159
159
  - dashboard/spec/**/*
160
160
 
161
- Style/AccessModifierIndentation:
161
+ Layout/AccessModifierIndentation:
162
162
  Enabled: false
163
163
 
164
- Style/AccessorMethodName:
164
+ Naming/AccessorMethodName:
165
165
  Enabled: false
166
166
 
167
- Style/AlignArray:
167
+ Layout/AlignArray:
168
168
  Enabled: false
169
169
 
170
- Style/AlignHash:
170
+ Layout/AlignHash:
171
171
  Enabled: false
172
172
 
173
- Style/AlignParameters:
173
+ Layout/AlignParameters:
174
+ Enabled: false
175
+
176
+ Metrics/BlockLength:
174
177
  Enabled: false
175
178
 
176
179
  Metrics/BlockNesting:
@@ -179,7 +182,7 @@ Metrics/BlockNesting:
179
182
  Style/BracesAroundHashParameters:
180
183
  Enabled: false
181
184
 
182
- Style/CaseIndentation:
185
+ Layout/CaseIndentation:
183
186
  Enabled: false
184
187
 
185
188
  Style/CollectionMethods:
@@ -188,25 +191,25 @@ Style/CollectionMethods:
188
191
  Style/CommentAnnotation:
189
192
  Enabled: false
190
193
 
191
- Style/CommentIndentation:
194
+ Layout/CommentIndentation:
192
195
  Enabled: false
193
196
 
194
197
  Style/DefWithParentheses:
195
198
  Enabled: false
196
199
 
197
- Style/DotPosition:
200
+ Layout/DotPosition:
198
201
  Enabled: false
199
202
 
200
203
  Style/EachWithObject:
201
204
  Enabled: false
202
205
 
203
- Style/EmptyLineBetweenDefs:
206
+ Layout/EmptyLineBetweenDefs:
204
207
  Enabled: false
205
208
 
206
- Style/EmptyLines:
209
+ Layout/EmptyLines:
207
210
  Enabled: false
208
211
 
209
- Style/EmptyLinesAroundAccessModifier:
212
+ Layout/EmptyLinesAroundAccessModifier:
210
213
  Enabled: false
211
214
 
212
215
  Style/FrozenStringLiteralComment:
@@ -221,7 +224,7 @@ Style/HashSyntax:
221
224
  Style/IfUnlessModifier:
222
225
  Enabled: false
223
226
 
224
- Style/IndentationWidth:
227
+ Layout/IndentationWidth:
225
228
  Enabled: false
226
229
 
227
230
  Style/Lambda:
@@ -230,7 +233,7 @@ Style/Lambda:
230
233
  Style/MultilineBlockChain:
231
234
  Enabled: false
232
235
 
233
- Style/MethodCallParentheses:
236
+ Style/MethodCallWithoutArgsParentheses:
234
237
  Enabled: false
235
238
 
236
239
  Style/MultilineIfThen:
@@ -245,7 +248,7 @@ Style/MultilineTernaryOperator:
245
248
  Style/NilComparison:
246
249
  Enabled: false
247
250
 
248
- Style/PredicateName:
251
+ Naming/PredicateName:
249
252
  Enabled: false
250
253
 
251
254
  Style/RaiseArgs:
@@ -263,22 +266,19 @@ Style/RegexpLiteral:
263
266
  Style/SingleLineMethods:
264
267
  Enabled: false
265
268
 
266
- Style/SpaceAfterComma:
269
+ Layout/SpaceAfterComma:
267
270
  Enabled: false
268
271
 
269
- Style/SpaceAfterNot:
272
+ Layout/SpaceAfterNot:
270
273
  Enabled: false
271
274
 
272
- Style/SpaceAroundEqualsInParameterDefault:
275
+ Layout/SpaceAroundEqualsInParameterDefault:
273
276
  Enabled: false
274
277
 
275
- Style/SpaceInsideBrackets:
278
+ Layout/SpaceInsideParens:
276
279
  Enabled: false
277
280
 
278
- Style/SpaceInsideParens:
279
- Enabled: false
280
-
281
- Style/TrailingBlankLines:
281
+ Layout/TrailingBlankLines:
282
282
  Enabled: false
283
283
 
284
284
  Style/TrivialAccessors:
@@ -290,6 +290,14 @@ Style/WhileUntilDo:
290
290
  Style/WhileUntilModifier:
291
291
  Enabled: false
292
292
 
293
+ Layout/IndentHeredoc:
294
+ Enabled: false
295
+
296
+ Layout/ClosingHeredocIndentation:
297
+ Enabled: false
298
+
299
+ Naming/HeredocDelimiterNaming:
300
+ Enabled: false
293
301
 
294
302
  # Things that are off but we should turn on eventually
295
303
 
@@ -1,6 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1.1
5
- - 2.2.0
3
+ - 2.0
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
6
10
  - ruby-head
data/Gemfile CHANGED
@@ -7,6 +7,6 @@ group :development, :test do
7
7
  gem "rake", "~> 10.4"
8
8
  gem "rspec", "~> 3.0"
9
9
  gem "rspec-mocks", "~> 3.0"
10
- gem "rubocop", "~> 0.36"
10
+ gem "rubocop", "~> 0.49"
11
11
  gem "rubygems-tasks", "~> 0.2"
12
12
  end
data/README.md CHANGED
@@ -33,10 +33,6 @@ The following errors can be raised when using this Gem:
33
33
 
34
34
  I'm using Travis CI to build and test on every push to the public github repository. You can find the Travis CI page for this project here: https://travis-ci.org/ianchesal/loweredexpectations/
35
35
 
36
- ### Branching in Git
37
-
38
- I'm using [git-flow](http://nvie.com/posts/a-successful-git-branching-model/) for development in git via github. I've loved the branching model git-flow proposed from day one and the addon to git makes it very intuitive and easy to follow. I generally don't push my `feature/*` branches to the public repository; I do keep `development` and `master` up to date here though.
39
-
40
36
  ### TODO Work
41
37
 
42
38
  Please see [TODO.md](TODO.md) for the short list of big things I thought worth writing down.
@@ -1,5 +1,12 @@
1
1
  # lowered-expectations Release Notes
2
2
 
3
+ ## 1.0.2
4
+
5
+ * Updated rubocop library to cover CVE-2017-8418
6
+ * Updated everything else while I was at it
7
+ * Fixed everything that broke because of the updates
8
+ * Updated Travis configuration to ensure we test against every 2.x release of ruby
9
+
3
10
  ## 1.0.1
4
11
 
5
12
  * Move development dependencies out of the gemspec into the gemfile.
data/Rakefile CHANGED
@@ -1,3 +1,3 @@
1
- # Encoding: utf-8
2
1
  Dir.glob('tasks/**/*.rake').each(&method(:import))
2
+
3
3
  task :default => [:lint, 'test:spec']
@@ -1,11 +1,10 @@
1
- # Encoding: utf-8
2
1
  require 'rubygems/dependency'
3
2
  require 'open3'
4
3
  require 'shellwords'
5
4
  require 'pty'
6
5
 
7
6
  class LoweredExpectations
8
- VERSION = '1.0.1'.freeze
7
+ VERSION = '1.0.2'.freeze
9
8
 
10
9
  class VersionPatternError < StandardError
11
10
  end
@@ -22,6 +21,7 @@ class LoweredExpectations
22
21
  def self.expect(executable, version, vopt: '--version', vpattern: '(\d+\.\d+\.\d+)')
23
22
  vstring = run! which(executable), vopt, quiet: true
24
23
  vmatch = /#{vpattern}/.match(vstring)
24
+ raise(VersionPatternError.new("unable to match #{vpattern} in version output #{vstring} from #{executable}")) unless vmatch
25
25
  verify_version(vmatch[0], version) || raise(VersionPatternError.new("unable to match #{vpattern} in version output #{vstring} from #{executable}"))
26
26
  end
27
27
 
@@ -59,7 +59,7 @@ class LoweredExpectations
59
59
  Process.wait(pid)
60
60
  end
61
61
  end
62
- raise CommandExecutionError.new(stderr) unless status == 0
62
+ raise CommandExecutionError.new(stderr) unless status.zero?
63
63
  stdout
64
64
  end
65
65
  private_class_method :run!
@@ -1,13 +1,10 @@
1
- # Encoding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'lowered/expectations'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
6
  spec.name = "lowered-expectations"
8
7
  spec.version = LoweredExpectations::VERSION
9
- # For deploying alpha versions via Travis CI
10
- spec.version = "#{spec.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
11
8
  spec.authors = ["Ian Chesal", "Derek Tamsen"]
12
9
  spec.email = ["ian.chesal@gmail.com"]
13
10
  spec.summary = 'A library for testing versions of command line tools.'
@@ -20,7 +17,7 @@ enforce a major version but allow any minor version above a certain value for a
20
17
  tool. If you use Gemfile's the syntax should look pretty familiary to you.
21
18
  END
22
19
  spec.homepage = "https://github.com/ianchesal/loweredexpectations"
23
- spec.license = "Apache 2.0"
20
+ spec.license = "Apache-2.0"
24
21
 
25
22
  spec.files = `git ls-files -z`.split("\x0")
26
23
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -9,11 +9,11 @@ RSpec.describe LoweredExpectations do
9
9
  end
10
10
 
11
11
  it 'raises an error when the version pattern cannot be found in executable output' do
12
- expect{LoweredExpectations.expect(tool, "~> 0.1", vpattern: 'notvalid')}.to raise_error
12
+ expect{LoweredExpectations.expect(tool, "~> 0.1", vpattern: 'notvalid')}.to raise_error(LoweredExpectations::VersionPatternError)
13
13
  end
14
14
 
15
15
  it 'raises an error when the version of the tool does not meet expectations' do
16
- expect{LoweredExpectations.expect(tool, "~> 1000.0")}.to raise_error
16
+ expect{LoweredExpectations.expect(tool, "~> 1000.0")}.to raise_error(LoweredExpectations::IncompatibleVersionError)
17
17
  end
18
18
  end
19
19
 
@@ -19,26 +19,26 @@ Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL lib"
19
19
 
20
20
  it 'raises an error when the executable does not exist' do
21
21
  expect(LoweredExpectations).to receive(:which).once.with(tool).and_raise(LoweredExpectations::MissingExecutableError)
22
- expect{LoweredExpectations.expect(tool, "~> 0.1")}.to raise_error
22
+ expect{LoweredExpectations.expect(tool, "~> 0.1")}.to raise_error(LoweredExpectations::MissingExecutableError)
23
23
  end
24
24
 
25
25
  it 'raises an error when the version cannot be extracted from executable' do
26
26
  expect(LoweredExpectations).to receive(:which).once.with(tool).and_return(tool)
27
27
  expect(LoweredExpectations).to receive(:run!).once.and_raise(LoweredExpectations::CommandExecutionError)
28
- expect{LoweredExpectations.expect(tool, "~> 0.1")}.to raise_error
28
+ expect{LoweredExpectations.expect(tool, "~> 0.1")}.to raise_error(LoweredExpectations::CommandExecutionError)
29
29
  end
30
30
 
31
31
  it 'raises an error when the version pattern cannot be found in executable output' do
32
32
  expect(LoweredExpectations).to receive(:which).once.with(tool).and_return(tool)
33
33
  expect(LoweredExpectations).to receive(:run!).once.and_return(curl_version)
34
- expect{LoweredExpectations.expect(tool, "~> 0.1", vpattern: 'notvalid')}.to raise_error
34
+ expect{LoweredExpectations.expect(tool, "~> 0.1", vpattern: 'notvalid')}.to raise_error(LoweredExpectations::VersionPatternError)
35
35
  end
36
36
 
37
37
  it 'raises an error when the version of the tool does not meet expectations' do
38
38
  expect(LoweredExpectations).to receive(:which).once.with(tool).and_return(tool)
39
39
  expect(LoweredExpectations).to receive(:run!).once.and_return(curl_version)
40
40
  expect(LoweredExpectations).to receive(:verify_version).once.with(version, "~> 0.1").and_raise(LoweredExpectations::IncompatibleVersionError)
41
- expect{LoweredExpectations.expect(tool, "~> 0.1")}.to raise_error
41
+ expect{LoweredExpectations.expect(tool, "~> 0.1")}.to raise_error(LoweredExpectations::IncompatibleVersionError)
42
42
  end
43
43
  end
44
44
 
@@ -63,12 +63,12 @@ Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL lib"
63
63
  end
64
64
 
65
65
  it 'raise an error when the version string does not match the version pattern' do
66
- expect{LoweredExpectations.verify_version version, '~> 0.2'}.to raise_error
67
- expect{LoweredExpectations.verify_version version, '~> 1'}.to raise_error
68
- expect{LoweredExpectations.verify_version version, '> 0.1.3'}.to raise_error
69
- expect{LoweredExpectations.verify_version version, '< 0'}.to raise_error
70
- expect{LoweredExpectations.verify_version version, '> 1'}.to raise_error
71
- expect{LoweredExpectations.verify_version version, "!= #{version}"}.to raise_error
66
+ expect{LoweredExpectations.verify_version version, '~> 0.2'}.to raise_error(LoweredExpectations::IncompatibleVersionError)
67
+ expect{LoweredExpectations.verify_version version, '~> 1'}.to raise_error(LoweredExpectations::IncompatibleVersionError)
68
+ expect{LoweredExpectations.verify_version version, '> 0.1.3'}.to raise_error(LoweredExpectations::IncompatibleVersionError)
69
+ expect{LoweredExpectations.verify_version version, '< 0'}.to raise_error(LoweredExpectations::IncompatibleVersionError)
70
+ expect{LoweredExpectations.verify_version version, '> 1'}.to raise_error(LoweredExpectations::IncompatibleVersionError)
71
+ expect{LoweredExpectations.verify_version version, "!= #{version}"}.to raise_error(LoweredExpectations::IncompatibleVersionError)
72
72
  end
73
73
  end
74
74
  end
@@ -1,4 +1,3 @@
1
- # Encoding: utf-8
2
1
  # Copyright 2015 Ian Chesal
3
2
  #
4
3
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,3 +1,3 @@
1
- # Encoding: utf-8
2
1
  require 'rake/clean'
2
+
3
3
  CLEAN.add FileList['lowered-expectations-*.gem']
@@ -1,5 +1,5 @@
1
- # Encoding: utf-8
2
1
  require 'rspec/core/rake_task'
2
+
3
3
  namespace :test do
4
4
  RSpec::Core::RakeTask.new(:spec) do |t|
5
5
  t.pattern = Dir['spec/**/*_spec.rb'].reject{ |f| f['/integration'] }
@@ -1,3 +1,3 @@
1
- # Encoding: utf-8
2
1
  require 'rubocop/rake_task'
2
+
3
3
  RuboCop::RakeTask.new(:lint)
@@ -1,3 +1,3 @@
1
- # Encoding: utf-8
2
1
  require 'rubygems/tasks'
2
+
3
3
  Gem::Tasks.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lowered-expectations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Chesal
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-02 00:00:00.000000000 Z
12
+ date: 2018-08-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |
15
15
  A Ruby gem that lets you test for the presence of command line tools and ensure
@@ -46,7 +46,7 @@ files:
46
46
  - tasks/rubygems.rake
47
47
  homepage: https://github.com/ianchesal/loweredexpectations
48
48
  licenses:
49
- - Apache 2.0
49
+ - Apache-2.0
50
50
  metadata: {}
51
51
  post_install_message:
52
52
  rdoc_options: []
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.4.5
67
+ rubygems_version: 2.6.13
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: A library for testing versions of command line tools.