volley 0.1.0 → 0.1.1
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/bin/volley +26 -8
- data/lib/volley/log.rb +4 -0
- data/lib/volley/version.rb +1 -1
- data/volley.gemspec +1 -0
- metadata +18 -2
data/bin/volley
CHANGED
@@ -4,6 +4,7 @@ require 'rubygems'
|
|
4
4
|
require 'docopt'
|
5
5
|
require 'volley'
|
6
6
|
require 'awesome_print'
|
7
|
+
require 'daemons'
|
7
8
|
|
8
9
|
DOC = <<-DOC
|
9
10
|
Usage: volley [options] <plan> <descriptor> [argument]...
|
@@ -55,11 +56,13 @@ module Volley
|
|
55
56
|
log = options[:log]
|
56
57
|
level = options[:level]
|
57
58
|
force = options[:force]
|
58
|
-
args = {}
|
59
|
+
args = { }
|
60
|
+
|
59
61
|
|
60
62
|
Volley::Dsl::VolleyFile.init
|
61
63
|
Volley::Dsl::VolleyFile.load(config, :optional => true)
|
62
64
|
Volley::Dsl::VolleyFile.load(primary, :primary => true) if File.file?(primary)
|
65
|
+
|
63
66
|
Volley::Log.add(level.to_sym, log)
|
64
67
|
Volley::Log.console_debug if debug
|
65
68
|
Volley.config.debug = debug
|
@@ -79,10 +82,10 @@ module Volley
|
|
79
82
|
# the plan isn't reserved
|
80
83
|
raise "must specify descriptor" unless desc
|
81
84
|
(project, branch, version) = Volley::Descriptor.new(desc).get
|
82
|
-
plan
|
85
|
+
plan = "#{project}:#{plan}"
|
83
86
|
end
|
84
87
|
|
85
|
-
args
|
88
|
+
args = kvs.inject({ }) { |h, e| (k, v) = e.split(/=/); h[k.to_sym] = v; h }
|
86
89
|
args[:force] = force
|
87
90
|
|
88
91
|
if debug
|
@@ -93,7 +96,22 @@ module Volley
|
|
93
96
|
Volley::Log.debug "key:value: #{kvs.join(",")}"
|
94
97
|
end
|
95
98
|
|
96
|
-
|
99
|
+
if fork
|
100
|
+
options = {
|
101
|
+
:appname => "volley",
|
102
|
+
:dir => Volley.config.directory,
|
103
|
+
:dir_mode => :normal,
|
104
|
+
:log_output => true,
|
105
|
+
:ontop => false
|
106
|
+
}
|
107
|
+
Volley::Log.info "daemonizing ... "
|
108
|
+
Volley::Log.reset
|
109
|
+
Daemons.daemonize(options)
|
110
|
+
Volley::Log.init
|
111
|
+
Volley::Log.add(level.to_sym, log)
|
112
|
+
Volley::Log.console_debug if debug
|
113
|
+
end
|
114
|
+
|
97
115
|
Volley.process(plan, desc, args)
|
98
116
|
rescue Interrupt
|
99
117
|
Volley::Log.info "interrupted"
|
@@ -101,11 +119,11 @@ module Volley
|
|
101
119
|
Volley::Log.info "exited"
|
102
120
|
rescue => e
|
103
121
|
Volley::Log.error "error: #{e.message} at #{e.backtrace.first}"
|
104
|
-
if debug
|
122
|
+
#if debug
|
105
123
|
Volley::Log.error e
|
106
|
-
else
|
107
|
-
|
108
|
-
end
|
124
|
+
#else
|
125
|
+
# Volley::Log.debug e
|
126
|
+
#end
|
109
127
|
end
|
110
128
|
end
|
111
129
|
end
|
data/lib/volley/log.rb
CHANGED
data/lib/volley/version.rb
CHANGED
data/volley.gemspec
CHANGED
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.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: clamp
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: daemons
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
110
126
|
description: PubSub Deployment tool
|
111
127
|
email:
|
112
128
|
- scatanzarite@gmail.com
|