div_by_3 1.0.2 → 1.0.3

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: 738ff70503ae3e2fe564a1e38c93096a91cd7790
4
- data.tar.gz: 3c749d4206a92fbc7f3206b828eddc44d12bfd48
3
+ metadata.gz: 3fd4c2e406785acf29ff8b8acfd2a89fd9b0bcea
4
+ data.tar.gz: eabafc677a01cee47e71f9a52a8c86fe3913a0f8
5
5
  SHA512:
6
- metadata.gz: 4b121be11413143b6d13a09a1993d385e972474155ce159602038cb14976bdc14016a0bfbe912ac47f5acd3bff4539be0924a8e325b8939bd3169b2eeb328d2d
7
- data.tar.gz: 1976f80763cfcd2097713b2c0799e2d90911714893570c5e38840a9a29be05b8ede82bffc7036f6c17de4aa2d9dca051f603881cd4fc95595fd11af35a821cb3
6
+ metadata.gz: bf3cf2877a3222fe85c46e58704e13d91111a12b77e246e8703815b67ef912583c69d50e3c49d6472478364656a411e52714a66f6f1c0c28f1a7b891d50abd22
7
+ data.tar.gz: 8a052432e50b7595b123335e3c96173f52fec885a2fa96fd7791fb199ee685bb5b51f68a2c0adfaa11d09a4551191b01bfcf0542bdc66e45789c4ee5d4917348
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009-2016 Fredrik Svard
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/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # DivBy3
2
+
3
+
4
+ Return boolean if argument divisible by three or not. Bignum and Fixnum
5
+ accepted, everything else will lead to exception
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+
13
+ gem install 'div_by_3'
14
+
15
+ ```
16
+
17
+
18
+
19
+ And then execute:
20
+
21
+ ``` bash
22
+ $ bundle
23
+ ```
24
+
25
+ Or install it yourself as:
26
+
27
+
28
+ ``` bash
29
+ $ gem install is_even
30
+ ```
31
+
32
+
33
+ ## Usage
34
+
35
+ ```ruby
36
+ div_by_3(123) => true
37
+
38
+ div_by_3(223) => false
39
+ ```
40
+
41
+ ## Development
42
+
43
+
44
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec`
45
+ to run the tests. You can also run `bin/console` for an interactive prompt that will allow
46
+ you to experiment.
47
+
48
+
49
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a
50
+ new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
51
+ which will create a git tag for the version, push git commits and tags, and push the `.gem` file
52
+ to [rubygems.org](https://rubygems.org).
53
+
54
+ ## Contributing
55
+
56
+ Bug reports and pull requests are welcome on GitHub at https://github.com/nfredrik/div_by_3.
57
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are
58
+ expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
59
+
60
+ ## License
61
+
62
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
63
+
64
+
65
+
data/lib/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module DivBy_3
2
+ VERSION = "1.0.3"
3
+ end
metadata CHANGED
@@ -1,71 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: div_by_3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fredrik Svärd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-29 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rdoc
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '4.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '4.0'
27
- - !ruby/object:Gem::Dependency
28
- name: hoe
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.15'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.15'
41
- description: "Return boolean if argument divisible by three or not. Bignum and Fixnum
42
- \naccepted, everything else will lead to exception"
11
+ date: 2018-05-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Howdy folks
43
14
  email:
44
15
  - nfredrik@hotmail.com
45
- executables:
46
- - div_by_3
16
+ executables: []
47
17
  extensions: []
48
- extra_rdoc_files:
49
- - History.txt
50
- - Manifest.txt
51
- - README.txt
18
+ extra_rdoc_files: []
52
19
  files:
53
- - ".autotest"
54
- - History.txt
55
- - Manifest.txt
56
- - README.txt
57
- - Rakefile
20
+ - LICENSE
21
+ - README.md
58
22
  - bin/div_by_3
59
23
  - lib/div_by_3.rb
60
- - test/test_div_by_3.rb
61
- homepage: http://example.com
24
+ - lib/version.rb
25
+ homepage: http://github.com/nfredrik/div_by_3
62
26
  licenses:
63
27
  - MIT
64
28
  metadata: {}
65
29
  post_install_message:
66
- rdoc_options:
67
- - "--main"
68
- - README.txt
30
+ rdoc_options: []
69
31
  require_paths:
70
32
  - lib
71
33
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -77,11 +39,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
39
  requirements:
78
40
  - - ">="
79
41
  - !ruby/object:Gem::Version
80
- version: '0'
42
+ version: 0.2.1
81
43
  requirements: []
82
- rubyforge_project:
83
- rubygems_version: 2.5.1
44
+ rubyforge_project: div_by_3
45
+ rubygems_version: 2.6.11
84
46
  signing_key:
85
47
  specification_version: 4
86
- summary: Return boolean if argument divisible by three or not
48
+ summary: check if number could by divided by 3
87
49
  test_files: []
data/.autotest DELETED
@@ -1,25 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require "autotest/restart"
4
-
5
- # Autotest.add_hook :initialize do |at|
6
- # at.testlib = "minitest/unit"
7
- #
8
- # at.extra_files << "../some/external/dependency.rb"
9
- #
10
- # at.libs << ":../some/external"
11
- #
12
- # at.add_exception "vendor"
13
- #
14
- # at.add_mapping(/dependency.rb/) do |f, _|
15
- # at.files_matching(/test_.*rb$/)
16
- # end
17
- #
18
- # %w(TestA TestB).each do |klass|
19
- # at.extra_class_map[klass] = "test/test_misc.rb"
20
- # end
21
- # end
22
-
23
- # Autotest.add_hook :run_command do |at|
24
- # system "rake build"
25
- # end
data/History.txt DELETED
@@ -1,13 +0,0 @@
1
- === 1.0.2 / 2016-08-29
2
-
3
- * 1 major enhancement
4
-
5
- * Birthday!
6
-
7
- * 1 minor enhancement
8
-
9
- * Some corrections
10
-
11
- * 1 minor correction
12
-
13
- * changes _with_ to _by_
data/Manifest.txt DELETED
@@ -1,8 +0,0 @@
1
- .autotest
2
- History.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- bin/div_by_3
7
- lib/div_by_3.rb
8
- test/test_div_by_3.rb
data/README.txt DELETED
@@ -1,61 +0,0 @@
1
- = div_by_3
2
-
3
- home :: http://example.com
4
- code :: http://github/nfredrik/div_by_3
5
- rdoc :: http://vecka.nu
6
- bugs :: htpp://otvunget.st
7
- email :: nfredrik@hotmail.com
8
-
9
- == DESCRIPTION:
10
-
11
- Return boolean if argument divisible by three or not. Bignum and Fixnum
12
- accepted, everything else will lead to exception
13
-
14
- == FEATURES/PROBLEMS:
15
-
16
- * No known bugs
17
-
18
- == SYNOPSIS:
19
-
20
- div_by_3(123)
21
-
22
- == REQUIREMENTS:
23
-
24
- * ruby 2.2 or >=
25
-
26
- == INSTALL:
27
-
28
- * gem install div_by_3
29
-
30
- == DEVELOPERS:
31
-
32
- After checking out the source, run:
33
-
34
- $ rake newb
35
-
36
- This task will install any missing dependencies, run the tests/specs,
37
- and generate the RDoc.
38
-
39
- == LICENSE:
40
-
41
-
42
- Copyright (c) 2016 MIT License
43
-
44
- Permission is hereby granted, free of charge, to any person obtaining
45
- a copy of this software and associated documentation files (the
46
- 'Software'), to deal in the Software without restriction, including
47
- without limitation the rights to use, copy, modify, merge, publish,
48
- distribute, sublicense, and/or sell copies of the Software, and to
49
- permit persons to whom the Software is furnished to do so, subject to
50
- the following conditions:
51
-
52
- The above copyright notice and this permission notice shall be
53
- included in all copies or substantial portions of the Software.
54
-
55
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
56
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
58
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
59
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
60
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
61
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,24 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require "rubygems"
4
- require "hoe"
5
-
6
- # Hoe.plugin :compiler
7
- # Hoe.plugin :gem_prelude_sucks
8
- # Hoe.plugin :inline
9
- # Hoe.plugin :minitest
10
- # Hoe.plugin :racc
11
- # Hoe.plugin :rcov
12
- # Hoe.plugin :rdoc
13
-
14
- Hoe.spec "div_by_3" do
15
- # HEY! If you fill these out in ~/.hoe_template/default/Rakefile.erb then
16
- # you'll never have to touch them again!
17
- # (delete this comment too, of course)
18
-
19
- developer("Fredrik Svärd", "nfredrik@hotmail.com")
20
-
21
- # license "MIT" # this should match the license in the README
22
- end
23
-
24
- # vim: syntax=ruby
@@ -1,46 +0,0 @@
1
- gem "minitest"
2
- require "minitest/autorun"
3
- require "div_by_3"
4
-
5
- class TC_DivideByThree <Minitest::Test
6
-
7
- def setup
8
- end
9
-
10
- def test_valid_val
11
- assert div_by_3(123)
12
- end
13
-
14
- def test_valid_val_zero
15
- assert div_by_3(0)
16
- end
17
-
18
- def test_valid_val_negative
19
- refute div_by_3(-2)
20
- end
21
-
22
-
23
- def test_valid_val_but_false
24
- refute div_by_3(223)
25
- end
26
-
27
- def test_invalid_string
28
- assert_raises(TypeError) { div_by_3("123") }
29
- end
30
-
31
- def test_invalid_array
32
- assert_raises(TypeError){ div_by_3([123])}
33
- end
34
-
35
-
36
- def test_valid_val_very_big_false
37
- refute div_by_3(1231123232445353645667657567575)
38
- end
39
-
40
- def test_valid_val_very_big_true
41
- assert div_by_3(1231123232445353645667657567576)
42
- end
43
-
44
-
45
- end
46
-