google_holiday_calendar 0.1.2 → 0.1.3

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: 533f91bc51a0c47f008a02ec3d621897e6405a92394e65c46b9d96fa7c750b66
4
- data.tar.gz: a0806bbe8f27b01226cebbff992551991bf9e227c4f4916ac3a114641328542f
3
+ metadata.gz: 7c6644bf7ce3f457b67ab609c1cb0b4040a48e2c1efb08c1cb40c556d58505da
4
+ data.tar.gz: d418905f0bd78187cbc90f943aa55316334cbac93d4cea4d461eac2200bee5d5
5
5
  SHA512:
6
- metadata.gz: 8b52fcd6983253189a12aa198e2aacfedc85e4711c2697fb0190cb8caeb4cb8476c6d6a2f5ab2af9abc6cb18fde0d55a4901800a8210cbe7983dfd4718abd486
7
- data.tar.gz: '05841d7af8d193e6445335f2aafc0597ae1f0b099719b03fc90aa2805d8554c8806de1e78c753c6e9d8885e9c16855e82618de180deccc06a869ae3fdb997e50'
6
+ metadata.gz: 8ce89ff3cdaedb0a3c111979ee51c252d52999f24f88c37f7656c76c7fd1cddabe290c6f0cae8bcb9c417990a62eea649cfcad47a2124fbfe942ed49caf20792
7
+ data.tar.gz: '089b3ca6bde0678af5d12310776d95ac2548d56eec0cee2e205fb3e04acd05b070aa1e97bbc6166b40caca49b78f334ef435505de989c9989ee7d18f9a2680ae'
@@ -0,0 +1,12 @@
1
+ # c.f. https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2
+ version: 2
3
+
4
+ updates:
5
+ - package-ecosystem: github-actions
6
+ directory: /
7
+ schedule:
8
+ interval: weekly
9
+ cooldown:
10
+ default-days: 7
11
+ assignees:
12
+ - sue445
@@ -0,0 +1,59 @@
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name: Deploy static content to Pages
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches:
8
+ - master
9
+
10
+ # Allows you to run this workflow manually from the Actions tab
11
+ workflow_dispatch:
12
+
13
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14
+ permissions:
15
+ contents: read
16
+ pages: write
17
+ id-token: write
18
+
19
+ # Allow one concurrent deployment
20
+ concurrency:
21
+ group: "pages"
22
+ cancel-in-progress: true
23
+
24
+ jobs:
25
+ # Single deploy job since we're just deploying
26
+ deploy:
27
+ environment:
28
+ name: github-pages
29
+ url: ${{ steps.deployment.outputs.page_url }}
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: Checkout
33
+ uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
34
+
35
+ - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
36
+ with:
37
+ ruby-version: ruby
38
+ bundler-cache: true
39
+
40
+ - run: bundle exec yard
41
+
42
+ - name: Setup Pages
43
+ uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
44
+ - name: Upload artifact
45
+ uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
46
+ with:
47
+ # Upload entire repository
48
+ path: './doc'
49
+ - name: Deploy to GitHub Pages
50
+ id: deployment
51
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
52
+
53
+ - name: Slack Notification (not success)
54
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
55
+ if: "! success()"
56
+ continue-on-error: true
57
+ with:
58
+ status: ${{ job.status }}
59
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
@@ -0,0 +1,41 @@
1
+ name: Publish gem to rubygems.org
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ release:
8
+ if: github.repository == 'sue445/google_holiday_calendar'
9
+ runs-on: ubuntu-latest
10
+
11
+ environment:
12
+ name: rubygems.org
13
+ url: https://rubygems.org/gems/google_holiday_calendar
14
+
15
+ permissions:
16
+ contents: write
17
+ id-token: write
18
+
19
+ steps:
20
+ - name: Harden Runner
21
+ uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
22
+ with:
23
+ egress-policy: audit
24
+
25
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26
+
27
+ - name: Set up Ruby
28
+ uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
29
+ with:
30
+ bundler-cache: true
31
+ ruby-version: ruby
32
+
33
+ - name: Publish to RubyGems
34
+ uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
35
+
36
+ - name: Create GitHub release
37
+ run: |
38
+ tag_name="$(git describe --tags --abbrev=0)"
39
+ gh release create "${tag_name}" --verify-tag --generate-notes
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -12,71 +12,49 @@ on:
12
12
  schedule:
13
13
  - cron: "0 10 * * 5" # JST 19:00 (Fri)
14
14
 
15
- env:
16
- CI: "true"
17
-
18
15
  jobs:
19
16
  test:
20
17
  runs-on: ubuntu-latest
21
18
 
22
- container: ${{ matrix.ruby }}
23
-
24
19
  strategy:
25
20
  fail-fast: false
26
21
 
27
22
  matrix:
28
23
  ruby:
29
- - ruby:2.0
30
- - ruby:2.1
31
- - ruby:2.2
32
- - ruby:2.3
33
- - ruby:2.4
34
- - ruby:2.5
35
- - ruby:2.6
36
- - ruby:2.7
37
- - ruby:3.0
38
- - rubylang/ruby:master-nightly-bionic
39
- include:
40
- - ruby: rubylang/ruby:master-nightly-bionic
41
- allow_failures: "true"
24
+ - "2.0"
25
+ - "2.1"
26
+ - "2.2"
27
+ - "2.3"
28
+ - "2.4"
29
+ - "2.5"
30
+ - "2.6"
31
+ - "2.7"
32
+ - "3.0"
33
+ - "3.1"
34
+ - "3.2"
35
+ - "3.3"
36
+ - "3.4"
42
37
 
43
38
  steps:
44
- - uses: actions/checkout@v2
45
-
39
+ - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
46
40
 
47
- - name: Cache vendor/bundle
48
- uses: actions/cache@v1
49
- id: cache_gem
41
+ - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
50
42
  with:
51
- path: vendor/bundle
52
- key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }}
53
- restore-keys: |
54
- v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
55
- continue-on-error: ${{ matrix.allow_failures == 'true' }}
43
+ ruby-version: ${{ matrix.ruby }}
44
+ bundler-cache: true
56
45
 
57
- - name: bundle update
58
- run: |
59
- set -xe
60
- bundle config path vendor/bundle
61
- bundle update --jobs $(nproc) --retry 3
62
- continue-on-error: ${{ matrix.allow_failures == 'true' }}
46
+ - run: bundle update --jobs $(nproc) --retry 3
63
47
 
64
- - name: Run test
65
- run: |
66
- set -xe
67
- bundle exec rspec
68
- continue-on-error: ${{ matrix.allow_failures == 'true' }}
48
+ - run: bundle exec rspec
69
49
 
70
50
  - name: Slack Notification (not success)
71
- uses: lazy-actions/slatify@master
51
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
72
52
  if: "! success()"
73
53
  continue-on-error: true
74
54
  with:
75
- job_name: ${{ format('*build* ({0})', matrix.ruby) }}
76
- type: ${{ job.status }}
77
- icon_emoji: ":octocat:"
78
- url: ${{ secrets.SLACK_WEBHOOK }}
79
- token: ${{ secrets.GITHUB_TOKEN }}
55
+ status: ${{ job.status }}
56
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
57
+ matrix: ${{ toJson(matrix) }}
80
58
 
81
59
  notify:
82
60
  needs:
@@ -86,12 +64,9 @@ jobs:
86
64
 
87
65
  steps:
88
66
  - name: Slack Notification (success)
89
- uses: lazy-actions/slatify@master
67
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
90
68
  if: always()
91
69
  continue-on-error: true
92
70
  with:
93
- job_name: '*build*'
94
- type: ${{ job.status }}
95
- icon_emoji: ":octocat:"
96
- url: ${{ secrets.SLACK_WEBHOOK }}
97
- token: ${{ secrets.GITHUB_TOKEN }}
71
+ status: ${{ job.status }}
72
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
data/.yardopts CHANGED
@@ -1,2 +1,3 @@
1
1
  --markup markdown
