wip-runner 0.1.0 → 0.2.0

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: dbc3644fecc21fa0f02ddb63c48f2d1d90b2e239
4
- data.tar.gz: 600819ca5fd024e601afe9d6badc02f69627e2f3
3
+ metadata.gz: 07575a25bfbcf73e66b5bb2831d025836cf83038
4
+ data.tar.gz: 1184dfc87682289495a31e89201dd8304a7b52a8
5
5
  SHA512:
6
- metadata.gz: 4fca4438f06d1c8d9cc9c8c6018f65f67aee88c46be720c8a38b17a39fdca3733b68755c1b6f1a3572b3500ae9fab2de82ca49fdddafb0a9a2b46d6b29590c15
7
- data.tar.gz: 00f94a5c728be4acf4e5cd29754da119ecac54e715912cc88306039bb70d1b05b376d3e28c82f1b4bf312fed2a7f10dc62f39fd6e9342f917a3ecd8215999076
6
+ metadata.gz: 0c767c4bb1f728a740a2f22714d118c471981208173fcee97b48fdda609188a364420026cc21138749dbac46e7db85d98f8896569599814d35cf6d5f185b8312
7
+ data.tar.gz: 9f4139d5c4c9aa80053c808506e65c3ee61a6ceb3c64c72fdca9a6dd2baaa4c88f147d12c5a2c37781fe00bc76596eabd1e3bf80b3706d07e0aff941bf9d8b04
@@ -4,6 +4,16 @@ module WIP
4
4
  module Runner
5
5
  class CLI
6
6
  class << self
7
+ def allow(path, search)
8
+ search.each do |dir|
9
+ extension = File.join(dir, path)
10
+ if File.exist?("#{extension}.rb")
11
+ $:.push(File.join(extension, 'lib'))
12
+ require extension
13
+ end
14
+ end
15
+ end
16
+
7
17
  def signature=(value)
8
18
  @signature = value
9
19
  end
@@ -61,7 +61,8 @@ module WIP
61
61
  validate!(arguments)
62
62
  execute(arguments, options)
63
63
  else
64
- delegate(command, argv)
64
+ # TODO: add a spec for the help path.
65
+ command.match(/^-/) ? parser.help : delegate(command, argv)
65
66
  end
66
67
  end
67
68
  rescue OptionParser::InvalidOption, InvalidArguments, InvalidCommand => e
@@ -1,5 +1,5 @@
1
1
  module WIP
2
2
  module Runner
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wip-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Innis