knife-partial-search 0.0.2 → 0.0.3

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: d0140db7060838ec89c3434595f4ac4e774966d2
4
- data.tar.gz: 546c379a20b3bcd01d4050b1576f92600a723a55
3
+ metadata.gz: 4cf858b2fc20d3548c3d7bf6687da1ab868b1f24
4
+ data.tar.gz: 03c5f714491f61d98593b98f5eea3336b59de1e8
5
5
  SHA512:
6
- metadata.gz: dd85f2bb33952214317b4755a8fd8a6ca6c80df6cd47886b66e37bd2d5b1f2cc8f7eda4f64d5f4f0c038ede08063ff43f09068d1c28cd32c906774e1bbb00ddc
7
- data.tar.gz: 6b3ab64123301b6426ac2a0367440f8f2cfb5372942390dbe279dac97301d7ab5a3eaf026b589b70b30f885012d9b3a61dc65f6c923485d81cb5ca150291f594
6
+ metadata.gz: b5ce2dcf62086f671de8574e94daf8b6625a822ee3ae41c64a0145cf20577bae1764484c49937c34ef453ea647ba8542bae76f8cbfc8d62c22f2e7e53616df92
7
+ data.tar.gz: 18ddc461262f750a64fa91d3354287236718272093bd0d7442f8a293c31c71c30b399ca6d93486238ee36f928d79bef73fb36d755e3177ece7e0f91e7e12a964
@@ -1,27 +1,25 @@
1
- class Chef
2
- class Knife
3
- class PartialSearch
4
- class FakeNode < Hash
5
- def name
6
- self['name']
7
- end
8
- def chef_environment
9
- self['chef_environment']
10
- end
11
- def run_list
12
- self['run_list'].join(', ')
13
- end
1
+ module Knife
2
+ class PartialSearch
3
+ class FakeNode < Hash
4
+ def name
5
+ self['name']
6
+ end
7
+ def chef_environment
8
+ self['chef_environment']
9
+ end
10
+ def run_list
11
+ self['run_list'].join(', ')
12
+ end
14
13
 
15
- def [](key)
16
- super(key.to_s)
17
- end
14
+ def [](key)
15
+ super(key.to_s)
16
+ end
18
17
 
19
- def kind_of?(klass)
20
- if klass.to_s == 'Chef::Node'
21
- true
22
- else
23
- super
24
- end
18
+ def kind_of?(klass)
19
+ if klass.to_s == 'Chef::Node'
20
+ true
21
+ else
22
+ super
25
23
  end
26
24
  end
27
25
  end
@@ -31,12 +31,3 @@ class Chef
31
31
  end
32
32
  end
33
33
  end
34
-
35
- class FakeNode < Hash
36
- def name
37
- self['name']
38
- end
39
- def run_list
40
- self['run_list'].join(', ')
41
- end
42
- end
@@ -17,7 +17,7 @@ class Chef
17
17
  args[:rows] = rows
18
18
  if block_given?
19
19
  q.search(type, query, args) do |node_hash|
20
- n = Chef::Knife::PartialSearch::FakeNode.new do |h,k|
20
+ n = ::Knife::PartialSearch::FakeNode.new do |h,k|
21
21
  h[k] = node_hash[k]
22
22
  end
23
23
  @@keys.each do |k,v| n[k] end
@@ -43,7 +43,7 @@ class Chef
43
43
  alias_method :old_extract, :extract_nested_value unless method_defined? :old_extract
44
44
 
45
45
  def extract_nested_value(data, nested_value_spec)
46
- if data.kind_of?(Chef::Knife::PartialSearch::FakeNode)
46
+ if data.kind_of?(::Knife::PartialSearch::FakeNode)
47
47
  data[nested_value_spec]
48
48
  else
49
49
  old_extract(data, nested_value_spec)
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module PartialSearch
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-partial-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregoire Seux
@@ -111,4 +111,3 @@ signing_key:
111
111
  specification_version: 4
112
112
  summary: Improve usual knife commands thanks to partial-search
113
113
  test_files: []
114
- has_rdoc: