ruby-development-toolbox 1.3.1 → 1.3.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: f9bb887cbfc473c25506ca33604187b4b15a33f1
4
- data.tar.gz: 25eef0d7c4cfbc4c698444642a02bd2328f24dae
3
+ metadata.gz: 910138d99d7862d7ce2725e50334afc5bbc51565
4
+ data.tar.gz: 6fe90a88dd79fb5e49ec65b9ffca2836eb3c811d
5
5
  SHA512:
6
- metadata.gz: 9977bce3f042f36f8d9f191a944bb8359ba7da27187d9ff178ab66696141beb5d89de8453ef3841c285a496277e9164fa4dc42ba05015efea836c4e1e2dbe38e
7
- data.tar.gz: dc32154bbe283c1114ef590ddc625293ae7ff835531cc19ce7190357a8257d03d429783b354a98664156088c218c6385c028f74665c406ec934ce0f5633f4a74
6
+ metadata.gz: c2a6894e4d066e35a9fb3963e2b8b03d9f00c7ed79da652f4e3090760d9165776dd39623263dd46619e1588bd823899a04c50214fd48aebdf1c6f1a8a53c2b32
7
+ data.tar.gz: f91363877803840ded559ef939f2d88298c1ce65e81ceaee7152796ed7c7206e64342f9ab13c2e2e7a0960297bf065410732e8cf0783a6f0091502bafb04008d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.2
@@ -1,70 +1,82 @@
1
- ##
2
- # Extending String function to be able to convert a String 'true' or 'false' to a boolean true/false.
3
- # See the Boolean module for usage
4
- #
5
1
  class String
2
+
3
+ ##
4
+ # Extending String function to be able to convert a String 'true' or 'false' to a boolean true/false.
5
+ # See the Boolean module for usage
6
+ #
6
7
  def to_bool
7
8
  (self =~ /^true$/i) == 0
8
9
  end
10
+
9
11
  end
10
12
 
11
- ##
12
- # Implementing to_bool operation that returns self.
13
- # See the Boolean module for usage
14
- #
15
13
  class TrueClass
14
+
15
+ ##
16
+ # Implementing to_bool operation that returns self.
17
+ # See the Boolean module for usage
18
+ #
16
19
  def to_bool
17
20
  self
18
21
  end
22
+
19
23
  end
20
24
 
21
- ##
22
- # Implementing to_bool operation that returns self.
23
- # See the Boolean module for usage
24
- #
25
25
  class FalseClass
26
+
27
+ ##
28
+ # Implementing to_bool operation that returns self.
29
+ # See the Boolean module for usage
30
+ #
26
31
  def to_bool
27
32
  self
28
33
  end
34
+
29
35
  end
30
36
 
31
- ##
32
- # Implementing to_bool operation that returns self.
33
- # See the Boolean module for usage
34
- #
35
37
  class NilClass
38
+
39
+ ##
40
+ # Implementing to_bool operation that returns self.
41
+ # See the Boolean module for usage
42
+ #
36
43
  def to_bool
37
44
  self
38
45
  end
46
+
39
47
  end
40
48
 
41
- ##
42
- # The main application of the Boolean module is to
43
- # support reading boolean values from a String (e.g.
44
- # while reading a configuration value) and having the
45
- # ability to convert it back to a boolean true/false
46
- # for easier evaluation in your Ruby code
47
- #
48
- # == Usage
49
- #
50
- # Working with Boolean module can be very simple, for example:
51
- #
52
- # require 'toolbox/boolean'
53
- #
54
- # list_of_values = [
55
- # 'true',
56
- # 'True',
57
- # 'TRUE',
58
- # 'false',
59
- # 'False',
60
- # 'FALSE',
61
- # nil,
62
- # ]
63
- #
64
- # list_of_values.each do |string|
65
- # puts "This evaluated to true" if string.to_bool
66
- # puts "This evaluated to false or was nil" unless string.to_bool
67
- # end
68
- #
69
- module Boolean
49
+ module Toolbox
50
+
51
+ ##
52
+ # The main application of the Boolean module is to
53
+ # support reading boolean values from a String (e.g.
54
+ # while reading a configuration value) and having the
55
+ # ability to convert it back to a boolean true/false
56
+ # for easier evaluation in your Ruby code
57
+ #
58
+ # == Usage
59
+ #
60
+ # Working with Boolean module can be very simple, for example:
61
+ #
62
+ # require 'toolbox/boolean'
63
+ #
64
+ # list_of_values = [
65
+ # 'true',
66
+ # 'True',
67
+ # 'TRUE',
68
+ # 'false',
69
+ # 'False',
70
+ # 'FALSE',
71
+ # nil,
72
+ # ]
73
+ #
74
+ # list_of_values.each do |string|
75
+ # puts "This evaluated to true" if string.to_bool
76
+ # puts "This evaluated to false or was nil" unless string.to_bool
77
+ # end
78
+ #
79
+ module Boolean
80
+ end
81
+
70
82
  end
