scaledrone 0.1 → 0.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scaledrone.rb +6 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 278f539f4ff05fb5fb6719e1caa22e02843268d5
4
- data.tar.gz: 027bd1d1d2ca7b2dbda99b6c7432b97341cbd7e0
3
+ metadata.gz: 34e7f1ea27464fc8e2628e5a1ce8e1d227e76aa1
4
+ data.tar.gz: e97ce1d2b40895ada98ae22372a70eac871e07a7
5
5
  SHA512:
6
- metadata.gz: 4502aab633fa07328157e2a8292d15557c6966280c23f5392c1836ef045db94128fb32100e1b5f56f794c7386c912239fdb88190c5c4cb2f1d1eb8f4d452e0de
7
- data.tar.gz: f695a93e9ba8fca24d2989edde6b898bc2ee894c2d81decfb3ec75a2493fd04daa6c728550a2053c73009706778c7fca170ad25f132fc8fca46b7dcc12664963
6
+ metadata.gz: 748c558239bc3368c5dc861f60f3e9f2619c52f643a9934aa8c4ba410b07408785eeab235294a624186472d1dfdb65c3f7697aef51607349a31ec194d04192f9
7
+ data.tar.gz: 0f7779a8a922930ac00d538f3f7c5c72fff2cc1224053b882203040cdad333316087947bcfead8731641e19a04d801b8dca73b1932fd74dc799e149483ac8155
@@ -1,14 +1,14 @@
1
1
  require 'httparty'
2
2
 
3
- BASE_URL = 'https://api2.scaledrone.com'
4
-
5
3
  class ScaleDrone
6
4
  include HTTParty
7
5
 
8
- def initialize(channel_id, secret_key, base_url = BASE_URL)
9
- @channel_id = channel_id
10
- @base_url = base_url
11
- @auth = {username: channel_id, password: secret_key}
6
+ def initialize(options = {})
7
+ options = {
8
+ :base_url => 'https://api2.scaledrone.com',
9
+ }.merge(options)
10
+ @channel_id, @base_url = options.values_at(:channel_id, :base_url)
11
+ @auth = {username: options[:channel_id], password: options[:secret_key]}
12
12
  end
13
13
 
14
14
  def publish(room, data = {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaledrone
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
  - Serge Herkül
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-31 00:00:00.000000000 Z
11
+ date: 2015-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty