nodevent 3.1.6 → 3.1.7

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.
@@ -9,7 +9,7 @@ module NoDevent
9
9
  format :json
10
10
  default_timeout 5
11
11
 
12
- HOSTNAME="nodevent.com"
12
+ HOSTNAME="spigot.io"
13
13
 
14
14
  attr_accessor :namespace
15
15
  attr_accessor :secret
@@ -21,7 +21,9 @@ module NoDevent
21
21
  self.secret = opts["secret"]
22
22
 
23
23
  unless self.namespace
24
- resp = JSON.parse generate_namespace.body
24
+ body = generate_namespace.body
25
+ p "body :#{body}"
26
+ resp = JSON.parse body
25
27
  self.namespace = "/" + resp["id"]
26
28
  self.secret = resp["secret"]
27
29
  end
@@ -42,16 +44,17 @@ module NoDevent
42
44
  end
43
45
 
44
46
  def generate_namespace
45
- require "socket"
46
- hostname = Socket.gethostname
47
- suffix = " (#{Rails.env})" if defined?(Rails)
48
- req = {
49
- :body => {
50
- :api_key => api_key,
51
- :namespace => {"name" => "#{hostname}#{suffix}"}
52
- }
47
+ p "generate_namespace"
48
+ require "socket"
49
+ hostname = Socket.gethostname
50
+ suffix = " (#{Rails.env})" if defined?(Rails)
51
+ req = {
52
+ :body => {
53
+ :api_key => api_key,
54
+ :namespace => {"name" => "#{hostname}#{suffix}"}
53
55
  }
54
- self.class.post("http://#{HOSTNAME}/namespaces",req)
56
+ }
57
+ self.class.post("http://#{HOSTNAME}/namespaces",req)
55
58
  end
56
59
  end
57
60
  end
@@ -1,3 +1,3 @@
1
1
  module Nodevent
2
- VERSION = "3.1.6"
2
+ VERSION = "3.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nodevent
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.6
4
+ version: 3.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-06 00:00:00.000000000 Z
12
+ date: 2012-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis