infrataster 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6deb149a0997920f69ccdb20adbdabcbb923ebb4
4
- data.tar.gz: 4e9c444f8d6beee298c37286998eb6e7a6517642
3
+ metadata.gz: 15a7285d66344e5c446457a0087f020721a2146f
4
+ data.tar.gz: 031805c8c44797156c92683bd534b02a8140c4bc
5
5
  SHA512:
6
- metadata.gz: e69c2d0111708ed18d616419f10515bb06283841d561d97e9935064a2e0dce16d42e9c3c02aab7adf3ceec80769cf392e2cd3b66e8765bfdbb9fca7f939cf3f4
7
- data.tar.gz: 6337545b1a1fb3d1d81517ff972d214e1c91c9b3ec3499169010eb156499e1b674e31cf36909b3b558e22be45a625e0768aa8254c01d9fa35a006bd8adde7912
6
+ metadata.gz: f6cdc5c1a0feb0a1771557d691c6c7ff22292326f2a7fba3d9904811c8f0ce61f6905f3f5ebc38d2a8123e6e6e130bb8381c22dc4cd74d656b0b5136dea7552d
7
+ data.tar.gz: 3d0c51c1210d0ffdf89ef0cf3a2cac23864264f2eaced0a10778f9e8997190ceb26a7e0764af8913b7fc9c02af9b461b8d0909c07e2f2246290212d2b9a4f4f3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Infrataster Changelog
2
2
 
3
+ ## v0.1.10
4
+
5
+ * rspec ~> 2.0
6
+
3
7
  ## v0.1.9
4
8
 
5
9
  * Add "fuzzy IP address" feature which determine IP address by CIDR or netmask.
data/README.md CHANGED
@@ -143,7 +143,7 @@ You can specify SSH configuration manually too:
143
143
  ```ruby
144
144
  Infrataster::Server.define(
145
145
  # ...
146
- ssh: {host: 'hostname', user: 'testuser', keys: ['/path/to/id_rsa']}
146
+ ssh: {host_name: 'hostname', user: 'testuser', keys: ['/path/to/id_rsa']}
147
147
  )
148
148
  ```
149
149
 
data/infrataster.gemspec CHANGED
@@ -13,13 +13,14 @@ Gem::Specification.new do |spec|
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").delete_if do |path|
16
- path.start_with?('example/')
16
+ path.start_with?('example/') ||
17
+ path.start_with?('ci/')
17
18
  end
18
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
21
  spec.require_paths = ["lib"]
21
22
 
22
- spec.add_runtime_dependency "rspec"
23
+ spec.add_runtime_dependency "rspec", '~> 2.0'
23
24
  spec.add_runtime_dependency "net-ssh"
24
25
  spec.add_runtime_dependency "net-ssh-gateway"
25
26
  spec.add_runtime_dependency "capybara"
@@ -1,3 +1,3 @@
1
1
  module Infrataster
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
@@ -4,29 +4,29 @@ module Infrataster
4
4
  describe Server do
5
5
  describe "self.define" do
6
6
  it "adds a Server instance to defined_servers" do
7
- described_class.define('name', 'address', {})
7
+ described_class.define('name', '127.0.0.1', {})
8
8
  servers = described_class.defined_servers
9
9
  expect(servers.size).to eq(1)
10
10
  expect(servers[0].name).to eq('name')
11
- expect(servers[0].address).to eq('address')
11
+ expect(servers[0].address).to eq('127.0.0.1')
12
12
  expect(servers[0].options).to eq({})
13
13
  end
14
14
  end
15
15
 
16
16
  describe "self.find_by_name" do
17
17
  it "finds a server by name" do
18
- described_class.define('name', 'address', {})
18
+ described_class.define('name', '127.0.0.1', {})
19
19
  server = described_class.find_by_name('name')
20
20
  expect(server.name).to eq('name')
21
- expect(server.address).to eq('address')
21
+ expect(server.address).to eq('127.0.0.1')
22
22
  expect(server.options).to eq({})
23
23
  end
24
24
  end
25
25
 
26
26
  describe "#from" do
27
27
  it "returns 'from' server instance" do
