rspec-time_stop 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: d10ce976e431663f5aa2f2ee3320600ed18608830560a84e35246a295bad4dab
4
- data.tar.gz: bb17c58cfb93590b795cd1803dbcce0b51843ca39b85883fc6a463ae5fd389a9
3
+ metadata.gz: e0adbef8ef0b9b3179e8ac80ffd0961d9b44ddc79098247defe178cad6090216
4
+ data.tar.gz: 8fb2cb3441661a1c93d874bfa592eda6cd5b48cd118938c3b1c1a547fb6e7d72
5
5
  SHA512:
6
- metadata.gz: 894e12dce316c71f6784653ad91b23c94411ada23886e5f83afa3ee4d53a46e004891c9249f66557c8ca1293bd82d49539a1a8b28b09ca3f0a3a6473664a6f05
7
- data.tar.gz: b98a728f3b038bc11395e4e09de982d889dedc6ac43b8748d5fead208852a6aaba0b04c33ba9b2f41537f32909a8277c5c6f8c770d75a1a4de4190434994d90d
6
+ metadata.gz: d4f80271597e997278c1a4831845d25d30aa45f3774bbb430b7bb8c8f80623341f201ad224fde75642392b32953c2283d02b97024ac73e16df7aee67bbbf5dde
7
+ data.tar.gz: 2f77ca06c6aad6d480f38bb799d5143e65854c9ee20bed108297f31ce41fa2c3e243b876939c1e13d937f8d17e0e6ed519afdc13f0722fd1da3ff4ab07779adf
@@ -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/rspec-time_stop'
9
+ runs-on: ubuntu-latest
10
+
11
+ environment:
12
+ name: rubygems.org
13
+ url: https://rubygems.org/gems/rspec-time_stop
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,68 +12,46 @@ 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.3
30
- - ruby:2.4
31
- - ruby:2.5
32
- - ruby:2.6
33
- - ruby:2.7
34
- - ruby:3.0
35
- - rubylang/ruby:master-nightly-bionic
36
- include:
37
- - ruby: rubylang/ruby:master-nightly-bionic
38
- allow_failures: "true"
24
+ - "2.3"
25
+ - "2.4"
26
+ - "2.5"
27
+ - "2.6"
28
+ - "2.7"
29
+ - "3.0"
30
+ - "3.1"
31
+ - "3.2"
32
+ - "3.3"
33
+ - "3.4"
39
34
 
40
35
  steps:
41
- - uses: actions/checkout@v2
42
-
36
+ - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
43
37
 
44
- - name: Cache vendor/bundle
45
- uses: actions/cache@v1
46
- id: cache_gem
38
+ - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
47
39
  with:
48
- path: vendor/bundle
49
- key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }}
50
- restore-keys: |
51
- v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
52
- continue-on-error: ${{ matrix.allow_failures == 'true' }}
40
+ ruby-version: ${{ matrix.ruby }}
41
+ bundler-cache: true
53
42
 
54
- - name: bundle update
55
- run: |
56
- set -xe
57
- bundle config path vendor/bundle
58
- bundle update --jobs $(nproc) --retry 3
59
- continue-on-error: ${{ matrix.allow_failures == 'true' }}
43
+ - run: bundle update --jobs $(nproc) --retry 3
60
44
 
61
- - name: Run test
62
- run: |
63
- set -xe
64
- bundle exec rspec
65
- continue-on-error: ${{ matrix.allow_failures == 'true' }}
45
+ - run: bundle exec rspec
66
46
 
67
47
  - name: Slack Notification (not success)
68
- uses: lazy-actions/slatify@master
48
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
69
49
  if: "! success()"
70
50
  continue-on-error: true
71
51
  with:
72
- job_name: ${{ format('*build* ({0})', matrix.ruby) }}
73
- type: ${{ job.status }}
74
- icon_emoji: ":octocat:"
75
- url: ${{ secrets.SLACK_WEBHOOK }}
76
- token: ${{ secrets.GITHUB_TOKEN }}
52
+ status: ${{ job.status }}
53
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
54
+ matrix: ${{ toJson(matrix) }}
77
55
 
78
56
  notify:
79
57
  needs:
@@ -83,12 +61,9 @@ jobs:
83
61
 
84
62
  steps:
85
63
  - name: Slack Notification (success)
86
- uses: lazy-actions/slatify@master
64
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
87
65
  if: always()
88
66
  continue-on-error: true
89
67
  with:
90
- job_name: '*build*'
91
- type: ${{ job.status }}
92
- icon_emoji: ":octocat:"
93
- url: ${{ secrets.SLACK_WEBHOOK }}
94
- token: ${{ secrets.GITHUB_TOKEN }}
68
+ status: ${{ job.status }}
69
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --markup markdown
2
+ --no-private
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.2...master)
2
+ [full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.4...master)
3
+
4
+ ## [v0.1.4](https://github.com/sue445/rspec-time_stop/releases/tag/v0.1.4)
5
+ [full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.3...v0.1.4)
6
+
7
+ * Release gem from GitHub Actions
8
+ * https://github.com/sue445/rspec-time_stop/pull/48
9
+
10
+ ## v0.1.3
11
+ [full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.2...v0.1.3)
12
+
13
+ * Support activesupport 7.1
14
+ * https://github.com/sue445/rspec-time_stop/pull/32
3
15
 
4
16
  ## v0.1.2
5
17
  [full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.1...v0.1.2)
data/Gemfile CHANGED
@@ -4,3 +4,9 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in rspec-time_stop.gemspec
6
6
  gemspec
7
+
8
+ if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.4.0")
9
+ # term-ansicolor 1.10.3+ doesn't work on Ruby < 2.4
10
+ # c.f. https://github.com/flori/term-ansicolor/commit/95f68f02ee38227c7f9e905a5ee3a48d3d3d98ca
11
+ gem "term-ansicolor", "< 1.10.3"
12
+ end
data/README.md CHANGED
@@ -4,7 +4,7 @@ Stop current time in example.
4
4
  This is a shorthand of `ActiveSupport::Testing::TimeHelpers`
5
5
 
6
6
  [![Gem Version](https://badge.fury.io/rb/rspec-time_stop.svg)](https://badge.fury.io/rb/rspec-time_stop)
7
- [![Build Status](https://github.com/sue445/rspec-time_stop/workflows/test/badge.svg?branch=master)](https://github.com/sue445/rspec-time_stop/actions?query=workflow%3Atest)
7
+ [![test](https://github.com/sue445/rspec-time_stop/actions/workflows/test.yml/badge.svg)](https://github.com/sue445/rspec-time_stop/actions/workflows/test.yml)
8
8
  [![Coverage Status](https://coveralls.io/repos/github/sue445/rspec-time_stop/badge.svg)](https://coveralls.io/github/sue445/rspec-time_stop)
9
9
  [![Maintainability](https://api.codeclimate.com/v1/badges/9f437c78e286285f5605/maintainability)](https://codeclimate.com/github/sue445/rspec-time_stop/maintainability)
10
10
 
@@ -32,7 +32,7 @@ Add `:time_stop` to `it`, `describe` or `context`
32
32
  ```ruby
33
33
  RSpec.describe RSpec::TimeStop do
34
34
  context "with :time_stop", :time_stop do
35
- it "current time is freezed" do
35
+ it "current time is frozen" do
36
36
  before_time = Time.now
37
37
  sleep 1
38
38
  after_time = Time.now
@@ -42,7 +42,7 @@ RSpec.describe RSpec::TimeStop do
42
42
  end
43
43
 
44
44
  context "without :time_stop" do
45
- it "current time is not freezed" do
45
+ it "current time is not frozen" do
46
46
  before_time = Time.now
47
47
  sleep 1
48
48
  after_time = Time.now
@@ -50,7 +50,7 @@ RSpec.describe RSpec::TimeStop do
50
50
  expect(after_time).to be > before_time
51
51
  end
52
52
 
53
- it "current time is freezed when :time_stop is granted", :time_stop do
53
+ it "current time is frozen when :time_stop is granted", :time_stop do
54
54
  before_time = Time.now
55
55
  sleep 1
56
56
  after_time = Time.now
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module TimeStop
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
@@ -1,5 +1,6 @@
1
1
  require "rspec/time_stop/version"
2
2
  require "rspec"
3
+ require "active_support"
3
4
 
4
5
  begin
5
6
  # workaround for activesupport 7.0.0
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = spec.homepage
19
19
  spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
20
+ spec.metadata["documentation_uri"] = "https://sue445.github.io/rspec-time_stop/"
20
21
  spec.metadata["rubygems_mfa_required"] = "true"
21
22
 
22
23
  # Specify which files should be added to the gem when it is released.
@@ -32,7 +33,9 @@ Gem::Specification.new do |spec|
32
33
  spec.add_dependency "rspec"
33
34
 
34
35
  spec.add_development_dependency "bundler", ">= 1.16"
35
- spec.add_development_dependency "coveralls"
36
+ spec.add_development_dependency "coveralls_reborn"
36
37
  spec.add_development_dependency "rake"
37
38
  spec.add_development_dependency "simplecov"
39
+ spec.add_development_dependency "term-ansicolor", "!= 1.11.1" # ref. https://github.com/flori/term-ansicolor/issues/41
40
+ spec.add_development_dependency "yard"
38
41
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-time_stop
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
  - sue445
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2021-12-17 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
@@ -53,7 +52,7 @@ dependencies:
53
52
  - !ruby/object:Gem::Version
54
53
  version: '1.16'
55
54
  - !ruby/object:Gem::Dependency
56
- name: coveralls
55
+ name: coveralls_reborn
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ">="
@@ -94,6 +93,34 @@ dependencies:
94
93
  - - ">="
95
94
  - !ruby/object:Gem::Version
96
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: term-ansicolor
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "!="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.11.1
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "!="
108
+ - !ruby/object:Gem::Version
109
+ version: 1.11.1
110
+ - !ruby/object:Gem::Dependency
111
+ name: yard
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
97
124
  description: Stop current time in example.
98
125
  email:
99
126
  - sue445@sue445.net
@@ -102,9 +129,13 @@ extensions: []
102
129
  extra_rdoc_files: []
103
130
  files:
104
131
  - ".coveralls.yml"
132
+ - ".github/dependabot.yml"
133
+ - ".github/workflows/pages.yml"
134
+ - ".github/workflows/release_gem.yml"
105
135
  - ".github/workflows/test.yml"
106
136
  - ".gitignore"
107
137
  - ".rspec"
138
+ - ".yardopts"
108
139
  - CHANGELOG.md
109
140
  - Gemfile
110
141
  - LICENSE.txt
@@ -123,8 +154,8 @@ metadata:
123
154
  homepage_uri: https://github.com/sue445/rspec-time_stop
124
155
  source_code_uri: https://github.com/sue445/rspec-time_stop
125
156
  changelog_uri: https://github.com/sue445/rspec-time_stop/blob/master/CHANGELOG.md
157
+ documentation_uri: https://sue445.github.io/rspec-time_stop/
126
158
  rubygems_mfa_required: 'true'
127
- post_install_message:
128
159
  rdoc_options: []
129
160
  require_paths:
130
161
  - lib
@@ -139,8 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
170
  - !ruby/object:Gem::Version
140
171
  version: '0'
141
172
  requirements: []
142
- rubygems_version: 3.2.32
143
- signing_key:
173
+ rubygems_version: 3.6.7
144
174
  specification_version: 4
145
175
  summary: Stop current time in example.
146
176
  test_files: []