relax-rb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/relax/event.rb +10 -2
- data/lib/relax/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: 1e159f7cd23212ec321b69fe4755f9c8e16aa265
|
4
|
+
data.tar.gz: 41a381874ff2ce87ca94ca97651f42b686906795
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada236c753ec78516014e664943e2fe095be97969d4e8102de773e38ce18a3a65e185b423b0a849ba6c63270a04499fffe34debf49f59fc8cdb11ad39e4446ee
|
7
|
+
data.tar.gz: 383dd76a8809d2d8bbcee05f2a8f1a4253ad6775f370a9e4e1f2fa5da55ac098d9666985fbe9f75ecb07880fc9c4e9c425fd40db09e3cf927945a529e51f67ce
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Relax is a Ruby client/consumer library for [relax](https://github.com/zerobotla
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem 'relax'
|
12
|
+
gem 'relax-rb', require: 'relax'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -121,7 +121,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
121
121
|
|
122
122
|
## Contributing
|
123
123
|
|
124
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/zerobotlabs/relax-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
124
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/zerobotlabs/relax-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org/) code of conduct.
|
125
125
|
|
126
126
|
|
127
127
|
## License
|
data/lib/relax/event.rb
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
module Relax
|
2
2
|
class Event
|
3
|
-
|
4
|
-
:relax_bot_uid, :timestamp, :provider, :event_timestamp
|
3
|
+
ATTRIBUTES = [:type, :user_uid, :channel_uid, :team_uid, :im, :text,
|
4
|
+
:relax_bot_uid, :timestamp, :provider, :event_timestamp]
|
5
|
+
|
6
|
+
attr_accessor *ATTRIBUTES
|
5
7
|
|
6
8
|
def initialize(opts = {})
|
7
9
|
opts.each { |k,v| self.send("#{k}=", v) if self.respond_to?("#{k}=") }
|
8
10
|
end
|
11
|
+
|
12
|
+
def to_hash
|
13
|
+
hash = {}
|
14
|
+
ATTRIBUTES.each { |a| hash[a] = self.send(a) }
|
15
|
+
hash
|
16
|
+
end
|
9
17
|
end
|
10
18
|
end
|
data/lib/relax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relax-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arunthampi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|