be_boolean 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +2 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +108 -0
- data/Guardfile +18 -0
- data/LICENSE.txt +20 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/be_boolean.gemspec +67 -0
- data/lib/be_boolean.rb +21 -0
- data/readme.md +37 -0
- data/spec/lib/be_boolean_spec.rb +49 -0
- data/spec/spec_helper.rb +78 -0
- metadata +141 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c745465dce6a50081ffd4d59943032724fc06d05
|
4
|
+
data.tar.gz: f4a04e8b261b782e1d8b1f6dc8565585f8907320
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d2acfbfce023da4c3a595c4166f6d04f5d8ac93b0ea7534876cf251e1f724e2e521e54f78f04bd9f9de8af5928eb39b98660e04eb3a49ed3c8c438dc08f1b8ee
|
7
|
+
data.tar.gz: 695671c95dfc7afe450f7b299753f16f809461f8e1d050271cdc3753b2dd1176354b42e46a19c4e251088f26e4ec90cf64d23edc9ed91844d1ab9a9687b9b87e
|
data/.document
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "bundler", "~> 1.0"
|
10
|
+
gem 'github_api', '~> 0.11.3'
|
11
|
+
gem 'guard-rspec', '~> 4.3'
|
12
|
+
gem "jeweler", "~> 2.0.1"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
gem 'rspec', '~> 3.0'
|
15
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.3.6)
|
5
|
+
builder (3.2.2)
|
6
|
+
celluloid (0.15.2)
|
7
|
+
timers (~> 1.1.0)
|
8
|
+
coderay (1.1.0)
|
9
|
+
descendants_tracker (0.0.4)
|
10
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
11
|
+
diff-lcs (1.2.5)
|
12
|
+
docile (1.1.5)
|
13
|
+
faraday (0.9.0)
|
14
|
+
multipart-post (>= 1.2, < 3)
|
15
|
+
ffi (1.9.3)
|
16
|
+
formatador (0.2.5)
|
17
|
+
git (1.2.8)
|
18
|
+
github_api (0.11.3)
|
19
|
+
addressable (~> 2.3)
|
20
|
+
descendants_tracker (~> 0.0.1)
|
21
|
+
faraday (~> 0.8, < 0.10)
|
22
|
+
hashie (>= 1.2)
|
23
|
+
multi_json (>= 1.7.5, < 2.0)
|
24
|
+
nokogiri (~> 1.6.0)
|
25
|
+
oauth2
|
26
|
+
guard (2.6.1)
|
27
|
+
formatador (>= 0.2.4)
|
28
|
+
listen (~> 2.7)
|
29
|
+
lumberjack (~> 1.0)
|
30
|
+
pry (>= 0.9.12)
|
31
|
+
thor (>= 0.18.1)
|
32
|
+
guard-rspec (4.3.1)
|
33
|
+
guard (~> 2.1)
|
34
|
+
rspec (>= 2.14, < 4.0)
|
35
|
+
hashie (3.2.0)
|
36
|
+
highline (1.6.21)
|
37
|
+
jeweler (2.0.1)
|
38
|
+
builder
|
39
|
+
bundler (>= 1.0)
|
40
|
+
git (>= 1.2.5)
|
41
|
+
github_api
|
42
|
+
highline (>= 1.6.15)
|
43
|
+
nokogiri (>= 1.5.10)
|
44
|
+
rake
|
45
|
+
rdoc
|
46
|
+
json (1.8.1)
|
47
|
+
jwt (1.0.0)
|
48
|
+
listen (2.7.9)
|
49
|
+
celluloid (>= 0.15.2)
|
50
|
+
rb-fsevent (>= 0.9.3)
|
51
|
+
rb-inotify (>= 0.9)
|
52
|
+
lumberjack (1.0.9)
|
53
|
+
method_source (0.8.2)
|
54
|
+
mini_portile (0.6.0)
|
55
|
+
multi_json (1.10.1)
|
56
|
+
multi_xml (0.5.5)
|
57
|
+
multipart-post (2.0.0)
|
58
|
+
nokogiri (1.6.3.1)
|
59
|
+
mini_portile (= 0.6.0)
|
60
|
+
oauth2 (1.0.0)
|
61
|
+
faraday (>= 0.8, < 0.10)
|
62
|
+
jwt (~> 1.0)
|
63
|
+
multi_json (~> 1.3)
|
64
|
+
multi_xml (~> 0.5)
|
65
|
+
rack (~> 1.2)
|
66
|
+
pry (0.10.0)
|
67
|
+
coderay (~> 1.1.0)
|
68
|
+
method_source (~> 0.8.1)
|
69
|
+
slop (~> 3.4)
|
70
|
+
rack (1.5.2)
|
71
|
+
rake (10.3.2)
|
72
|
+
rb-fsevent (0.9.4)
|
73
|
+
rb-inotify (0.9.5)
|
74
|
+
ffi (>= 0.5.0)
|
75
|
+
rdoc (4.1.1)
|
76
|
+
json (~> 1.4)
|
77
|
+
rspec (3.0.0)
|
78
|
+
rspec-core (~> 3.0.0)
|
79
|
+
rspec-expectations (~> 3.0.0)
|
80
|
+
rspec-mocks (~> 3.0.0)
|
81
|
+
rspec-core (3.0.3)
|
82
|
+
rspec-support (~> 3.0.0)
|
83
|
+
rspec-expectations (3.0.3)
|
84
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
+
rspec-support (~> 3.0.0)
|
86
|
+
rspec-mocks (3.0.3)
|
87
|
+
rspec-support (~> 3.0.0)
|
88
|
+
rspec-support (3.0.3)
|
89
|
+
simplecov (0.9.0)
|
90
|
+
docile (~> 1.1.0)
|
91
|
+
multi_json
|
92
|
+
simplecov-html (~> 0.8.0)
|
93
|
+
simplecov-html (0.8.0)
|
94
|
+
slop (3.6.0)
|
95
|
+
thor (0.19.1)
|
96
|
+
thread_safe (0.3.4)
|
97
|
+
timers (1.1.0)
|
98
|
+
|
99
|
+
PLATFORMS
|
100
|
+
ruby
|
101
|
+
|
102
|
+
DEPENDENCIES
|
103
|
+
bundler (~> 1.0)
|
104
|
+
github_api (~> 0.11.3)
|
105
|
+
guard-rspec (~> 4.3)
|
106
|
+
jeweler (~> 2.0.1)
|
107
|
+
rspec (~> 3.0)
|
108
|
+
simplecov
|
data/Guardfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
5
|
+
# rspec may be run, below are examples of the most common uses.
|
6
|
+
# * bundler: 'bundle exec rspec'
|
7
|
+
# * bundler binstubs: 'bin/rspec'
|
8
|
+
# * spring: 'bin/rsspec' (This will use spring if running and you have
|
9
|
+
# installed the spring binstubs per the docs)
|
10
|
+
# * zeus: 'zeus rspec' (requires the server to be started separetly)
|
11
|
+
# * 'just' rspec: 'rspec'
|
12
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
13
|
+
watch(%r{^spec/.+_spec\.rb$})
|
14
|
+
watch(%r{^lib/.+\.rb$})
|
15
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
16
|
+
watch('spec/spec_helper.rb') { "spec" }
|
17
|
+
end
|
18
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Sebastian Porto
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "be_boolean"
|
18
|
+
gem.homepage = "http://github.com/sporto/be_boolean"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Cast number or string to boolean}
|
21
|
+
gem.description = %Q{Cast number or string to boolean}
|
22
|
+
gem.email = "sebasporto@gmail.com"
|
23
|
+
gem.authors = ["Sebastian Porto"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['test'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "be_boolean #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
data/be_boolean.gemspec
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: be_boolean 1.0.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "be_boolean"
|
9
|
+
s.version = "1.0.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Sebastian Porto"]
|
14
|
+
s.date = "2014-08-14"
|
15
|
+
s.description = "Cast number or string to boolean"
|
16
|
+
s.email = "sebasporto@gmail.com"
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
".rspec",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"Guardfile",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"be_boolean.gemspec",
|
30
|
+
"lib/be_boolean.rb",
|
31
|
+
"readme.md",
|
32
|
+
"spec/lib/be_boolean_spec.rb",
|
33
|
+
"spec/spec_helper.rb"
|
34
|
+
]
|
35
|
+
s.homepage = "http://github.com/sporto/be_boolean"
|
36
|
+
s.licenses = ["MIT"]
|
37
|
+
s.rubygems_version = "2.2.2"
|
38
|
+
s.summary = "Cast number or string to boolean"
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
s.specification_version = 4
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
45
|
+
s.add_development_dependency(%q<github_api>, ["~> 0.11.3"])
|
46
|
+
s.add_development_dependency(%q<guard-rspec>, ["~> 4.3"])
|
47
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
48
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<rspec>, ["~> 3.0"])
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
52
|
+
s.add_dependency(%q<github_api>, ["~> 0.11.3"])
|
53
|
+
s.add_dependency(%q<guard-rspec>, ["~> 4.3"])
|
54
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
55
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
56
|
+
s.add_dependency(%q<rspec>, ["~> 3.0"])
|
57
|
+
end
|
58
|
+
else
|
59
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
60
|
+
s.add_dependency(%q<github_api>, ["~> 0.11.3"])
|
61
|
+
s.add_dependency(%q<guard-rspec>, ["~> 4.3"])
|
62
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
63
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rspec>, ["~> 3.0"])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
data/lib/be_boolean.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
module BeBoolean
|
2
|
+
|
3
|
+
def self.get(val)
|
4
|
+
return true if val.kind_of?(TrueClass)
|
5
|
+
return false if val.kind_of?(FalseClass)
|
6
|
+
|
7
|
+
if val.kind_of?(String)
|
8
|
+
down = val.downcase
|
9
|
+
return !!/1|true|t|yes|y/.match(down)
|
10
|
+
end
|
11
|
+
|
12
|
+
if val.kind_of?(Integer) || val.kind_of?(Float)
|
13
|
+
return val != 0
|
14
|
+
end
|
15
|
+
|
16
|
+
false
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
data/readme.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
BeBoolean
|
2
|
+
|
3
|
+
A simple gem for casting strings and numbers to a boolean
|
4
|
+
|
5
|
+
Usage
|
6
|
+
------
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
require 'be_boolean'
|
10
|
+
|
11
|
+
BeBoolean.get(nil) # => false
|
12
|
+
BeBoolean.get(0) # => false
|
13
|
+
BeBoolean.get("0") # => false
|
14
|
+
BeBoolean.get("") # => false
|
15
|
+
BeBoolean.get("n") # => false
|
16
|
+
BeBoolean.get("N") # => false
|
17
|
+
BeBoolean.get("f") # => false
|
18
|
+
BeBoolean.get("F") # => false
|
19
|
+
|
20
|
+
BeBoolean.get(1) # => true
|
21
|
+
BeBoolean.get("1") # => true
|
22
|
+
BeBoolean.get("t") # => true
|
23
|
+
BeBoolean.get("T") # => true
|
24
|
+
BeBoolean.get("true") # => true
|
25
|
+
BeBoolean.get("TRUE") # => true
|
26
|
+
BeBoolean.get("y") # => true
|
27
|
+
BeBoolean.get("Y") # => true
|
28
|
+
BeBoolean.get("yes") # => true
|
29
|
+
BeBoolean.get("YES") # => true
|
30
|
+
```
|
31
|
+
|
32
|
+
Copyright
|
33
|
+
------
|
34
|
+
|
35
|
+
Copyright (c) 2014 Sebastian Porto. See LICENSE.txt for
|
36
|
+
further details.
|
37
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require File.expand_path('lib/be_boolean')
|
3
|
+
|
4
|
+
describe 'BeBoolean' do
|
5
|
+
|
6
|
+
table = [
|
7
|
+
[nil, false],
|
8
|
+
# booleans
|
9
|
+
[false, false],
|
10
|
+
[true, true],
|
11
|
+
# numbers
|
12
|
+
[0, false],
|
13
|
+
[0.0, false],
|
14
|
+
[1, true],
|
15
|
+
[1.0, true],
|
16
|
+
[2, true],
|
17
|
+
[2.0, true],
|
18
|
+
# strings
|
19
|
+
['', false],
|
20
|
+
['0', false],
|
21
|
+
['n', false],
|
22
|
+
['N', false],
|
23
|
+
['f', false],
|
24
|
+
['F', false],
|
25
|
+
['false', false],
|
26
|
+
['FALSE', false],
|
27
|
+
['no', false],
|
28
|
+
['NO', false],
|
29
|
+
['1', true],
|
30
|
+
['y', true],
|
31
|
+
['Y', true],
|
32
|
+
['t', true],
|
33
|
+
['T', true],
|
34
|
+
['true', true],
|
35
|
+
['TRUE', true],
|
36
|
+
['yes', true],
|
37
|
+
['YES', true],
|
38
|
+
]
|
39
|
+
|
40
|
+
table.each do |pair|
|
41
|
+
given = pair[0]
|
42
|
+
expected = pair[1]
|
43
|
+
|
44
|
+
it "casts #{given} to #{expected}" do
|
45
|
+
expect(BeBoolean.get(given)).to eq(expected)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause this
|
4
|
+
# file to always be loaded, without a need to explicitly require it in any files.
|
5
|
+
#
|
6
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
7
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
8
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
9
|
+
# individual file that may not need all of that loaded. Instead, make a
|
10
|
+
# separate helper file that requires this one and then use it only in the specs
|
11
|
+
# that actually need it.
|
12
|
+
#
|
13
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
14
|
+
# users commonly want.
|
15
|
+
#
|
16
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
|
+
RSpec.configure do |config|
|
18
|
+
# The settings below are suggested to provide a good initial experience
|
19
|
+
# with RSpec, but feel free to customize to your heart's content.
|
20
|
+
=begin
|
21
|
+
# These two settings work together to allow you to limit a spec run
|
22
|
+
# to individual examples or groups you care about by tagging them with
|
23
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
24
|
+
# get run.
|
25
|
+
config.filter_run :focus
|
26
|
+
config.run_all_when_everything_filtered = true
|
27
|
+
|
28
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
29
|
+
# file, and it's useful to allow more verbose output when running an
|
30
|
+
# individual spec file.
|
31
|
+
if config.files_to_run.one?
|
32
|
+
# Use the documentation formatter for detailed output,
|
33
|
+
# unless a formatter has already been configured
|
34
|
+
# (e.g. via a command-line flag).
|
35
|
+
config.default_formatter = 'doc'
|
36
|
+
end
|
37
|
+
|
38
|
+
# Print the 10 slowest examples and example groups at the
|
39
|
+
# end of the spec run, to help surface which specs are running
|
40
|
+
# particularly slow.
|
41
|
+
config.profile_examples = 10
|
42
|
+
|
43
|
+
# Run specs in random order to surface order dependencies. If you find an
|
44
|
+
# order dependency and want to debug it, you can fix the order by providing
|
45
|
+
# the seed, which is printed after each run.
|
46
|
+
# --seed 1234
|
47
|
+
config.order = :random
|
48
|
+
|
49
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
50
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
51
|
+
# test failures related to randomization by passing the same `--seed` value
|
52
|
+
# as the one that triggered the failure.
|
53
|
+
Kernel.srand config.seed
|
54
|
+
|
55
|
+
# rspec-expectations config goes here. You can use an alternate
|
56
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
57
|
+
# assertions if you prefer.
|
58
|
+
config.expect_with :rspec do |expectations|
|
59
|
+
# Enable only the newer, non-monkey-patching expect syntax.
|
60
|
+
# For more details, see:
|
61
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
62
|
+
expectations.syntax = :expect
|
63
|
+
end
|
64
|
+
|
65
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
66
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
67
|
+
config.mock_with :rspec do |mocks|
|
68
|
+
# Enable only the newer, non-monkey-patching expect syntax.
|
69
|
+
# For more details, see:
|
70
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
71
|
+
mocks.syntax = :expect
|
72
|
+
|
73
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
74
|
+
# a real object. This is generally recommended.
|
75
|
+
mocks.verify_partial_doubles = true
|
76
|
+
end
|
77
|
+
=end
|
78
|
+
end
|
metadata
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: be_boolean
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sebastian Porto
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: github_api
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.11.3
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.11.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: guard-rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jeweler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.0.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.0.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
description: Cast number or string to boolean
|
98
|
+
email: sebasporto@gmail.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files:
|
102
|
+
- LICENSE.txt
|
103
|
+
files:
|
104
|
+
- ".document"
|
105
|
+
- ".rspec"
|
106
|
+
- Gemfile
|
107
|
+
- Gemfile.lock
|
108
|
+
- Guardfile
|
109
|
+
- LICENSE.txt
|
110
|
+
- Rakefile
|
111
|
+
- VERSION
|
112
|
+
- be_boolean.gemspec
|
113
|
+
- lib/be_boolean.rb
|
114
|
+
- readme.md
|
115
|
+
- spec/lib/be_boolean_spec.rb
|
116
|
+
- spec/spec_helper.rb
|
117
|
+
homepage: http://github.com/sporto/be_boolean
|
118
|
+
licenses:
|
119
|
+
- MIT
|
120
|
+
metadata: {}
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubyforge_project:
|
137
|
+
rubygems_version: 2.2.2
|
138
|
+
signing_key:
|
139
|
+
specification_version: 4
|
140
|
+
summary: Cast number or string to boolean
|
141
|
+
test_files: []
|