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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adff098dfab3b6235f2d925db88d2a1a7c626d0f
4
- data.tar.gz: b7f2c5ad14d0bafacfdbabbd9aa8137b4f8ba7c6
3
+ metadata.gz: 1e159f7cd23212ec321b69fe4755f9c8e16aa265
4
+ data.tar.gz: 41a381874ff2ce87ca94ca97651f42b686906795
5
5
  SHA512:
6
- metadata.gz: 639d3c3e543bc5959ef656143c130d15e10f0cb5840c0c6f0197bac3ea6af0465a30439ab9c024a75d808a6b69c52952b41fd7eb7d5353ffe8ca4affe7184a11
7
- data.tar.gz: 0c0fa52320c7af2cbc79a4971b9424f251136e4c89b8c9f4d43b6269f46f64603570eacd087efc2040e7c4863337c3abdc2ab7309f9a810e720507a2528ab963
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
- attr_accessor :type, :user_uid, :channel_uid, :team_uid, :im, :text,
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
@@ -1,3 +1,3 @@
1
1
  module Relax
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-10-13 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis