vagrant-niftycloud 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ before_install:
3
+ - gem install bundler
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.1.5 (July 27, 2013)
2
+
3
+ * gemspecファイルのライセンス表示を追加
4
+
1
5
  # 0.1.4 (July 25, 2013)
2
6
 
3
7
  * Vagrantfileでinstance_idを指定せずにvagrant upした場合に、instance_id決定ロジックが can't convert nil into String を吐くケースがある問題を修正
data/Gemfile CHANGED
@@ -6,5 +6,5 @@ group :development do
6
6
  # We depend on Vagrant for development, but we don't add it as a
7
7
  # gem dependency because we expect to be installed within the
8
8
  # Vagrant environment itself using `vagrant plugin`.
9
- #gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
9
+ gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
10
10
  end
data/README.md CHANGED
@@ -1,13 +1,16 @@
1
- # Vagrant NiftyCloud Provider
1
+ # vagrant-niftycloud
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/vagrant-niftycloud.png)](http://badge.fury.io/rb/vagrant-niftycloud)
4
+ [![Build Status](https://travis-ci.org/sakama/vagrant-niftycloud.png?branch=master)](https://travis-ci.org/sakama/vagrant-niftycloud)
5
+ [![Dependency Status](https://gemnasium.com/sakama/vagrant-niftycloud.png)](https://gemnasium.com/sakama/vagrant-niftycloud)
2
6
 
3
7
  `開発中!8月頭を目処に処理をブラッシュアップします`
4
8
 
5
9
  `リージョン・ゾーン周り以外のロジックはほぼ問題ないと思います`
6
10
 
7
- [Vagrant](http://www.vagrantup.com) 1.2以降のバージョンで[ニフティクラウド](http://cloud.nifty.com/)
8
- を操作するためのprovider機能を追加するプラグインです。
11
+ [Vagrant](http://www.vagrantup.com) 1.2以降のバージョンのproviderとして[ニフティクラウド](http://cloud.nifty.com/) を使えるようにするためのプラグインです。
9
12
 
10
- Vagrantでニフティクラウド上のサーバインスタンスの制御や[Chef](http://www.opscode.com/chef/)や[Puppet](https://puppetlabs.com/) 等を使ったサーバのprovisioningが可能となります。
13
+ Vagrantでニフティクラウド上のサーバインスタンスの制御や、[Chef](http://www.opscode.com/chef/)や[Puppet](https://puppetlabs.com/) 等を使ったサーバのprovisioningが可能となります。
11
14
 
12
15
  Chef以外の動作確認は行なっていませんが、プラグインで行なっているのはSSH実行可能な状態にすることとrsyncによるファイル転送だけなので、Vagrantでサポートされているものであれば動作するのではないかと思います。
13
16
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module NiftyCloud
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ describe VagrantPlugins::NiftyCloud::Config do
19
19
  its("image_id") { should be_nil }
20
20
  its("key_name") { should be_nil }
21
21
  its("zone") { should be_nil }
22
- its("instance_ready_timeout") { should == 120 }
22
+ its("instance_ready_timeout") { should == 300 }
23
23
  its("instance_type") { should == "mini" }
24
24
  its("secret_access_key") { should be_nil }
25
25
  its("firewall") { should == [] }
@@ -57,8 +57,8 @@ describe VagrantPlugins::NiftyCloud::Config do
57
57
 
58
58
  context "with NiftyCloud credential environment variables" do
59
59
  before :each do
60
- ENV.stub(:[]).with("NIFTY_ACCESS_KEY").and_return("access_key")
61
- ENV.stub(:[]).with("NIFTY_SECRET_KEY").and_return("secret_key")
60
+ ENV.stub(:[]).with("NIFTY_CLOUD_ACCESS_KEY").and_return("access_key_id")
61
+ ENV.stub(:[]).with("NIFTY_CLOUD_SECRET_KEY").and_return("secret_access_key")
62
62
  end
63
63
 
64
64
  subject do
@@ -67,8 +67,8 @@ describe VagrantPlugins::NiftyCloud::Config do
67
67
  end
68
68
  end
69
69
 
70
- its("access_key_id") { should == "access_key" }
71
- its("secret_access_key") { should == "secret_key" }
70
+ its("access_key_id") { should == "access_key_id" }
71
+ its("secret_access_key") { should == "secret_access_key" }
72
72
  end
73
73
  end
74
74
 
@@ -87,6 +87,11 @@ describe VagrantPlugins::NiftyCloud::Config do
87
87
  instance.secret_access_key = config_secret_access_key
88
88
  end
89
89
 
90
+ it "should raise an exception if not finalized" do
91
+ expect { instance.get_zone_config("east-12") }.
92
+ to raise_error
93
+ end
94
+
90
95
  context "with no specific config set" do
91
96
  subject do
92
97
  # Set the values on the top-level object
@@ -95,6 +100,7 @@ describe VagrantPlugins::NiftyCloud::Config do
95
100
  # Finalize so we can get the zone config
96
101
  instance.finalize!
97
102
 
103
+ instance.get_zone_config("east-12")
98
104
  end
99
105
 
100
106
  its("access_key_id") { should == config_access_key_id }
@@ -105,6 +111,21 @@ describe VagrantPlugins::NiftyCloud::Config do
105
111
  end
106
112
 
107
113
  context "with a specific config set" do
114
+ let(:zone_name) { "hashi-zone" }
115
+
116
+ subject do
117
+ # Set the values on a specific region
118
+ instance.zone_config zone_name do |config|
119
+ set_test_values(config)
120
+ end
121
+
122
+ # Finalize so we can get the region config
123
+ instance.finalize!
124
+
125
+ # Get the region
126
+ instance.get_zone_config(zone_name)
127
+ end
128
+
108
129
  its("access_key_id") { should == config_access_key_id }
109
130
  its("image_id") { should == config_image_id }
110
131
  its("key_name") { should == config_key_name }
@@ -145,10 +166,5 @@ describe VagrantPlugins::NiftyCloud::Config do
145
166
 
146
167
  its("image_id") { should == "child" }
147
168
  end
148
-
149
- describe "merging" do
150
- let(:first) { described_class.new }
151
- let(:second) { described_class.new }
152
- end
153
169
  end
154
170
  end
@@ -4,10 +4,11 @@ require "vagrant-niftycloud/version"
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "vagrant-niftycloud"
6
6
  s.version = VagrantPlugins::NiftyCloud::VERSION
7
+ s.license = 'MIT'
7
8
  s.platform = Gem::Platform::RUBY
8
9
  s.authors = "Satoshi Akama"
9
10
  s.email = "satoshiakama@gmail.com"
10
- s.homepage = "http://www.vagrantup.com"
11
+ s.homepage = "https://github.com/sakama/vagrant-niftycloud"
11
12
  s.summary = "Enables Vagrant to manage machines in Nifty Cloud"
12
13
  s.description = "Enables Vagrant to manage machines in Nifty Cloud."
13
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-niftycloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-25 00:00:00.000000000 Z
12
+ date: 2013-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70242618690860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *70242618690860
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: rspec-core
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70242618689380 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 2.12.2
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 2.12.2
35
+ version_requirements: *70242618689380
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: rspec-expectations
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70242618687580 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ~>
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: 2.12.1
54
44
  type: :development
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 2.12.1
46
+ version_requirements: *70242618687580
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: rspec-mocks
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70242618685820 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ~>
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: 2.12.1
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 2.12.1
57
+ version_requirements: *70242618685820
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: nifty-cloud-sdk
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70242618685340 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ! '>='
@@ -85,12 +65,7 @@ dependencies:
85
65
  version: '1.7'
86
66
  type: :runtime
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '1.7'
68
+ version_requirements: *70242618685340
94
69
  description: Enables Vagrant to manage machines in Nifty Cloud.
95
70
  email: satoshiakama@gmail.com
96
71
  executables: []
@@ -131,8 +106,10 @@ files:
131
106
  - vagrant-niftycloud.gemspec
132
107
  - Vagrantfile.chef.sample
133
108
  - .gitignore
134
- homepage: http://www.vagrantup.com
135
- licenses: []
109
+ - .travis.yml
110
+ homepage: https://github.com/sakama/vagrant-niftycloud
111
+ licenses:
112
+ - MIT
136
113
  post_install_message:
137
114
  rdoc_options: []
138
115
  require_paths:
@@ -145,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
122
  version: '0'
146
123
  segments:
147
124
  - 0
148
- hash: -1485453421114679184
125
+ hash: -102762255497424011
149
126
  required_rubygems_version: !ruby/object:Gem::Requirement
150
127
  none: false
151
128
  requirements:
@@ -154,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
131
  version: 0.1.0
155
132
  requirements: []
156
133
  rubyforge_project: vagrant-nifycloud
157
- rubygems_version: 1.8.23
134
+ rubygems_version: 1.8.11
158
135
  signing_key:
159
136
  specification_version: 3
160
137
  summary: Enables Vagrant to manage machines in Nifty Cloud