opsicle 0.1.0 → 0.2.0

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.
Files changed (46) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +3 -0
  3. data/.travis.yml +6 -1
  4. data/Gemfile +3 -0
  5. data/Guardfile +5 -0
  6. data/README.markdown +44 -17
  7. data/bin/opsicle +36 -3
  8. data/lib/opsicle.rb +2 -3
  9. data/lib/opsicle/commands.rb +6 -0
  10. data/lib/opsicle/commands/deploy.rb +39 -0
  11. data/lib/opsicle/{list.rb → commands/list.rb} +0 -2
  12. data/lib/opsicle/{ssh.rb → commands/ssh.rb} +0 -3
  13. data/lib/opsicle/commands/ssh_key.rb +40 -0
  14. data/lib/opsicle/config.rb +1 -0
  15. data/lib/opsicle/deployment.rb +59 -0
  16. data/lib/opsicle/deployments.rb +22 -0
  17. data/lib/opsicle/monitor.rb +12 -0
  18. data/lib/opsicle/monitor/app.rb +147 -0
  19. data/lib/opsicle/monitor/panel.rb +98 -0
  20. data/lib/opsicle/monitor/panels/deployments.rb +42 -0
  21. data/lib/opsicle/monitor/panels/header.rb +48 -0
  22. data/lib/opsicle/monitor/panels/help.rb +33 -0
  23. data/lib/opsicle/monitor/screen.rb +83 -0
  24. data/lib/opsicle/monitor/spy/dataspyable.rb +19 -0
  25. data/lib/opsicle/monitor/spy/deployments.rb +53 -0
  26. data/lib/opsicle/monitor/subpanel.rb +55 -0
  27. data/lib/opsicle/monitor/translatable.rb +33 -0
  28. data/lib/opsicle/stack.rb +22 -0
  29. data/lib/opsicle/version.rb +1 -1
  30. data/opsicle.gemspec +1 -1
  31. data/spec/opsicle/client_spec.rb +6 -6
  32. data/spec/opsicle/commands/deploy_spec.rb +50 -0
  33. data/spec/opsicle/{list_spec.rb → commands/list_spec.rb} +7 -6
  34. data/spec/opsicle/commands/ssh_key_spec.rb +75 -0
  35. data/spec/opsicle/{ssh_spec.rb → commands/ssh_spec.rb} +24 -24
  36. data/spec/opsicle/config_spec.rb +12 -11
  37. data/spec/opsicle/monitor/app_spec.rb +63 -0
  38. data/spec/opsicle/monitor/panel_spec.rb +162 -0
  39. data/spec/opsicle/monitor/screen_spec.rb +121 -0
  40. data/spec/opsicle/monitor/spy/deployments_spec.rb +41 -0
  41. data/spec/opsicle/monitor/subpanel_spec.rb +199 -0
  42. data/spec/spec_helper.rb +2 -1
  43. metadata +44 -16
  44. data/Gemfile.lock +0 -75
  45. data/lib/opsicle/deploy.rb +0 -25
  46. data/spec/opsicle/deploy_spec.rb +0 -29
data/spec/spec_helper.rb CHANGED
@@ -4,8 +4,9 @@
4
4
  # loaded once.
5
5
  #
6
6
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+
7
8
  RSpec.configure do |config|
8
- config.treat_symbols_as_metadata_keys_with_true_values = true
9
+ config.raise_errors_for_deprecations!
9
10
  config.run_all_when_everything_filtered = true
10
11
  config.filter_run :focus
11
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsicle
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
  - Andy Fleener
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 3.0.0.beta1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 3.0.0.beta1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -136,24 +136,46 @@ files:
136
136
  - .ruby-version
137
137
  - .travis.yml
138
138
  - Gemfile
139
- - Gemfile.lock
139
+ - Guardfile
140
140
  - LICENSE
141
141
  - README.markdown
142
142
  - Rakefile
