cfa 0.3.0 → 0.3.1

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: 7c7c319b95af69d63982cc26ad42fe34fd9b093c
4
- data.tar.gz: 444f7f376376ed86f043d141d3e03f72ea1be175
3
+ metadata.gz: 9cce96087b2572d125c83d3644a764cc9452a78c
4
+ data.tar.gz: 39d693b539e2d36fc5fdbb717ae45ab693d75d1b
5
5
  SHA512:
6
- metadata.gz: 8928604db487fc98241e9f30723aeea719a98f7e54c8b2963f9429ac4308c51de8501757ed625391ba304dc86976c0ed0ed8eb5db66608b48276184a99323bfc
7
- data.tar.gz: 58fbf54148ae3943c12cf0b90d3cae9b4809ae351870086e9180c6308ebaab0f7e367346777f1a8d911b9f6854db496ca17e407dff4ab8d83359d5e174ef71b2
6
+ metadata.gz: fb3a9fd48997d1fb9d4b558dcc9fd34ec98bad607f39f78adbacb73070ec0997b92fe060f3beb5a42c03e23fad052f9fe17816660afda29a0dcc3ce399a4ffa3
7
+ data.tar.gz: 87502b14fe5c75961b76a2c4874b5e9ec29706a59bce6b3af631503c5ce3c22f5e5564597cb18e237a326665cb2847d353480d8063a87221ec031c538d226a5e
@@ -156,6 +156,16 @@ module CFA
156
156
  @model.generic_set(@name, value ? @true_value : @false_value)
157
157
  end
158
158
 
159
+ # enhanced inspect method to contain important data
160
+ def inspect
161
+ "#<CFA::BooleanValue:0x#{object_id} name=#{@name.inspect}, " \
162
+ "data=#{data.inspect}, true_value=#{@true_value.inspect}, " \
163
+ "false_value=#{@false_value.inspect}>"
164
+ end
165
+
166
+ # also have better to_s
167
+ alias_method :to_s, :inspect
168
+
159
169
  private
160
170
 
161
171
  def data
@@ -9,7 +9,7 @@ module CFA
9
9
  return false unless key_match?(element, key)
10
10
  return false unless collection_match?(element, collection)
11
11
  return false unless value_match?(element, value_matcher)
12
- return false unless !block || block.call(element[:key], element[:value])
12
+ return false unless !block || yield(element[:key], element[:value])
13
13
  return true
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Reidinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-28 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-augeas
@@ -40,7 +40,7 @@ files:
40
40
  - lib/cfa/placer.rb
41
41
  homepage: http://github.com/config-files-api/config_files_api
42
42
  licenses:
43
- - LGPLv3
43
+ - LGPL-3.0
44
44
  metadata: {}
45
45
  post_install_message:
46
46
  rdoc_options: []
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  version: 1.3.6
59
59
  requirements: []
60
60
  rubyforge_project:
61
- rubygems_version: 2.2.2
61
+ rubygems_version: 2.4.5.1
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: CFA (Config Files API) provides an easy way to create models on top of configuration