cmd-utils 1.3.2 → 1.3.3

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: 82fc6f54bad863feda3de7c309b853b2b9331d45
4
- data.tar.gz: 838e9712ef47ff97f11fe355f276bff61c46ee97
3
+ metadata.gz: bdbc7893f1993c334bb77d21f7469880d7bc0eac
4
+ data.tar.gz: bcccc4218048c8d765cf9572f242d222a5dd10fb
5
5
  SHA512:
6
- metadata.gz: 10a2116b39456ab1bfddd66ed3d7b6215e193f22bfc99c48df2c48c610df8abbd89d1543ca191dc57869e5cd1748268c873e10c5d77400cee43de457e68c75d9
7
- data.tar.gz: 3e725eb411c244db992e49aa160b3fb97c4622c360e99c69acb6d034e3dd8c9fd33c934151bb9b2eae5db748d752582a701ba3a9e36091838251acd9a35b6741
6
+ metadata.gz: a487c6cb71cad87cd04786d9b5efd35157c5fa76090169f8498e0f3c80675a0f88f012653a0c46e7d2dd21e3057c0dac0437827b8d3b14aba54330271d7feee9
7
+ data.tar.gz: 8da749d551535ce57addddacb05e14007f90b1f90a27baa12c18bb451cfcf8c41d55430d2fe1d49b2fe25ca4bc682ea180ad9399762fed9a95a223b6838c2bee
data/Gemfile CHANGED
@@ -6,8 +6,8 @@ source "http://rubygems.org"
6
6
  # Add dependencies to develop your gem here.
7
7
  # Include everything needed to run rake, tests, features, etc.
8
8
  group :development do
9
- gem "minitest", '~> 5.3'
10
- gem "rdoc", "~> 4.1"
11
- gem "bundler", "~> 1.0"
12
- gem "jeweler", "~> 2.0"
9
+ gem "minitest", ">= 5.10.1"
10
+ gem "rdoc", ">= 5.0.0"
11
+ gem "bundler", ">= 1.0"
12
+ gem "jeweler", ">= 2.3.2"
13
13
  end
data/Gemfile.lock CHANGED
@@ -1,59 +1,65 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.8)
4
+ addressable (2.5.0)
5
+ public_suffix (~> 2.0, >= 2.0.2)
5
6
  builder (3.2.2)
6
7
  descendants_tracker (0.0.4)
7
8
  thread_safe (~> 0.3, >= 0.3.1)
8
9
  faraday (0.9.2)
9
10
  multipart-post (>= 1.2, < 3)
10
- git (1.2.9.1)
11
- github_api (0.12.4)
11
+ git (1.3.0)
12
+ github_api (0.11.3)
12
13
  addressable (~> 2.3)
13
- descendants_tracker (~> 0.0.4)
14
+ descendants_tracker (~> 0.0.1)
14
15
  faraday (~> 0.8, < 0.10)
15
- hashie (>= 3.4)
16
+ hashie (>= 1.2)
16
17
  multi_json (>= 1.7.5, < 2.0)
17
- nokogiri (~> 1.6.6)
18
+ nokogiri (~> 1.6.0)
18
19
  oauth2
19
- hashie (3.4.3)
20
+ hashie (3.4.6)
20
21
  highline (1.7.8)
21
- jeweler (2.0.1)
22
+ jeweler (2.3.2)
22
23
  builder
23
24
  bundler (>= 1.0)
24
25
  git (>= 1.2.5)
25
- github_api
26
+ github_api (~> 0.11.0)
26
27
  highline (>= 1.6.15)
27
28
  nokogiri (>= 1.5.10)
29
+ psych (~> 2.2)
28
30
  rake
29
31
  rdoc
30
- jwt (1.5.2)
31
- mini_portile (0.6.2)
32
- minitest (5.8.3)
33
- multi_json (1.11.2)
34
- multi_xml (0.5.5)
32
+ semver2
33
+ jwt (1.5.6)
34
+ mini_portile2 (2.1.0)
35
+ minitest (5.10.1)
36
+ multi_json (1.12.1)
37
+ multi_xml (0.6.0)
35
38
  multipart-post (2.0.0)
36
- nokogiri (1.6.6.3)
37
- mini_portile (~> 0.6.0)
38
- oauth2 (1.0.0)
39
- faraday (>= 0.8, < 0.10)
39
+ nokogiri (1.6.8.1)
40
+ mini_portile2 (~> 2.1.0)
41
+ oauth2 (1.3.0)
42
+ faraday (>= 0.8, < 0.11)
40
43
  jwt (~> 1.0)
41
44
  multi_json (~> 1.3)
42
45
  multi_xml (~> 0.5)
43
- rack (~> 1.2)
44
- rack (1.6.4)
45
- rake (10.4.2)
46
- rdoc (4.2.0)
46
+ rack (>= 1.2, < 3)
47
+ psych (2.2.2)
48
+ public_suffix (2.0.5)
49
+ rack (2.0.1)
50
+ rake (12.0.0)
51
+ rdoc (5.0.0)
52
+ semver2 (3.4.2)
47
53
  thread_safe (0.3.5)
48
54
 
49
55
  PLATFORMS
50
56
  ruby
51
57
 
52
58
  DEPENDENCIES
53
- bundler (~> 1.0)
54
- jeweler (~> 2.0)
55
- minitest (~> 5.3)
56
- rdoc (~> 4.1)
59
+ bundler (>= 1.0)
60
+ jeweler (>= 2.3.2)
61
+ minitest (>= 5.10.1)
62
+ rdoc (>= 5.0.0)
57
63
 
58
64
  BUNDLED WITH
59
- 1.10.6
65
+ 1.13.7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.2
1
+ 1.3.3
data/cmd-utils.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: cmd-utils 1.3.2 ruby lib
5
+ # stub: cmd-utils 1.3.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "cmd-utils"
9
- s.version = "1.3.2"
9
+ s.version = "1.3.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Alan K. Stebbens"]
14
- s.date = "2015-11-18"
14
+ s.date = "2017-01-11"
15
15
  s.description = "Several ruby libraries for building command-line utilities."
16
16
  s.email = "aks@stebbens.org"
17
17
  s.extra_rdoc_files = [
@@ -41,28 +41,28 @@ Gem::Specification.new do |s|
41
41
  ]
42
42
  s.homepage = "http://bitbucket.org/aks_/cmd-utils"
43
43
  s.licenses = ["MIT"]
44
- s.rubygems_version = "2.4.5.1"
44
+ s.rubygems_version = "2.5.1"
45
45
  s.summary = "Utilities for building CLIs"
46
46
 
47
47
  if s.respond_to? :specification_version then
48
48
  s.specification_version = 4
49
49
 
50
50
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
- s.add_development_dependency(%q<minitest>, ["~> 5.3"])
52
- s.add_development_dependency(%q<rdoc>, ["~> 4.1"])
53
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
54
- s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
51
+ s.add_development_dependency(%q<minitest>, [">= 5.10.1"])
52
+ s.add_development_dependency(%q<rdoc>, [">= 5.0.0"])
53
+ s.add_development_dependency(%q<bundler>, [">= 1.0"])
54
+ s.add_development_dependency(%q<jeweler>, [">= 2.3.2"])
55
55
  else
56
- s.add_dependency(%q<minitest>, ["~> 5.3"])
57
- s.add_dependency(%q<rdoc>, ["~> 4.1"])
58
- s.add_dependency(%q<bundler>, ["~> 1.0"])
59
- s.add_dependency(%q<jeweler>, ["~> 2.0"])
56
+ s.add_dependency(%q<minitest>, [">= 5.10.1"])
57
+ s.add_dependency(%q<rdoc>, [">= 5.0.0"])
58
+ s.add_dependency(%q<bundler>, [">= 1.0"])
59
+ s.add_dependency(%q<jeweler>, [">= 2.3.2"])
60
60
  end
