cucumber-chef 2.1.0.rc.8 → 2.1.0.rc.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,11 +39,10 @@ Gem::Specification.new do |s|
39
39
 
40
40
  # Providers
41
41
  s.add_dependency("fog", ">= 1.3.1")
42
- s.add_dependency("vagrant", ">= 1.0.5")
42
+ # s.add_dependency("vagrant", ">= 1.0.5")
43
43
 
44
44
  # TDD
45
45
  s.add_dependency("cucumber", ">= 1.2.0")
46
- s.add_dependency("gherkin", "<= 2.11.5")
47
46
  s.add_dependency("rspec", ">= 2.10.0")
48
47
 
49
48
  # Support
@@ -27,18 +27,24 @@ module Cucumber
27
27
  class Config
28
28
  extend(Mixlib::Config)
29
29
 
30
+ ################################################################################
31
+
30
32
  unless const_defined?(:KEYS)
31
33
  KEYS = %w(mode provider).map(&:to_sym)
32
34
  end
35
+
33
36
  unless const_defined?(:MODES)
34
37
  MODES = %w(user test).map(&:to_sym)
35
38
  end
39
+
36
40
  unless const_defined?(:PROVIDERS)
37
41
  PROVIDERS = %w(aws vagrant).map(&:to_sym)
38
42
  end
43
+
39
44
  unless const_defined?(:PROVIDER_AWS_KEYS)
40
45
  PROVIDER_AWS_KEYS = %w(aws_access_key_id aws_secret_access_key region availability_zone aws_ssh_key_id identity_file).map(&:to_sym)
41
46
  end
47
+
42
48
  unless const_defined?(:PROVIDER_VAGRANT_KEYS)
43
49
  PROVIDER_VAGRANT_KEYS = %w(identity_file).map(&:to_sym)
44
50
  end
@@ -139,7 +145,6 @@ module Cucumber
139
145
 
140
146
  def self.verify_provider_vagrant
141
147
  # NOOP
142
- require 'vagrant'
143
148
  end
144
149
 
145
150
  ################################################################################
@@ -25,7 +25,7 @@ module Cucumber
25
25
  class VagrantError < Error; end
26
26
 
27
27
  class Vagrant
28
- attr_accessor :env, :vm
28
+ # attr_accessor :env, :vm
29
29
 
30
30
  INVALID_STATES = %w(not_created aborted).map(&:to_sym)
31
31
  RUNNING_STATES = %w(running).map(&:to_sym)
@@ -37,8 +37,8 @@ module Cucumber
37
37
  def initialize(ui=ZTK::UI.new)
38
38
  @ui = ui
39
39
 
40
- @env = ::Vagrant::Environment.new
41
- @vm = @env.primary_vm
40
+ # @env = ::Vagrant::Environment.new
41
+ # @vm = @env.primary_vm
42
42
  end
43
43
 
44
44
  ################################################################################
@@ -131,7 +131,7 @@ module Cucumber
131
131
  ################################################################################
132
132
 
133
133
  def exists?
134
- (@env.vms.count > 0)
134
+ ((self.vagrant_cli("status").output =~ /not created/) ? false : true)
135
135
  end
136
136
 
137
137
  def alive?
@@ -145,23 +145,28 @@ module Cucumber
145
145
  ################################################################################
146
146
 
147
147
  def id
148
- @vm.name
148
+ # @vm.name
149
+ "default"
149
150
  end
150
151
 
151
152
  def state
152
- @vm.state.to_sym
153
+ # @vm.state.to_sym
154
+ "unknown"
153
155
  end
154
156
 
155
157
  def username
156
- @vm.config.ssh.username
158
+ # @vm.config.ssh.username
159
+ "vagrant"
157
160
  end
158
161
 
159
162
  def ip
160
- @vm.config.ssh.host
163
+ # @vm.config.ssh.host
164
+ "127.0.0.1"
161
165
  end
162
166
 
163
167
  def port
164
- @vm.config.vm.forwarded_ports.select{ |fwd_port| (fwd_port[:name] == "ssh") }.first[:hostport].to_i
168
+ # @vm.config.vm.forwarded_ports.select{ |fwd_port| (fwd_port[:name] == "ssh") }.first[:hostport].to_i
169
+ 2222
165
170
  end
166
171
 
167
172
  ################################################################################
@@ -271,7 +271,6 @@ module Cucumber
271
271
  dependencies = {
272
272
  "cucumber_chef_version" => Cucumber::Chef::VERSION.inspect,
273
273
  "chef_version" => ::Chef::VERSION.inspect,
274
- "vagrant_version" => ::Vagrant::VERSION.inspect,
275
274
  "fog_version" => ::Fog::VERSION.inspect,
276
275
  "ruby_version" => RUBY_VERSION.inspect,
277
276
  "ruby_patchlevel" => RUBY_PATCHLEVEL.inspect,
@@ -24,7 +24,7 @@ module Cucumber
24
24
 
25
25
  ################################################################################
26
26
 
27
- VERSION = "2.1.0.rc.8" unless const_defined?(:VERSION)
27
+ VERSION = "2.1.0.rc.9" unless const_defined?(:VERSION)
28
28
 
29
29
  ################################################################################
30
30
 
data/lib/cucumber/chef.rb CHANGED
@@ -31,7 +31,6 @@ require 'chef'
31
31
  require 'chef/cookbook_uploader'
32
32
 
33
33
  require 'fog'
34
- require 'vagrant'
35
34
 
36
35
  require 'json'
37
36
  require 'mixlib/config'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.rc.8
4
+ version: 2.1.0.rc.9
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-05 00:00:00.000000000 Z
13
+ date: 2013-02-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: chef
@@ -44,22 +44,6 @@ dependencies:
44
44
  - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.3.1
47
- - !ruby/object:Gem::Dependency
48
- name: vagrant
49
- requirement: !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: 1.0.5
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: 1.0.5
63
47
  - !ruby/object:Gem::Dependency
64
48
  name: cucumber
65
49
  requirement: !ruby/object:Gem::Requirement
@@ -76,22 +60,6 @@ dependencies:
76
60
  - - ! '>='
77
61
  - !ruby/object:Gem::Version
78
62
  version: 1.2.0
79
- - !ruby/object:Gem::Dependency
80
- name: gherkin
81
- requirement: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - <=
85
- - !ruby/object:Gem::Version
86
- version: 2.11.5
87
- type: :runtime
88
- prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - <=
93
- - !ruby/object:Gem::Version
94
- version: 2.11.5
95
63
  - !ruby/object:Gem::Dependency
96
64
  name: rspec
97
65
  requirement: !ruby/object:Gem::Requirement