rego-ruby-ext 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/boolean.rb ADDED
@@ -0,0 +1,11 @@
1
+ #hash that true.is_a?(Boolean) and false.is_a?(Boolean) would work
2
+ module Boolean
3
+ end
4
+
5
+ class TrueClass
6
+ include Boolean
7
+ end
8
+
9
+ class FalseClass
10
+ include Boolean
11
+ end
data/lib/rego-ruby-ext.rb CHANGED
@@ -1,4 +1,4 @@
1
- ['nil', 'date', 'time', 'enumerable', 'hash', 'numeric', 'symbol', 'string-interpolation', 'string'].each do |file_name|
1
+ ['nil', 'boolean', 'date', 'time', 'enumerable', 'hash', 'numeric', 'symbol', 'string-interpolation', 'string'].each do |file_name|
2
2
  require File.join(File.dirname(__FILE__), file_name)
3
3
  end
4
4
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rego-ruby-ext}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alex Tkachev"]
12
- s.date = %q{2011-09-14}
12
+ s.date = %q{2011-09-15}
13
13
  s.description = %q{Ruby core extensions that are common for all ReGO projects}
14
14
  s.email = %q{tkachev.alex@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
25
25
  "Rakefile",
26
26
  "VERSION",
27
27
  "init.rb",
28
+ "lib/boolean.rb",
28
29
  "lib/date.rb",
29
30
  "lib/enumerable.rb",
30
31
  "lib/hash.rb",
@@ -36,6 +37,7 @@ Gem::Specification.new do |s|
36
37
  "lib/symbol.rb",
37
38
  "lib/time.rb",
38
39
  "rego-ruby-ext.gemspec",
40
+ "spec/boolean_spec.rb",
39
41
  "spec/date_spec.rb",
40
42
  "spec/enumerable_spec.rb",
41
43
  "spec/hash_spec.rb",
@@ -0,0 +1,18 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe Boolean do
4
+
5
+ it "true is a Boolean" do
6
+ true.should be_a(Boolean)
7
+ end
8
+
9
+ it "false is a Boolean" do
10
+ false.should be_a(Boolean)
11
+ end
12
+
13
+ it 'numbers and other stuff are not Boolean' do
14
+ [nil, 3, 3.445, 'true', 'false', {:true => 3}].each do |o|
15
+ o.should_not be_a(Boolean)
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rego-ruby-ext
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Tkachev
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-14 00:00:00 +03:00
18
+ date: 2011-09-15 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -112,6 +112,7 @@ files:
112
112
  - Rakefile
113
113
  - VERSION
114
114
  - init.rb
115
+ - lib/boolean.rb
115
116
  - lib/date.rb
116
117
  - lib/enumerable.rb
117
118
  - lib/hash.rb
@@ -123,6 +124,7 @@ files:
123
124
  - lib/symbol.rb
124
125
  - lib/time.rb
125
126
  - rego-ruby-ext.gemspec
127
+ - spec/boolean_spec.rb
126
128
  - spec/date_spec.rb
127
129
  - spec/enumerable_spec.rb
128
130
  - spec/hash_spec.rb