guignol 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format nested
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- guignol (0.1.1)
4
+ guignol (0.1.2)
5
5
  active_support
6
6
  fog (~> 1.1.2)
7
7
  parallel (~> 0.5.14)
@@ -29,13 +29,13 @@ GEM
29
29
  nokogiri (~> 1.5.0)
30
30
  ruby-hmac
31
31
  formatador (0.2.1)
32
- mime-types (1.17.2)
32
+ mime-types (1.18)
33
33
  multi_json (1.0.4)
34
34
  net-scp (1.0.4)
35
35
  net-ssh (>= 1.99.1)
36
36
  net-ssh (2.3.0)
37
- nokogiri (1.5.0)
38
- parallel (0.5.15)
37
+ nokogiri (1.5.2)
38
+ parallel (0.5.16)
39
39
  rake (0.9.2.2)
40
40
  rspec (2.4.0)
41
41
  rspec-core (~> 2.4.0)
@@ -0,0 +1,42 @@
1
+ # Copyright (c) 2012, HouseTrip SA.
2
+ # All rights reserved.
3
+ #
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # 1. Redistributions of source code must retain the above copyright notice, this
8
+ # list of conditions and the following disclaimer.
9
+ # 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ # this list of conditions and the following disclaimer in the documentation
11
+ # and/or other materials provided with the distribution.
12
+ #
13
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14
+ # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
+ # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17
+ # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
+ # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
+ # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20
+ # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
+ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
+ #
24
+ # The views and conclusions contained in the software and documentation are those
25
+ # of the authors and should not be interpreted as representing official policies,
26
+ # either expressed or implied, of the authors.
27
+
28
+ require 'guignol/commands/base'
29
+ require 'guignol/instance'
30
+
31
+ module Guignol::Commands
32
+ class FixDNS < Base
33
+ def run_on_server(config)
34
+ Guignol::Instance.new(config).update_dns
35
+ end
36
+
37
+ def self.short_usage
38
+ ["<regexps>", "Make sure the DNS mappings are correct."]
39
+ end
40
+ end
41
+ end
42
+
@@ -32,6 +32,8 @@ require 'guignol/commands/stop'
32
32
  require 'guignol/commands/help'
33
33
  require 'guignol/commands/list'
34
34
  require 'guignol/commands/uuid'
35
+ require 'guignol/commands/new'
36
+ require 'guignol/commands/fix_dns'
35
37
 
36
38
  module Guignol::Commands
37
39
  Map = {
@@ -42,5 +44,7 @@ module Guignol::Commands
42
44
  'help' => Guignol::Commands::Help,
43
45
  'list' => Guignol::Commands::List,
44
46
  'uuid' => Guignol::Commands::UUID,
47
+ 'new' => Guignol::Commands::New,
48
+ 'fixdns' => Guignol::Commands::FixDNS,
45
49
  }
46
50
  end
@@ -26,5 +26,5 @@
26
26
  # either expressed or implied, of the authors.
27
27
 
28
28
  module Guignol
29
- VERSION = "0.1.1"
29
+ VERSION = "0.1.2"
30
30
  end
@@ -0,0 +1,31 @@
1
+ require 'guignol/instance'
2
+
3
+ describe Guignol::Instance do
4
+ subject { Guignol::Instance.new(options) }
5
+
6
+ let(:options) {{
7
+ :name => 'foobar',
8
+ :uuid => '948DB8E9-A356-4F66-8857-165FBDF5A71F'
9
+ }}
10
+
11
+ before(:each) do
12
+ connection = stub(:servers => [])
13
+ Fog::Compute.stub(:new).and_return(connection)
14
+ end
15
+
16
+ describe '#initialize' do
17
+ it 'should require :uuid' do
18
+ options.delete :uuid
19
+ expect { subject }.to raise_error
20
+ end
21
+
22
+ it 'should require :name' do
23
+ options.delete :name
24
+ expect { subject }.to raise_error
25
+ end
26
+
27
+ it 'should pass with minimal options' do
28
+ subject
29
+ end
30
+ end
31
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format doc
3
+ --debugger
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guignol
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julien Letessier
@@ -15,12 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-02 00:00:00 +00:00
18
+ date: 2012-05-01 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: bundler
23
- type: :development
24
23
  prerelease: false
25
24
  version_requirements: &id001 !ruby/object:Gem::Requirement
26
25
  none: false
@@ -33,10 +32,10 @@ dependencies:
33
32
  - 0
34
33
  - 0
35
34
  version: 1.0.0
