slotty 1.0.0 → 1.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 +4 -4
- data/.github/workflows/rspec.yml +15 -0
- data/.github/workflows/rubocop.yml +16 -0
- data/.gitignore +2 -0
- data/.tool-versions +1 -1
- data/Gemfile +4 -2
- data/Gemfile.lock +48 -18
- data/README.md +2 -0
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/lib/slotty/slot.rb +21 -4
- data/lib/slotty/timeframe.rb +14 -1
- data/lib/slotty/version.rb +3 -1
- data/lib/slotty.rb +52 -12
- data/slotty.gemspec +20 -15
- metadata +31 -17
- data/.travis.yml +0 -7
- data/slotty-0.1.0.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f88346da2757a2c2c3ee2d7f1201921430d7a0143cb3e61a733141af842c5d8
|
|
4
|
+
data.tar.gz: 404e5b446ff5bc69d699f1aa75e35c36e4226bda27d407762d917ef3f36a493b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21d95a04f8a6c5f4e7fada8955cdee1b3e258ee4ac164c880445944a8495b66353f4459f08d5683e32fe95c6d0403dd1fb3f14252a762362f21991c13dd3c97a
|
|
7
|
+
data.tar.gz: 85f382758e987b92b016048fe0d0d06a22edbc924f932b2f317c2f65bc8b09f641bbd1ff6f5a1eb869aff38b6de157166fccdc406d43aefa7e40abf650d85d8a
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: Run RSpec tests
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
run-rspec-tests:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v2
|
|
8
|
+
- name: Set up Ruby
|
|
9
|
+
uses: ruby/setup-ruby@v1
|
|
10
|
+
with:
|
|
11
|
+
ruby-version: 3.3.0
|
|
12
|
+
bundler-cache: true
|
|
13
|
+
- name: Run tests
|
|
14
|
+
run: |
|
|
15
|
+
bundle exec rspec
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Run Rubocop
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
run-rubocop:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v2
|
|
8
|
+
- name: Set up Ruby
|
|
9
|
+
uses: ruby/setup-ruby@v1
|
|
10
|
+
with:
|
|
11
|
+
ruby-version: 3.3.0
|
|
12
|
+
bundler-cache: true
|
|
13
|
+
- name: Run rubocop
|
|
14
|
+
run: |
|
|
15
|
+
bundle exec rubocop
|
|
16
|
+
|
data/.gitignore
CHANGED
data/.tool-versions
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby
|
|
1
|
+
ruby 3.3.0
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
source 'https://rubygems.org'
|
|
4
|
+
|
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
4
6
|
|
|
5
7
|
# Specify your gem's dependencies in slotty.gemspec
|
|
6
8
|
gemspec
|
data/Gemfile.lock
CHANGED
|
@@ -1,35 +1,65 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
slotty (1.
|
|
4
|
+
slotty (1.1.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
ast (2.4.2)
|
|
10
|
+
diff-lcs (1.5.1)
|
|
11
|
+
json (2.7.2)
|
|
12
|
+
language_server-protocol (3.17.0.3)
|
|
13
|
+
parallel (1.24.0)
|
|
14
|
+
parser (3.3.1.0)
|
|
15
|
+
ast (~> 2.4.1)
|
|
16
|
+
racc
|
|
17
|
+
racc (1.7.3)
|
|
18
|
+
rainbow (3.1.1)
|
|
19
|
+
rake (13.2.1)
|
|
20
|
+
regexp_parser (2.9.2)
|
|
21
|
+
rexml (3.3.3)
|
|
22
|
+
strscan
|
|
23
|
+
rspec (3.13.0)
|
|
24
|
+
rspec-core (~> 3.13.0)
|
|
25
|
+
rspec-expectations (~> 3.13.0)
|
|
26
|
+
rspec-mocks (~> 3.13.0)
|
|
27
|
+
rspec-core (3.13.0)
|
|
28
|
+
rspec-support (~> 3.13.0)
|
|
29
|
+
rspec-expectations (3.13.0)
|
|
18
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
19
|
-
rspec-support (~> 3.
|
|
20
|
-
rspec-mocks (3.
|
|
31
|
+
rspec-support (~> 3.13.0)
|
|
32
|
+
rspec-mocks (3.13.1)
|
|
21
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
22
|
-
rspec-support (~> 3.
|
|
23
|
-
rspec-support (3.
|
|
34
|
+
rspec-support (~> 3.13.0)
|
|
35
|
+
rspec-support (3.13.1)
|
|
36
|
+
rubocop (1.63.5)
|
|
37
|
+
json (~> 2.3)
|
|
38
|
+
language_server-protocol (>= 3.17.0)
|
|
39
|
+
parallel (~> 1.10)
|
|
40
|
+
parser (>= 3.3.0.2)
|
|
41
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
42
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
43
|
+
rexml (>= 3.2.5, < 4.0)
|
|
44
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
45
|
+
ruby-progressbar (~> 1.7)
|
|
46
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
47
|
+
rubocop-ast (1.31.3)
|
|
48
|
+
parser (>= 3.3.1.0)
|
|
49
|
+
ruby-progressbar (1.13.0)
|
|
50
|
+
strscan (3.1.0)
|
|
51
|
+
unicode-display_width (2.5.0)
|
|
24
52
|
|
|
25
53
|
PLATFORMS
|
|
54
|
+
arm64-darwin-23
|
|
26
55
|
ruby
|
|
27
56
|
|
|
28
57
|
DEPENDENCIES
|
|
29
|
-
bundler (~>
|
|
30
|
-
rake (~>
|
|
31
|
-
rspec (~> 3.
|
|
58
|
+
bundler (~> 2.5.9)
|
|
59
|
+
rake (~> 13.2.1)
|
|
60
|
+
rspec (~> 3.13)
|
|
61
|
+
rubocop (~> 1.63)
|
|
32
62
|
slotty!
|
|
33
63
|
|
|
34
64
|
BUNDLED WITH
|
|
35
|
-
|
|
65
|
+
2.5.9
|
data/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# Slotty
|
|
2
|
+
[](https://github.com/haydenrou/slotty/actions/workflows/rubocop.yml/badge.svg)
|
|
3
|
+
[](https://github.com/haydenrou/slotty/actions/workflows/rspec.yml/badge.svg)
|
|
2
4
|
|
|
3
5
|
Slotty provides a way of determining available slots within a time frame. An example would be where a service provider needs to take bookings.
|
|
4
6
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'slotty'
|
|
5
6
|
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
|
@@ -10,5 +11,5 @@ require "slotty"
|
|
|
10
11
|
# require "pry"
|
|
11
12
|
# Pry.start
|
|
12
13
|
|
|
13
|
-
require
|
|
14
|
+
require 'irb'
|
|
14
15
|
IRB.start(__FILE__)
|
data/lib/slotty/slot.rb
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'slotty/timeframe'
|
|
2
4
|
|
|
3
5
|
module Slotty
|
|
6
|
+
# The Slot class represents a time slot and provides methods to check
|
|
7
|
+
# for overlaps with excluded slots and to format the time slot as a string.
|
|
4
8
|
class Slot
|
|
5
9
|
attr_reader :range, :begin, :end
|
|
6
10
|
|
|
11
|
+
# Initializes a Slot instance with a specified range.
|
|
12
|
+
#
|
|
13
|
+
# @param range [Range] The time range for the slot.
|
|
7
14
|
def initialize(range:)
|
|
8
15
|
@range = range
|
|
9
16
|
@begin = range.begin
|
|
10
17
|
@end = range.end
|
|
11
18
|
end
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
# Checks if the slot has overlaps with any of the excluded slots.
|
|
21
|
+
#
|
|
22
|
+
# @param excluded_slots [Array<Range>] An array of ranges representing excluded slots.
|
|
23
|
+
# @return [Boolean] true if there are overlaps with any excluded slots, otherwise false.
|
|
24
|
+
def overlaps?(excluded_slots = [])
|
|
14
25
|
return false if excluded_slots.empty?
|
|
15
26
|
|
|
16
27
|
excluded_slots.any? do |exc_slot|
|
|
@@ -18,15 +29,21 @@ module Slotty
|
|
|
18
29
|
end
|
|
19
30
|
end
|
|
20
31
|
|
|
32
|
+
# Returns the start time of the slot formatted as a string.
|
|
33
|
+
#
|
|
34
|
+
# @return [String] The formatted start time of the slot.
|
|
21
35
|
def to_s
|
|
22
36
|
range.begin.strftime('%I:%M %p')
|
|
23
37
|
end
|
|
24
38
|
|
|
39
|
+
# Returns a hash representation of the slot with detailed time information.
|
|
40
|
+
#
|
|
41
|
+
# @return [Hash] A hash containing the start time, end time, and formatted time.
|
|
25
42
|
def full
|
|
26
43
|
{
|
|
27
44
|
start_time: range.begin,
|
|
28
|
-
end_time:
|
|
29
|
-
time:
|
|
45
|
+
end_time: range.end,
|
|
46
|
+
time: to_s
|
|
30
47
|
}
|
|
31
48
|
end
|
|
32
49
|
end
|
data/lib/slotty/timeframe.rb
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Slotty
|
|
4
|
+
# The Timeframe class provides methods to determine if one time range
|
|
5
|
+
# covers or contains another time range.
|
|
2
6
|
class Timeframe
|
|
3
7
|
class << self
|
|
8
|
+
# Determines if the surrounding_range completely covers the included_range.
|
|
9
|
+
#
|
|
10
|
+
# @param surrounding_range [Range] The range that is expected to cover the other.
|
|
11
|
+
# @param included_range [Range] The range that is expected to be covered.
|
|
12
|
+
# @return [Boolean] true if surrounding_range covers included_range, otherwise false.
|
|
4
13
|
def covers?(surrounding_range, included_range)
|
|
5
14
|
starts_before = surrounding_range.begin <= included_range.begin
|
|
6
15
|
ends_after = surrounding_range.end >= included_range.end
|
|
@@ -8,6 +17,11 @@ module Slotty
|
|
|
8
17
|
starts_before && ends_after
|
|
9
18
|
end
|
|
10
19
|
|
|
20
|
+
# Determines if the potential_slot is contained within the excluder range.
|
|
21
|
+
#
|
|
22
|
+
# @param excluder [Range] The range that potentially excludes another.
|
|
23
|
+
# @param potential_slot [Range] The range that is expected to be contained.
|
|
24
|
+
# @return [Boolean] true if potential_slot is within excluder, otherwise false.
|
|
11
25
|
def contains?(excluder, potential_slot)
|
|
12
26
|
start_within = potential_slot.begin >= excluder.begin && potential_slot.begin < excluder.end
|
|
13
27
|
end_within = potential_slot.end > excluder.begin && potential_slot.end <= excluder.end
|
|
@@ -17,4 +31,3 @@ module Slotty
|
|
|
17
31
|
end
|
|
18
32
|
end
|
|
19
33
|
end
|
|
20
|
-
|
data/lib/slotty/version.rb
CHANGED
data/lib/slotty.rb
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
require "slotty/timeframe"
|
|
3
|
-
require "slotty/slot"
|
|
1
|
+
# frozen_string_literal: true
|
|
4
2
|
|
|
3
|
+
require 'slotty/version'
|
|
4
|
+
require 'slotty/timeframe'
|
|
5
|
+
require 'slotty/slot'
|
|
6
|
+
|
|
7
|
+
# The Slotty module provides methods to generate time slots based on a specified
|
|
8
|
+
# range, slot length, and interval. It also allows for excluding specific time
|
|
9
|
+
# slots from the generated list.
|
|
5
10
|
module Slotty
|
|
6
11
|
InvalidFormatError = Class.new(StandardError)
|
|
7
12
|
InvalidDateError = Class.new(StandardError)
|
|
@@ -10,11 +15,39 @@ module Slotty
|
|
|
10
15
|
InvalidExclusionError = Class.new(StandardError)
|
|
11
16
|
|
|
12
17
|
class << self
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
# Retrieves available slots within a specified range, considering slot length,
|
|
19
|
+
# interval between slots, and any times to be excluded.
|
|
20
|
+
#
|
|
21
|
+
# @param for_range [Range] The range within which to generate slots.
|
|
22
|
+
# @param slot_length_mins [Integer] The length of each slot in minutes.
|
|
23
|
+
# @param interval_mins [Integer] The interval between the start of each slot in minutes.
|
|
24
|
+
# @param as [Symbol] The format in which to return the slots (:full by default).
|
|
25
|
+
# @param exclude_times [Array<Range>] An array of time ranges to be excluded.
|
|
26
|
+
# @raise [InvalidDateError] If for_range is not a Range.
|
|
27
|
+
# @raise [InvalidSlotLengthError] If slot_length_mins is not an integer.
|
|
28
|
+
# @raise [InvalidIntervalError] If interval_mins is not an integer.
|
|
29
|
+
# @raise [InvalidExclusionError] If exclude_times is not an array of ranges.
|
|
30
|
+
# @raise [InvalidFormatError] If the format specified in `as` is invalid.
|
|
31
|
+
# @return [Array<Object>] An array of slots in the specified format.
|
|
32
|
+
# rubocop:disable Metrics/MethodLength
|
|
33
|
+
# rubocop:disable Metrics/AbcSize
|
|
34
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
|
35
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
|
36
|
+
def get_slots(for_range:,
|
|
37
|
+
slot_length_mins:,
|
|
38
|
+
interval_mins:,
|
|
39
|
+
as: :full,
|
|
40
|
+
exclude_times: [])
|
|
41
|
+
raise InvalidDateError, 'for_value must be type of Range' unless for_range.is_a?(Range)
|
|
42
|
+
raise InvalidSlotLengthError, 'slot_length_mins must be an integer' unless slot_length_mins.is_a?(Integer)
|
|
43
|
+
raise InvalidIntervalError, 'interval_mins must be an integer' unless interval_mins.is_a?(Integer)
|
|
44
|
+
|
|
45
|
+
unless exclude_times.is_a?(Array) && exclude_times.all? do |t|
|
|
46
|
+
t.is_a?(Range)
|
|
47
|
+
end
|
|
48
|
+
raise InvalidExclusionError,
|
|
49
|
+
'exclude_times must be an array of time ranges'
|
|
50
|
+
end
|
|
18
51
|
|
|
19
52
|
slot_length = slot_length_mins * 60
|
|
20
53
|
interval = interval_mins * 60
|
|
@@ -24,20 +57,27 @@ module Slotty
|
|
|
24
57
|
potential_slot = Slot.new(range: for_range.begin..(for_range.begin + slot_length))
|
|
25
58
|
|
|
26
59
|
while Timeframe.covers?(for_range, potential_slot)
|
|
27
|
-
if potential_slot.
|
|
28
|
-
|
|
60
|
+
if potential_slot.overlaps?(exclude_times)
|
|
61
|
+
range = (potential_slot.begin + interval)..(potential_slot.begin + interval + slot_length)
|
|
62
|
+
potential_slot = Slot.new(range:)
|
|
29
63
|
|
|
30
64
|
next
|
|
31
65
|
end
|
|
32
66
|
|
|
33
|
-
raise InvalidFormatError,
|
|
67
|
+
raise InvalidFormatError, 'cannot format slot in this way' unless potential_slot.respond_to?(as)
|
|
34
68
|
|
|
35
69
|
slots << potential_slot.send(as)
|
|
36
70
|
|
|
37
|
-
|
|
71
|
+
range = (potential_slot.begin + interval)..(potential_slot.begin + interval + slot_length)
|
|
72
|
+
|
|
73
|
+
potential_slot = Slot.new(range:)
|
|
38
74
|
end
|
|
39
75
|
|
|
40
76
|
slots
|
|
41
77
|
end
|
|
78
|
+
# rubocop:enable Metrics/MethodLength
|
|
79
|
+
# rubocop:enable Metrics/AbcSize
|
|
80
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
|
81
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
|
42
82
|
end
|
|
43
83
|
end
|
data/slotty.gemspec
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
1
2
|
|
|
2
|
-
lib = File.expand_path(
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require
|
|
5
|
+
require 'slotty/version'
|
|
5
6
|
|
|
6
7
|
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name =
|
|
8
|
+
spec.name = 'slotty'
|
|
8
9
|
spec.version = Slotty::VERSION
|
|
9
|
-
spec.authors = [
|
|
10
|
-
spec.email = [
|
|
10
|
+
spec.authors = ['Hayden Rouille']
|
|
11
|
+
spec.email = ['hayden@rouille.dev']
|
|
11
12
|
|
|
12
|
-
spec.summary =
|
|
13
|
-
spec.description =
|
|
14
|
-
|
|
15
|
-
spec.
|
|
13
|
+
spec.summary = 'Generate available slots between time ranges'
|
|
14
|
+
spec.description = "Slotty will determine the available time slots for a given period, taking in a set of \
|
|
15
|
+
pre-existing busy periods and a timeframe of the appointment"
|
|
16
|
+
spec.homepage = 'https://github.com/haydenrou/slotty'
|
|
17
|
+
spec.license = 'MIT'
|
|
18
|
+
|
|
19
|
+
spec.required_ruby_version = '>= 3.3.0'
|
|
16
20
|
|
|
17
21
|
# Specify which files should be added to the gem when it is released.
|
|
18
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
19
|
-
spec.files
|
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
20
24
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
21
25
|
end
|
|
22
|
-
spec.bindir =
|
|
26
|
+
spec.bindir = 'exe'
|
|
23
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
24
|
-
spec.require_paths = [
|
|
28
|
+
spec.require_paths = ['lib']
|
|
25
29
|
|
|
26
|
-
spec.add_development_dependency
|
|
27
|
-
spec.add_development_dependency
|
|
28
|
-
spec.add_development_dependency
|
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.5.9'
|
|
31
|
+
spec.add_development_dependency 'rake', '~> 13.2.1'
|
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.13'
|
|
33
|
+
spec.add_development_dependency 'rubocop', '~> 1.63'
|
|
29
34
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slotty
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hayden Rouille
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -16,54 +16,70 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 2.5.9
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 2.5.9
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 13.2.1
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 13.2.1
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rspec
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '3.
|
|
47
|
+
version: '3.13'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '3.
|
|
54
|
+
version: '3.13'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rubocop
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '1.63'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '1.63'
|
|
55
69
|
description: Slotty will determine the available time slots for a given period, taking
|
|
56
|
-
in a set of
|
|
70
|
+
in a set of pre-existing busy periods and a timeframe of
|
|
71
|
+
the appointment
|
|
57
72
|
email:
|
|
58
73
|
- hayden@rouille.dev
|
|
59
74
|
executables: []
|
|
60
75
|
extensions: []
|
|
61
76
|
extra_rdoc_files: []
|
|
62
77
|
files:
|
|
78
|
+
- ".github/workflows/rspec.yml"
|
|
79
|
+
- ".github/workflows/rubocop.yml"
|
|
63
80
|
- ".gitignore"
|
|
64
81
|
- ".rspec"
|
|
65
82
|
- ".tool-versions"
|
|
66
|
-
- ".travis.yml"
|
|
67
83
|
- CODE_OF_CONDUCT.md
|
|
68
84
|
- Gemfile
|
|
69
85
|
- Gemfile.lock
|
|
@@ -76,13 +92,12 @@ files:
|
|
|
76
92
|
- lib/slotty/slot.rb
|
|
77
93
|
- lib/slotty/timeframe.rb
|
|
78
94
|
- lib/slotty/version.rb
|
|
79
|
-
- slotty-0.1.0.gem
|
|
80
95
|
- slotty.gemspec
|
|
81
96
|
homepage: https://github.com/haydenrou/slotty
|
|
82
97
|
licenses:
|
|
83
98
|
- MIT
|
|
84
99
|
metadata: {}
|
|
85
|
-
post_install_message:
|
|
100
|
+
post_install_message:
|
|
86
101
|
rdoc_options: []
|
|
87
102
|
require_paths:
|
|
88
103
|
- lib
|
|
@@ -90,16 +105,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
90
105
|
requirements:
|
|
91
106
|
- - ">="
|
|
92
107
|
- !ruby/object:Gem::Version
|
|
93
|
-
version:
|
|
108
|
+
version: 3.3.0
|
|
94
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
110
|
requirements:
|
|
96
111
|
- - ">="
|
|
97
112
|
- !ruby/object:Gem::Version
|
|
98
113
|
version: '0'
|
|
99
114
|
requirements: []
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
signing_key:
|
|
115
|
+
rubygems_version: 3.5.3
|
|
116
|
+
signing_key:
|
|
103
117
|
specification_version: 4
|
|
104
118
|
summary: Generate available slots between time ranges
|
|
105
119
|
test_files: []
|
data/.travis.yml
DELETED
data/slotty-0.1.0.gem
DELETED
|
Binary file
|