snfoil-context 1.0.0 → 1.0.1
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 +4 -4
- data/README.md +3 -3
- data/lib/snfoil/context/version.rb +1 -1
- data/snfoil-context.gemspec +4 -4
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f6ae006560cdebebc26c85b934844f41a97798a0380c533e8fe63ec20c87878
|
4
|
+
data.tar.gz: 55969fedd2c359612b3b5e8a2159d8a877694df5a53aa150c96bebfce3cc6a29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f765c83ea9194475a845ecf6592629db78b364f1b0fd1542532aa2e267df6134415554c271c9f3709d56d4e708c0e750ea7670362fe65dbfa4c9b6f0ceb6a30
|
7
|
+
data.tar.gz: ae9ee679b230d7e189b485355a0cf9203ace33c39719c1250a1345efafeb7648ef837af535362af04cdbce7c92a8813e48daf837e02dbe957f462147f541c75f
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ end
|
|
50
50
|
When you `new` up a SnFoil Context you should provide the entity running the actions. This will usually be a user but you can pass in anything. This will be accessible from within the context as `entity`.
|
51
51
|
|
52
52
|
```ruby
|
53
|
-
TokenContext.new(current_user)
|
53
|
+
TokenContext.new(entity: current_user)
|
54
54
|
```
|
55
55
|
|
56
56
|
### Actions
|
@@ -92,7 +92,7 @@ class TokenContext
|
|
92
92
|
action(:expire) { |options| options[:object].update(expired_at: Time.current) }
|
93
93
|
end
|
94
94
|
|
95
|
-
TokenContext.new(current_user).expire(object: current_token)
|
95
|
+
TokenContext.new(entity: current_user).expire(object: current_token)
|
96
96
|
```
|
97
97
|
|
98
98
|
If you want to reuse the primary action or just prefer methods, you can pass in the method name you would like to call, rather than providing a block. If a method name and a block are provided, the block is ignored.
|
@@ -335,7 +335,7 @@ end
|
|
335
335
|
Just like for an action SnFoil allows you to define both hooks and a method. To run this interval you call it using the `run_interval` method.
|
336
336
|
|
337
337
|
```ruby
|
338
|
-
TokenContext.new(entity).run_interval(:demo, **options)
|
338
|
+
TokenContext.new(entity: entity).run_interval(:demo, **options)
|
339
339
|
```
|
340
340
|
|
341
341
|
## Development
|
data/snfoil-context.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'An easy way to make extensible workflows and actions'
|
13
13
|
spec.homepage = 'https://github.com/limited-effort/snfoil-context'
|
14
14
|
spec.license = 'Apache-2.0'
|
15
|
-
spec.required_ruby_version = '>= 2.
|
15
|
+
spec.required_ruby_version = '>= 2.6'
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = spec.homepage
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
36
36
|
spec.add_development_dependency 'rake', '~> 13.0'
|
37
37
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
38
|
-
spec.add_development_dependency 'rubocop', '
|
39
|
-
spec.add_development_dependency 'rubocop-performance', '
|
40
|
-
spec.add_development_dependency 'rubocop-rspec', '
|
38
|
+
spec.add_development_dependency 'rubocop', '1.33'
|
39
|
+
spec.add_development_dependency 'rubocop-performance', '1.14.3'
|
40
|
+
spec.add_development_dependency 'rubocop-rspec', '2.12.1'
|
41
41
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snfoil-context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Howes
|
8
8
|
- Cliff Campbell
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -99,44 +99,44 @@ dependencies:
|
|
99
99
|
name: rubocop
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - '='
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '1.
|
104
|
+
version: '1.33'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - '='
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '1.
|
111
|
+
version: '1.33'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: rubocop-performance
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 1.14.3
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - '='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 1.14.3
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rubocop-rspec
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - '='
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: 2.12.1
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - '='
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
139
|
+
version: 2.12.1
|
140
140
|
description: An easy way to make extensible workflows and actions
|
141
141
|
email:
|
142
142
|
- howeszy@gmail.com
|
@@ -164,7 +164,7 @@ metadata:
|
|
164
164
|
source_code_uri: https://github.com/limited-effort/snfoil-context
|
165
165
|
changelog_uri: https://github.com/limited-effort/snfoil-context/blob/main/CHANGELOG.md
|
166
166
|
rubygems_mfa_required: 'true'
|
167
|
-
post_install_message:
|
167
|
+
post_install_message:
|
168
168
|
rdoc_options: []
|
169
169
|
require_paths:
|
170
170
|
- lib
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
requirements:
|
173
173
|
- - ">="
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: '2.
|
175
|
+
version: '2.6'
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - ">="
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '0'
|
181
181
|
requirements: []
|
182
182
|
rubygems_version: 3.1.6
|
183
|
-
signing_key:
|
183
|
+
signing_key:
|
184
184
|
specification_version: 4
|
185
185
|
summary: Setup Simple Pipelined Workflows
|
186
186
|
test_files: []
|