vagrant-berkshelf 1.3.7 → 1.4.0.dev1

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: e1066521ec6181be56b05a4262d6abb11399406c
4
- data.tar.gz: 79cb14d052022423b27ec8c5d0efeafd5fc3795e
3
+ metadata.gz: ab72184e8817a778c14479ba0240b7428e6ca499
4
+ data.tar.gz: 014174b38d6b5bcbed17974029eaf14a117aa033
5
5
  SHA512:
6
- metadata.gz: 1e3aa1aa1a2aa4a79de72166e81382e79c7590bf503e21871d87f38bc9a23e24cf6681c21635a7829e8438b713a63da39411ac4172c83740dded8d7dee667599
7
- data.tar.gz: ecff6e68824b0d48fbb46a4318796a366b258fd05950fa692ac99b876ab3a3c4fe5af4e445c485e5d8e57f7d56f2409a1ef01fae3dfe98b245e0b5c8c30fab87
6
+ metadata.gz: 931caa0414264ce23e463c696d5dc6a54a53bae4385f65c6347632437d71510b30adf23dc7580c48df75300b011a26bbdb0469d8dfcefda97efc1598275b2d85
7
+ data.tar.gz: 3ce49237284d8f3c84de4191b4432da3c25d3dfd2fe2d85e2021c187f1ffa06db6559acdf65ae78dbdb0d0efbf045cf4b0294d36eb1b4924e631fbba1a44a90c
data/.travis.yml CHANGED
@@ -8,4 +8,5 @@ notifications:
8
8
  - "irc.freenode.org#berkshelf"
9
9
  skip_join: true
10
10
  use_notice: true
11
+ bundler_args: --without doc guard
11
12
  script: 'bundle exec thor spec:ci'
data/CHANGELOG.md CHANGED
@@ -1,13 +1,7 @@
1
- # 1.3.5
2
-
3
- * Relax constraint on SSH to fix Vagrant 1.4 support
4
-
5
1
  # 1.3.4
6
-
7
2
  - Fix undefined constant error when provisioning with Vagrant AWS
8
3
 
9
4
  # 1.2.0
10
-
11
5
  - Rename to vagrant-berkshelf
12
6
  - Trigger the plugin also on `vagrant reload`
13
7
  - Check Vagrant version to see if it's supported
@@ -16,15 +10,12 @@
16
10
  - Respect --no-provision flag
17
11
 
18
12
  # 1.1.2
19
-
20
13
  - Support Vagrant 1.2
21
14
  - Plugin defaults to enabled, if Berksfile exists.
22
15
 
23
16
  # 1.1.0
24
-
25
17
  - Plugin defaults to disabled. Set 'config.berkshelf.enabled = true' in Vagrant config
26
18
 
27
19
  # 1.0.0
28
-
29
20
  - Separated Berkshelf Vagrant plugin into it's own gem (this one)
30
21
  - Support Vagrant 1.1.x
data/Gemfile CHANGED
@@ -3,15 +3,18 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- gem 'vagrant', github: "mitchellh/vagrant"
6
+ gem 'vagrant', github: 'mitchellh/vagrant'
7
+ end
8
+
9
+ group :guard do
7
10
  gem 'coolline'
11
+ gem 'fuubar'
8
12
  gem 'guard', '>= 1.5.0'
9
13
  gem 'guard-rspec'
10
14
  gem 'guard-spork'
11
15
  gem 'guard-yard'
12
16
  gem 'redcarpet'
13
17
  gem 'yard'
14
- gem 'fuubar'
15
18
 
16
19
  require 'rbconfig'
17
20
 
data/Thorfile CHANGED
@@ -4,15 +4,14 @@ $:.push File.expand_path("../lib", __FILE__)
4
4
  require 'bundler'
5
5
  require 'bundler/setup'
6
6
  require 'thor/rake_compat'
7
-
8
7
  require 'berkshelf/vagrant'
9
8
 
10
- class Default < Thor
9
+ GEM_PKG = "vagrant-berkshelf-#{Berkshelf::Vagrant::VERSION}.gem".freeze
10
+
11
+ class Gem < Thor
11
12
  include Thor::RakeCompat
12
13
  Bundler::GemHelper.install_tasks
13
14
 
14
- GEM_PKG = "vagrant-berkshelf-#{Berkshelf::Vagrant::VERSION}.gem".freeze
15
-
16
15
  desc "build", "Build #{GEM_PKG} into the pkg directory"
17
16
  def build
18
17
  Rake::Task["build"].execute
@@ -27,6 +26,11 @@ class Default < Thor
27
26
  def install
28
27
  Rake::Task["install"].execute
29
28
  end
29
+ end
30
+
31
+ class Spec < Thor
32
+ include Thor::Actions
33
+ default_task :unit
30
34
 
31
35
  desc "plug", "Install #{GEM_PKG} into vagrant"
32
36
  def plug
@@ -34,29 +38,22 @@ class Default < Thor
34
38
  run "vagrant plugin install pkg/#{GEM_PKG}"
35
39
  end
36
40
 
37
- class Spec < Thor
38
- include Thor::Actions
39
-
40
- namespace :spec
41
- default_task :unit
42
-
43
- desc "ci", "Run all possible tests on Travis-CI"
44
- def ci
45
- ENV['CI'] = 'true' # Travis-CI also sets this, but set it here for local testing
46
- invoke(:unit)
47
- end
41
+ desc "ci", "Run all possible tests on Travis-CI"
42
+ def ci
43
+ ENV['CI'] = 'true' # Travis-CI also sets this, but set it here for local testing
44
+ invoke(:unit)
45
+ end
48
46
 
49
- desc "unit", "Run unit tests"
50
- def unit
51
- unless run_unit
52
- exit 1
53
- end
47
+ desc "unit", "Run unit tests"
48
+ def unit
49
+ unless run_unit
50
+ exit 1
54
51
  end
52
+ end
55
53
 
56
- no_tasks do
57
- def run_unit(*flags)
58
- run "rspec --color --format=documentation #{flags.join(' ')} spec"
59
- end
54
+ no_tasks do
55
+ def run_unit(*flags)
56
+ run "rspec --color --format=documentation #{flags.join(' ')} spec"
60
57
  end
61
58
  end
62
59
  end
@@ -4,21 +4,21 @@ rescue LoadError
4
4
  raise 'The Vagrant Berkshelf plugin must be run within Vagrant.'
5
5
  end
6
6
 
7
+ require 'berkshelf'
7
8
  require 'fileutils'
8
9
  require 'json'
9
10
  require 'tmpdir'
10
11
 
11
- require 'berkshelf'
12
- require 'berkshelf/vagrant/version'
13
- require 'berkshelf/vagrant/errors'
12
+ require_relative 'vagrant/errors'
13
+ require_relative 'vagrant/version'
14
14
 
15
15
  module Berkshelf
16
16
  # @author Jamie Winsor <jamie@vialstudios.com>
17
17
  module Vagrant
18
- autoload :Action, 'berkshelf/vagrant/action'
19
- autoload :Config, 'berkshelf/vagrant/config'
20
- autoload :Env, 'berkshelf/vagrant/env'
21
- autoload :EnvHelpers, 'berkshelf/vagrant/env_helpers'
18
+ require_relative 'vagrant/action'
19
+ require_relative 'vagrant/config'
20
+ require_relative 'vagrant/env'
21
+ require_relative 'vagrant/env_helpers'
22
22
 
23
23
  TESTED_CONSTRAINT = "~> 1.2.0"
24
24
 
@@ -53,4 +53,4 @@ module Berkshelf
53
53
  end
54
54
  end
55
55
 
56
- require 'berkshelf/vagrant/plugin'
56
+ require_relative 'vagrant/plugin'
@@ -1,12 +1,15 @@
1
1
  module Berkshelf
2
2
  module Vagrant
3
3
  module Action
4
- autoload :Clean, 'berkshelf/vagrant/action/clean'
5
- autoload :ConfigureChef, 'berkshelf/vagrant/action/configure_chef'
6
- autoload :Install, 'berkshelf/vagrant/action/install'
7
- autoload :LoadShelf, 'berkshelf/vagrant/action/load_shelf'
8
- autoload :SetUI, 'berkshelf/vagrant/action/set_ui'
9
- autoload :Upload, 'berkshelf/vagrant/action/upload'
4
+ require_relative 'env'
5
+ require_relative 'env_helpers'
6
+
7
+ require_relative 'action/clean'
8
+ require_relative 'action/configure_chef'
9
+ require_relative 'action/install'
10
+ require_relative 'action/load_shelf'
11
+ require_relative 'action/set_ui'
12
+ require_relative 'action/upload'
10
13
 
