igni 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 +3 -2
- data/lib/igni/api.rb +0 -6
- data/lib/igni/bot.rb +3 -0
- data/lib/igni/version.rb +1 -1
- data/lib/igni.rb +0 -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: 294e745a0fff3a0644580984888aafc17a3e2a88
|
|
4
|
+
data.tar.gz: 8a278fa70aa8fbbe2e00b99adebee8c990892097
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bf693b109ba5248b073f406ee35ca02832534c2e4569ac4883abb5207987a8618cc984f742aefe4de9cd3bfc6102a9a59b41539f422c97a7894dd4a7e055cec
|
|
7
|
+
data.tar.gz: 10646dbdd12a05dc7c610327a664a73dda20f698beaac8dc93cbbd2883c864060e323997f70092b214357b79772e857a9325401e3eb8d89207a50746337de8a8
|
data/README.md
CHANGED
|
@@ -22,7 +22,9 @@ Or install it yourself as:
|
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Access message raw data:
|
|
26
|
+
|
|
27
|
+
message["raw"]
|
|
26
28
|
|
|
27
29
|
## Development
|
|
28
30
|
|
|
@@ -38,4 +40,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
|
38
40
|
## License
|
|
39
41
|
|
|
40
42
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
41
|
-
|
data/lib/igni/api.rb
CHANGED
data/lib/igni/bot.rb
CHANGED
|
@@ -4,6 +4,8 @@ require 'igni/api'
|
|
|
4
4
|
|
|
5
5
|
module Igni
|
|
6
6
|
class Bot < Sinatra::Base
|
|
7
|
+
include Igni::API
|
|
8
|
+
|
|
7
9
|
attr_reader :token
|
|
8
10
|
attr_reader :hook
|
|
9
11
|
attr_reader :API
|
|
@@ -41,6 +43,7 @@ module Igni
|
|
|
41
43
|
raw = request.env["rack.input"].read
|
|
42
44
|
|
|
43
45
|
data = JSON.parse(raw)
|
|
46
|
+
data["raw"] = raw
|
|
44
47
|
|
|
45
48
|
Thread.new { self.@handler(data) } if @handler != nil
|
|
46
49
|
end
|
data/lib/igni/version.rb
CHANGED
data/lib/igni.rb
CHANGED