143
143
  - bin/opsicle
144
144
  - lib/opsicle.rb
145
145
  - lib/opsicle/client.rb
146
+ - lib/opsicle/commands.rb
147
+ - lib/opsicle/commands/deploy.rb
148
+ - lib/opsicle/commands/list.rb
149
+ - lib/opsicle/commands/ssh.rb
150
+ - lib/opsicle/commands/ssh_key.rb
146
151
  - lib/opsicle/config.rb
147
- - lib/opsicle/deploy.rb
148
- - lib/opsicle/list.rb
149
- - lib/opsicle/ssh.rb
152
+ - lib/opsicle/deployment.rb
153
+ - lib/opsicle/deployments.rb
154
+ - lib/opsicle/monitor.rb
155
+ - lib/opsicle/monitor/app.rb
156
+ - lib/opsicle/monitor/panel.rb
157
+ - lib/opsicle/monitor/panels/deployments.rb
158
+ - lib/opsicle/monitor/panels/header.rb
159
+ - lib/opsicle/monitor/panels/help.rb
160
+ - lib/opsicle/monitor/screen.rb
161
+ - lib/opsicle/monitor/spy/dataspyable.rb
162
+ - lib/opsicle/monitor/spy/deployments.rb
163
+ - lib/opsicle/monitor/subpanel.rb
164
+ - lib/opsicle/monitor/translatable.rb
165
+ - lib/opsicle/stack.rb
150
166
  - lib/opsicle/version.rb
151
167
  - opsicle.gemspec
152
168
  - spec/opsicle/client_spec.rb
169
+ - spec/opsicle/commands/deploy_spec.rb
170
+ - spec/opsicle/commands/list_spec.rb
171
+ - spec/opsicle/commands/ssh_key_spec.rb
172
+ - spec/opsicle/commands/ssh_spec.rb
153
173
  - spec/opsicle/config_spec.rb
154
- - spec/opsicle/deploy_spec.rb
155
- - spec/opsicle/list_spec.rb
156
- - spec/opsicle/ssh_spec.rb
174
+ - spec/opsicle/monitor/app_spec.rb
175
+ - spec/opsicle/monitor/panel_spec.rb
176
+ - spec/opsicle/monitor/screen_spec.rb
177
+ - spec/opsicle/monitor/spy/deployments_spec.rb
178
+ - spec/opsicle/monitor/subpanel_spec.rb
157
179
  - spec/spec_helper.rb
158
180
  homepage: https://github.com/sportngin/opsicle
159
181
  licenses:
@@ -181,8 +203,14 @@ specification_version: 4
181
203
  summary: An opsworks specific abstraction on top of the aws sdk
182
204
  test_files:
183
205
  - spec/opsicle/client_spec.rb
206
+ - spec/opsicle/commands/deploy_spec.rb
207
+ - spec/opsicle/commands/list_spec.rb
208
+ - spec/opsicle/commands/ssh_key_spec.rb
209
+ - spec/opsicle/commands/ssh_spec.rb
184
210
  - spec/opsicle/config_spec.rb
185
- - spec/opsicle/deploy_spec.rb
186
- - spec/opsicle/list_spec.rb
187
- - spec/opsicle/ssh_spec.rb
211
+ - spec/opsicle/monitor/app_spec.rb
212
+ - spec/opsicle/monitor/panel_spec.rb
213
+ - spec/opsicle/monitor/screen_spec.rb
214
+ - spec/opsicle/monitor/spy/deployments_spec.rb
215
+ - spec/opsicle/monitor/subpanel_spec.rb
188
216
  - spec/spec_helper.rb
