spacebunny 1.0.0 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ec6a838a45e43d41f1af7b2b4689fb9cb239bbf
4
- data.tar.gz: b45289c93365e82c60d325c7cf4a3d04787ac4bd
3
+ metadata.gz: 5db9699ac58bea490291642944c72fd557446d4f
4
+ data.tar.gz: 8d1bd3c08403918a2948cc1b2931dad39f41c268
5
5
  SHA512:
6
- metadata.gz: 79e6ae369230e1e92a791a159f4c935b28f621c11970167b60dfd1511d442393b010bb0be00570b8b1774c20cca05b9177ec925783eb24380447f9cac76fab41
7
- data.tar.gz: 0321121e0d08d1440392080c26625bcb1abd363b443300f324add3a73e717fc84d5571385954a7bf8687b6d3887c390c4b10bda2c6ab62a0085dab5406228df5
6
+ metadata.gz: f0101c5441780b1d4ff477ce9017c5000593608052c3ca711826dca14436466619b96e4fdf2e712022fcd4975121ff3be2e77a96eb4645cb9ed63483011690b4
7
+ data.tar.gz: 5f053ad3fdc2f19bbb6800b6e9d7d08f90ea8b783b77daef4840a0c942526672776ec711303ed853deefc975d25a1dc802f60061b59c6198c1824b37a3eb0162
@@ -54,6 +54,7 @@ module Spacebunny
54
54
  check_connection_configs
55
55
  @connection_configs
56
56
  end
57
+ alias_method :auto_configure!, :connection_configs
57
58
 
58
59
  def connect
59
60
  logger.warn "connect method must be implemented on class responsibile to handle protocol '#{@protocol}'"
@@ -84,25 +85,50 @@ module Spacebunny
84
85
  connection_configs[:auto_recover]
85
86
  end
86
87
 
88
+ def auto_recover=(auto_recover)
89
+ @connection_configs[:auto_recover] = auto_recover
90
+ end
91
+
87
92
  def id
88
93
  connection_configs[:device_id]
89
94
  end
90
95
 
96
+ def id=(id)
97
+ @connection_configs[:device_id] = id
98
+ end
99
+
91
100
  def name
92
101
  connection_configs[:device_name]
93
102
  end
94
103
 
104
+ def name=(name)
105
+ @connection_configs[:name] = name
106
+ end
107
+
95
108
  def host
96
109
  connection_configs[:host]
97
110
  end
98
111
 
112
+ def host=(host)
113
+ @connection_configs[:host] = host
114
+ end
115
+
99
116
  def secret
100
117
  connection_configs[:secret]
101
118
  end
102
119
 
120
+ def secret=(secret)
121
+ @connection_configs[:secret] = secret
122
+ end
123
+
103
124
  def vhost
104
125
  connection_configs[:vhost]
105
126
  end
127
+ alias_method :organization_id, :vhost
128
+
129
+ def vhost=(vhost)
130
+ @connection_configs[:secret] = secret
131
+ end
106
132
 
107
133
  protected
108
134
 
@@ -57,7 +57,7 @@ module Spacebunny
57
57
 
58
58
  # Contact APIs endpoint to retrieve configs
59
59
  def fetch
60
- uri_builder = case scheme
60
+ uri_builder = case scheme.to_s
61
61
  when 'http'
62
62
  URI::HTTP
63
63
  when 'https'
@@ -54,6 +54,7 @@ module Spacebunny
54
54
  check_connection_configs
55
55
  @connection_configs
56
56
  end
57
+ alias_method :auto_configure, :connection_configs
57
58
 
58
59
  def connect
59
60
  logger.warn "connect method must be implemented on class responsibile to handle protocol '#{@protocol}'"
@@ -83,17 +84,34 @@ module Spacebunny
83
84
  connection_configs[:auto_recover]
84
85
  end
85
86
 
87
+ def auto_recover=(auto_recover)
88
+ @connection_configs[:auto_recover] = auto_recover
89
+ end
90
+
86
91
  def host
87
92
  connection_configs[:host]
88
93
  end
89
94
 
95
+ def host=(host)
96
+ @connection_configs[:host] = host
97
+ end
98
+
90
99
  def secret
91
100
  connection_configs[:secret]
92
101
  end
93
102
 
103
+ def secret=(secret)
104
+ @connection_configs[:secret] = secret
105
+ end
106
+
94
107
  def vhost
95
108
  connection_configs[:vhost]
96
109
  end
110
+ alias_method :organization_id, :vhost
111
+
112
+ def vhost=(vhost)
113
+ @connection_configs[:secret] = secret
114
+ end
97
115
 
98
116
  private
99
117
 
@@ -1,3 +1,3 @@
1
1
  module Spacebunny
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spacebunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http