jsender 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -49
- data/lib/jsender/version.rb +1 -1
- 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: c634788874c60631cfb98169498697bfd862d009
|
4
|
+
data.tar.gz: 80989fd7159cd49186a6f8bdd7c13c3595fa1d91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da13dc60f2048469404e5ab06be1c02b28b90cb6560f042b340f9a5944ff0cb42a06e2c6c3ce114f7ae31838a7218f7cb9a7e48991bdc74d45bd6d4496e258f3
|
7
|
+
data.tar.gz: ff40d171333a9165b64f7513e3d411039016b0346c2b8a5c85002efaa4f3f17dc48c50848245878b0011210b6f3adc1257b1bec51beef50092d52fd0ce25a478
|
data/README.md
CHANGED
@@ -26,8 +26,14 @@ Or install it yourself as:
|
|
26
26
|
class CodeClass
|
27
27
|
include Jsender
|
28
28
|
end
|
29
|
+
```
|
29
30
|
|
31
|
+
```
|
30
32
|
iut = CodeClass.new
|
33
|
+
```
|
34
|
+
|
35
|
+
|
36
|
+
```
|
31
37
|
iut.success
|
32
38
|
=> {"status"=>"success", "data"=>{"result"=>nil, "notifications"=>["success"]}}
|
33
39
|
|
@@ -62,53 +68,6 @@ Or install it yourself as:
|
|
62
68
|
=> {"status"=>"fail", "data"=>{"result"=>["d", "a", "t", "a"], "notifications"=>["a failure occurred"]}}
|
63
69
|
```
|
64
70
|
|
65
|
-
```
|
66
|
-
iut = CodeClass.new
|
67
|
-
```
|
68
|
-
|
69
|
-
```
|
70
|
-
iut.action(1)
|
71
|
-
=> {"status"=>"success", "data"=>{"result"=>nil, "notifications"=>["success"]}}
|
72
|
-
|
73
|
-
iut.action(2)
|
74
|
-
=> {"status"=>"success", "data"=>{"result"=>nil, "notifications"=>["code 2 selected"]}}
|
75
|
-
|
76
|
-
iut.action(3)
|
77
|
-
=> {"status"=>"success", "data"=>{"a"=>"A", "b"=>"B", "notifications"=>["success"]}}
|
78
|
-
|
79
|
-
iut.action(4)
|
80
|
-
=> {"status"=>"success", "data"=>{"result"=>["d", "a", "t", "a"], "notifications"=>["some data for you"]}}
|
81
|
-
|
82
|
-
iut.action(5)
|
83
|
-
=> {"status"=>"fail", "data"=>{"result"=>nil, "notifications"=>["code 5 selected"]}}
|
84
|
-
|
85
|
-
iut.action(6)
|
86
|
-
=> {"status"=>"fail", "data"=>{"a"=>"A", "b"=>"B", "notifications"=>["fail"]}}
|
87
|
-
|
88
|
-
iut.action(7)
|
89
|
-
=> {"status"=>"fail", "data"=>{"result"=>["d", "a", "t", "a"], "notifications"=>["some errors for you"]}}
|
90
|
-
iut.has_data?(result, 'a')
|
91
|
-
=> true
|
92
|
-
iut.has_data?(result, 'z')
|
93
|
-
=> false
|
94
|
-
|
95
|
-
iut.action(0)
|
96
|
-
=> {"status"=>"fail", "data"=>{"result"=>nil, "notifications"=>["fail"]}}
|
97
|
-
|
98
|
-
iut.action(8)
|
99
|
-
=> {"status"=>"error", "message"=>nil}
|
100
|
-
|
101
|
-
iut.action(9)
|
102
|
-
=> {"status"=>"error", "message"=>"something went wrong"}
|
103
|
-
|
104
|
-
result = iut.action(6)
|
105
|
-
iut.notifications_include?(result, "ail")
|
106
|
-
=> true
|
107
|
-
iut.notifications_include?(result, "not")
|
108
|
-
=> false
|
109
|
-
|
110
|
-
```
|
111
|
-
|
112
71
|
## Development
|
113
72
|
|
114
73
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -117,8 +76,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
117
76
|
|
118
77
|
## Contributing
|
119
78
|
|
120
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/hetznerZA/jsender.
|
121
|
-
|
79
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/hetznerZA/jsender.
|
122
80
|
|
123
81
|
## License
|
124
82
|
|
data/lib/jsender/version.rb
CHANGED