simple_service 1.2.5 → 1.2.6
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 -0
- data/lib/simple_service/organizer.rb +1 -0
- data/lib/simple_service/service_base.rb +6 -0
- data/lib/simple_service/version.rb +1 -1
- data/spec/lib/organizer_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 515fadc80305add45e86b396802b338cede2aa06
|
4
|
+
data.tar.gz: 841835535e8881c65fa145ae53eecd09bc33b89b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b0c5dd85db59e62815ecec3ea749d4f81d0638f10e335da322576613626c8a7cd12a2815d7eeda6c39ee27b4dc43bee0d9c41910075de319a6a09a7053552ac
|
7
|
+
data.tar.gz: 2cfc971c8db2575311a893e53cce3f4aca902687eafcb7e68924bee36e8c22a30c9cfb6a85891420dbb3a2f57261cc57660e9a723a1fa46ce4281574f5f70e46
|
data/README.md
CHANGED
@@ -98,6 +98,9 @@ starting_context = {
|
|
98
98
|
}
|
99
99
|
modified_context = ProcessSomethingComplex.new(starting_context).call
|
100
100
|
|
101
|
+
# alternatively, you can call directly from the service class
|
102
|
+
modified_context = ProcessSomethingComplex.call(starting_context)
|
103
|
+
|
101
104
|
modified_context[:modified_thing] # => 2
|
102
105
|
```
|
103
106
|
|
data/spec/lib/organizer_spec.rb
CHANGED
@@ -33,6 +33,12 @@ describe SimpleService::Organizer do
|
|
33
33
|
).to eql(foo: 'foo', bar: 'bar', baz: 'baz')
|
34
34
|
end
|
35
35
|
|
36
|
+
it 'accepts string keys in context hash' do
|
37
|
+
expect(
|
38
|
+
TestOrganizer.new('foo' => 'foo').call
|
39
|
+
).to eql(foo: 'foo', bar: 'bar', baz: 'baz')
|
40
|
+
end
|
41
|
+
|
36
42
|
end
|
37
43
|
|
38
44
|
end
|