chefspec 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa02a86e6813498d4a4c73b0d7f968003f34878c
4
- data.tar.gz: b03370fdbbda88588e840b6f0f070af15d92a349
3
+ metadata.gz: 4fdab9ea6808e6834ea2b8ca84e5986f1884c232
4
+ data.tar.gz: 5892bad574e6176b98a579b785897ab6f19e9f6c
5
5
  SHA512:
6
- metadata.gz: 7c353f63cd8f5c517953bc662944c3c9a37d25916b9f9c6c5d997361217b9e0be1fff8b1cd4a48e775cf363a74e6c799db8156bd6360a1514204531dd4c1680b
7
- data.tar.gz: f0b5cc3ebc85afa21f678b8441f9cbcc438f746433ebfce40ac945a0b7d2fe356df0d99c55a561d38211c4130832ebda63475691611ca0c58e0f7d4acf6a828f
6
+ metadata.gz: 1ac07c3eec2c331b441b06cf5c9389d6e8488739708c9bf92ed2b84cd046004ba9e6f7b49da25b158cdbc9f3418b89100e914b18e8bba8d84c1322fb5516d750
7
+ data.tar.gz: 707917cef6b44d97a296cb0c3d8d11641af10e05cb251ad91ed4c094935c863d4e13a756cb10ae10092a251a3462f9f3d064625aba2da8a31e3ca21f19c95cf0
@@ -314,7 +314,7 @@ module ChefSpec
314
314
  #
315
315
  def expand_run_list!
316
316
  client.instance_eval do
317
- @run_list_expansion = @node.expand!('disk')
317
+ @run_list_expansion = expand_run_list
318
318
  @expanded_run_list_with_versions = @run_list_expansion.recipes.with_version_constraints_strings
319
319
  end
320
320
  end
@@ -99,7 +99,14 @@ module ChefSpec
99
99
  def self.entity(method, klass, key)
100
100
  class_eval <<-EOH, __FILE__, __LINE__ + 1
101
101
  def create_#{method}(name, data = {})
102
- data = JSON.fast_generate(data) unless '#{key}' == 'data'
102
+ unless '#{key}' == 'data'
103
+ # Automatically set the "name" if no explicit one was given
104
+ data[:name] ||= name
105
+
106
+ # Convert it to JSON
107
+ data = JSON.fast_generate(data)
108
+ end
109
+
103
110
  @server.load_data('#{key}' => { name => data })
104
111
  end
105
112
 
@@ -1,3 +1,3 @@
1
1
  module ChefSpec
2
- VERSION = '3.1.3'
2
+ VERSION = '3.1.4'
3
3
  end
data/locales/en.yml ADDED
@@ -0,0 +1,19 @@
1
+ en:
2
+ chefspec:
3
+ errors:
4
+ cookbook_path_not_found: >
5
+ I could not find or infer a `cookbook_path' from your current working
6
+ directory. Please make sure you put your specs (tests) under a directory
7
+ named `spec' or manually set the cookbook path in the RSpec
8
+ configuration.
9
+ gem_load_error: >
10
+ I could not load the %{name} gem! You must have %{name} installed on
11
+ your local system before you can use the `%{gem}' plugin. You can
12
+ install %{gem} by running `gem install %{gem}', or add %{name} to your
13
+ Gemfile and run the `bundle' command to install.
14
+ not_stubbed: |-
15
+ Executing a real %{type} is disabled. Unregistered %{type}: `%{signature}`"
16
+
17
+ You can stub this %{type} with:
18
+
19
+ %{stub}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chefspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Crump
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-02 00:00:00.000000000 Z
12
+ date: 2014-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -240,6 +240,7 @@ files:
240
240
  - lib/chefspec/stubs/stub.rb
241
241
  - lib/chefspec/util.rb
242
242
  - lib/chefspec/version.rb
243
+ - locales/en.yml
243
244
  homepage: http://code.sethvargo.com/chefspec
244
245
  licenses:
245
246
  - MIT