splatter 0.0.1 → 0.0.2
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 +17 -1
- data/lib/splatter.rb +29 -0
- data/lib/splatter/init.rb +1 -1
- data/lib/splatter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 367e2d5b32574cf762e1ada2223933eaedd7a962
|
4
|
+
data.tar.gz: bcda23e9c812ed0f80f01c29e8cc0b46160e1f25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b67ba77ac4579859f39c3a2319076b04f1f58066b53499aeffb139bd22a8e93b13f9fe9668a44bcc9ddbf3136dbd7198fc66e57bfbdea33c95b94ed2d8e8367
|
7
|
+
data.tar.gz: dc5e9583a9d808a2148c3d019b5492810908a6ce2e31e2dc24b14de70c458fafd03360a96018e1453161b9893214c24e46ca0dab8038ae32eb11fa7f03dc0a0d
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ class AcceptInvite
|
|
39
39
|
end
|
40
40
|
|
41
41
|
AcceptInvite.call(invite, user)
|
42
|
-
```
|
42
|
+
```
|
43
43
|
|
44
44
|
### Splatter
|
45
45
|
|
@@ -70,3 +70,19 @@ Or install it yourself as:
|
|
70
70
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
71
71
|
4. Push to the branch (`git push origin my-new-feature`)
|
72
72
|
5. Create a new Pull Request
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
## Notes
|
83
|
+
|
84
|
+
Motivation: https://gist.github.com/exploid/9f4b1501fb2dd9053388
|
85
|
+
|
86
|
+
check out https://github.com/pcreux/rspec-set
|
87
|
+
|
88
|
+
Easy / straightforward to mock because of single #call interface.
|
data/lib/splatter.rb
CHANGED
@@ -10,3 +10,32 @@ module Splatter
|
|
10
10
|
end
|
11
11
|
|
12
12
|
end
|
13
|
+
__END__
|
14
|
+
|
15
|
+
module Splatter
|
16
|
+
class Success
|
17
|
+
def success?
|
18
|
+
true
|
19
|
+
end
|
20
|
+
def errors?
|
21
|
+
false
|
22
|
+
end
|
23
|
+
def errors
|
24
|
+
nil
|
25
|
+
end
|
26
|
+
end
|
27
|
+
class Error
|
28
|
+
def initialize(errors)
|
29
|
+
@errors = errors
|
30
|
+
end
|
31
|
+
def success?
|
32
|
+
false
|
33
|
+
end
|
34
|
+
def errors?
|
35
|
+
true
|
36
|
+
end
|
37
|
+
def errors
|
38
|
+
@errors
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/splatter/init.rb
CHANGED
data/lib/splatter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Roy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|