35
+ type: :development
36
36
  requirement: *id001
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- type: :development
40
39
  prerelease: false
41
40
  version_requirements: &id002 !ruby/object:Gem::Requirement
42
41
  none: false
@@ -49,10 +48,10 @@ dependencies:
49
48
  - 4
50
49
  - 0
51
50
  version: 2.4.0
51
+ type: :development
52
52
  requirement: *id002
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rake
55
- type: :development
56
55
  prerelease: false
57
56
  version_requirements: &id003 !ruby/object:Gem::Requirement
58
57
  none: false
@@ -63,10 +62,10 @@ dependencies:
63
62
  segments:
64
63
  - 0
65
64
  version: "0"
65
+ type: :development
66
66
  requirement: *id003
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: awesome_print
69
- type: :development
70
69
  prerelease: false
71
70
  version_requirements: &id004 !ruby/object:Gem::Requirement
72
71
  none: false
@@ -77,10 +76,10 @@ dependencies:
77
76
  segments:
78
77
  - 0
79
78
  version: "0"
79
+ type: :development
80
80
  requirement: *id004
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: fog
83
- type: :runtime
84
83
  prerelease: false
85
84
  version_requirements: &id005 !ruby/object:Gem::Requirement
86
85
  none: false
@@ -93,10 +92,10 @@ dependencies:
93
92
  - 1
94
93
  - 2
95
94
  version: 1.1.2
95
+ type: :runtime
96
96
  requirement: *id005
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: parallel
99
- type: :runtime
100
99
  prerelease: false
101
100
  version_requirements: &id006 !ruby/object:Gem::Requirement
102
101
  none: false
@@ -109,10 +108,10 @@ dependencies:
109
108
  - 5
110
109
  - 14
111
110
  version: 0.5.14
111
+ type: :runtime
112
112
  requirement: *id006
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: active_support
115
- type: :runtime
116
115
  prerelease: false
117
116
  version_requirements: &id007 !ruby/object:Gem::Requirement
118
117
  none: false
@@ -123,10 +122,10 @@ dependencies:
123
122
  segments:
124
123
  - 0
125
124
  version: "0"
125
+ type: :runtime
126
126
  requirement: *id007
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: term-ansicolor
129
- type: :runtime
130
129
  prerelease: false
131
130
  version_requirements: &id008 !ruby/object:Gem::Requirement
132
131
  none: false
@@ -137,10 +136,10 @@ dependencies:
137
136
  segments:
138
137
  - 0
139
138
  version: "0"
139
+ type: :runtime
140
140
  requirement: *id008
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: uuidtools
143
- type: :runtime
144
143
  prerelease: false
145
144
  version_requirements: &id009 !ruby/object:Gem::Requirement
146
145
  none: false
@@ -151,6 +150,7 @@ dependencies:
151
150
  segments:
152
151
  - 0
153
152
  version: "0"
153
+ type: :runtime
154
154
  requirement: *id009
155
155
  description: "\n Create, start, stop, destroy instances from the command line\n based on a YAML description of your instances.\n "
156
156
  email:
@@ -162,6 +162,7 @@ extensions: []
162
162
  extra_rdoc_files: []
163
163
 
164
164
  files:
165
+ - .rspec
165
166
  - Gemfile
166
167
  - Gemfile.lock
167
168
  - README.md
@@ -173,6 +174,7 @@ files:
173
174
  - lib/guignol/commands.rb
174
175
  - lib/guignol/commands/base.rb
175
176
  - lib/guignol/commands/create.rb
177
+ - lib/guignol/commands/fix_dns.rb
176
178
  - lib/guignol/commands/help.rb
177
179
  - lib/guignol/commands/kill.rb
178
180
  - lib/guignol/commands/list.rb
@@ -185,6 +187,8 @@ files:
185
187
  - lib/guignol/tty_spinner.rb
186
188
  - lib/guignol/version.rb
187
189
  - lib/guignol/volume.rb
190
+ - spec/guignol/instance_spec.rb
191
+ - spec/spec.opts
188
192
  has_rdoc: true
189
193
  homepage: https://github.com/mezis/guignol
190
194
  licenses: []
@@ -221,5 +225,6 @@ rubygems_version: 1.6.2
221
225
  signing_key:
222
226
  specification_version: 3
223
227
  summary: Manipulate Amazon EC2 instances
224
- test_files: []
225
-
228
+ test_files:
229
+ - spec/guignol/instance_spec.rb
230
+ - spec/spec.opts