ae_bank_days 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +20 -0
- data/ae_bank_days.gemspec +13 -14
- data/lib/ae_bank_days/date_extensions.rb +6 -4
- data/lib/ae_bank_days/version.rb +1 -1
- data/lib/ae_bank_days.rb +1 -1
- metadata +17 -14
- data/Gemfile +0 -13
- data/README.md +0 -25
- data/Rakefile +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42ba36b7ceeed8edf9ef314e44b8dc435cf26696fb3b98924c8b384eb14fe102
|
4
|
+
data.tar.gz: c3ce717d5a563d65602a76fd3384a74e2e0df131e83d2d303f0ce3c4cb145805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1e9c7b9c5bbdb8ab1a95b156d706a05471d1c685202f4a40986192082a12dfd2bf9f97e2514416a8e96dd32159f85d121c659da006962e3fb9e28de32291997
|
7
|
+
data.tar.gz: f41b4e1a9c343dfc52e957625e5a71014a91b441c2384f6a8cedb6c52ac9e5e795d8a9e72c23deea5f7b02387eecde47492817ecdf5e4e7135f0e4872a0aef8a
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2019-2024 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
@@ -3,21 +3,20 @@
|
|
3
3
|
require_relative 'lib/ae_bank_days/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.platform
|
9
|
-
spec.
|
10
|
-
spec.email
|
11
|
-
spec.
|
12
|
-
spec.
|
13
|
-
spec.homepage
|
14
|
-
spec.
|
15
|
-
spec.
|
16
|
-
spec.
|
17
|
-
spec.test_files = spec.files.grep(%r{^(test)/})
|
18
|
-
spec.require_paths = ['lib']
|
6
|
+
spec.name = 'ae_bank_days'
|
7
|
+
spec.version = AeBankDays::VERSION
|
8
|
+
spec.platform = Gem::Platform::RUBY
|
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
|
+
spec.homepage = 'https://github.com/appfolio/ae_bank_days'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.files = Dir['**/*'].select { |f| f[/^(lib\/|LICENSE.txt|.*gemspec)/] }
|
16
|
+
spec.require_paths = ['lib']
|
19
17
|
|
18
|
+
spec.required_ruby_version = Gem::Requirement.new('< 3.4')
|
20
19
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
20
|
|
22
|
-
spec.add_dependency('holidays', '
|
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(
|
8
|
-
BankDayHelper.next_banking_day(self, number_of_days:
|
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(
|
12
|
-
BankDayHelper.previous_banking_day(self, number_of_days:
|
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
|
data/lib/ae_bank_days/version.rb
CHANGED
data/lib/ae_bank_days.rb
CHANGED
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.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AppFolio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-29 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
|
-
|
28
|
-
|
29
|
-
|
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
|
-
-
|
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
|
@@ -50,17 +53,17 @@ require_paths:
|
|
50
53
|
- lib
|
51
54
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
55
|
requirements:
|
53
|
-
- - "
|
56
|
+
- - "<"
|
54
57
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
58
|
+
version: '3.4'
|
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.
|
65
|
+
rubygems_version: 3.5.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
|