2
2
  --no-private
3
+ --asset img/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/google_holiday_calendar/compare/v0.1.2...master)
2
+ [full changelog](http://github.com/sue445/google_holiday_calendar/compare/v0.1.3...master)
3
+
4
+ ## [v0.1.3](https://github.com/sue445/google_holiday_calendar/releases/tag/v0.1.3)
5
+ [full changelog](http://github.com/sue445/google_holiday_calendar/compare/v0.1.2...v0.1.3)
6
+
7
+ * Release gem from GitHub Actions
8
+ * https://github.com/sue445/google_holiday_calendar/pull/74
3
9
 
4
10
  ## v0.1.2
5
11
  [full changelog](http://github.com/sue445/google_holiday_calendar/compare/v0.1.1...v0.1.2)
data/Gemfile CHANGED
@@ -20,11 +20,15 @@ end
20
20
  if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.2.0")
21
21
  # NOTE: rake v13.0.0+ requires Ruby 2.2.0+
22
22
  gem "rake", "< 13.0.0"
23
- end
24
23
 
25
- if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.2.0")
24
+ # NOTE: concurrent-ruby v1.1.0+ requires Ruby 2.2.0+
25
+ gem "concurrent-ruby", "< 1.1.0"
26
+
26
27
  # NOTE: minitest v5.12.1+ requires Ruby 2.2.0+
27
28
  gem "minitest", "< 5.12.1"
29
+
30
+ # NOTE: addressable v2.8.1+ requires Ruby 2.2.0+
31
+ gem "addressable", "< 2.8.1"
28
32
  end
29
33
 
30
34
  if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.5.0")
@@ -35,4 +39,16 @@ end
35
39
  if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.3.0")
36
40
  # NOTE: json v2.6.0+ requires Ruby 2.3.0+
37
41
  gem "json", "< 2.6.0"
42
+
43
+ # NOTE: webrick v1.4.0+ requires Ruby 2.3.0+
44
+ gem "webrick", "< 1.4.0"
45
+
46
+ # NOTE: webmock v3.15.0+ requires Ruby 2.3+
47
+ gem "webmock", "< 3.15.0"
48
+ end
49
+
50
+ if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.7.0")
51
+ # term-ansicolor 1.9.0+ doesn't work on Ruby < 2.7
52
+ gem "term-ansicolor", "< 1.9.0"
38
53
  end
54
+
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # GoogleHolidayCalendar
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/google_holiday_calendar.png)](http://badge.fury.io/rb/google_holiday_calendar)
4
- [![Build Status](https://github.com/sue445/google_holiday_calendar/workflows/test/badge.svg?branch=master)](https://github.com/sue445/google_holiday_calendar/actions?query=workflow%3Atest)
4
+ [![test](https://github.com/sue445/google_holiday_calendar/actions/workflows/test.yml/badge.svg)](https://github.com/sue445/google_holiday_calendar/actions/workflows/test.yml)
5
5
  [![Coverage Status](https://coveralls.io/repos/sue445/google_holiday_calendar/badge.png)](https://coveralls.io/r/sue445/google_holiday_calendar)
6
6
  [![Code Climate](https://codeclimate.com/github/sue445/google_holiday_calendar.png)](https://codeclimate.com/github/sue445/google_holiday_calendar)
7
7
 
@@ -128,7 +128,7 @@ $ GOOGLE_API_KEY=xxxx google_holiday_calendar --start-date=2014-01-01 --end-date
128
128
  ```
129
129
 
130
130
  ## More reference
131
- http://rubydoc.info/github/sue445/google_holiday_calendar
131
+ https://sue445.github.io/google_holiday_calendar/
132
132
 
133
133
  ## Contributing
134
134
 
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = spec.homepage
18
18
  spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
19
+ spec.metadata["documentation_uri"] = "https://sue445.github.io/google_holiday_calendar/"
19
20
  spec.metadata["rubygems_mfa_required"] = "true"
20
21
 
21
22
  spec.required_ruby_version = '>= 2.0.0'
@@ -32,12 +33,13 @@ Gem::Specification.new do |spec|
32
33
  spec.add_dependency "activesupport", ">= 4.0.0"
33
34
 
34
35
  spec.add_development_dependency "bundler", ">= 1.5"
35
- spec.add_development_dependency "coveralls"
36
+ spec.add_development_dependency "coveralls_reborn"
36
37
  spec.add_development_dependency "delorean"
37
38
  spec.add_development_dependency "rake"
38
39
  spec.add_development_dependency "rspec"
39
40
  spec.add_development_dependency "rspec-collection_matchers"
40
41
  spec.add_development_dependency "rspec-its"
42
+ spec.add_development_dependency "term-ansicolor", "!= 1.11.1" # ref. https://github.com/flori/term-ansicolor/issues/41
41
43
  spec.add_development_dependency "webmock"
42
44
  spec.add_development_dependency "yard"
43
45
  end
@@ -49,7 +49,7 @@ module GoogleHolidayCalendar
49
49
  end
50
50
 
51
51
  # whether arg is holiday
52
- # @param arg [#to_date, String] {Date}, {Time}, or date like String (ex. "YYYY-MM-DD")
52
+ # @param arg [#to_date, String] `Date`, `Time`, or date like String (ex. "YYYY-MM-DD")
53
53
  def holiday?(arg)
54
54
  date = to_date(arg)
55
55
  holidays(start_date: date, end_date: date + 1.day, limit: 1).length > 0
@@ -1,3 +1,3 @@
1
1
  module GoogleHolidayCalendar
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_holiday_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-11-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -39,7 +38,7 @@ dependencies:
39
38
  - !ruby/object:Gem::Version
40
39
  version: '1.5'
41
40
  - !ruby/object:Gem::Dependency
42
- name: coveralls
41
+ name: coveralls_reborn
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
@@ -122,6 +121,20 @@ dependencies:
122
121
  - - ">="
123
122
  - !ruby/object:Gem::Version
124
123
  version: '0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: term-ansicolor
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "!="
129
+ - !ruby/object:Gem::Version
130
+ version: 1.11.1
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "!="
136
+ - !ruby/object:Gem::Version
137
+ version: 1.11.1
125
138
  - !ruby/object:Gem::Dependency
126
139
  name: webmock
127
140
  requirement: !ruby/object:Gem::Requirement
@@ -159,6 +172,9 @@ extensions: []
159
172
  extra_rdoc_files: []
160
173
  files:
161
174
  - ".coveralls.yml"
175
+ - ".github/dependabot.yml"
176
+ - ".github/workflows/pages.yml"
177
+ - ".github/workflows/release_gem.yml"
162
178
  - ".github/workflows/test.yml"
163
179
  - ".gitignore"
164
180
  - ".rspec"
@@ -180,8 +196,8 @@ metadata:
180
196
  homepage_uri: https://github.com/sue445/google_holiday_calendar
181
197
  source_code_uri: https://github.com/sue445/google_holiday_calendar
182
198
  changelog_uri: https://github.com/sue445/google_holiday_calendar/blob/master/CHANGELOG.md
199
+ documentation_uri: https://sue445.github.io/google_holiday_calendar/
183
200
  rubygems_mfa_required: 'true'
184
- post_install_message:
185
201
  rdoc_options: []
186
202
  require_paths:
187
203
  - lib
@@ -196,8 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
212
  - !ruby/object:Gem::Version
197
213
  version: '0'
198
214
  requirements: []
199
- rubygems_version: 3.2.22
200
- signing_key:
215
+ rubygems_version: 3.6.7
201
216
  specification_version: 4
202
217
  summary: Get holidays via Google Calendar.
203
218
  test_files: []