@@ -19,15 +19,19 @@ module Gem
19
19
  end
20
20
  end
21
21
 
22
- ##
23
- # Extends the functionality of a Gem::Specification to be able to retrieve the latest version of gems
24
- # currently on your system.
25
- #
26
- # == Usage
27
- #
28
- # Gem::Specification.latest_versions.each do |spec|
29
- # puts "#{spec.name} (#{spec.version})"
30
- # end
31
- #
32
- module GemSpecification
22
+ module Toolbox
23
+
24
+ ##
25
+ # Extends the functionality of a Gem::Specification to be able to retrieve the latest version of gems
26
+ # currently on your system.
27
+ #
28
+ # == Usage
29
+ #
30
+ # Gem::Specification.latest_versions.each do |spec|
31
+ # puts "#{spec.name} (#{spec.version})"
32
+ # end
33
+ #
34
+ module GemSpecification
35
+ end
36
+
33
37
  end
@@ -121,33 +121,37 @@ class Hash
121
121
  end
122
122
  end
123
123
 
124
- ##
125
- # Extends the functionality of a Hash to be able to perform (i) diff and (ii) similarity operations
126
- # For implementation details, see the Hash class for the extended functions
127
- #
128
- # == Usage
129
- #
130
- # Working with HashDiff module can be very simple, for example:
131
- #
132
- # require 'toolbox/hash_diff'
133
- # require 'yaml'
134
- #
135
- # hash1 = {
136
- # :foo => 'bar',
137
- # :bar => 'hello',
138
- # :hello => 'world',
139
- # :this => { :exists => 'yay!' }
140
- # }
141
- #
142
- # hash2 = {
143
- # :foo => 'bar',
144
- # :hello => 'Hi',
145
- # :this => { :exists => 'yay!' },
146
- # :hey => { :this => "Doesn't exist", :but => "oh well" }
147
- # }
148
- #
149
- # puts hash1.diff(hash2).to_yaml
150
- # puts hash1.similarity(hash2).to_yaml
151
- #
152
- module HashDiff
124
+ module Toolbox
125
+
126
+ ##
127
+ # Extends the functionality of a Hash to be able to perform (i) diff and (ii) similarity operations
128
+ # For implementation details, see the Hash class for the extended functions
129
+ #
130
+ # == Usage
131
+ #
132
+ # Working with HashDiff module can be very simple, for example:
133
+ #
134
+ # require 'toolbox/hash_diff'
135
+ # require 'yaml'
136
+ #
137
+ # hash1 = {
138
+ # :foo => 'bar',
139
+ # :bar => 'hello',
140
+ # :hello => 'world',
141
+ # :this => { :exists => 'yay!' }
142
+ # }
143
+ #
144
+ # hash2 = {
145
+ # :foo => 'bar',
146
+ # :hello => 'Hi',
147
+ # :this => { :exists => 'yay!' },
148
+ # :hey => { :this => "Doesn't exist", :but => "oh well" }
149
+ # }
150
+ #
151
+ # puts hash1.diff(hash2).to_yaml
152
+ # puts hash1.similarity(hash2).to_yaml
153
+ #
154
+ module HashDiff
155
+ end
156
+
153
157
  end
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: ruby-development-toolbox 1.3.1 ruby lib
5
+ # stub: ruby-development-toolbox 1.3.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "ruby-development-toolbox"
9
- s.version = "1.3.1"
9
+ s.version = "1.3.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-development-toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Salas