codegears 0.0.21.pre → 0.0.22.pre

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cg/api.rb CHANGED
@@ -7,18 +7,18 @@ module CG
7
7
  PUSHER_URL = "#{ROOT_URL}:9292/stream"
8
8
 
9
9
  def self.create_app_request(email)
10
- self.post("#{ROOT_URL}/apps", :body => { :application => { :email => email } })
10
+ JSON.parse(self.post("#{ROOT_URL}/apps", :body => { :application => { :email => email } }).body)
11
11
  end
12
12
 
13
13
  def self.show_app_request(id, secret_id = nil, secret_token = nil)
14
- self.get("#{ROOT_URL}/apps/#{id}?#{self.attach_auth(secret_id, secret_token)}")
14
+ JSON.parse(self.get("#{ROOT_URL}/apps/#{id}?#{self.attach_auth(secret_id, secret_token)}").body)
15
15
  end
16
16
 
17
17
  def self.push_message_request(channel, message)
18
18
  message = { :channel => channel,
19
19
  :message => message,
20
20
  :ext => { :secret_id => CG::APP.secret_id, :secret_token => CG::APP.secret_token } }.to_json
21
- Net::HTTP.post_form(URI.parse(PUSHER_URL), :message => message)
21
+ JSON.parse(Net::HTTP.post_form(URI.parse(PUSHER_URL), :message => message).body)
22
22
  end
23
23
 
24
24
  def self.attach_auth(secret_id, secret_token)
data/lib/cg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CG
2
- VERSION = "0.0.21.pre"
2
+ VERSION = "0.0.22.pre"
3
3
  end
@@ -21,9 +21,9 @@ module Cg
21
21
  unless email.blank?
22
22
  response = CG::API.create_app_request(email)
23
23
  unless response["success"] == false
24
- @id = response["id"]
25
- @secret_id = response["secret_id"]
26
- @secret_token = response["secret_token"]
24
+ @id = response['id']
25
+ @secret_id = response['secret_id']
26
+ @secret_token = response['secret_token']
27
27
  end
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codegears
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21.pre
4
+ version: 0.0.22.pre
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors: