boolean_typecast 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef3544438319dda92b65b6bada1176f7369d4a8b8c58ec8e7b76ed1d5108d337
4
- data.tar.gz: 113d58644fd9a405aac91a31b3617916389e3be64179b2f88919b23c9981ace3
3
+ metadata.gz: ad237c1f32d5f98635836dc9142bdcb07f8eee9911c3879499d174dd38a1d76c
4
+ data.tar.gz: f3f0a635efbde826ed4244573a1f255b4a4104eb9bfb1d9945c77004d292ac4f
5
5
  SHA512:
6
- metadata.gz: 84eab92dad45c71cb0f31abd9bf1854fe9b5544d4bfc39b1013298c8c14a7a9f56a08083895ce0c42687f39af46db300f2380d474265beca10fea3aa729758f2
7
- data.tar.gz: be47cb08bb92bdcafe37af986a8f1e326821ca70108952755a1e64ef4aeb9057df21627fa81d0419c50eb9e56f05846f29c6546052c3085b0122a42f8d0235cb
6
+ metadata.gz: 76d32f4a9b46a8082d27a5b649e8fe5dcad011b83f5e1705a110b5ca632e0a9a5ada73a77d49b93ad7ec1cd5df928eca388ce930961e85c93d0af0c8858becca
7
+ data.tar.gz: 3822c5108f6054bc1b5ad56f9fe1c2a0c21ff03d88ec78dacc989cbd50e0726bcc1cf603a5464cd08edb1a08dd9b7d48072e5f17a40934c8887d5e5620c39ad5
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
3
  # Specify your gem's dependencies in boolean_typecast.gemspec
6
4
  gemspec
data/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # BooleanTypecast
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/boolean_typecast`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ ## Description
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Performs type casting from anything to true:TrueClass / false:FalseClass
6
+
7
+ ```ruby
8
+ true.to_bool? #=> true
9
+ nil.to_bool? #=> false
10
+ ```
6
11
 
7
12
  ## Installation
8
13
 
@@ -22,17 +27,26 @@ Or install it yourself as:
22
27
 
23
28
  ## Usage
24
29
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
30
+ Just `require 'boolean_typecast'` and then use it as:
28
31
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+ ```ruby
33
+ require 'boolean_typecast'
34
+
35
+ # Example true values
36
+ true.to_bool? #=> true
37
+ 0.to_bool? #=> true
38
+ ''.to_bool? #=> true
39
+ {}.to_bool? #=> true
40
+ 0.0.to_bool? #=> true
41
+
42
+ # Example false values
43
+ false.to_bool? #=> false
44
+ nil.to_bool? #=> false
45
+ ```
32
46
 
33
47
  ## Contributing
34
48
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/boolean_typecast. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
+ Bug reports and pull requests are welcome on GitHub at https://github.com/surabhiojha12/boolean_typecast. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
50
 
37
51
  ## License
38
52
 
@@ -40,4 +54,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
54
 
41
55
  ## Code of Conduct
42
56
 
43
- Everyone interacting in the BooleanTypecast project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/boolean_typecast/blob/master/CODE_OF_CONDUCT.md).
57
+ Everyone interacting in the BooleanTypecast project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/surabhiojha12/boolean_typecast/blob/master/CODE_OF_CONDUCT.md).
@@ -11,9 +11,12 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Performs type conversion from anything to true:TrueClass / false:FalseClass}
13
13
  spec.description = spec.summary
14
- spec.homepage = ""
14
+ spec.homepage = "https://github.com/surabhiojha12/boolean_typecast"
15
15
  spec.license = "MIT"
16
16
 
17
+ spec.required_ruby_version = '>= 2.4.7'
18
+ spec.required_rubygems_version = '>= 3.0.9'
19
+
17
20
  # Specify which files should be added to the gem when it is released.
18
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
22
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
@@ -1,3 +1,3 @@
1
1
  module BooleanTypecast
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boolean_typecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surabhi Ojha
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2021-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -71,7 +71,7 @@ files:
71
71
  - boolean_typecast.gemspec
72
72
  - lib/boolean_typecast.rb
73
73
  - lib/boolean_typecast/version.rb
74
- homepage: ''
74
+ homepage: https://github.com/surabhiojha12/boolean_typecast
75
75
  licenses:
76
76
  - MIT
77
77
  metadata: {}
@@ -83,12 +83,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: '0'
86
+ version: 2.4.7
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: '0'
91
+ version: 3.0.9
92
92
  requirements: []
93
93
  rubygems_version: 3.0.9
94
94
  signing_key: