reprise 0.1.1-aarch64-linux → 0.1.3-aarch64-linux

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
  SHA256:
3
- metadata.gz: 3864b68e8660a3701c8ec042dbcda81a40d0d05deba495308ae6e16b1d049c90
4
- data.tar.gz: '095ce9dd6f4377afa53cfe3cbe761717c7277926a69fee3a5fd182edf4d40fc1'
3
+ metadata.gz: d41a9f1e7678594967c5bd8cd5de84280e6b98393068f5925fcbe8263fce39a9
4
+ data.tar.gz: 728a43dc0a06167496ce060f9213476a22749cbb88ceb9aeda5fec7f5000502f
5
5
  SHA512:
6
- metadata.gz: 3cb472f6fe20c116ebb042c8e6f245b42be1e9666b961c93e40853502c4fc71035d5d1d9850102ddb40a1c91775796214dd48f49593a412edd267dc18807ac5e
7
- data.tar.gz: 2799a8d4bf5ab39d6d5a58ddd03ab81ddf3e626fabce24615262485d52c31ea1cc53f5c4bcd90625fb6f8ecc5f2e761aa8f3a13e72bd4b920bb3daa163e92aa4
6
+ metadata.gz: 3f7fdb96ed2464683129fbbc61b95c517f71754aafe90c81737dc9faf09fc486bf190c8530d8dd2b4c099339e05c2e5edb0cd8c56dcd5a23e4962b8073cfa721
7
+ data.tar.gz: 986cb0503495cc50a20924ac7977c9dd58c53288906f12d7a58af90bcc15bd31d7d345e359e7a3462b296dd1e3c9222fbd7d34134b18f4ce1b3a5f6c238f6f93
data/Cargo.lock CHANGED
@@ -594,7 +594,7 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
594
594
 
595
595
  [[package]]
596
596
  name = "reprise"