data/Gemfile.lock DELETED
@@ -1,75 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- opsicle (0.1.0)
5
- aws-sdk (~> 1.30)
6
- commander
7
- terminal-table
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- aws-sdk (1.30.1)
13
- json (~> 1.4)
14
- nokogiri (>= 1.4.4)
15
- uuidtools (~> 2.1)
16
- celluloid (0.15.2)
17
- timers (~> 1.1.0)
18
- coderay (1.1.0)
19
- commander (4.1.5)
20
- highline (~> 1.6.11)
21
- diff-lcs (1.2.5)
22
- ffi (1.9.3)
23
- formatador (0.2.4)
24
- guard (2.2.5)
25
- formatador (>= 0.2.4)
26
- listen (~> 2.1)
27
- lumberjack (~> 1.0)
28
- pry (>= 0.9.12)
29
- thor (>= 0.18.1)
30
- guard-rspec (4.2.0)
31
- guard (>= 2.1.1)
32
- rspec (>= 2.14, < 4.0)
33
- highline (1.6.20)
34
- json (1.8.1)
35
- listen (2.4.0)
36
- celluloid (>= 0.15.2)
37
- rb-fsevent (>= 0.9.3)
38
- rb-inotify (>= 0.9)
39
- lumberjack (1.0.4)
40
- method_source (0.8.2)
41
- mini_portile (0.5.2)
42
- nokogiri (1.6.1)
43
- mini_portile (~> 0.5.0)
44
- pry (0.9.12.4)
45
- coderay (~> 1.0)
46
- method_source (~> 0.8)
47
- slop (~> 3.4)
48
- rake (10.1.0)
49
- rb-fsevent (0.9.3)
50
- rb-inotify (0.9.3)
51
- ffi (>= 0.5.0)
52
- rspec (2.14.1)
53
- rspec-core (~> 2.14.0)
54
- rspec-expectations (~> 2.14.0)
55
- rspec-mocks (~> 2.14.0)
56
- rspec-core (2.14.7)
57
- rspec-expectations (2.14.4)
58
- diff-lcs (>= 1.1.3, < 2.0)
59
- rspec-mocks (2.14.4)
60
- slop (3.4.7)
61
- terminal-table (1.4.5)
62
- thor (0.18.1)
63
- timers (1.1.0)
64
- uuidtools (2.1.4)
65
-
66
- PLATFORMS
67
- ruby
68
-
69
- DEPENDENCIES
70
- bundler (~> 1.3)
71
- guard
72
- guard-rspec
73
- opsicle!
74
- rake
75
- rspec
@@ -1,25 +0,0 @@
1
- require 'aws-sdk'
2
- require_relative 'client'
3
-
4
- module Opsicle
5
- class Deploy
6
- attr_reader :client
7
-
8
- def initialize(environment)
9
- @client = Client.new(environment)
10
- end
11
-
12
- def execute(options={})
13
- response = client.run_command('deploy')
14
- open_deploy(response[:deployment_id])
15
- end
16
-
17
- def open_deploy(deployment_id)
18
- if deployment_id
19
- exec "open 'https://console.aws.amazon.com/opsworks/home?#/stack/#{client.config.opsworks_config[:stack_id]}/deployments'"
20
- else
21
- puts 'deploy failed'
22
- end
23
- end
24
- end
25
- end
@@ -1,29 +0,0 @@
1
- require "spec_helper"
2
- require "opsicle/deploy"
3
-
4
- module Opsicle
5
- describe Deploy do
6
- subject { Deploy.new('derp') }
7
-
8
- context "#execute" do
9
- let(:client) { double }
10
- before do
11
- Client.stub(:new).with('derp').and_return(client)
12
- end
13
-
14
- it "creates a new deployment" do
15
- subject.should_receive(:open_deploy).with('derp')
16
- client.should_receive(:run_command).with('deploy').and_return({deployment_id: 'derp'})
17
- subject.execute
18
- end
19
- end
20
-
21
- context "#client" do
22
- it "generates a new aws client from the given configs" do
23
- Client.should_receive(:new).with('derp')
24
- subject.client
25
- end
26
- end
27
-
28
- end
29
- end