61
61
  else
62
- s.add_dependency(%q<minitest>, ["~> 5.3"])
63
- s.add_dependency(%q<rdoc>, ["~> 4.1"])
64
- s.add_dependency(%q<bundler>, ["~> 1.0"])
65
- s.add_dependency(%q<jeweler>, ["~> 2.0"])
62
+ s.add_dependency(%q<minitest>, [">= 5.10.1"])
63
+ s.add_dependency(%q<rdoc>, [">= 5.0.0"])
64
+ s.add_dependency(%q<bundler>, [">= 1.0"])
65
+ s.add_dependency(%q<jeweler>, [">= 2.3.2"])
66
66
  end
67
67
  end
68
68
 
data/lib/arg-utils.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # arg-utils.rb -- simple methods for managing variable argument lists
2
2
  #
3
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
3
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
4
4
  #
5
5
  #
6
6
  # require 'arg-utils'
data/lib/cmd-utils.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # cmd-utils.rb -- a collection of utilities for ruby command line tools
2
2
  #
3
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
3
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
4
4
  #
5
5
  # require 'cmd-utils'
6
6
  #
data/lib/error-utils.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # error-utils.rb -- simple utilities for managing errors to $stderr
2
2
  #
3
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
3
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
4
4
  #
5
5
  #
6
6
  # require 'error-utils'
data/lib/lookup.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # lookup.rb -- simple keyword lookup routine
2
2
  #
3
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
3
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
4
4
  #
5
5
  # require 'lookup'
6
6
  #
data/lib/run-utils.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # run-utils.rb -- simple utilities for running commands
2
2
  #
3
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
3
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
4
4
  #
5
5
  #
6
6
  # require 'run-utils'
data/lib/ssh-utils.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # A module to define some routines for running commands across many systems
4
4
  # using ssh
5
5
  #
6
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
6
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
7
7
  #
8
8
  # Usage:
9
9
  #
data/lib/talk-utils.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # talk-utils.rb -- simple utilties for "talking" to $stderr
2
2
  #
3
- # Copyright 2013-2015, Alan K. Stebbens <aks@stebbens.org>
3
+ # Copyright 2013-2017, Alan K. Stebbens <aks@stebbens.org>
4
4
  #
5
5
  # require 'talk-utils'
6
6
  #
data/test/helper.rb CHANGED
@@ -19,9 +19,12 @@ module IO_Assert
19
19
  def io_assert ioname, name, actual, expected
20
20
  if expected
21
21
  case expected
22
- when TrueClass then refute_empty(actual, "#{name} $#{ioname} should not be empty")
23
- when FalseClass then assert_empty(actual, "#{name} $#{ioname} should be empty")
24
- when String then assert_match(actual, expected, "#{name} $#{ioname}: expected '#{expected}', got: '#{actual}'")
22
+ when TrueClass
23
+ refute_empty(actual, "#{name} $#{ioname} should not be empty")
24
+ when FalseClass
25
+ then assert_empty(actual, "#{name} $#{ioname} should be empty")
26
+ when String, Regexp
27
+ then assert_match(expected, actual, "#{name} $#{ioname}: expected '#{expected.inspect}', got: '#{actual}'")
25
28
  end
26
29
  end
27
30
  true
@@ -32,26 +35,26 @@ module Gen_Test
32
35
  include IO_Assert
33
36
 
34
37
  #def gen_test name, norun, verbose, quiet, debug, output
35
- def gen_test name, flags, output
38
+ def gen_test name, flags, expected_err
36
39
  $norun = flags.include?('n')
37
40
  $verbose = flags.include?('v')
38
41
  $quiet = flags.include?('q')
39
42
  $debug = flags.include?('d')
40
- out, err = capture_io { yield }
41
- assert_empty(out, "#{name} $stdout should be empty")
42
- io_assert :stderr, name, err, output
43
+ actual_out, actual_err = capture_io { yield }
44
+ assert_empty(actual_out, "#{name} $stdout should be empty")
45
+ io_assert :stderr, name, actual_err, expected_err
43
46
  end
44
47
  end
45
48
 
46
49
  module Run_Test
47
50
  include IO_Assert
48
- def run_test name, flags, output=nil, errput=nil
51
+ def run_test name, flags, expected_out=nil, expected_err=nil
49
52
  $norun = flags.include?('n')
50
53
  $verbose = flags.include?('v')
51
54
  $quiet = flags.include?('q')
52
55
  $debug = flags.include?('d')
53
56
  begin
54
- out, err = capture_subprocess_io do
57
+ actual_out, actual_err = capture_subprocess_io do
55
58
  begin
56
59
  yield
57
60
  rescue
@@ -59,8 +62,8 @@ module Run_Test
59
62
  end
60
63
  rescue
61
64
  end
62
- io_assert :stdout, name, out, output
63
- io_assert :stderr, name, err, errput
65
+ io_assert :stdout, name, actual_out, expected_out
66
+ io_assert :stderr, name, actual_err, expected_err
64
67
  true
65
68
  end
66
69
  end
@@ -23,9 +23,9 @@ class TestRunUtils < Minitest::Test
23
23
  end
24
24
 
25
25
  def test_run_errmsg
26
- run_test("run 11", 'n', false, "(norun) ( exit 1)\n") { cmd_run "( exit 1)", 'error 11' }
27
- run_test("run 12", 'v', false, ">> ( exit 1)\nerror 12\n") { cmd_run "( exit 1)", 'error 12' }
28
- run_test("run 13", 'v', false, ">> ( exit 0)\n") { cmd_run "( exit 0)", 'no error 13' }
29
- run_test("run 14", ' ', false, false) { cmd_run "( exit 0)", 'no error 13' }
26
+ run_test("run 11", 'n', false, "(norun) ( exit 1)\n") { cmd_run "( exit 1)", 'error 11' }
27
+ run_test("run 12", 'v', false, />> \( exit 1\).*\nerror 12\n/m) { cmd_run "( exit 1)", 'error 12' }
28
+ run_test("run 13", 'v', false, ">> ( exit 0)\n") { cmd_run "( exit 0)", 'no error 13' }
29
+ run_test("run 14", ' ', false, false) { cmd_run "( exit 0)", 'no error 13' }
30
30
  end
31
31
  end
@@ -239,8 +239,8 @@ class TestTalkUtils < Minitest::Test
239
239
  def test_dtalkf_content
240
240
  gen_test('dtalkf_content', ' d', "-hello-") { dtalkf "-%s-", "hello" }
241
241
  gen_test('dtalkf_content', ' d', "-hello-") { dtalkf("-%s-") { "hello" } }
242
- gen_test('dtalkf_default_content', ' d', "-hello-") { dtalkf "hello" }
243
- gen_test('dtalkf_default_content', ' d', "-hello-") { dtalkf { "hello" } }
242
+ gen_test('dtalkf_default_content', ' d', "hello") { dtalkf "hello" }
243
+ gen_test('dtalkf_default_content', ' d', "hello") { dtalkf { "hello" } }
244
244
 
245
245
  gen_test('dtalkf_content', ' ', false) { dtalkf "-%s-", "hello" }
246
246
  gen_test('dtalkf_content', ' ', false) { dtalkf("-%s-") { "hello" } }
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmd-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan K. Stebbens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-18 00:00:00.000000000 Z
11
+ date: 2017-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.3'
19
+ version: 5.10.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.3'
26
+ version: 5.10.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rdoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.1'
33
+ version: 5.0.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '4.1'
40
+ version: 5.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jeweler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '2.0'
61
+ version: 2.3.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '2.0'
68
+ version: 2.3.2
69
69
  description: Several ruby libraries for building command-line utilities.
70
70
  email: aks@stebbens.org
71
71
  executables: []
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.4.5.1
116
+ rubygems_version: 2.5.1
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Utilities for building CLIs