slot_machine 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/CHANGELOG.rdoc +5 -1
- data/MIT-LICENSE +2 -2
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/slot_machine/slot.rb +3 -3
- data/lib/slot_machine/version.rb +2 -2
- data/slot_machine.gemspec +1 -0
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfbfc09634e9493fce5a1b0cfba6c9abf85da643
|
4
|
+
data.tar.gz: 4a2d6f79212a67d39d16b7f68872c7eb3c1c0ba4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 044739fa8abc559acc9ac2e444086feba7a96a0f8667cf8f4d1e1a2cf6d561d6bfc9b86392baab2b3dc42e676ce58e2b9c9c7d46e3d30f7496aae1903e7054d0
|
7
|
+
data.tar.gz: d313036fc461db10b867c46eb683a0b1c2ce74eb01c65f90eadcf7e4ee2ae014e3494fa440f68ce478ff765b390873983fce336664d0e83cf75890c2fefb1b22
|
data/.travis.yml
CHANGED
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
= SlotMachine CHANGELOG
|
2
2
|
|
3
|
+
== Version 0.1.2 (April 19, 2018)
|
4
|
+
|
5
|
+
* Fixed Fixnum deprecation (credits to @dmkl)
|
6
|
+
|
3
7
|
== Version 0.1.1 (July 10, 2013)
|
4
8
|
|
5
9
|
* Introduced SlotMachine::Slots (also Slots and TimeSlots) for addition and subtraction of slots
|
@@ -10,4 +14,4 @@
|
|
10
14
|
|
11
15
|
== Version 0.1.0 (September 16, 2012)
|
12
16
|
|
13
|
-
* Initial release
|
17
|
+
* Initial release
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2018 Paul Engel
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
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.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -135,7 +135,7 @@ For support, remarks and requests, please mail me at [paul.engel@holder.nl](mail
|
|
135
135
|
|
136
136
|
## License
|
137
137
|
|
138
|
-
Copyright (c)
|
138
|
+
Copyright (c) 2018 Paul Engel, released under the MIT license
|
139
139
|
|
140
140
|
[http://holder.nl](http://holder.nl) - [http://codehero.es](http://codehero.es) - [http://gettopup.com](http://gettopup.com) - [http://github.com/archan937](http://github.com/archan937) - [http://twitter.com/archan937](http://twitter.com/archan937) - [paul.engel@holder.nl](mailto:paul.engel@holder.nl)
|
141
141
|
|
@@ -143,4 +143,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
143
143
|
|
144
144
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
145
145
|
|
146
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
146
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/slot_machine/slot.rb
CHANGED
@@ -154,7 +154,7 @@ module SlotMachine
|
|
154
154
|
end
|
155
155
|
|
156
156
|
def match_compared(a, b, interval)
|
157
|
-
if a.is_a?(Array) && b.is_a?(
|
157
|
+
if a.is_a?(Array) && b.is_a?(Integer)
|
158
158
|
raise ArgumentError, "Length has to be greater than 0 (#{b} given)" unless b > 0
|
159
159
|
i = 0
|
160
160
|
[].tap do |matches|
|
@@ -164,7 +164,7 @@ module SlotMachine
|
|
164
164
|
i += interval
|
165
165
|
end
|
166
166
|
end
|
167
|
-
elsif a.is_a?(
|
167
|
+
elsif a.is_a?(Integer) && b.is_a?(Array)
|
168
168
|
match_compared b, a, interval
|
169
169
|
elsif a.is_a?(Array) && b.is_a?(Array)
|
170
170
|
[].tap do |matches|
|
@@ -178,4 +178,4 @@ module SlotMachine
|
|
178
178
|
end
|
179
179
|
|
180
180
|
end
|
181
|
-
end
|
181
|
+
end
|
data/lib/slot_machine/version.rb
CHANGED
data/slot_machine.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slot_machine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Engel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.13.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: One of the classic programming problems is the determination of time
|
42
56
|
slot availability. Very often this is used within scheduling / calendar programs.
|
43
57
|
SlotMachine is a very small Ruby gem which can do the job for you. It does not only
|
@@ -48,8 +62,8 @@ executables: []
|
|
48
62
|
extensions: []
|
49
63
|
extra_rdoc_files: []
|
50
64
|
files:
|
51
|
-
- .gitignore
|
52
|
-
- .travis.yml
|
65
|
+
- ".gitignore"
|
66
|
+
- ".travis.yml"
|
53
67
|
- CHANGELOG.rdoc
|
54
68
|
- Gemfile
|
55
69
|
- MIT-LICENSE
|
@@ -80,17 +94,17 @@ require_paths:
|
|
80
94
|
- lib
|
81
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
96
|
requirements:
|
83
|
-
- -
|
97
|
+
- - ">="
|
84
98
|
- !ruby/object:Gem::Version
|
85
99
|
version: '0'
|
86
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
|
-
- -
|
102
|
+
- - ">="
|
89
103
|
- !ruby/object:Gem::Version
|
90
104
|
version: '0'
|
91
105
|
requirements: []
|
92
106
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.4.5.1
|
94
108
|
signing_key:
|
95
109
|
specification_version: 4
|
96
110
|
summary: Ruby gem for matching available slots (time slots are also supported)
|