ruby-boolean 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6527ef88d43ebc0a49d0d5d9a4987e70c6669562
4
+ data.tar.gz: 6882a45ee6c91a438ff8ba428bdd5a7afbe98c04
5
+ SHA512:
6
+ metadata.gz: ee9b9a9ae39b5d955f0d351351b029d79fc335a1ecb7bfc5fb99bc2ec6bfc039199746f03fdcb270e7594225469fd484ac6e874cc18dc920d0cc130aae7b0f8f
7
+ data.tar.gz: f2c051f6a32983d9bf1a87c954c349a3bd7f871cceb440ddede264d678714d786d7f99a0162388a2df66f1654168b2a8a24d22b262251908cd7e2ed2ab283562
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .ruby-*
2
+ *.gem
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm: 2.2.1
3
+ # uncomment this line if your project needs to run something other than `rake`:
4
+ script: bundle exec rspec spec
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'rspec'
5
+ end
6
+
data/Gemfile.lock ADDED
@@ -0,0 +1,23 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.2.5)
5
+ rspec (3.2.0)
6
+ rspec-core (~> 3.2.0)
7
+ rspec-expectations (~> 3.2.0)
8
+ rspec-mocks (~> 3.2.0)
9
+ rspec-core (3.2.3)
10
+ rspec-support (~> 3.2.0)
11
+ rspec-expectations (3.2.1)
12
+ diff-lcs (>= 1.2.0, < 2.0)
13
+ rspec-support (~> 3.2.0)
14
+ rspec-mocks (3.2.1)
15
+ diff-lcs (>= 1.2.0, < 2.0)
16
+ rspec-support (~> 3.2.0)
17
+ rspec-support (3.2.2)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ rspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Jake Yesbeck
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ ## Ruby Boolean
2
+
3
+ ![Build Status](https://travis-ci.org/yez/ruby-boolean.svg?branch=master)
4
+
5
+ This is an extremely simple addition of a Boolean module.
6
+
7
+ Install:
8
+
9
+ ```ruby
10
+ gem install 'ruby-boolean'
11
+ ```
12
+
13
+ or in your Gemfile
14
+
15
+ ```ruby
16
+ gem 'ruby-boolean'
17
+ ```
18
+
19
+ It's purpose to avoid doing:
20
+
21
+ ```ruby
22
+ foo = true
23
+ if foo.is_a?(TrueClass) || foo.is_a?(FalseClass)
24
+ # do something that's specific to booleans
25
+ end
26
+ ```
27
+
28
+ Now it can be reduced to:
29
+
30
+ ```ruby
31
+ true.is_a?(Boolean) #=> true
32
+ false.is_a?(Boolean) #=> true
33
+ "foo".is_a?(Boolean) #=> false
34
+ ```
@@ -0,0 +1,3 @@
1
+ module Boolean; end
2
+ class TrueClass; include Boolean; end
3
+ class FalseClass; include Boolean; end
@@ -0,0 +1 @@
1
+ require_relative 'boolean/boolean'
@@ -0,0 +1,16 @@
1
+ lib = File.expand_path('../lib/', __FILE__)
2
+ $:.unshift lib unless $:.include?(lib)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'ruby-boolean'
6
+ s.version = '1.3.3'
7
+ s.date = '2015-04-28'
8
+ s.summary = 'Boolean for Ruby'
9
+ s.description = 'A way to handle booleans in a terse way for a specific use case.'
10
+ s.authors = ['Jake Yesbeck']
11
+ s.email = 'yesbeckjs@gmail.com'
12
+ s.require_paths = ['lib']
13
+ s.files = `git ls-files`.split("\n")
14
+ s.homepage = 'http://rubygems.org/gems/ruby-boolean'
15
+ s.license = 'MIT'
16
+ end
@@ -0,0 +1,21 @@
1
+ require_relative '../lib/ruby_boolean'
2
+
3
+ describe Boolean do
4
+ context 'TrueClass' do
5
+ specify do
6
+ expect(true.is_a?(Boolean)).to eq(true)
7
+ end
8
+ end
9
+
10
+ context 'FalseClass' do
11
+ specify do
12
+ expect(false.is_a?(Boolean)).to eq(true)
13
+ end
14
+ end
15
+
16
+ context 'NilClass' do
17
+ specify do
18
+ expect(nil.is_a?(Boolean)).to eq(false)
19
+ end
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-boolean
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.3
5
+ platform: ruby
6
+ authors:
7
+ - Jake Yesbeck
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A way to handle booleans in a terse way for a specific use case.
14
+ email: yesbeckjs@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - ".gitignore"
20
+ - ".travis.yml"
21
+ - Gemfile
22
+ - Gemfile.lock
23
+ - LICENSE.txt
24
+ - README.md
25
+ - lib/boolean/boolean.rb
26
+ - lib/ruby-boolean.rb
27
+ - ruby_boolean.gemspec
28
+ - spec/boolean_spec.rb
29
+ homepage: http://rubygems.org/gems/ruby-boolean
30
+ licenses:
31
+ - MIT
32
+ metadata: {}
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubyforge_project:
49
+ rubygems_version: 2.4.6
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Boolean for Ruby
53
+ test_files: []