28
- described_class.define('proxy', 'address', {})
29
- described_class.define('app', 'address', from: 'proxy')
28
+ described_class.define('proxy', '127.0.0.1', {})
29
+ described_class.define('app', '127.0.0.1', from: 'proxy')
30
30
  app_server = described_class.find_by_name('app')
31
31
  expect(app_server.from.name).to eq('proxy')
32
32
  end
@@ -36,7 +36,7 @@ module Infrataster
36
36
  context "with ssh option" do
37
37
  context "when options[:ssh][:host] is set" do
38
38
  it 'returns args for SSH.start' do
39
- server = Server.new('name', 'address', ssh: {host_name: 'host', user: 'user'})
39
+ server = Server.new('name', '127.0.0.1', ssh: {host_name: 'host', user: 'user'})
40
40
  expect(server.send(:_ssh_start_args)).
41
41
  to eq(['host', 'user', {host_name: 'host', user: 'user'}])
42
42
  end
@@ -44,9 +44,9 @@ module Infrataster
44
44
 
45
45
  context "when options[:ssh][:host] is not set" do
46
46
  it 'returns args for SSH.start' do
47
- server = Server.new('name', 'address', ssh: {user: 'user'})
47
+ server = Server.new('name', '127.0.0.1', ssh: {user: 'user'})
48
48
  expect(server.send(:_ssh_start_args)).
49
- to eq(['address', 'user', {host_name: 'address', user: 'user'}])
49
+ to eq(['127.0.0.1', 'user', {host_name: '127.0.0.1', user: 'user'}])
50
50
  end
51
51
  end
52
52
  end
@@ -54,7 +54,7 @@ module Infrataster
54
54
  context "with vagrant option" do
55
55
  context "when vagrant option is true" do
56
56
  it 'returns args for SSH.start' do
57
- server = Server.new('name', 'address', vagrant: true)
57
+ server = Server.new('name', '127.0.0.1', vagrant: true)
58
58
  expect(server).to receive(:ssh_config_for_vagrant).with('name').
59
59
  and_return({host_name: 'host', user: 'user'})
60
60
  expect(server.send(:_ssh_start_args)).
@@ -64,7 +64,7 @@ module Infrataster
64
64
 
65
65
  context "when vagrant option is not true but truthy" do
66
66
  it 'returns args for SSH.start' do
67
- server = Server.new('name', 'address', vagrant: 'vagrant_vm_name')
67
+ server = Server.new('name', '127.0.0.1', vagrant: 'vagrant_vm_name')
68
68
  expect(server).to receive(:ssh_config_for_vagrant).with('vagrant_vm_name').
69
69
  and_return({host_name: 'host', user: 'user'})
70
70
  expect(server.send(:_ssh_start_args)).
@@ -75,7 +75,7 @@ module Infrataster
75
75
 
76
76
  context "otherwise" do
77
77
  it 'raises an error' do
78
- server = Server.new('name', 'address')
78
+ server = Server.new('name', '127.0.0.1')
79
79
  expect do
80
80
  server.send(:_ssh_start_args)
81
81
  end.to raise_error(Server::Error)
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infrataster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-18 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: net-ssh
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +150,6 @@ files:
150
150
  - LICENSE.txt
151
151
  - README.md
152
152
  - Rakefile
153
- - ci/jenkins_build
154
153
  - infrataster.gemspec
155
154
  - lib/infrataster.rb
156
155
  - lib/infrataster/contexts.rb
data/ci/jenkins_build DELETED
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- def exec(cmd, exit_if_fail = true)
4
- env = {'CI' => 'true'}
5
- system env, cmd
6
- if exit_if_fail && $?.exitstatus != 0
7
- puts "`#{cmd}` failed"
8
- exit $?.exitstatus
9
- end
10
-
11
- $?.exitstatus
12
- end
13
-
14
- exec('env USE_SYSTEM_GECODE=1 bundle install --path=vendor/bundle --jobs=4')
15
-
16
- exec 'bundle exec rake spec:unit'
17
-
18
- exec 'bundle exec rake spec:integration:prepare'
19
- status = exec('bundle exec rake spec:integration', false)
20
- exec 'bundle exec rake spec:integration:clean'
21
- exit status
22
-