ae_bank_days 2.0.0 → 2.1.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
2
  SHA256:
3
- metadata.gz: af37f7836eec42406fe3a2c1c86f3079f0b3ee95261020e770a8b3aa960ce524
4
- data.tar.gz: 50fe48b765afdb9f3675934b157d809490b74985ce74e3a1fdd52428f28ccd9c
3
+ metadata.gz: afad1460d6fb8acce458d2ad2dfabb29843d1a630162bd5043c5eb897b841d86
4
+ data.tar.gz: 54bdb02650c7a97a1161a357435c3d33fceb6f4286edb2b4a804a4267b3c97ef
5
5
  SHA512:
6
- metadata.gz: 7a9b58a38b414c355268fcd982e232e216d4c8fe0ade9da1a6218e1c41e8cca852e3bcf6ae6b1d6cdae8013400006735eda668378237398ebc9016a7cfd7da79
7
- data.tar.gz: c4fc232b7874a6d4c6be98c6860e189f7ab156821b61d3eb56b57371384b07acb96934c299fbd24268cebb46d8900e45242fabd43a76f80fe461fd5b11b81357
6
+ metadata.gz: b4acb7565fd8647e9f9a705b29fe7ccd4a76ae943f54945a04c3a02028a5fe93e4ac559b0ab895208c6104f0641d45869ca8e7d87a684b0ac04de89be93b2414
7
+ data.tar.gz: cf0fd6a295074b5b53f3b25590d614cc0e9f2d97a7e5612b2857667e48215a6da755b29066a3a7e6ce834619591ecda515f735910d0c60b4c3d5878fdbeee005
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2019-2022 AppFolio, Inc
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/ae_bank_days.gemspec CHANGED
@@ -6,18 +6,17 @@ Gem::Specification.new do |spec|
6
6
  spec.name = 'ae_bank_days'
7
7
  spec.version = AeBankDays::VERSION
8
8
  spec.platform = Gem::Platform::RUBY
9
- spec.authors = ['AppFolio']
10
- spec.email = ['dev@appfolio.com']
11
- spec.summary = 'Gem for finding the next banking date'
12
- spec.description = spec.summary
9
+ spec.author = 'AppFolio'
10
+ spec.email = 'opensource@appfolio.com'
11
+ spec.description = 'Gem for finding the next banking date.'
12
+ spec.summary = spec.description
13
13
  spec.homepage = 'https://github.com/appfolio/ae_bank_days'
14
- spec.required_ruby_version = '>= 2.3.3'
15
- spec.licenses = ['MIT']
16
- spec.files = Dir['**/*'].select { |f| f[%r{^(lib/|Gemfile$|Rakefile|README.md|.*gemspec)}] }
17
- spec.test_files = spec.files.grep(%r{^(test)/})
14
+ spec.license = 'MIT'
15
+ spec.files = Dir['**/*'].select { |f| f[%r{^(lib/|LICENSE.txt|.*gemspec)}] }
18
16
  spec.require_paths = ['lib']
17
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6.3')
19
18
 
20
19
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
20
 
22
- spec.add_dependency('holidays', '~> 8.3')
21
+ spec.add_dependency('holidays', ['>= 8.3', '< 9'])
23
22
  end
@@ -1,15 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AeBankDays
2
4
  module DateExtensions
3
5
  def bank_day?
4
6
  BankDayHelper.bank_day?(self)
5
7
  end
6
8
 
7
- def next_banking_day(n = 0)
8
- BankDayHelper.next_banking_day(self, number_of_days: n)
9
+ def next_banking_day(number_of_days = 0)
10
+ BankDayHelper.next_banking_day(self, number_of_days: number_of_days)
9
11
  end
10
12
 
11
- def previous_banking_day(n = 0)
12
- BankDayHelper.previous_banking_day(self, number_of_days: n)
13
+ def previous_banking_day(number_of_days = 0)
14
+ BankDayHelper.previous_banking_day(self, number_of_days: number_of_days)
13
15
  end
14
16
  end
15
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AeBankDays
4
- VERSION = '2.0.0'
4
+ VERSION = '2.1.0'
5
5
  end
data/lib/ae_bank_days.rb CHANGED
@@ -8,4 +8,4 @@ module AeBankDays
8
8
  autoload :DateExtensions, 'ae_bank_days/date_extensions'
9
9
  end
10
10
 
11
- Date.send :include, AeBankDays::DateExtensions
11
+ Date.prepend(AeBankDays::DateExtensions)
metadata CHANGED
@@ -1,39 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_bank_days
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AppFolio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-13 00:00:00.000000000 Z
11
+ date: 2022-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: holidays
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '8.3'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '9'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '8.3'
27
- description: Gem for finding the next banking date
28
- email:
29
- - dev@appfolio.com
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '9'
33
+ description: Gem for finding the next banking date.
34
+ email: opensource@appfolio.com
30
35
  executables: []
31
36
  extensions: []
32
37
  extra_rdoc_files: []
33
38
  files:
34
- - Gemfile
35
- - README.md
36
- - Rakefile
39
+ - LICENSE.txt
37
40
  - ae_bank_days.gemspec
38
41
  - lib/ae_bank_days.rb
39
42
  - lib/ae_bank_days/bank_day_helper.rb
@@ -52,15 +55,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
52
55
  requirements:
53
56
  - - ">="
54
57
  - !ruby/object:Gem::Version
55
- version: 2.3.3
58
+ version: 2.6.3
56
59
  required_rubygems_version: !ruby/object:Gem::Requirement
57
60
  requirements:
58
61
  - - ">="
59
62
  - !ruby/object:Gem::Version
60
63
  version: '0'
61
64
  requirements: []
62
- rubygems_version: 3.1.2
65
+ rubygems_version: 3.3.3
63
66
  signing_key:
64
67
  specification_version: 4
65
- summary: Gem for finding the next banking date
68
+ summary: Gem for finding the next banking date.
66
69
  test_files: []
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org' do
4
- gem 'appraisal', '>= 2.3', '< 3'
5
- gem 'bundler', '>= 1.10.4', '< 3'
6
- gem 'minitest', '>= 5.8', '< 6'
7
- gem 'minitest-reporters', '>= 1.4', '< 2'
8
- gem 'mocha', '>= 1.11', '< 2'
9
- gem 'rake', '>= 13', '< 14'
10
- gem 'simplecov', '>= 0.18', '< 1', group: :test, require: false
11
- end
12
-
13
- gemspec
data/README.md DELETED
@@ -1,25 +0,0 @@
1
- # AeBankDays
2
-
3
- Simple utility to find the next banking day
4
-
5
- ## Running Tests
6
-
7
- Use the appraisal gem to test different versions of Ruby to ensure changes are compatible. Run them with the
8
- following command with the different versions of Ruby set:
9
-
10
- `bundle exec appraisal rake test`
11
-
12
- For a more detailed output that includes total coverage use:
13
-
14
- `WITH_COVERAGE=true bundle exec rake test`
15
-
16
- ## Contributing to AeBankDays
17
-
18
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
19
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
20
- * Fork the project.
21
- * Start a feature/bugfix branch.
22
- * Commit and push until you are happy with your contribution.
23
- * Make sure to add tests for it. This is important so it doesn't break in a future version unintentionally.
24
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise
25
- necessary, that is fine, but please isolate to its own commit so it can be cherry-picked around.
data/Rakefile DELETED
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler'
4
-
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- warn e.message
9
- warn 'Run `bundle install` to install missing gems'
10
- exit e.status_code
11
- end
12
-
13
- require 'rake/testtask'
14
-
15
- Rake::TestTask.new(:test) do |test|
16
- test.libs << 'test'
17
- test.pattern = 'test/**/*_test.rb'
18
- test.verbose = true
19
- end
20
-
21
- task default: :test