volley 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.1.7:
4
+ * handle docopt exit for --version
5
+ * update to use newest docopt version
6
+
3
7
  ## v0.1.6:
4
8
  * add better support for plan#stop
5
9
  * fix bugs in volley plans
data/bin/volley CHANGED
@@ -4,9 +4,13 @@ require 'rubygems'
4
4
  require 'docopt'
5
5
  require 'volley'
6
6
  require 'daemons'
7
+ require 'awesome_print'
7
8
 
8
9
  DOC = <<-DOC
9
- Usage: volley [options] <plan> <descriptor> [argument]...
10
+ Usage:
11
+ volley [options] PLAN
12
+ volley [options] PLAN DESCRIPTOR
13
+ volley [options] PLAN DESCRIPTOR [ARGUMENT ...]
10
14
 
11
15
  <plan>
12
16
  The plan to run. This can be just the plan name or the project:plan.
@@ -49,14 +53,15 @@ module Volley
49
53
  def run(argv)
50
54
  STDOUT.sync = true
51
55
  options = Docopt::docopt(DOC, :version => Volley::Version::STRING)
52
- debug = options[:debug]
53
- quiet = options[:quiet]
54
- config = options[:config]
55
- primary = options[:primary]
56
- fork = options[:fork]
57
- log = options[:log]
58
- level = options[:level]
59
- force = options[:force]
56
+ ap options
57
+ debug = options["--debug"]
58
+ quiet = options["--quiet"]
59
+ config = options["--config"]
60
+ primary = options["--primary"]
61
+ fork = options["--fork"]
62
+ log = options["--log"]
63
+ level = options["--level"]
64
+ force = options["--force"]
60
65
  args = { }
61
66
 
62
67
 
@@ -74,6 +79,8 @@ module Volley
74
79
  Volley::Log.console_quiet
75
80
  end
76
81
 
82
+ ap argv
83
+
77
84
  kvs = argv.select { |e| e.match(/(\w+)\=(\w+)/) }
78
85
  pos = argv.reject { |e| e.match(/(\w+)\=(\w+)/) }
79
86
 
@@ -126,7 +133,7 @@ module Volley
126
133
  rescue SystemExit
127
134
  Volley::Log.debug "exited"
128
135
  rescue Docopt::Exit => e
129
- Volley::Log.info "volley version: #{e.message}"
136
+ Volley::Log.info e.message
130
137
  rescue => e
131
138
  Volley::Log.error "error: #{e} #{e.message} at #{e.backtrace.first}"
132
139
  Volley::Log.debug e
@@ -134,4 +141,4 @@ module Volley
134
141
  end
135
142
  end
136
143
 
137
- Volley::Command.new.run(ARGV)
144
+ Volley::Command.new.run(ARGV)
@@ -59,6 +59,7 @@ module Volley
59
59
  end
60
60
 
61
61
  def find_file(filename)
62
+ return unless filename
62
63
  [filename, File.expand_path(filename), File.expand_path(filename, __FILE__)].each do |f|
63
64
  return f if File.file?(f)
64
65
  end
@@ -69,4 +70,4 @@ module Volley
69
70
  end
70
71
  end
71
72
  end
72
- end
73
+ end
@@ -3,7 +3,7 @@ unless defined?(Volley::Version)
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 7
6
+ TINY = 8
7
7
  TAG = nil
8
8
  STRING = [MAJOR, MINOR, TINY, TAG].compact.join('.')
9
9
  end
data/volley.gemspec CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency "activesupport"
21
21
  gem.add_dependency "mixlib-shellout"
22
22
  gem.add_dependency "yell"
23
- gem.add_dependency "docopt"
23
+ gem.add_dependency "docopt", '0.5.0'
24
24
  gem.add_dependency "daemons"
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volley
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -96,17 +96,17 @@ dependencies:
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
- - - ! '>='
99
+ - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: '0'
101
+ version: 0.5.0
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
- - - ! '>='
107
+ - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: '0'
109
+ version: 0.5.0
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: daemons
112
112
  requirement: !ruby/object:Gem::Requirement