working_hours 1.4.1 → 1.5.0

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: 9d51f59c3456e35117b42605450d911595a331ef6a72303aba33a6eedcdabd6f
4
- data.tar.gz: '0527249d73eb1da76205e5b02bd7d67226a105c91f2a14240ddfd39abc0daeb6'
3
+ metadata.gz: 225b5949f517f52c261b36052038b14c5041f68c14ead85872a3fe5f62221b22
4
+ data.tar.gz: 753f528212ba0c641390383a0d2446f6291ef5aabf581fd338034083bee0a012
5
5
  SHA512:
6
- metadata.gz: b276429238c21dbb526c53d4be5082450c99b5c5414d9b21786ec4278ef83ff07c6e2a952cdf6bbb9125f0b32b013f7d2b009cadb020b062a780dcf119d733aa
7
- data.tar.gz: 77524f554091fccfdd9b96ea0ff64295fb55a8358f010adac5f008455428fd91c3b8ef80111f515529f2059b4e3db6081177b3563b2c16c83ee5d6e829e27789
6
+ metadata.gz: 979eb961fadd99a0997a361cc34f0e4d71df757a23103f40a76038dce547ea103f05c879eddf098b56af04eddb97dc297cbcae686a4026f2a09e94838dae6cb1
7
+ data.tar.gz: 93a6d6e4c69af754f593e69fb46afff7ea242bcccfb9c57627ede0bce4826d5bc25de1aaccb4ae4ed3c6b560929fa188871e2b6b342462bb154114ba21ddd1b6
@@ -0,0 +1,38 @@
1
+ name: build
2
+ on: push
3
+ jobs:
4
+ specs:
5
+ runs-on: ubuntu-latest
6
+ timeout-minutes: 10
7
+ strategy:
8
+ matrix:
9
+ ruby_version:
10
+ - 3.1.6
11
+ - 3.2.6
12
+ - 3.3.6
13
+ - jruby-9.4.9.0
14
+ gemfile:
15
+ - gemfiles/Gemfile.activesupport-7.1.x
16
+ - gemfiles/Gemfile.activesupport-7.2.x
17
+ - gemfiles/Gemfile.activesupport-8.x
18
+ exclude:
19
+ - gemfile: gemfiles/Gemfile.activesupport-8.x
20
+ ruby_version: 3.1.6
21
+ - gemfile: gemfiles/Gemfile.activesupport-8.x
22
+ ruby_version: jruby-9.4.9.0
23
+ env:
24
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
25
+ steps:
26
+ - name: Checkout code
27
+ uses: actions/checkout@v3
28
+ with:
29
+ fetch-depth: 0
30
+
31
+ - name: Setup Ruby
32
+ uses: ruby/setup-ruby@v1
33
+ with:
34
+ ruby-version: ${{ matrix.ruby_version }}
35
+ bundler-cache: true
36
+
37
+ - name: Run rspec
38
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Unreleased
2
2
 
3
- [Compare master with v1.4.1](https://github.com/intrepidd/working_hours/compare/v1.4.1...master)
3
+ [Compare master with v1.5.0](https://github.com/intrepidd/working_hours/compare/v1.5.0...master)
4
+
5
+ # v1.5.0
6
+ This release does not include any code change, there is only a dependency bump to ActiveSupport >= 7.0 to reflect the actual versions the gem supports.
7
+
8
+ * Drop support for unsupported Ruby & ActiveSupport versions
9
+ * Add support to ActiveSupport 7 and 8
10
+ * Changes gemspec dependency to ActiveSupport >= 7.0
4
11
 
5
12
  # v1.4.1
6
13
  * Add InvalidConfiguration error code to allow custom message or behavior - [#47](https://github.com/Intrepidd/working_hours/pull/47)
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # WorkingHours
2
2
 
3
- [![Build Status](https://travis-ci.com/Intrepidd/working_hours.svg?branch=master)](https://travis-ci.com/Intrepidd/working_hours)
3
+ [![build](https://github.com/Intrepidd/working_hours/actions/workflows/build.yml/badge.svg)](https://github.com/Intrepidd/working_hours/actions/workflows/build.yml)
4
4
 
5
5
  A modern ruby gem allowing to do time calculation with working hours.
6
6
 
7
7
  Compatible and tested with:
8
- - Ruby `2.4`, `2.5`, `2.6`, `2.7`, `3.0`, JRuby `9.2`
9
- - ActiveSupport `4.x`, `5.x`, `6.x`
8
+ - Ruby `3.1`, `3.2`, `3.3`, JRuby `9.4`
9
+ - ActiveSupport `7.x`, `8.x`
10
10
 
11
11
  ## Installation
12
12
 
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path => '..'
4
4
 
5
- gem 'activesupport', '~> 4.2'
5
+ gem 'activesupport', '~> 7.1'
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path => '..'
4
4
 
5
- gem 'activesupport', '~> 5.2'
5
+ gem 'activesupport', '~> 7.2'
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path => '..'
4
4
 
5
- gem 'activesupport', '~> 6.1'
5
+ gem 'activesupport', '~> 8.0'
@@ -1,3 +1,3 @@
1
1
  module WorkingHours
2
- VERSION = "1.4.1"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -401,12 +401,12 @@ describe WorkingHours::Computation do
401
401
 
402
402
  it 'takes into account reduced holiday closing' do
403
403
  WorkingHours::Config.holiday_hours = { Date.new(2019, 12, 27) => { '10:00' => '17:00' } }
404
- expect(advance_to_closing_time(Time.new(2019, 12, 26, 20))).to eq(Time.new(2019, 12, 27, 17))
404
+ expect(advance_to_closing_time(Time.utc(2019, 12, 26, 20))).to eq(Time.utc(2019, 12, 27, 17))
405
405
  end
406
406
 
407
407
  it 'takes into account extended holiday closing' do
408
408
  WorkingHours::Config.holiday_hours = { Date.new(2019, 12, 26) => { '10:00' => '21:00' } }
409
- expect(advance_to_closing_time(Time.new(2019, 12, 26, 20))).to eq(Time.new(2019, 12, 26, 21))
409
+ expect(advance_to_closing_time(Time.utc(2019, 12, 26, 20))).to eq(Time.utc(2019, 12, 26, 21))
410
410
  end
411
411
  end
412
412
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'activesupport', '>= 3.2'
21
+ spec.add_dependency 'activesupport', '>= 7.0'
22
22
  spec.add_dependency 'tzinfo'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '>= 1.5'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: working_hours
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Jarthon
8
8
  - Intrepidd
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-15 00:00:00.000000000 Z
12
+ date: 2024-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '3.2'
20
+ version: '7.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '3.2'
27
+ version: '7.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: tzinfo
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -103,17 +103,17 @@ executables: []
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - ".github/workflows/build.yml"
106
107
  - ".gitignore"
107
108
  - ".rspec"
108
- - ".travis.yml"
109
109
  - CHANGELOG.md
110
110
  - Gemfile
111
111
  - LICENSE.txt
112
112
  - README.md
113
113
  - Rakefile
114
- - gemfiles/Gemfile.activesupport-4.x
115
- - gemfiles/Gemfile.activesupport-5.x
116
- - gemfiles/Gemfile.activesupport-6.x
114
+ - gemfiles/Gemfile.activesupport-7.1.x
115
+ - gemfiles/Gemfile.activesupport-7.2.x
116
+ - gemfiles/Gemfile.activesupport-8.x
117
117
  - gemfiles/Gemfile.activesupport-edge
118
118
  - lib/working_hours.rb
119
119
  - lib/working_hours/computation.rb
@@ -137,7 +137,7 @@ homepage: https://github.com/intrepidd/working_hours
137
137
  licenses:
138
138
  - MIT
139
139
  metadata: {}
140
- post_install_message:
140
+ post_install_message:
141
141
  rdoc_options: []
142
142
  require_paths:
143
143
  - lib
@@ -152,8 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.1.2
156
- signing_key:
155
+ rubygems_version: 3.5.10
156
+ signing_key:
157
157
  specification_version: 4
158
158
  summary: time calculation with working hours
159
159
  test_files:
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- language: ruby
2
- dist: bionic
3
- rvm:
4
- - 2.4.10
5
- - 2.5.8
6
- - 2.6.6
7
- - 2.7.2
8
- - 3.0.0
9
- - jruby-9.2.14.0
10
- gemfile:
11
- - gemfiles/Gemfile.activesupport-4.x
12
- - gemfiles/Gemfile.activesupport-5.x
13
- - gemfiles/Gemfile.activesupport-6.x
14
- jobs:
15
- exclude:
16
- - rvm: 2.4.10
17
- gemfile: gemfiles/Gemfile.activesupport-6.x
18
- - rvm: 2.7.2
19
- gemfile: gemfiles/Gemfile.activesupport-4.x
20
- - rvm: 3.0.0
21
- gemfile: gemfiles/Gemfile.activesupport-4.x
22
- include:
23
- - rvm: ruby-head
24
- gemfile: gemfiles/Gemfile.activesupport-edge
25
- allow_failures:
26
- - gemfile: gemfiles/Gemfile.activesupport-edge
27
- fast_finish: true