rspec-time_stop 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/pages.yml +62 -0
- data/.github/workflows/test.yml +14 -36
- data/.yardopts +2 -0
- data/CHANGELOG.md +7 -1
- data/README.md +3 -3
- data/lib/rspec/time_stop/version.rb +1 -1
- data/lib/rspec/time_stop.rb +1 -0
- data/rspec-time_stop.gemspec +3 -1
- metadata +22 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a95284e1adcc131376d5773c871b7421d4a538fa41237043c95fbf8875c0fab
|
4
|
+
data.tar.gz: 80cbeb082f77c90039c9f564f692d30fd2452afe3b11b645253ec57337f8c95d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8468fd2bfc92aac9a92d3254d4fba1bfc3d13b27148384bd73810e247b43baa6a14e8c5a7684b02c8e25db0d0512f1d91454b0d471e6f3c16e271671e75742a
|
7
|
+
data.tar.gz: d3807dd818d6dbdd0ad7ea459aba50cfdf6011e28387c1b78ac5616946e3e485f96a32122f1c211158a386b2fd5483bc5257d2c323ed5b116d127d6c793f6046
|
@@ -0,0 +1,10 @@
|
|
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
|
+
assignees:
|
10
|
+
- sue445
|
@@ -0,0 +1,62 @@
|
|
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@v4
|
34
|
+
|
35
|
+
- uses: ruby/setup-ruby@v1
|
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@v3
|
44
|
+
- name: Upload artifact
|
45
|
+
uses: actions/upload-pages-artifact@v2
|
46
|
+
with:
|
47
|
+
# Upload entire repository
|
48
|
+
path: './doc'
|
49
|
+
- name: Deploy to GitHub Pages
|
50
|
+
id: deployment
|
51
|
+
uses: actions/deploy-pages@main
|
52
|
+
|
53
|
+
- name: Slack Notification (not success)
|
54
|
+
uses: lazy-actions/slatify@master
|
55
|
+
if: "! success()"
|
56
|
+
continue-on-error: true
|
57
|
+
with:
|
58
|
+
job_name: "*pages*"
|
59
|
+
type: ${{ job.status }}
|
60
|
+
icon_emoji: ":octocat:"
|
61
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
62
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.github/workflows/test.yml
CHANGED
@@ -12,57 +12,35 @@ 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
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
|
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"
|
39
32
|
|
40
33
|
steps:
|
41
|
-
- uses: actions/checkout@
|
42
|
-
|
34
|
+
- uses: actions/checkout@v4
|
43
35
|
|
44
|
-
-
|
45
|
-
uses: actions/cache@v1
|
46
|
-
id: cache_gem
|
36
|
+
- uses: ruby/setup-ruby@v1
|
47
37
|
with:
|
48
|
-
|
49
|
-
|
50
|
-
restore-keys: |
|
51
|
-
v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
|
52
|
-
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
38
|
+
ruby-version: ${{ matrix.ruby }}
|
39
|
+
bundler-cache: true
|
53
40
|
|
54
|
-
-
|
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' }}
|
41
|
+
- run: bundle update --jobs $(nproc) --retry 3
|
60
42
|
|
61
|
-
-
|
62
|
-
run: |
|
63
|
-
set -xe
|
64
|
-
bundle exec rspec
|
65
|
-
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
43
|
+
- run: bundle exec rspec
|
66
44
|
|
67
45
|
- name: Slack Notification (not success)
|
68
46
|
uses: lazy-actions/slatify@master
|
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.
|
2
|
+
[full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.3...master)
|
3
|
+
|
4
|
+
## v0.1.3
|
5
|
+
[full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.2...v0.1.3)
|
6
|
+
|
7
|
+
* Support activesupport 7.1
|
8
|
+
* https://github.com/sue445/rspec-time_stop/pull/32
|
3
9
|
|
4
10
|
## v0.1.2
|
5
11
|
[full changelog](http://github.com/sue445/rspec-time_stop/compare/v0.1.1...v0.1.2)
|
data/README.md
CHANGED
@@ -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
|
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
|
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
|
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
|
data/lib/rspec/time_stop.rb
CHANGED
data/rspec-time_stop.gemspec
CHANGED
@@ -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,8 @@ 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 "
|
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 "yard"
|
38
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-time_stop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.16'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: coveralls_reborn
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: yard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: Stop current time in example.
|
98
112
|
email:
|
99
113
|
- sue445@sue445.net
|
@@ -102,9 +116,12 @@ extensions: []
|
|
102
116
|
extra_rdoc_files: []
|
103
117
|
files:
|
104
118
|
- ".coveralls.yml"
|
119
|
+
- ".github/dependabot.yml"
|
120
|
+
- ".github/workflows/pages.yml"
|
105
121
|
- ".github/workflows/test.yml"
|
106
122
|
- ".gitignore"
|
107
123
|
- ".rspec"
|
124
|
+
- ".yardopts"
|
108
125
|
- CHANGELOG.md
|
109
126
|
- Gemfile
|
110
127
|
- LICENSE.txt
|
@@ -123,6 +140,7 @@ metadata:
|
|
123
140
|
homepage_uri: https://github.com/sue445/rspec-time_stop
|
124
141
|
source_code_uri: https://github.com/sue445/rspec-time_stop
|
125
142
|
changelog_uri: https://github.com/sue445/rspec-time_stop/blob/master/CHANGELOG.md
|
143
|
+
documentation_uri: https://sue445.github.io/rspec-time_stop/
|
126
144
|
rubygems_mfa_required: 'true'
|
127
145
|
post_install_message:
|
128
146
|
rdoc_options: []
|
@@ -139,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
157
|
- !ruby/object:Gem::Version
|
140
158
|
version: '0'
|
141
159
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
160
|
+
rubygems_version: 3.4.10
|
143
161
|
signing_key:
|
144
162
|
specification_version: 4
|
145
163
|
summary: Stop current time in example.
|