chef-zero 2.0.1 → 2.0.2

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: f6c24fde8bb84962324a79c418978ec93fd52ac8
4
- data.tar.gz: 71d24e21a84902b5caa06ff2a1d48e69a1615cca
3
+ metadata.gz: 724196a25d016237466c1536eff497dbdd1e2a1e
4
+ data.tar.gz: 4ebf2ae81da945160926ba408be3e6ce802d1d8d
5
5
  SHA512:
6
- metadata.gz: 0ef14b23d22f1adcaf6551f15e505da9fe157e7015bbbaba0ae9448df6205777705501387e2d8a1d26872a42fa3e8e9fec1b3c868896273dd4e9e1424267d44a
7
- data.tar.gz: 020842c6725b2d9b73c69434b435ca2e1b4cccec446a6f9a854628b9453b46e8f4ecb5f54386875cd799661e9198688d5b24d5f963a80eb614812047ff7679e3
6
+ metadata.gz: 5e6869dfcfee74354fa1438fa6b6289d7bccf7d24f932e0af67b8fc2bfe8499466ed624a78715a2e80f13280eb11a6c3fd49f5acf648c224bd8ef54890a9d39b
7
+ data.tar.gz: 7f03e15a3e895e1e7423c0061ce8e78ff7399d178a40f1da13ca99d0a79419d3baead62d4fc9546ccd0f4121f057bef2658bbc02f977ac9c8c2ce74e7a5be955
data/README.md CHANGED
@@ -80,7 +80,7 @@ You may currently pass the following options to the initializer:
80
80
  - `debug` - run in debug mode to see all requests and responses (Default: false)
81
81
 
82
82
 
83
- CLI (Comand Line)
83
+ CLI (Command Line)
84
84
  -----------------
85
85
  If you don't want to use Chef Zero as a library, you can simply start an instance
86
86
  with the included `chef-zero` executable:
@@ -73,8 +73,8 @@ module ChefZero
73
73
  end
74
74
  end
75
75
 
76
- def from_json(filepath)
77
- self.merge!(JSON.parse(File.read(filepath)))
76
+ def from_json(json)
77
+ self.merge!(JSON.parse(json))
78
78
  end
79
79
 
80
80
  private
@@ -70,7 +70,6 @@ module ChefZero
70
70
 
71
71
  def initialize(options = {})
72
72
  @options = DEFAULT_OPTIONS.merge(options)
73
- @options[:host] = "[#{@options[:host]}]" if @options[:host].include?(':')
74
73
  @options.freeze
75
74
 
76
75
  ChefZero::Log.level = @options[:log_level].to_sym
@@ -85,12 +84,19 @@ module ChefZero
85
84
  include ChefZero::Endpoints
86
85
 
87
86
  #
88
- # The URL for this Chef Zero server.
87
+ # The URL for this Chef Zero server. If the given host is an IPV6 address,
88
+ # it is escaped in brackets according to RFC-2732.
89
+ #
90
+ # @see http://www.ietf.org/rfc/rfc2732.txt RFC-2732
89
91
  #
90
92
  # @return [String]
91
93
  #
92
94
  def url
93
- "http://#{@options[:host]}:#{@options[:port]}"
95
+ @url ||= if @options[:host].include?(':')
96
+ "http://[#{@options[:host]}]:#{@options[:port]}"
97
+ else
98
+ "http://#{@options[:host]}:#{@options[:port]}"
99
+ end
94
100
  end
95
101
 
96
102
  #
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-03 00:00:00.000000000 Z
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-log
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: moneta
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - <
46
- - !ruby/object:Gem::Version
47
- version: 0.7.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - <
53
- - !ruby/object:Gem::Version
54
- version: 0.7.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: json
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
183
  version: '0'
198
184
  requirements: []
199
185
  rubyforge_project:
200
- rubygems_version: 2.2.0
186
+ rubygems_version: 2.2.1
201
187
  signing_key:
202
188
  specification_version: 4
203
189
  summary: Self-contained, easy-setup, fast-start in-memory Chef server for testing