11
14
  class << self
12
15
  # Return the Berkshelf install middleware stack. When placed in the action chain
@@ -40,10 +40,10 @@ module Berkshelf
40
40
  def install(env)
41
41
  check_vagrant_version(env)
42
42
  env[:berkshelf].ui.info "Updating Vagrant's berkshelf: '#{env[:berkshelf].shelf}'"
43
- opts = {
44
- path: env[:berkshelf].shelf
45
- }.merge(env[:global_config].berkshelf.to_hash).symbolize_keys!
46
- env[:berkshelf].berksfile.install(opts)
43
+ FileUtils.rm_rf(env[:berkshelf].shelf)
44
+
45
+ opts = env[:machine].config.berkshelf.to_hash.symbolize_keys
46
+ env[:berkshelf].berksfile.vendor(env[:berkshelf].shelf, opts)
47
47
  end
48
48
 
49
49
  def warn_disabled_but_berksfile_exists(env)
@@ -15,9 +15,9 @@ module Berkshelf
15
15
  end
16
16
 
17
17
  # Make sure that Berkshelf itself uses distinct directories for each vagrant run.
18
- ENV['BERKSHELF_PATH'] = File.join(Berkshelf.berkshelf_path, env[:machine].name.to_s) unless ENV['BERKSHELF_PATH']
18
+ ENV['BERKSHELF_PATH'] ||= File.join(Berkshelf.berkshelf_path, env[:machine].name.to_s)
19
19
 
20
- shelf = load_shelf env
20
+ shelf = load_shelf(env)
21
21
 
22
22
  if shelf.nil?
23
23
  shelf = cache_shelf(Berkshelf::Vagrant.mkshelf(env[:machine].name), env)
@@ -15,9 +15,9 @@ module Berkshelf
15
15
 
16
16
  def initialize
17
17
  if Gem::Version.new(::Vagrant::VERSION) >= Gem::Version.new("1.2")
18
- @ui = ::Vagrant::UI::Colored.new.scope('Berkshelf')
18
+ @ui = ::Vagrant::UI::Colored.new.scope('Berkshelf')
19
19
  else
20
- @ui = ::Vagrant::UI::Colored.new('Berkshelf')
20
+ @ui = ::Vagrant::UI::Colored.new('Berkshelf')
21
21
  end
22
22
  @config = Berkshelf::Config.instance
23
23
  end
@@ -48,7 +48,7 @@ module Berkshelf
48
48
  #
49
49
  # @return [Boolean]
50
50
  def berkshelf_enabled?(env)
51
- env[:global_config].berkshelf.enabled
51
+ env[:machine].config.berkshelf.enabled
52
52
  end
53
53
 
54
54
  # Determine if --no-provision was specified
@@ -1,5 +1,5 @@
1
1
  module Berkshelf
2
2
  module Vagrant
3
- VERSION = "1.3.7"
3
+ VERSION = "1.4.0.dev1"
4
4
  end
5
5
  end
@@ -19,15 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
  spec.required_ruby_version = '>= 1.9.1'
21
21
 
22
- spec.add_dependency 'berkshelf', '~> 2.0.7'
22
+ spec.add_dependency 'berkshelf', '>= 3.0.0.beta3'
23
23
 
24
- # Explicit locks to ensure we activate the proper gem versions for Vagrant
25
- spec.add_dependency 'i18n', '~> 0.6.0'
26
- spec.add_dependency 'net-ssh', '>= 2.6.6', '< 2.8.0'
27
- spec.add_dependency 'net-scp', '~> 1.1.0'
28
-
29
- spec.add_development_dependency 'bundler', '~> 1.3'
30
- spec.add_development_dependency 'spork'
31
- spec.add_development_dependency 'rspec'
32
- spec.add_development_dependency 'thor'
24
+ spec.add_development_dependency 'spork', '~> 0.9'
25
+ spec.add_development_dependency 'rspec', '~> 2.13'
26
+ spec.add_development_dependency 'thor', '~> 0.18'
33
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-berkshelf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7
4
+ version: 1.4.0.dev1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -9,126 +9,64 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-16 00:00:00.000000000 Z
12
+ date: 2013-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: berkshelf
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ~>
19
- - !ruby/object:Gem::Version
20
- version: 2.0.7
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ~>
26
- - !ruby/object:Gem::Version
27
- version: 2.0.7
28
- - !ruby/object:Gem::Dependency
29
- name: i18n
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
34
- version: 0.6.0
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ~>
40
- - !ruby/object:Gem::Version
41
- version: 0.6.0
42
- - !ruby/object:Gem::Dependency
43
- name: net-ssh
44
16
  requirement: !ruby/object:Gem::Requirement
45
17
  requirements:
46
18
  - - '>='
47
19
  - !ruby/object:Gem::Version
48
- version: 2.6.6
49
- - - <
50
- - !ruby/object:Gem::Version
51
- version: 2.8.0
20
+ version: 3.0.0.beta3
52
21
  type: :runtime
53
22
  prerelease: false
54
23
  version_requirements: !ruby/object:Gem::Requirement
55
24
  requirements:
56
25
  - - '>='
57
26
  - !ruby/object:Gem::Version
58
- version: 2.6.6
59
- - - <
60
- - !ruby/object:Gem::Version
61
- version: 2.8.0
27
+ version: 3.0.0.beta3
62
28
  - !ruby/object:Gem::Dependency
63
- name: net-scp
64
- requirement: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: 1.1.0
69
- type: :runtime
70
- prerelease: false
71
- version_requirements: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- version: 1.1.0
76
- - !ruby/object:Gem::Dependency
77
- name: bundler
29
+ name: spork
78
30
  requirement: !ruby/object:Gem::Requirement
79
31
  requirements:
80
32
  - - ~>
81
33
  - !ruby/object:Gem::Version
82
- version: '1.3'
34
+ version: '0.9'
83
35
  type: :development
84
36
  prerelease: false
85
37
  version_requirements: !ruby/object:Gem::Requirement
86
38
  requirements:
87
39
  - - ~>
88
40
  - !ruby/object:Gem::Version
89
- version: '1.3'
90
- - !ruby/object:Gem::Dependency
91
- name: spork
92
- requirement: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- type: :development
98
- prerelease: false
99
- version_requirements: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '>='
102
- - !ruby/object:Gem::Version
103
- version: '0'
41
+ version: '0.9'
104
42
  - !ruby/object:Gem::Dependency
105
43
  name: rspec
106
44
  requirement: !ruby/object:Gem::Requirement
107
45
  requirements:
108
- - - '>='
46
+ - - ~>
109
47
  - !ruby/object:Gem::Version
110
- version: '0'
48
+ version: '2.13'
111
49
  type: :development
112
50
  prerelease: false
113
51
  version_requirements: !ruby/object:Gem::Requirement
114
52
  requirements:
115
- - - '>='
53
+ - - ~>
116
54
  - !ruby/object:Gem::Version
117
- version: '0'
55
+ version: '2.13'
118
56
  - !ruby/object:Gem::Dependency
119
57
  name: thor
120
58
  requirement: !ruby/object:Gem::Requirement
121
59
  requirements:
122
- - - '>='
60
+ - - ~>
123
61
  - !ruby/object:Gem::Version
124
- version: '0'
62
+ version: '0.18'
125
63
  type: :development
126
64
  prerelease: false
127
65
  version_requirements: !ruby/object:Gem::Requirement
128
66
  requirements:
129
- - - '>='
67
+ - - ~>
130
68
  - !ruby/object:Gem::Version
131
- version: '0'
69
+ version: '0.18'
132
70
  description: A Vagrant plugin to add Berkshelf integration to the Chef provisioners
133
71
  email:
134
72
  - jamie@vialstudios.com
@@ -181,12 +119,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
119
  version: 1.9.1
182
120
  required_rubygems_version: !ruby/object:Gem::Requirement
183
121
  requirements:
184
- - - '>='
122
+ - - '>'
185
123
  - !ruby/object:Gem::Version
186
- version: '0'
124
+ version: 1.3.1
187
125
  requirements: []
188
126
  rubyforge_project:
189
- rubygems_version: 2.0.14
127
+ rubygems_version: 2.0.3
190
128
  signing_key:
191
129
  specification_version: 4
192
130
  summary: A Vagrant plugin to add Berkshelf integration to the Chef provisioners