philiprehberger-cron_parser 0.1.2 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60b6bf82b286276b68b8e58974587e5df5c233fc093c4b711c366e814d2d7ec3
4
- data.tar.gz: 40caa4404310c46d3cc2f999a4d52f0d9656fe7d5179df458e852e7a902886dc
3
+ metadata.gz: 32817318714cb93a510d59bfae5592462669488da4ee176d3985d484889f48d7
4
+ data.tar.gz: ad3ebb67b51c6e6b93a1126779950b5097b04ba6c935d7c8406250c5f5637f4a
5
5
  SHA512:
6
- metadata.gz: f3cda2ee270a3eed599fef0ac4175e20d4b83e2b06f5eed84a61d73b091cdea5b2d47868b718d0a41f897f4dd13f38b3283d430d370ac7c0cee8052e7281bcb3
7
- data.tar.gz: 9a4293525ce41ee53c8664e4dca6ad8bf193b544238401d7e8cac631769a3ffe224f72489add5d496e4ef21c8c2c1994157f19e5dff6bbc9b745dd3121ef8e8d
6
+ metadata.gz: 04572d61d279af7901ad03bc56f041e0e0fc7083323b240639fb8fa4d3646ad340976c22051ed5e84a3d79471c63b8a39a983f245aa44ab276c2f88aeed0db6e
7
+ data.tar.gz: 61d578083cf566b3add7df47b14203d8c3ef6815128d89fd3cf2a86c1d952702168a085ae175f1b1f1d75d38c509d460bec09852366a6c9ded1ed4cb1c275bd4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.4] - 2026-03-31
11
+
12
+ ### Changed
13
+ - Standardize README badges, support section, and license format
14
+
15
+ ## [0.1.3] - 2026-03-24
16
+
17
+ ### Fixed
18
+ - Remove inline comments from Development section to match template
19
+
10
20
  ## [0.1.2] - 2026-03-22
11
21
 
12
22
  ### Changed
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Tests](https://github.com/philiprehberger/rb-cron-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/rb-cron-parser/actions/workflows/ci.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/philiprehberger-cron_parser.svg)](https://rubygems.org/gems/philiprehberger-cron_parser)
5
- [![License](https://img.shields.io/github/license/philiprehberger/rb-cron-parser)](LICENSE)
5
+ [![Last updated](https://img.shields.io/github/last-commit/philiprehberger/rb-cron-parser)](https://github.com/philiprehberger/rb-cron-parser/commits/main)
6
6
 
7
7
  Cron expression parser for calculating next and previous occurrences
8
8
 
@@ -83,10 +83,28 @@ Philiprehberger::CronParser.new('0 0 1 * *') # first of month
83
83
 
84
84
  ```bash
85
85
  bundle install
86
- bundle exec rspec # Run tests
87
- bundle exec rubocop # Check code style
86
+ bundle exec rspec
87
+ bundle exec rubocop
88
88
  ```
89
89
 
90
+ ## Support
91
+
92
+ If you find this project useful:
93
+
94
+ ⭐ [Star the repo](https://github.com/philiprehberger/rb-cron-parser)
95
+
96
+ 🐛 [Report issues](https://github.com/philiprehberger/rb-cron-parser/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
97
+
98
+ 💡 [Suggest features](https://github.com/philiprehberger/rb-cron-parser/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)
99
+
100
+ ❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)
101
+
102
+ 🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)
103
+
104
+ 💻 [GitHub Profile](https://github.com/philiprehberger)
105
+
106
+ 🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)
107
+
90
108
  ## License
91
109
 
92
- MIT
110
+ [MIT](LICENSE)
@@ -113,7 +113,7 @@ module Philiprehberger
113
113
  current += step
114
114
  end
115
115
 
116
- raise Error, "No matching time found within 4 years"
116
+ raise Error, 'No matching time found within 4 years'
117
117
  end
118
118
 
119
119
  def round_to_minute(time)
@@ -39,12 +39,12 @@ module Philiprehberger
39
39
  case part
40
40
  when '*'
41
41
  (@min..@max).to_a
42
- when /\A\*\/(\d+)\z/
42
+ when %r{\A\*/(\d+)\z}
43
43
  step = Regexp.last_match(1).to_i
44
44
  raise Error, "Invalid step: #{step}" if step.zero?
45
45
 
46
46
  (@min..@max).step(step).to_a
47
- when /\A(\d+)-(\d+)(?:\/(\d+))?\z/
47
+ when %r{\A(\d+)-(\d+)(?:/(\d+))?\z}
48
48
  range_start = Regexp.last_match(1).to_i
49
49
  range_end = Regexp.last_match(2).to_i
50
50
  step = Regexp.last_match(3)&.to_i || 1
@@ -68,7 +68,7 @@ module Philiprehberger
68
68
  end
69
69
 
70
70
  def validate_value!(value)
71
- return if value >= @min && value <= @max
71
+ return if value.between?(@min, @max)
72
72
 
73
73
  raise Error, "Value #{value} out of range (#{@min}-#{@max})"
74
74
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Philiprehberger
4
4
  module CronParser
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philiprehberger-cron_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Rehberger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-23 00:00:00.000000000 Z
11
+ date: 2026-03-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Parse standard 5-field cron expressions and calculate next/previous occurrences,
14
14
  match times against patterns, and generate human-readable descriptions.