597
- version = "0.1.0"
597
+ version = "0.1.3"
598
598
  dependencies = [
599
599
  "chrono",
600
600
  "chrono-tz",
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Reprise
2
2
 
3
- [![Tests](https://github.com/jordanhiltunen/reprise/actions/workflows/test.yml/badge.svg)](https://github.com/jordanhiltunen/reprise/actions/workflows/test.yml) | [![Test CRuby Gem Build](https://github.com/jordanhiltunen/reprise/actions/workflows/cruby-build-and-install.yml/badge.svg)](https://github.com/jordanhiltunen/reprise/actions/workflows/cruby-build-and-install.yml)
3
+ [![Gem Version](https://badge.fury.io/rb/reprise.svg)](https://badge.fury.io/rb/reprise) | [![Tests](https://github.com/jordanhiltunen/reprise/actions/workflows/test.yml/badge.svg)](https://github.com/jordanhiltunen/reprise/actions/workflows/test.yml) | [![Test CRuby Gem Build](https://github.com/jordanhiltunen/reprise/actions/workflows/cruby-build-and-install.yml/badge.svg)](https://github.com/jordanhiltunen/reprise/actions/workflows/cruby-build-and-install.yml)
4
4
 
5
5
  Reprise is an experimental performance-first Ruby gem that provides support for defining event recurrence
6
6
  rules and generating & querying their future occurrences. Depending on your use case,
@@ -21,9 +21,11 @@ gem "reprise"
21
21
 
22
22
  ## Usage
23
23
 
24
+ _For a complete reference of all of the methods and options available, please [see our documentation](https://rubydoc.info/gems/reprise)._
25
+
24
26
  ### Initialize a new schedule
25
27
 
26
- All schedules need to be initialized with a `start_time` and `end_time`:
28
+ All schedules need to be initialized with `starts_at` and `ends_at` time bookends:
27
29
 
28
30
  ```ruby
29
31
  may_26_2015_four_thirty_pm_in_rome = Time.parse("2015-05-26 10:30:45").in_time_zone("Rome")
@@ -64,8 +66,9 @@ started at as the local time for each future occurrence:
64
66
 
65
67
  ```ruby
66
68
  first_occurrence = schedule.occurrences.first
67
- # => <Reprise::Core::Occurrence start_time="2015-05-31T14:30:45+00:00" end_time="2015-05-31T14:45:45+00:00" label="nil">
68
- first_occurrence.start_time.in_time_zone("Rome")
69
+ # => <Reprise::Core::Occurrence starts_at="2015-05-31T14:30:45+00:00" ends_at="2015-05-31T14:45:45+00:00" label="nil">
70
+
71
+ first_occurrence.starts_at.in_time_zone("Rome")
69
72
  # => Sun, 31 May 2015 16:30:45.000000000 CEST +02:00 # <- 4:30 PM
70
73
  ```
71
74
 
@@ -75,8 +78,9 @@ either by passing an hour/minute/second hash to `time_of_day`:
75
78
  ```ruby
76
79
  schedule.repeat_weekly(:sunday, time_of_day: { hour: 9, minute: 30 }, duration_in_seconds: 60)
77
80
  first_occurrence = schedule.occurrences.first
78
- # => => <Reprise::Core::Occurrence start_time="2015-05-31T07:30:00+00:00" end_time="2015-05-31T07:31:00+00:00" label="nil">
79
- first_occurrence.start_time.in_time_zone("Rome")
81
+ # => <Reprise::Core::Occurrence starts_at="2015-05-31T07:30:00+00:00" ends_at="2015-05-31T07:31:00+00:00" label="nil">
82
+
83
+ first_occurrence.starts_at.in_time_zone("Rome")
80
84
  # => Sun, 31 May 2015 09:30:00.000000000 CEST +02:00
81
85
  ```
82
86
 
@@ -85,8 +89,9 @@ Or, by passing a `Time` object instead:
85
89
  ```ruby
86
90
  ten_forty_five_pm_in_rome = Time.parse("2015-05-27 04:45:00").in_time_zone("Rome")
87
91
  schedule.repeat_weekly(:tuesday, time_of_day: ten_forty_five_pm_in_rome, duration_in_seconds: 60)
88
- # => <Reprise::Core::Occurrence start_time="2015-06-02T08:45:00+00:00" end_time="2015-06-02T08:46:00+00:00" label="nil">
89
- first_occurrence.start_time.in_time_zone("Rome")
92
+ # => <Reprise::Core::Occurrence starts_at="2015-06-02T08:45:00+00:00" ends_at="2015-06-02T08:46:00+00:00" label="nil">
93
+
94
+ first_occurrence.starts_at.in_time_zone("Rome")
90
95
  # => Tue, 02 Jun 2015 10:45:00.000000000 CEST +02:00
91
96
  ```
92
97
 
@@ -102,9 +107,11 @@ schedule = Reprise::Schedule.new(
102
107
 
103
108
  schedule.repeat_weekly(:wednesday, time_of_day: { hour: 9, minute: 30 }, duration_in_seconds: 10.minutes)
104
109
  occurrences = schedule.occurrences
110
+
105
111
  puts occurrences.size
106
112
  # => 29
107
- puts (occurrences.last.start_time.to_date - occurrences.first.start_time.to_date).to_i
113
+
114
+ puts (occurrences.last.starts_at.to_date - occurrences.first.starts_at.to_date).to_i
108
115
  # => 196 # days
109
116
  ```
110
117
 
@@ -121,18 +128,20 @@ schedule.repeat_weekly(
121
128
  occurrences = schedule.occurrences
122
129
  puts occurrences.size
123
130
  # => 8
124
- puts occurrences.first.start_time.in_time_zone("Rome")
131
+
132
+ puts occurrences.first.starts_at.in_time_zone("Rome")
125
133
  # 2015-07-10 04:01:00 +0200
126
- puts occurrences.last.start_time.in_time_zone("Rome")
134
+
135
+ puts occurrences.last.starts_at.in_time_zone("Rome")
127
136
  # 2015-08-28 04:01:00 +0200
128
- puts (occurrences.last.start_time.to_date - occurrences.first.start_time.to_date).to_i
137
+
138
+ puts (occurrences.last.starts_at.to_date - occurrences.first.starts_at.to_date).to_i
129
139
  # => 49 # days
130
140
  ```
131
141
 
132
142
  There are many recurring series that you can create; `#repeat_minutely`, `#repeat_hourly`,
133
- `#repeat_daily`, `#repeat_weekly`, `#repeat_monthly_by_day`, and `#repeat_monthly_by_nth_weekday`.
134
-
135
- For more information on each method, see the docs.
143
+ `#repeat_daily`, `#repeat_weekly`, `#repeat_monthly_by_day`, `#repeat_monthly_by_nth_weekday`,
144
+ and `#repeat_annually_by_day`.
136
145
 
137
146
  #### Adding labels to the occurrences of each series
138
147
 
@@ -142,14 +151,15 @@ you can add an optional label:
142
151
  ```ruby
143
152
  schedule.repeat_daily(label: "Coffee Time", time_of_day: { hour: 8 }, duration_in_seconds: 15.minutes)
144
153
  schedule.repeat_daily(label: "Tea Time", interval: 3, time_of_day: { hour: 9 }, duration_in_seconds: 10.minutes)
154
+
145
155
  schedule.occurrences.take(7).map { |o| puts o.inspect }
146
- # => <Reprise::Core::Occurrence label="Coffee Time" start_time="2015-05-27T06:00:00+00:00" end_time="2015-05-27T06:15:00+00:00">
147
- # => <Reprise::Core::Occurrence label="Tea Time" start_time="2015-05-27T07:00:00+00:00" end_time="2015-05-27T07:10:00+00:00">
148
- # => <Reprise::Core::Occurrence label="Coffee Time" start_time="2015-05-28T06:00:00+00:00" end_time="2015-05-28T06:15:00+00:00">
149
- # => <Reprise::Core::Occurrence label="Coffee Time" start_time="2015-05-29T06:00:00+00:00" end_time="2015-05-29T06:15:00+00:00">
150
- # => <Reprise::Core::Occurrence label="Coffee Time" start_time="2015-05-30T06:00:00+00:00" end_time="2015-05-30T06:15:00+00:00">
151
- # => <Reprise::Core::Occurrence label="Tea Time" start_time="2015-05-30T07:00:00+00:00" end_time="2015-05-30T07:10:00+00:00">
152
- # => <Reprise::Core::Occurrence label="Coffee Time" start_time="2015-05-31T06:00:00+00:00" end_time="2015-05-31T06:15:00+00:00">
156
+ # => <Reprise::Core::Occurrence label="Coffee Time" starts_at="2015-05-27T06:00:00+00:00" ends_at="2015-05-27T06:15:00+00:00">
157
+ # => <Reprise::Core::Occurrence label="Tea Time" starts_at="2015-05-27T07:00:00+00:00" ends_at="2015-05-27T07:10:00+00:00">
158
+ # => <Reprise::Core::Occurrence label="Coffee Time" starts_at="2015-05-28T06:00:00+00:00" ends_at="2015-05-28T06:15:00+00:00">
159
+ # => <Reprise::Core::Occurrence label="Coffee Time" starts_at="2015-05-29T06:00:00+00:00" ends_at="2015-05-29T06:15:00+00:00">
160
+ # => <Reprise::Core::Occurrence label="Coffee Time" starts_at="2015-05-30T06:00:00+00:00" ends_at="2015-05-30T06:15:00+00:00">
161
+ # => <Reprise::Core::Occurrence label="Tea Time" starts_at="2015-05-30T07:00:00+00:00" ends_at="2015-05-30T07:10:00+00:00">
162
+ # => <Reprise::Core::Occurrence label="Coffee Time" starts_at="2015-05-31T06:00:00+00:00" ends_at="2015-05-31T06:15:00+00:00">
153
163
  ```
154
164
 
155
165
  #### Excluding time intervals from the schedule's occurrences
@@ -160,11 +170,11 @@ occurrences and need to be excluded, you can add exclusions to your schedule bef
160
170
  ```ruby
161
171
  schedule.repeat_daily(label: "Standing Meeting", ends_at: may_26_2015_four_thirty_pm_in_rome + 5.days, duration_in_seconds: 15.minutes)
162
172
  schedule.occurrences.map { |o| puts o.inspect }
163
- # => <Reprise::Core::Occurrence start_time="2015-05-26T14:30:45+00:00" end_time="2015-05-26T14:45:45+00:00" label="Standing Meeting">
164
- # => <Reprise::Core::Occurrence start_time="2015-05-27T14:30:45+00:00" end_time="2015-05-27T14:45:45+00:00" label="Standing Meeting">
165
- # => <Reprise::Core::Occurrence start_time="2015-05-28T14:30:45+00:00" end_time="2015-05-28T14:45:45+00:00" label="Standing Meeting">
166
- # => <Reprise::Core::Occurrence start_time="2015-05-29T14:30:45+00:00" end_time="2015-05-29T14:45:45+00:00" label="Standing Meeting">
167
- # => <Reprise::Core::Occurrence start_time="2015-05-30T14:30:45+00:00" end_time="2015-05-30T14:45:45+00:00" label="Standing Meeting">
173
+ # => <Reprise::Core::Occurrence starts_at="2015-05-26T14:30:45+00:00" ends_at="2015-05-26T14:45:45+00:00" label="Standing Meeting">
174
+ # => <Reprise::Core::Occurrence starts_at="2015-05-27T14:30:45+00:00" ends_at="2015-05-27T14:45:45+00:00" label="Standing Meeting">
175
+ # => <Reprise::Core::Occurrence starts_at="2015-05-28T14:30:45+00:00" ends_at="2015-05-28T14:45:45+00:00" label="Standing Meeting">
176
+ # => <Reprise::Core::Occurrence starts_at="2015-05-29T14:30:45+00:00" ends_at="2015-05-29T14:45:45+00:00" label="Standing Meeting">
177
+ # => <Reprise::Core::Occurrence starts_at="2015-05-30T14:30:45+00:00" ends_at="2015-05-30T14:45:45+00:00" label="Standing Meeting">
168
178
 
169
179
  # You don't need to specify entire days; you can pass time intervals as narrow or wide as you like.
170
180
  schedule.add_exclusion(
@@ -174,10 +184,10 @@ schedule.add_exclusion(
174
184
 
175
185
  schedule.occurrences.map { |o| puts o.inspect }
176
186
  # N.B. The occurrence on 2015-05-28 is now excluded.
177
- # => <Reprise::Core::Occurrence start_time="2015-05-26T14:30:45+00:00" end_time="2015-05-26T14:45:45+00:00" label="Standing Meeting">
178
- # => <Reprise::Core::Occurrence start_time="2015-05-27T14:30:45+00:00" end_time="2015-05-27T14:45:45+00:00" label="Standing Meeting">
179
- # => <Reprise::Core::Occurrence start_time="2015-05-29T14:30:45+00:00" end_time="2015-05-29T14:45:45+00:00" label="Standing Meeting">
180
- # => <Reprise::Core::Occurrence start_time="2015-05-30T14:30:45+00:00" end_time="2015-05-30T14:45:45+00:00" label="Standing Meeting">
187
+ # => <Reprise::Core::Occurrence starts_at="2015-05-26T14:30:45+00:00" ends_at="2015-05-26T14:45:45+00:00" label="Standing Meeting">
188
+ # => <Reprise::Core::Occurrence starts_at="2015-05-27T14:30:45+00:00" ends_at="2015-05-27T14:45:45+00:00" label="Standing Meeting">
189
+ # => <Reprise::Core::Occurrence starts_at="2015-05-29T14:30:45+00:00" ends_at="2015-05-29T14:45:45+00:00" label="Standing Meeting">
190
+ # => <Reprise::Core::Occurrence starts_at="2015-05-30T14:30:45+00:00" ends_at="2015-05-30T14:45:45+00:00" label="Standing Meeting">
181
191
  ```
182
192
 
183
193
  #### Querying for occurrences within a given time interval
@@ -198,7 +208,7 @@ schedule.occurrences_between(
198
208
  may_26_2015_four_thirty_pm_in_rome + 2.days,
199
209
  may_26_2015_four_thirty_pm_in_rome + 3.days,
200
210
  ).map { |o| puts o.inspect }
201
- # => <Reprise::Core::Occurrence start_time="2015-05-28T14:30:45+00:00" end_time="2015-05-28T14:45:45+00:00" label="Standing Meeting">
211
+ # => <Reprise::Core::Occurrence starts_at="2015-05-28T14:30:45+00:00" ends_at="2015-05-28T14:45:45+00:00" label="Standing Meeting">
202
212
  ```
203
213
 
204
214
  Both `#occurs_between?` and `#occurrences_between` also support an optional `include_overlapping`
@@ -219,7 +229,7 @@ you would probably be much better served by choosing one of those two gems inste
219
229
  the influence of Rust leaks into its Ruby API. Alternative gems offer much more flexible APIs that support a variety
220
230
  of more idiomatic calling conventions: they have better, more forgiving ergonomics. Reprise may invest more efforts
221
231
  here in the future, but not until we have landed on a feature-complete, performant core - our primary design goal.
222
- Until then, out API will remain sparse but sufficient.
232
+ Until then, our API will remain sparse but sufficient.
223
233
  - **Stability.** Reprise is still experimental; we do not yet have a `1.0.0` release or a public roadmap. Breaking changes
224
234
  may be frequent across releases. If you do not want to pin Reprise to a specific version and want a library that you can
225
235
  upgrade without reviewing the changelog, you may want to consider an alternative for now.
@@ -235,6 +245,7 @@ A truism in the Ruby community is that "Ruby is slow, but that doesn't matter fo
235
245
  > speed, or throughput that Ruby chokes on. Or because the trade-offs are worth it: Often the
236
246
  > quicker development, cheaper development, faster time-to-market etc is worth the extra resources
237
247
  > (servers, hardware, SAAS) you must throw at your app to keep it performing acceptable.
248
+ >
238
249
  > https://berk.es/2022/08/09/ruby-slow-database-slow/
239
250
 
240
251
  This is often delightfully true, until on the odd occasion Ruby's speed requires that a straightforward feature
@@ -305,9 +316,7 @@ and 3:30 - 4:30 PM.
305
316
  How do you filter out recurring series occurrences that conflict with other schedule entries that exist
306
317
  in your application?
307
318
 
308
- At time of writing, alternative gems' solutions to this problem are all unfortunately lacking:
309
- - **None**: It is entirely the responsibility of the client application to handle occurrence exclusions,
310
- despite this logic being core to the domain of recurring schedule management.
319
+ At time of writing, alternative gems' solutions to this problem are somewhat wanting:
311
320
  - **Date-based exclusion**: Client applications can pass specific dates when occurrences should be excluded.
312
321
  This is not sufficient except for in the most simple of circumstances. Again, consider our hypothetical
313
322
  Monday @ 12:30 PM recurring series: being able to exclude a specific _date_ from your recurrence rule still
Binary file
Binary file
Binary file
@@ -8,9 +8,9 @@ module Reprise
8
8
  # of adding documentation; it is defined dynamically within
9
9
  # the Rust extension.
10
10
  class Occurrence
11
- # @!attribute [r] start_time
11
+ # @!attribute [r] starts_at
12
12
  # @return [Time] The start time of the occurrence, given in the current system time zone.
13
- # @!attribute [r] end_time
13
+ # @!attribute [r] ends_at
14
14
  # @return [Time] The end time of the occurrence, given in the current system time zone.
15
15
  # @!attribute [r] label
16
16
  # @return [String, nil] The label given to the recurring series from which the
@@ -81,10 +81,16 @@ module Reprise
81
81
 
82
82
  # @!macro [new] duration_in_seconds
83
83
  # @param duration_in_seconds [Integer]
84
- # This determines the end time of each occurrence ({Reprise::Core::Occurrence#end_time}), and also
84
+ # This determines the end time of each occurrence ({Reprise::Core::Occurrence#ends_at}), and also
85
85
  # influences occurrence queries, and whether any added exclusions conflict with any of the schedule's
86
86
  # occurrences.
87
87
 
88
+ # @!macro [new] count
89
+ # @param count [Integer, nil] An optional count limit to apply to the occurrences
90
+ # of a series; once the schedule has generated the requested number of occurrences,
91
+ # it will halt further expansion of that specific series. The count takes precedence
92
+ # over the optional +ends_at+ param.
93
+
88
94
  # @!macro [new] label
89
95
  # @param label [String, nil] An optional label to apply to all of the occurrences
90
96
  # that are generated from the series. See {Reprise::Core::Occurrence#label}.
@@ -93,15 +99,17 @@ module Reprise
93
99
  # @!macro duration_in_seconds
94
100
  # @!macro interval
95
101
  # @!macro recurring_series_start_and_end_times
102
+ # @!macro count
96
103
  # @!macro label
97
104
  # @return [void]
98
- def repeat_minutely(time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
105
+ def repeat_minutely(time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
99
106
  internal_schedule.repeat_minutely(
100
107
  time_of_day: TimeOfDay.new(time_of_day || self.starts_at).to_h,
101
108
  duration_in_seconds:,
102
109
  interval:,
103
110
  starts_at_unix_timestamp: starts_at.presence&.to_i,
104
111
  ends_at_unix_timestamp: ends_at.presence&.to_i,
112
+ count:,
105
113
  label:
106
114
  )
107
115
  end
@@ -110,15 +118,17 @@ module Reprise
110
118
  # @!macro duration_in_seconds
111
119
  # @!macro interval
112
120
  # @!macro recurring_series_start_and_end_times
121
+ # @!macro count
113
122
  # @!macro label
114
123
  # @return [void]
115
- def repeat_hourly(time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
124
+ def repeat_hourly(time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
116
125
  internal_schedule.repeat_hourly(
117
126
  time_of_day: TimeOfDay.new(time_of_day || self.starts_at).to_h,
118
127
  duration_in_seconds:,
119
128
  interval:,
120
129
  starts_at_unix_timestamp: starts_at.presence&.to_i,
121
130
  ends_at_unix_timestamp: ends_at.presence&.to_i,
131
+ count:,
122
132
  label:
123
133
  )
124
134
  end
@@ -127,15 +137,17 @@ module Reprise
127
137
  # @!macro duration_in_seconds
128
138
  # @!macro interval
129
139
  # @!macro recurring_series_start_and_end_times
140
+ # @!macro count
130
141
  # @!macro label
131
142
  # @return [void]
132
- def repeat_daily(time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
143
+ def repeat_daily(time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
133
144
  internal_schedule.repeat_daily(
134
145
  time_of_day: TimeOfDay.new(time_of_day || self.starts_at).to_h,
135
146
  duration_in_seconds:,
136
147
  interval:,
137
148
  starts_at_unix_timestamp: starts_at.presence&.to_i,
138
149
  ends_at_unix_timestamp: ends_at.presence&.to_i,
150
+ count:,
139
151
  label:
140
152
  )
141
153
  end
@@ -145,6 +157,7 @@ module Reprise
145
157
  # @!macro duration_in_seconds
146
158
  # @!macro interval
147
159
  # @!macro recurring_series_start_and_end_times
160
+ # @!macro count
148
161
  # @!macro label
149
162
  # @return [void]
150
163
  # @example with a +time_of_day+ hash
@@ -152,7 +165,7 @@ module Reprise
152
165
  # @example with a local time for +time_of_day+
153
166
  # local_time = Time.current.in_time_zone(my_current_time_zone)
154
167
  # schedule.repeat_weekly(:monday, time_of_day: local_time, duration_in_seconds: 30)
155
- def repeat_weekly(weekday, time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
168
+ def repeat_weekly(weekday, time_of_day: nil, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
156
169
  internal_schedule.repeat_weekly(
157
170
  weekday,
158
171
  time_of_day: TimeOfDay.new(time_of_day || self.starts_at).to_h,
@@ -160,6 +173,7 @@ module Reprise
160
173
  interval:,
161
174
  starts_at_unix_timestamp: starts_at.presence&.to_i,
162
175
  ends_at_unix_timestamp: ends_at.presence&.to_i,
176
+ count:,
163
177
  label:
164
178
  )
165
179
  end
@@ -169,11 +183,12 @@ module Reprise
169
183
  # @!macro duration_in_seconds
170
184
  # @!macro interval
171
185
  # @!macro recurring_series_start_and_end_times
186
+ # @!macro count
172
187
  # @!macro label
173
188
  # @return [void]
174
189
  # @example
175
190
  # schedule.repeat_monthly_by_day(15, time_of_day: { hour: 9 }, duration_in_seconds: 30)
176
- def repeat_monthly_by_day(day_number, time_of_day:, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
191
+ def repeat_monthly_by_day(day_number, time_of_day:, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
177
192
  internal_schedule.repeat_monthly_by_day(
178
193
  day_number,
179
194
  time_of_day: TimeOfDay.new(time_of_day || self.starts_at).to_h,
@@ -181,6 +196,7 @@ module Reprise
181
196
  interval:,
182
197
  starts_at_unix_timestamp: starts_at.presence&.to_i,
183
198
  ends_at_unix_timestamp: ends_at.presence&.to_i,
199
+ count:,
184
200
  label:
185
201
  )
186
202
  end
@@ -191,9 +207,10 @@ module Reprise
191
207
  # @!macro duration_in_seconds
192
208
  # @!macro interval
193
209
  # @!macro recurring_series_start_and_end_times
210
+ # @!macro count
194
211
  # @!macro label
195
212
  # @return [void]
196
- def repeat_monthly_by_nth_weekday(weekday, nth_day, time_of_day:, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
213
+ def repeat_monthly_by_nth_weekday(weekday, nth_day, time_of_day:, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
197
214
  internal_schedule.repeat_monthly_by_nth_weekday(
198
215
  weekday,
199
216
  nth_day,
@@ -202,6 +219,7 @@ module Reprise
202
219
  interval:,
203
220
  starts_at_unix_timestamp: starts_at.presence&.to_i,
204
221
  ends_at_unix_timestamp: ends_at.presence&.to_i,
222
+ count:,
205
223
  label:
206
224
  )
207
225
  end
@@ -211,11 +229,12 @@ module Reprise
211
229
  # @!macro duration_in_seconds
212
230
  # @!macro interval
213
231
  # @!macro recurring_series_start_and_end_times
232
+ # @!macro count
214
233
  # @!macro label
215
234
  # @return [void]
216
235
  # @example
217
236
  # schedule.repeat_annually_by_day(200, duration_in_seconds: 30)
218
- def repeat_annually_by_day(day_number, time_of_day:, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, label: nil)
237
+ def repeat_annually_by_day(day_number, time_of_day:, duration_in_seconds:, interval: 1, starts_at: nil, ends_at: nil, count: nil, label: nil)
219
238
  internal_schedule.repeat_annually_by_day(
220
239
  day_number,
221
240
  time_of_day: TimeOfDay.new(time_of_day || self.starts_at).to_h,
@@ -223,6 +242,7 @@ module Reprise
223
242
  interval:,
224
243
  starts_at_unix_timestamp: starts_at.presence&.to_i,
225
244
  ends_at_unix_timestamp: ends_at.presence&.to_i,
245
+ count:,
226
246
  label:
227
247
  )
228
248
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reprise
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reprise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Jordan Hiltunen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-20 00:00:00.000000000 Z
11
+ date: 2024-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips