update 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/update/run-updates.rb +13 -28
  2. data/lib/update/version.rb +1 -1
  3. metadata +109 -115
@@ -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
- @commands = commands
19
-
20
- synchronously_run_commands_within_each_command_group
21
- end
22
-
23
- EventMachine.stop
24
- end
19
+ commands.each do |command, description|
20
+ @results ||= {}
21
+ @results["#{@description}"] = `#@command`
25
22
 
26
- def synchronously_run_commands_within_each_command_group
27
- @commands.each do |command, description|
28
- @command, @description = command, description
23
+ unless $?.success?
24
+ @failed ||= []
25
+ @failed << command
26
+ end
27
+ end
29
28
 
30
- run_commands_in_each_command_group
31
-
32
- take_note_if_command_fails
29
+ display_results_of_command_group
33
30
  end
34
31
 
35
- display_results_of_command_group
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 @description
37
+ green description
53
38
  puts result
54
39
  end
55
40
  end
@@ -1,3 +1,3 @@
1
1
  module Update
2
- VERSION = "0.9.4"
2
+ VERSION = "0.9.5"
3
3
  end
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
- - shan
7
+ authors:
8
+ - shan
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-02-28 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: slop
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "2.4"
24
- type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: awesome_print
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
34
- version: "1.0"
35
- type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: em-synchrony
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: "1.0"
46
- type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: slop
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ~>
55
- - !ruby/object:Gem::Version
56
- version: "2.4"
57
- type: :runtime
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: awesome_print
61
- prerelease: false
62
- requirement: &id005 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ~>
66
- - !ruby/object:Gem::Version
67
- version: "1.0"
68
- type: :runtime
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
71
- name: em-synchrony
72
- prerelease: false
73
- requirement: &id006 !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ~>
77
- - !ruby/object:Gem::Version
78
- version: "1.0"
79
- type: :runtime
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
- - shannonskipper@gmail.com
84
- executables:
85
- - update
81
+ email:
82
+ - shannonskipper@gmail.com
83
+ executables:
84
+ - update
86
85
  extensions: []
87
-
88
86
  extra_rdoc_files: []
89
-
90
- files:
91
- - .gitignore
92
- - Gemfile
93
- - README.md
94
- - bin/update
95
- - lib/update.rb
96
- - lib/update/commands.rb
97
- - lib/update/options.rb
98
- - lib/update/red-green.rb
99
- - lib/update/run-updates.rb
100
- - lib/update/version.rb
101
- - test/helper.rb
102
- - test/test_option_flags.rb
103
- - test/test_update_runs_asynchronously.rb
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
- require_paths:
112
- - lib
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
- - !ruby/object:Gem::Version
118
- version: "0"
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
- - !ruby/object:Gem::Version
124
- version: "0"
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.15
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
- - test/helper.rb
134
- - test/test_option_flags.rb
135
- - test/test_update_runs_asynchronously.rb
126
+ test_files:
127
+ - test/helper.rb
128
+ - test/test_option_flags.rb
129
+ - test/test_update_runs_asynchronously.rb
136
130
  has_rdoc: