repeatable 0.6.0 → 1.0.0

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
- SHA1:
3
- metadata.gz: 2a36439cf2a982c3ef546a1d7247517788a7f013
4
- data.tar.gz: 81df50553e0f1e6894feed2b03f4512321c6973c
2
+ SHA256:
3
+ metadata.gz: 9f6976240c976a027e08e04dc46dff2a7a420894f089ae7fa8c9fded126bafc6
4
+ data.tar.gz: 4e0e0e4d45d72b543549904a9a6f4b041430b9808075ccb64a81583366a4e414
5
5
  SHA512:
6
- metadata.gz: d489cdad639be6b5cd0dbbb9e320bc73bbacdc4df5fb402fd0c54d2355d8ca6cdb26015804d50378c020b1c677cc368e9669d182d4611d7899e37cb57f75a36b
7
- data.tar.gz: 3cad5c6ff55fb408a85a4ebbea1ad5ba3c90db7b2733050af10bb8d7f3ffa79534a52a87c6d163fa505c30cdf52962d57b47a36e7b319449cf95eec021817d78
6
+ metadata.gz: 2698038cb582f612642c1b2f9c595e3830ff42556fb89eef56d4bbf5e3c34396d318175699ecb74a2c589aefe861cc5c7e17a6bde0b4950b6939421fedcb1260
7
+ data.tar.gz: 6a98285ed9058b186651055e5afecae2b2abcb64ca0dbc488b92b76ff6a20da02d4ab1d96f204bd864b210a5d183fdff34db31b82d4b06595e0b7c16f2dc3dcf
@@ -0,0 +1,13 @@
1
+ # These commits should be ignored by git-blame, making it much easier to step through the history
2
+ # of a line without hitting formatting commits (esp. large, update-all-the-files sorts of commits).
3
+ #
4
+ # For git-blame to ignore these revisions, you'll need to tell it about this file.
5
+ #
6
+ # You can either pass it to the command each time:
7
+ # git blame --ignore-rev-file=.git-blame-ignore-revs -L 12,14 lib/repeatable/conversions.rb
8
+ #
9
+ # Or you can set it as a config value, which will be used by all git-blame commands henceforth:
10
+ # git config blame.ignoreRevsFile .git-blame-ignore-revs
11
+
12
+ # Initial style fix after introducing Standard
13
+ 80611e9be4fe12e6b9bdb937d37902c12ac3a53b
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  /*.gem
2
2
  /.bundle/
3
3
  /.yardoc
4
- /Gemfile.lock
5
4
  /_yardoc/
6
5
  /coverage/
7
6
  /doc/
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format documentation
2
1
  --color
data/.standard.yml ADDED
@@ -0,0 +1,3 @@
1
+ # For available configuration options, see: https://github.com/testdouble/standard
2
+
3
+ default_ignores: true
data/.travis.yml CHANGED
@@ -1,12 +1,18 @@
1
1
  language: ruby
2
+ env:
3
+ global:
4
+ - COVERAGE=true
2
5
  rvm:
3
- - 2.1.9
4
- - 2.2.5
5
- - 2.3.1
6
- sudo: false
7
- addons:
8
- code_climate:
9
- repo_token:
10
- secure: fyZ7Ycc23fzfh8bBiqPUhlJGcIcnanZWqVc4nsKDJeE1G5ScW01+ot1g4miDWxo7w80gKRKP/PfoYf6lOQ1B5yJJCV0Z5fjoTW3y+EKksMuGNCFaWh8R73MIPlVtfOazGyI2t3l4zDWoik906wHHNQJFveMZawvZGrVMWF6YxKg=
11
- after_success:
12
- - bundle exec codeclimate-test-reporter
6
+ - 2.5
7
+ - 2.6
8
+ - 2.7
9
+ - 3.0
10
+ before_install:
11
+ - yes | gem update --system --force
12
+ - gem install bundler
13
+ before_script:
14
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
15
+ - chmod +x ./cc-test-reporter
16
+ - ./cc-test-reporter before-build
17
+ after_script:
18
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/CHANGELOG.md CHANGED
@@ -2,7 +2,28 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
- [Commits](https://github.com/molawson/repeatable/compare/v0.6.0...master)
5
+ [Commits](https://github.com/molawson/repeatable/compare/v1.0.0...main)
6
+
7
+ ### 1.0.0 (2021-03-25)
8
+
9
+ Breaking Changes:
10
+
11
+ * Change `Expression::DayInMonth` to take negative numbers instead of special `:last` symbol (or string)
12
+ * Stop including `Conversions` in top level namespace (must now be accessed via `Repeatable::Conversions::Date()` or by calling `include Repeatable::Conversions` in whatever namespace(s) it's needed)
13
+ * Require Ruby 2.5.0 or greater
14
+
15
+ Changes:
16
+
17
+ * Flatten nested `Expression::Union` elements during initialization ([@cmoel][])
18
+ * Flatten nested `Expression::Intersection` elements during initialization
19
+
20
+ Chores:
21
+
22
+ * Add support for Ruby 2.5, 2.6, 2.7, 3.0
23
+ * Introduce [standard](https://github.com/testdouble/standard) for code formatting
24
+
25
+ [Commits](https://github.com/molawson/repeatable/compare/v0.6.0...v1.0.0)
26
+
6
27
 
7
28
  ### 0.6.0 (2017-05-04)
8
29
 
@@ -12,7 +33,7 @@ Features:
12
33
  * Allow `Expression::DayInMonth` to take `:last` (or `'last'`) for its `day:` argument ([@PatrickLerner][])
13
34
  * Allow `Expression::WeekdayInMonth` to take negative `count` argument for last, second-to-last, etc. of a given weekday ([@danielma][])
14
35
 
15
- Bugfixes:
36
+ Bug Fixes:
16
37
 
17
38
  * Fix `Expression::RangeInYear` to properly handle using `start_day` and `end_day` when `start_month == end_month` ([@danielma][])
18
39
 
@@ -52,7 +73,7 @@ Features:
52
73
  * Add `ParseError` class for better error handling
53
74
  * Extract `Parser` class from `Schedule`
54
75
 
55
- Bugfixes:
76
+ Bug Fixes:
56
77
 
57
78
  * Enable `Schedule` to take a hash with string keys
58
79
 
@@ -65,7 +86,7 @@ Features:
65
86
  * Add `Schedule#to_h` and `Expression#to_h` methods
66
87
  * Enable building a `Schedule` from composed `Expression` objects
67
88
 
68
- Bugfixes:
89
+ Bug Fixes:
69
90
 
70
91
  * Fix default case equality for `Expression::Base` to work with classes and instances
71
92
 
@@ -81,3 +102,4 @@ Initial Release
81
102
  [@danott]: https://github.com/danott
82
103
  [@PatrickLerner]: https://github.com/PatrickLerner
83
104
  [@danielma]: https://github.com/danielma
105
+ [@cmoel]: https://github.com/cmoel
data/Gemfile CHANGED
@@ -1,10 +1,13 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in repeatable.gemspec
4
4
  gemspec
5
5
 
6
- gem 'pry'
6
+ gem "pry", "~> 0.13"
7
+ gem "rake", ">= 12.3.3"
8
+ gem "standard", "~> 1.0"
9
+
7
10
  group :test do
8
- gem 'simplecov'
9
- gem 'codeclimate-test-reporter', '~> 1.0.0'
11
+ gem "rspec", "~> 3.0"
12
+ gem "simplecov", "~> 0.18"
10
13
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,76 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ repeatable (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ coderay (1.1.3)
11
+ diff-lcs (1.4.4)
12
+ docile (1.3.5)
13
+ method_source (1.0.0)
14
+ parallel (1.20.1)
15
+ parser (3.0.0.0)
16
+ ast (~> 2.4.1)
17
+ pry (0.14.0)
18
+ coderay (~> 1.1)
19
+ method_source (~> 1.0)
20
+ rainbow (3.0.0)
21
+ rake (13.0.3)
22
+ regexp_parser (2.1.1)
23
+ rexml (3.2.4)
24
+ rspec (3.10.0)
25
+ rspec-core (~> 3.10.0)
26
+ rspec-expectations (~> 3.10.0)
27
+ rspec-mocks (~> 3.10.0)
28
+ rspec-core (3.10.1)
29
+ rspec-support (~> 3.10.0)
30
+ rspec-expectations (3.10.1)
31
+ diff-lcs (>= 1.2.0, < 2.0)
32
+ rspec-support (~> 3.10.0)
33
+ rspec-mocks (3.10.2)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.10.0)
36
+ rspec-support (3.10.2)
37
+ rubocop (1.11.0)
38
+ parallel (~> 1.10)
39
+ parser (>= 3.0.0.0)
40
+ rainbow (>= 2.2.2, < 4.0)
41
+ regexp_parser (>= 1.8, < 3.0)
42
+ rexml
43
+ rubocop-ast (>= 1.2.0, < 2.0)
44
+ ruby-progressbar (~> 1.7)
45
+ unicode-display_width (>= 1.4.0, < 3.0)
46
+ rubocop-ast (1.4.1)
47
+ parser (>= 2.7.1.5)
48
+ rubocop-performance (1.10.1)
49
+ rubocop (>= 0.90.0, < 2.0)
50
+ rubocop-ast (>= 0.4.0)
51
+ ruby-progressbar (1.11.0)
52
+ simplecov (0.21.2)
53
+ docile (~> 1.1)
54
+ simplecov-html (~> 0.11)
55
+ simplecov_json_formatter (~> 0.1)
56
+ simplecov-html (0.12.3)
57
+ simplecov_json_formatter (0.1.2)
58
+ standard (1.0.4)
59
+ rubocop (= 1.11.0)
60
+ rubocop-performance (= 1.10.1)
61
+ unicode-display_width (2.0.0)
62
+
63
+ PLATFORMS
64
+ x86_64-darwin-19
65
+ x86_64-linux
66
+
67
+ DEPENDENCIES
68
+ pry (~> 0.13)
69
+ rake (>= 12.3.3)
70
+ repeatable!
71
+ rspec (~> 3.0)
72
+ simplecov (~> 0.18)
73
+ standard (~> 1.0)
74
+
75
+ BUNDLED WITH
76
+ 2.2.14
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Repeatable
2
2
 
3
- [![Build Status](https://img.shields.io/travis/molawson/repeatable.svg)](https://travis-ci.org/molawson/repeatable)
4
- [![Code Climate](https://img.shields.io/codeclimate/github/molawson/repeatable.svg)](https://codeclimate.com/github/molawson/repeatable)
5
- [![Code Climate Coverage](https://img.shields.io/codeclimate/coverage/github/molawson/repeatable.svg)](https://codeclimate.com/github/molawson/repeatable)
3
+ [![Build Status](https://travis-ci.org/molawson/repeatable.svg?branch=main)](https://travis-ci.org/molawson/repeatable)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/73707efd5eeffd364c0d/maintainability)](https://codeclimate.com/github/molawson/repeatable/maintainability)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/73707efd5eeffd364c0d/test_coverage)](https://codeclimate.com/github/molawson/repeatable/test_coverage)
6
6
 
7
7
  Ruby implementation of Martin Fowler's [Recurring Events for Calendars](http://martinfowler.com/apsupp/recurring.pdf) paper.
8
8
 
@@ -24,7 +24,7 @@ Or install it yourself as:
24
24
 
25
25
  ## Requirements
26
26
 
27
- Because this gem relies heavily on required keyword arguments, especially to make dumping and parsing of schedules simpler, this code will only work on **Ruby 2.1** and higher.
27
+ Because this gem relies heavily on required keyword arguments, especially to make dumping and parsing of schedules simpler, this code will only work on **Ruby 2.2** and higher.
28
28
 
29
29
  ## Usage
30
30
 
@@ -106,8 +106,8 @@ Repeatable::Expression::Biweekly.new(weekday: 1, start_date: Date.new(2015, 12,
106
106
  Repeatable::Expression::DayInMonth.new(day: 13)
107
107
 
108
108
  # The last day of every month
109
- { day_in_month: { day: :last } }
110
- Repeatable::Expression::DayInMonth.new(day: :last)
109
+ { day_in_month: { day: -1 } }
110
+ Repeatable::Expression::DayInMonth.new(day: -1)
111
111
 
112
112
  # All days in October
113
113
  { range_in_year: { start_month: 10 } }
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task default: :spec
6
+ require "standard/rake"
7
+
8
+ task default: %i[spec standard]
data/lib/repeatable.rb CHANGED
@@ -1,30 +1,30 @@
1
- require 'date'
1
+ require "date"
2
2
 
3
- require 'repeatable/version'
4
-
5
- require 'repeatable/conversions'
6
- include Repeatable::Conversions
3
+ require "repeatable/version"
7
4
 
8
5
  module Repeatable
9
6
  end
10
7
 
11
- require 'repeatable/parse_error'
8
+ require "repeatable/parse_error"
9
+
10
+ require "repeatable/conversions"
11
+ require "repeatable/last_date_of_month"
12
12
 
13
- require 'repeatable/expression'
14
- require 'repeatable/expression/base'
13
+ require "repeatable/expression"
14
+ require "repeatable/expression/base"
15
15
 
16
- require 'repeatable/expression/date'
17
- require 'repeatable/expression/exact_date'
18
- require 'repeatable/expression/weekday'
19
- require 'repeatable/expression/biweekly'
20
- require 'repeatable/expression/weekday_in_month'
21
- require 'repeatable/expression/day_in_month'
22
- require 'repeatable/expression/range_in_year'
16
+ require "repeatable/expression/date"
17
+ require "repeatable/expression/exact_date"
18
+ require "repeatable/expression/weekday"
19
+ require "repeatable/expression/biweekly"
20
+ require "repeatable/expression/weekday_in_month"
21
+ require "repeatable/expression/day_in_month"
22
+ require "repeatable/expression/range_in_year"
23
23
 
24
- require 'repeatable/expression/set'
25
- require 'repeatable/expression/union'
26
- require 'repeatable/expression/intersection'
27
- require 'repeatable/expression/difference'
24
+ require "repeatable/expression/set"
25
+ require "repeatable/expression/union"
26
+ require "repeatable/expression/intersection"
27
+ require "repeatable/expression/difference"
28
28
 
29
- require 'repeatable/schedule'
30
- require 'repeatable/parser'
29
+ require "repeatable/schedule"
30
+ require "repeatable/parser"
@@ -27,23 +27,23 @@ module Repeatable
27
27
  def union(other)
28
28
  Union.new(self, other)
29
29
  end
30
- alias + union
31
- alias | union
30
+ alias_method :+, :union
31
+ alias_method :|, :union
32
32
 
33
33
  def intersection(other)
34
34
  Intersection.new(self, other)
35
35
  end
36
- alias & intersection
36
+ alias_method :&, :intersection
37
37
 
38
38
  def difference(other)
39
39
  Difference.new(included: self, excluded: other)
40
40
  end
41
- alias - difference
41
+ alias_method :-, :difference
42
42
 
43
43
  private
44
44
 
45
45
  def hash_key
46
- self.class.name.split('::').last
46
+ self.class.name.split("::").last
47
47
  .gsub(/(?<!\b)[A-Z]/) { "_#{Regexp.last_match[0]}" }
48
48
  .downcase
49
49
  .to_sym
@@ -3,7 +3,7 @@ module Repeatable
3
3
  class Biweekly < Date
4
4
  def initialize(weekday:, start_after: ::Date.today)
5
5
  @weekday = weekday
6
- @start_after = Date(start_after)
6
+ @start_after = Conversions::Date(start_after)
7
7
  end
8
8
 
9
9
  def include?(date)
@@ -1,7 +1,6 @@
1
1
  module Repeatable
2
2
  module Expression
3
3
  class Date < Base
4
-
5
4
  def to_h
6
5
  Hash[hash_key, attributes]
7
6
  end
@@ -10,7 +9,7 @@ module Repeatable
10
9
  other.is_a?(self.class) && attributes == other.attributes
11
10
  end
12
11
 
13
- alias eql? ==
12
+ alias_method :eql?, :==
14
13
 
15
14
  def hash
16
15
  [attributes.values, self.class.name].hash
@@ -20,7 +19,7 @@ module Repeatable
20
19
 
21
20
  def attributes
22
21
  instance_variables.each_with_object({}) do |name, hash|
23
- key = name.to_s.gsub(/^@/, '').to_sym
22
+ key = name.to_s.gsub(/^@/, "").to_sym
24
23
  hash[key] = normalize_attribute_value(instance_variable_get(name))
25
24
  end
26
25
  end
@@ -1,13 +1,15 @@
1
1
  module Repeatable
2
2
  module Expression
3
3
  class DayInMonth < Date
4
+ include LastDateOfMonth
5
+
4
6
  def initialize(day:)
5
7
  @day = day
6
8
  end
7
9
 
8
10
  def include?(date)
9
- if day.to_s == 'last'
10
- date.next_day.month != date.month
11
+ if day < 0
12
+ date - last_date_of_month(date) - 1 == day
11
13
  else
12
14
  date.day == day
13
15
  end
@@ -11,7 +11,7 @@ module Repeatable
11
11
  end
12
12
 
13
13
  def to_h
14
- Hash[hash_key, { included: included.to_h, excluded: excluded.to_h }]
14
+ Hash[hash_key, {included: included.to_h, excluded: excluded.to_h}]
15
15
  end
16
16
 
17
17
  def ==(other)
@@ -2,7 +2,7 @@ module Repeatable
2
2
  module Expression
3
3
  class ExactDate < Date
4
4
  def initialize(date:)
5
- @date = Date(date)
5
+ @date = Conversions::Date(date)
6
6
  end
7
7
 
8
8
  def include?(other_date)
@@ -1,6 +1,11 @@
1
1
  module Repeatable
2
2
  module Expression
3
3
  class Intersection < Set
4
+ def initialize(*elements)
5
+ other_intersection, not_intersection = elements.partition { |e| e.is_a?(self.class) }
6
+ super(other_intersection.flat_map(&:elements) + not_intersection)
7
+ end
8
+
4
9
  def include?(date)
5
10
  elements.all? { |e| e.include?(date) }
6
11
  end
@@ -19,11 +19,11 @@ module Repeatable
19
19
  end
20
20
 
21
21
  def to_h
22
- args = { start_month: start_month }
22
+ args = {start_month: start_month}
23
23
  args[:end_month] = end_month unless end_month == start_month
24
24
  args[:start_day] = start_day unless start_day.zero?
25
25
  args[:end_day] = end_day unless end_day.zero?
26
- { range_in_year: args }
26
+ {range_in_year: args}
27
27
  end
28
28
 
29
29
  private
@@ -1,6 +1,8 @@
1
1
  module Repeatable
2
2
  module Expression
3
3
  class Set < Base
4
+ attr_reader :elements
5
+
4
6
  def initialize(*elements)
5
7
  @elements = elements.flatten.uniq
6
8
  end
@@ -19,10 +21,6 @@ module Repeatable
19
21
  elements.size == other.elements.size &&
20
22
  other.elements.all? { |e| elements.include?(e) }
21
23
  end
22
-
23
- protected
24
-
25
- attr_reader :elements
26
24
  end
27
25
  end
28
26
  end
@@ -1,6 +1,11 @@
1
1
  module Repeatable
2
2
  module Expression
3
3
  class Union < Set
4
+ def initialize(*elements)
5
+ other_unions, not_unions = elements.partition { |e| e.is_a?(self.class) }
6
+ super(other_unions.flat_map(&:elements) + not_unions)
7
+ end
8
+
4
9
  def include?(date)
5
10
  elements.any? { |e| e.include?(date) }
6
11
  end
@@ -1,6 +1,8 @@
1
1
  module Repeatable
2
2
  module Expression
3
3
  class WeekdayInMonth < Date
4
+ include LastDateOfMonth
5
+
4
6
  def initialize(weekday:, count:)
5
7
  @weekday = weekday
6
8
  @count = count
@@ -38,12 +40,6 @@ module Repeatable
38
40
  (zero_indexed_day / 7) + 1
39
41
  end
40
42
 
41
- def last_date_of_month(date)
42
- next_month = date.next_month
43
- first_day_of_next_month = ::Date.new(next_month.year, next_month.month, 1)
44
- first_day_of_next_month.prev_day
45
- end
46
-
47
43
  def negative_count?
48
44
  count < 0
49
45
  end
@@ -0,0 +1,7 @@
1
+ module Repeatable
2
+ module LastDateOfMonth
3
+ def last_date_of_month(date)
4
+ ::Date.new(date.next_month.year, date.next_month.month, 1).prev_day
5
+ end
6
+ end
7
+ end
@@ -39,7 +39,7 @@ module Repeatable
39
39
  excluded: build_expression(value[:excluded])
40
40
  )
41
41
  else
42
- klass.new(symbolize_keys(value))
42
+ klass.new(**symbolize_keys(value))
43
43
  end
44
44
  end
45
45
 
@@ -12,16 +12,16 @@ module Repeatable
12
12
  end
13
13
 
14
14
  def occurrences(start_date, end_date)
15
- start_date = Date(start_date)
16
- end_date = Date(end_date)
15
+ start_date = Conversions::Date(start_date)
16
+ end_date = Conversions::Date(end_date)
17
17
 
18
- fail(ArgumentError, 'end_date must be equal to or after start_date') if end_date < start_date
18
+ fail(ArgumentError, "end_date must be equal to or after start_date") if end_date < start_date
19
19
 
20
20
  (start_date..end_date).select { |date| include?(date) }
21
21
  end
22
22
 
23
23
  def next_occurrence(start_date = Date.today, include_start: false, limit: 36525)
24
- date = Date(start_date)
24
+ date = Conversions::Date(start_date)
25
25
 
26
26
  return date if include_start && include?(date)
27
27
 
@@ -34,7 +34,7 @@ module Repeatable
34
34
  end
35
35
 
36
36
  def include?(date = Date.today)
37
- date = Date(date)
37
+ date = Conversions::Date(date)
38
38
  expression.include?(date)
39
39
  end
40
40
 
@@ -1,3 +1,3 @@
1
1
  module Repeatable
2
- VERSION = '0.6.0'
2
+ VERSION = "1.0.0"
3
3
  end
data/repeatable.gemspec CHANGED
@@ -1,22 +1,19 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path("../lib", __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'repeatable/version'
3
+ require "repeatable/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'repeatable'
7
- spec.version = Repeatable::VERSION
8
- spec.authors = ['Mo Lawson']
9
- spec.email = ['mo@molawson.com']
6
+ spec.name = "repeatable"
7
+ spec.version = Repeatable::VERSION
8
+ spec.authors = ["Mo Lawson"]
9
+ spec.email = ["mo@molawson.com"]
10
10
 
11
- spec.summary = 'Describe recurring event schedules and calculate their occurrences'
12
- spec.description = "Ruby implementation of Martin Fowler's 'Recurring Events for Calendars' paper."
13
- spec.homepage = 'https://github.com/molawson/repeatable'
14
- spec.license = 'MIT'
11
+ spec.summary = "Describe recurring event schedules and calculate their occurrences"
12
+ spec.description = "Ruby implementation of Martin Fowler's 'Recurring Events for Calendars' paper."
13
+ spec.homepage = "https://github.com/molawson/repeatable"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
15
16
 
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.require_paths = ['lib']
18
-
19
- spec.add_development_dependency 'bundler', '~> 1.6'
20
- spec.add_development_dependency 'rake', '~> 10.0'
21
- spec.add_development_dependency 'rspec', '~> 3.0'
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.require_paths = ["lib"]
22
19
  end
metadata CHANGED
@@ -1,57 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repeatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mo Lawson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.6'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.6'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
+ dependencies: []
55
13
  description: Ruby implementation of Martin Fowler's 'Recurring Events for Calendars'
56
14
  paper.
57
15
  email:
@@ -60,11 +18,14 @@ executables: []
60
18
  extensions: []
61
19
  extra_rdoc_files: []
62
20
  files:
21
+ - ".git-blame-ignore-revs"
63
22
  - ".gitignore"
64
23
  - ".rspec"
24
+ - ".standard.yml"
65
25
  - ".travis.yml"
66
26
  - CHANGELOG.md
67
27
  - Gemfile
28
+ - Gemfile.lock
68
29
  - LICENSE.txt
69
30
  - README.md
70
31
  - Rakefile
@@ -85,6 +46,7 @@ files:
85
46
  - lib/repeatable/expression/union.rb
86
47
  - lib/repeatable/expression/weekday.rb
87
48
  - lib/repeatable/expression/weekday_in_month.rb
49
+ - lib/repeatable/last_date_of_month.rb
88
50
  - lib/repeatable/parse_error.rb
89
51
  - lib/repeatable/parser.rb
90
52
  - lib/repeatable/schedule.rb
@@ -94,7 +56,7 @@ homepage: https://github.com/molawson/repeatable
94
56
  licenses:
95
57
  - MIT
96
58
  metadata: {}
97
- post_install_message:
59
+ post_install_message:
98
60
  rdoc_options: []
99
61
  require_paths:
100
62
  - lib
@@ -102,16 +64,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
64
  requirements:
103
65
  - - ">="
104
66
  - !ruby/object:Gem::Version
105
- version: '0'
67
+ version: 2.5.0
106
68
  required_rubygems_version: !ruby/object:Gem::Requirement
107
69
  requirements:
108
70
  - - ">="
109
71
  - !ruby/object:Gem::Version
110
72
  version: '0'
111
73
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.5.2
114
- signing_key:
74
+ rubygems_version: 3.1.4
75
+ signing_key:
115
76
  specification_version: 4
116
77
  summary: Describe recurring event schedules and calculate their occurrences
117
78
  test_files: []