update 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/update/run-updates.rb +13 -28
- data/lib/update/version.rb +1 -1
- metadata +109 -115
data/lib/update/run-updates.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
require 'pry'
|
2
|
+
|
1
3
|
module Update
|
2
4
|
extend RedGreen
|
3
5
|
|
4
6
|
class << self
|
5
7
|
def run
|
6
8
|
EM.synchrony do
|
7
|
-
|
8
9
|
asynchronously_iterate_over_command_groups
|
9
10
|
end
|
10
11
|
|
@@ -15,41 +16,25 @@ module Update
|
|
15
16
|
|
16
17
|
def asynchronously_iterate_over_command_groups
|
17
18
|
EM::Synchrony::FiberIterator.new(Update::COMMAND_GROUPS).each do |commands|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
EventMachine.stop
|
24
|
-
end
|
19
|
+
commands.each do |command, description|
|
20
|
+
@results ||= {}
|
21
|
+
@results["#{@description}"] = `#@command`
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
unless $?.success?
|
24
|
+
@failed ||= []
|
25
|
+
@failed << command
|
26
|
+
end
|
27
|
+
end
|
29
28
|
|
30
|
-
|
31
|
-
|
32
|
-
take_note_if_command_fails
|
29
|
+
display_results_of_command_group
|
33
30
|
end
|
34
31
|
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
def run_commands_in_each_command_group
|
39
|
-
@results ||= {}
|
40
|
-
@results["#{@description}"] = `#@command`
|
41
|
-
end
|
42
|
-
|
43
|
-
def take_note_if_command_fails
|
44
|
-
unless $?.success?
|
45
|
-
@failed ||= []
|
46
|
-
@failed << @command
|
47
|
-
end
|
32
|
+
EventMachine.stop
|
48
33
|
end
|
49
34
|
|
50
35
|
def display_results_of_command_group
|
51
36
|
@results.each do |description, result|
|
52
|
-
green
|
37
|
+
green description
|
53
38
|
puts result
|
54
39
|
end
|
55
40
|
end
|
data/lib/update/version.rb
CHANGED
metadata
CHANGED
@@ -1,136 +1,130 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: update
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.5
|
4
5
|
prerelease:
|
5
|
-
version: 0.9.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
7
|
+
authors:
|
8
|
+
- shan
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
version_requirements: *id006
|
12
|
+
date: 2012-03-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: slop
|
16
|
+
requirement: &70144768529280 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.4'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70144768529280
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: awesome_print
|
27
|
+
requirement: &70144768528700 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70144768528700
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: em-synchrony
|
38
|
+
requirement: &70144768528080 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70144768528080
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: slop
|
49
|
+
requirement: &70144768527120 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.4'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70144768527120
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: awesome_print
|
60
|
+
requirement: &70144768526040 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.0'
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70144768526040
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: em-synchrony
|
71
|
+
requirement: &70144768525120 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70144768525120
|
81
80
|
description: A Ruby Gem for running a list of update commands from command line.
|
82
|
-
email:
|
83
|
-
|
84
|
-
executables:
|
85
|
-
|
81
|
+
email:
|
82
|
+
- shannonskipper@gmail.com
|
83
|
+
executables:
|
84
|
+
- update
|
86
85
|
extensions: []
|
87
|
-
|
88
86
|
extra_rdoc_files: []
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
- update.gemspec
|
87
|
+
files:
|
88
|
+
- .gitignore
|
89
|
+
- Gemfile
|
90
|
+
- README.md
|
91
|
+
- bin/update
|
92
|
+
- lib/update.rb
|
93
|
+
- lib/update/commands.rb
|
94
|
+
- lib/update/options.rb
|
95
|
+
- lib/update/red-green.rb
|
96
|
+
- lib/update/run-updates.rb
|
97
|
+
- lib/update/version.rb
|
98
|
+
- test/helper.rb
|
99
|
+
- test/test_option_flags.rb
|
100
|
+
- test/test_update_runs_asynchronously.rb
|
101
|
+
- update.gemspec
|
105
102
|
homepage: https://github.com/havenwood/update
|
106
103
|
licenses: []
|
107
|
-
|
108
104
|
post_install_message:
|
109
105
|
rdoc_options: []
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
109
|
none: false
|
115
|
-
requirements:
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ! '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
115
|
none: false
|
121
|
-
requirements:
|
122
|
-
|
123
|
-
|
124
|
-
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
125
120
|
requirements: []
|
126
|
-
|
127
121
|
rubyforge_project: update
|
128
|
-
rubygems_version: 1.8.
|
122
|
+
rubygems_version: 1.8.17
|
129
123
|
signing_key:
|
130
124
|
specification_version: 3
|
131
125
|
summary: a gem to run a list of updates
|
132
|
-
test_files:
|
133
|
-
|
134
|
-
|
135
|
-
|
126
|
+
test_files:
|
127
|
+
- test/helper.rb
|
128
|
+
- test/test_option_flags.rb
|
129
|
+
- test/test_update_runs_asynchronously.rb
|
136
130
|
has_rdoc:
|