KeyholeIO 0.1.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/keyholeio.rb CHANGED
@@ -1,305 +1,337 @@
1
- #
2
- # Keyhole.IO Ruby API
3
- # http://keyhole.io/developer/libraries
4
- #
5
- # By Kishyr Ramdial <kishyr@immedia.co.za>
6
- # Revision date: 28 June 2011
7
- #
8
-
9
- require 'rubygems'
10
- require 'cgi'
11
- require 'json'
12
1
  require 'net/http'
2
+ require 'json'
13
3
 
14
- # Keyhole.IO API Server
15
- $http = Net::HTTP.new("api.keyhole.io")
16
- $version = "v1"
4
+ module KeyholeIO
5
+ APIURL = "http://api.keyhole.io/v1"
17
6
 
18
- class KeyholeIO
19
- attr_accessor :apikey, :token
20
-
21
- def initialize(apikey, entity_options = nil)
22
- @@apikey = apikey
23
- unless entity_options.nil?
24
- self.register_entity(entity_options)
7
+
8
+ class Response
9
+ attr_accessor :meta, :data
10
+
11
+ def initialize response
12
+ resp = JSON.parse response
13
+ @meta = resp["meta"]
14
+ if @meta["status"] >= 200 and @meta["status"] <= 299
15
+ @data = resp["data"]
16
+ end
25
17
  end
26
- end
27
-
28
- # Entities
29
- #
30
- # POST /entity
31
- # Creates an entity if it doesn't exist and returns a token. If an already exists, it'll return a new token.
32
- def register_entity(options)
33
- raw_response = self.class.post_data_with_apikey("/entity", options)
34
- if raw_response["meta"]["status"].to_i == 200
35
- @@token = raw_response["data"]["token"]
36
- end
37
- raw_response
38
- end
39
18
 
40
- # GET /entity
41
- # Check if an entity exists, and return its description and its channel (if set) if it exists.
42
- def check_entity(options)
43
- self.class.get_data_with_apikey("/entity", options)
19
+ def successful?
20
+ @meta["status"] >= 200 and @meta["status"] <= 299
21
+ end
44
22
  end
45
23
 
46
- # DELETE /entity
47
- # Deletes an entity and all its datastores.
48
- def delete_entity(id)
49
- _hash = { :apikey => @@apikey }
50
- _identifier = { :id => id }
51
- _hash.merge!(_identifier)
52
- self.class.delete_data_with_token("/entity", _hash)
53
- end
54
24
 
55
- # PUT /entity
56
- # Nullifies the token given preventing further access to its entity and datastores.
57
- def nullify_entity_token
58
- self.class.put_data_with_token("/entity")
59
- end
25
+ class KVPair
26
+ attr_accessor :meta, :key, :value, :meta, :created_at, :updated_at, :type, :successful
27
+
28
+ def initialize raw_response
29
+ response = Response.new raw_response
30
+ if response.successful?
31
+ @meta = response.meta
32
+ @key = response.data["key"]
33
+ @value = response.data["value"]
34
+ @created_at = response.data["created_at"] if response.data["created_at"]
35
+ @updated_at = response.data["updated_at"] if response.data["updated_at"]
36
+ @type = response.data["type"] if response.data["type"]
37
+ @successful = true
38
+ else
39
+ @successful = false
40
+ end
41
+ end
60
42
 
61
- # POST /entity/password
62
- def change_password(oldpass, newpass)
63
- options = { :old => oldpass, :new => newpass }
64
- raw_response = self.class.post_data_with_token("/entity/password", options)
65
- if raw_response["meta"]["status"].to_i == 200
66
- @@token = raw_response["data"]["token"]
43
+ def successful?
44
+ @successful
67
45
  end
68
- raw_response
69
46
  end
70
47
 
71
48
 
72
- # Datastore
73
- #
74
- # POST /datastore
75
- # Create or update a datastore (set a value to a key)
76
- # FIXME: doesn't support binary uploads
77
- def set_datastore(key, value, meta = nil)
78
- val = value
79
- met = meta
49
+ class Group
50
+ attr_accessor :id, :apikey
80
51
 
81
- if [Hash, Array].include?(value.class)
82
- val = value.to_json
52
+ def initialize name, apikey
53
+ @apikey = apikey
54
+ @id = name
55
+
56
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/group"), paramshash(name)
57
+ r = Response.new response.body
83
58
  end
84
59
 
85
- if meta and [Hash, Array].include?(meta.class)
86
- met = meta.to_json
60
+ def entities
61
+ response = Net::HTTP.get URI.parse("#{APIURL}/group?apikey=#{@apikey}&id=#{@id}")
62
+ Response.new response
87
63
  end
88
64
 
89
- options = { :k => key, :v => val }
90
- options[:meta] = met unless met.nil?
91
- self.class.post_data_with_token("/datastore", options)
92
- end
65
+ def add entity
66
+ if entity.class == Entity
67
+ http = Net::HTTP.new("api.keyhole.io")
68
+ req = Net::HTTP::Put.new("/v1/group")
69
+ req.set_form_data apikey: @apikey, id: @id, entity: entity.name
93
70
 
94
- # GET /datastore
95
- # Returns a paginated list of keys and values.
96
- def get_all_datastores(options = nil)
97
- self.class.get_data_with_token("/datastore", options)
98
- end
71
+ Response.new http.request(req).body
72
+ else
73
+ puts "'entity' needs to be of type Entity."
74
+ end
75
+ end
99
76
 
100
- # GET /datastore/key[/nestedkey]
101
- # Returns the datastore for the given key or nested key.
102
- def get_datastore(key)
103
- self.class.get_data_with_token("/datastore/#{key}")
104
- end
77
+ def remove entity
78
+ if entity.class == Entity
79
+ http = Net::HTTP.new("api.keyhole.io")
80
+ req = Net::HTTP::Delete.new("/v1/group?apikey=#{@apikey}&id=#{@id}&entity=#{entity.name}")
81
+ Response.new http.request(req).body
82
+ else
83
+ puts "'entity' needs to be of type Entity."
84
+ end
85
+ end
105
86
 
106
- # DELETE /datastore/key
107
- # Deletes a datastore (and all uploaded files) given a key. There is no undo!
108
- def delete_datastore(key)
109
- self.class.delete_data_with_token("/datastore/#{key}")
110
- end
87
+ def destroy
88
+ http = Net::HTTP.new("api.keyhole.io")
89
+ req = Net::HTTP::Delete.new("/v1/group/rm?apikey=#{@apikey}&id=#{@id}")
90
+ Response.new http.request(req).body
91
+ end
111
92
 
93
+ private
112
94
 
113
- # Groups
114
- #
115
- # POST /group
116
- # Creates a new group using the apikey and an identifier (id)
117
- def create_group(group_name)
118
- self.class.post_data_with_apikey("/group", { :id => group_name })
119
- end
95
+ def paramshash name, options = {}
96
+ self.class.paramshash name, @apikey, options
97
+ end
120
98
 
121
- # GET /group
122
- # Lists all entities in a group
123
- def get_group(group_name)
124
- self.class.get_data_with_apikey("/group", { :id => group_name })
125
- end
99
+ def self.paramshash name, apikey, options
100
+ params = {
101
+ apikey: apikey,
102
+ id: name
103
+ }
104
+ options.collect { |k,v| params[k] = v }
126
105
 
127
- # PUT /group
128
- # Adds an entity with identifier to the specified group.
129
- def add_entity_to_group(group, entity)
130
- options = { :id => group, :entity => entity }
131
- self.class.put_data_with_apikey("/group", options)
106
+ params
107
+ end
132
108
  end
133
109
 
134
- # DELETE /group
135
- # Remove an entity from a specified group.
136
- def delete_entity_from_group(group, entity)
137
- options = { :id => group, :entity => entity }
138
- self.class.delete_data_with_apikey("/group", options)
139
- end
110
+
111
+ class Entity
112
+ attr_accessor :token, :id, :apikey, :name, :channel_name
113
+
114
+ ##
115
+ ## Entity Methods
116
+ ##
117
+
118
+ def initialize name, apikey, options = {}
119
+ # options: desc, password, public
120
+ @apikey = apikey
121
+ @name = name
122
+
123
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/entity"), paramshash(name, options)
124
+ r = Response.new response.body
125
+ if r.successful?
126
+ @token = r.data["token"]
127
+ end
128
+ end
140
129
 
141
- # DELETE /group/rm
142
- # Deletes the specified group completely (but not its entities)
143
- def delete_group(group_name)
144
- self.class.delete_data_with_apikey("/group/rm", { :id => group_name })
145
- end
130
+ def info options = {}
131
+ self.class.get_info @name, @apikey, options
132
+ end
146
133
 
134
+ def destroy
135
+ http = Net::HTTP.new("api.keyhole.io")
136
+ req = Net::HTTP::Delete.new("/v1/entity?token=#{@token}&apikey=#{@apikey}&id=#{@name}")
137
+ Response.new http.request(req).body
138
+ end
147
139
 
148
- # Messaging Clients
149
- #
150
- # POST /entity/messaging/type
151
- # Adds a messaging client to an entity for messaging via Apple Push Notification, email.
152
- def add_msg_client(type, client_id)
153
- self.class.post_data_with_token("/entity/messaging/#{type}", { :id => client_id })
154
- end
140
+ def nullify_token
141
+ http = Net::HTTP.new("api.keyhole.io")
142
+ req = Net::HTTP::Put.new("/v1/entity")
143
+ req.set_form_data token: @token
155
144
 
156
- # GET /entity/messaging/type
157
- # Checks if a messaging client of type {type} exists for an entity.
158
- def check_msg_client(type, client_id)
159
- self.class.get_data_with_token("/entity/messaging/#{type}", { :id => client_id })
160
- end
145
+ Response.new http.request(req).body
146
+ end
161
147
 
162
- # DELETE /entity/messaging/type
163
- # Deletes a messaging client of type {type}.
164
- def delete_msg_client(type, client_id)
165
- self.class.delete_data_with_token("/entity/messaging/#{type}", { :id => client_id })
166
- end
148
+ def set_password new_pass
149
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/entity/password"), tokenparams(new: new_pass)
150
+ Response.new response.body
151
+ end
167
152
 
153
+ def change_password old_pass, new_pass
154
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/entity/password"), tokenparams(old: old_pass, new: new_pass)
155
+ Response.new response.body
156
+ end
168
157
 
169
- # Real-Time Streaming Channels
170
- #
171
- # POST /entity/channel
172
- # Creates a channel and returns a channel name.
173
- def create_channel
174
- self.class.post_data_with_token("/entity/channel")
175
- end
158
+ def delete key
159
+ http = Net::HTTP.new("api.keyhole.io")
160
+ req = Net::HTTP::Delete.new("/v1/datastore/#{key}?token=#{@token}")
161
+ Response.new http.request(req).body
162
+ end
176
163
 
177
- # GET /entity/channel
178
- # Return how many clients are connected to the channel.
179
- def total_clients_in_channel
180
- self.class.get_data_with_token("/entity/channel")
181
- end
164
+ ##
165
+ ## Channel Methods
166
+ ##
182
167
 
183
- # PUT /entity/channel
184
- # Generates a new channel name and returns it.
185
- def generate_new_channel_name
186
- self.class.put_data_with_token("/entity/channel")
187
- end
168
+ def channel
169
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/entity/channel"), tokenparams(nil)
170
+ r = Response.new response.body
171
+ if r.successful?
172
+ @channel_name = r.data["name"]
173
+ end
174
+ end
188
175
 
189
- # DELETE /entity/channel
190
- # Deletes the channel and stops sending messages to it.
191
- def delete_channel
192
- self.class.delete_data_with_token("/entity/channel")
193
- end
176
+ def channel_connected
177
+ response = Net::HTTP.get URI.parse("#{APIURL}/entity/channel?token=#{@token}")
178
+ Response.new response
179
+ end
194
180
 
181
+ def channel_rename
182
+ http = Net::HTTP.new("api.keyhole.io")
183
+ req = Net::HTTP::Put.new("/v1/entity/channel")
184
+ req.set_form_data token: @token
195
185
 
196
- # Generic Endpoints
197
- # POST
198
- def self.post_data_with_apikey(endpoint, options = nil)
199
- _hash = { "apikey" => @@apikey }
200
- _hash.merge!(options) unless options.nil?
201
- self.post_data(endpoint, _hash)
202
- end
186
+ r = Response.new http.request(req).body
187
+ if r.successful?
188
+ @channel_name = r.data["name"]
189
+ end
190
+ end
203
191
 
204
- def self.post_data_with_token(endpoint, options = nil)
205
- _hash = { "token" => @@token }
206
- _hash.merge!(options) unless options.nil? unless options.nil?
207
- self.post_data(endpoint, _hash)
208
- end
192
+ def channel_destroy
193
+ http = Net::HTTP.new("api.keyhole.io")
194
+ req = Net::HTTP::Delete.new("/v1/entity/channel?token=#{@token}")
195
+ r = Response.new http.request(req).body
196
+ if r.successful?
197
+ @channel_name = nil
198
+ end
199
+ r
200
+ end
209
201
 
210
- def self.post_data(endpoint, options = nil)
211
- req = Net::HTTP::Post.new("/#{$version}#{endpoint}")
212
- req.set_form_data(options) unless options.nil?
213
- resp = $http.request(req)
214
- JSON.parse(resp.body)
215
- end
216
202
 
217
- # GET
218
- def self.get_data_with_apikey(endpoint, options = nil)
219
- _hash = { "apikey" => @@apikey }
220
- _hash.merge!(options)
221
- self.get_data(endpoint, _hash)
222
- end
203
+ ##
204
+ ## Messaging Client Methods
205
+ ##
223
206
 
224
- def self.get_data_with_token(endpoint, options = nil)
225
- _hash = { "token" => @@token }
226
- _hash.merge!(options) unless options.nil?
227
- self.get_data(endpoint, _hash)
228
- end
207
+ def add_client id, type
208
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/entity/messaging/#{type}"), tokenparams(id: id)
209
+ Response.new response.body
210
+ end
229
211
 
230
- def self.get_data(endpoint, options = nil)
231
- req = nil
212
+ def add_email_client id
213
+ add_client id, "email"
214
+ end
232
215
 
233
- unless options.nil?
234
- req = Net::HTTP::Get.new("/#{$version}#{endpoint}?".concat(options.to_url_params))
235
- else
236
- req = Net::HTTP::Get.new("/#{$version}#{endpoint}")
216
+ def add_apns_client id
217
+ add_client id, "apns"
237
218
  end
238
219
 
239
- resp = $http.request(req)
240
- JSON.parse(resp.body)
241
- end
220
+ def check_client id, type
221
+ response = Net::HTTP.get URI.parse("#{APIURL}/entity/messaging/#{type}?token=#{@token}&id=#{id}")
222
+ r = Response.new response
223
+ if r.successful?
224
+ r.meta["status"] == 200
225
+ else
226
+ false
227
+ end
228
+ end
242
229
 
243
- # DELETE
244
- def self.delete_data_with_apikey(endpoint, options = nil)
245
- _hash = { "apikey" => @@apikey }
246
- _hash.merge!(options) unless options.nil?
247
- self.delete_data(endpoint, _hash)
248
- end
230
+ def email_client_exists? id
231
+ check_client id, "email"
232
+ end
249
233
 
250
- def self.delete_data_with_token(endpoint, options = nil)
251
- _hash = { "token" => @@token }
252
- _hash.merge!(options) unless options.nil? unless options.nil?
253
- self.delete_data(endpoint, _hash)
254
- end
234
+ def apns_client_exists? id
235
+ check_client id, "apns"
236
+ end
255
237
 
256
- def self.delete_data(endpoint, options = nil)
257
- req = nil
238
+ def delete_client id, type
239
+ http = Net::HTTP.new("api.keyhole.io")
240
+ req = Net::HTTP::Delete.new("/v1/entity/messaging/#{type}?token=#{@token}&id=#{id}")
241
+ r = Response.new http.request(req).body
242
+ end
258
243
 
259
- unless options.nil?
260
- req = Net::HTTP::Delete.new("/#{$version}#{endpoint}?".concat(options.to_url_params))
261
- else
262
- req = Net::HTTP::Delete.new("/#{$version}#{endpoint}")
244
+ def remove_email_client id
245
+ delete_client id, "email"
263
246
  end
264
247
 
265
- resp = $http.request(req)
266
- JSON.parse(resp.body)
267
- end
248
+ def remove_apns_client id
249
+ delete_client id, "apns"
250
+ end
268
251
 
269
- # PUT
270
- def self.put_data_with_apikey(endpoint, options = nil)
271
- _hash = { "apikey" => @@apikey }
272
- _hash.merge!(options) unless options.nil?
273
- self.put_data(endpoint, _hash)
274
- end
252
+ ##
253
+ ## Datastore Methods
254
+ ##
255
+
256
+ def set kvpair
257
+ tparams = {}
258
+ unless kvpair.empty?
259
+ tparams[:k] = kvpair.keys.first
260
+ if (kvpair.values.first.class == Array or kvpair.values.first.class == Hash)
261
+ tparams[:v] = kvpair.values.first.to_json
262
+ else
263
+ tparams[:v] = kvpair.values.first
264
+ end
265
+ end
266
+
267
+ if kvpair.size > 1
268
+ tparams[:meta] = kvpair.values.last.to_json
269
+ end
270
+
271
+ response = Net::HTTP.post_form URI.parse("#{APIURL}/datastore"), tokenparams(tparams)
272
+ Response.new response.body
273
+ end
275
274
 
276
- def self.put_data_with_token(endpoint, options = nil)
277
- _hash = { "token" => @@token }
278
- _hash.merge!(options) unless options.nil?
279
- self.put_data(endpoint, _hash)
280
- end
275
+ def datastores options = {}
276
+ response = Net::HTTP.get URI.parse("#{APIURL}/datastore?#{tokenparams_string(options)}")
277
+ Response.new response
278
+ end
281
279
 
282
- def self.put_data(endpoint, options = nil)
283
- req = nil
280
+ def get key
281
+ response = Net::HTTP.get URI.parse("#{APIURL}/datastore/#{key}?#{tokenparams_string(nil)}")
282
+ KVPair.new response
283
+ end
284
284
 
285
- unless options.nil?
286
- req = Net::HTTP::Put.new("/#{$version}#{endpoint}?".concat(options.to_url_params))
287
- else
288
- req = Net::HTTP::Put.new("/#{$version}#{endpoint}")
285
+ def remove key
286
+ http = Net::HTTP.new("api.keyhole.io")
287
+ req = Net::HTTP::Delete.new("/v1/datastore/#{key}?token=#{@token}")
288
+ r = Response.new http.request(req).body
289
+ end
290
+
291
+ ##
292
+ ## Class Methods
293
+ ##
294
+
295
+ def self.get_info name, apikey, options = {}
296
+ # options: password
297
+ response = Net::HTTP.get(URI.parse("#{APIURL}/entity?#{self.paramshash_string(name, apikey, options)}"))
298
+ Response.new response
299
+ end
300
+
301
+ #private
302
+
303
+ def tokenparams options = {}
304
+ params = { token: @token }
305
+ options.collect { |k,v| params[k] = v } unless options.nil?
306
+ params
289
307
  end
290
- req.set_form_data({})
291
- resp = $http.request(req)
292
- JSON.parse(resp.body)
293
- end
294
308
 
295
- end
309
+ def tokenparams_string options
310
+ tokenparams(options).collect { |k, v| "#{k}=#{v}" }.join("&")
311
+ end
312
+
313
+ def paramshash name, options = {}
314
+ self.class.paramshash name, @apikey, options
315
+ end
316
+
317
+ def self.paramshash name, apikey, options
318
+ params = {
319
+ apikey: apikey,
320
+ id: name
321
+ }
322
+ options.collect { |k,v| params[k] = v }
323
+
324
+ params
325
+ end
326
+
327
+ def paramshash_string name, options = {}
328
+ self.class.paramshash_string name, options, @apikey
329
+ end
296
330
 
297
- class Hash
298
- def to_url_params
299
- elements = []
300
- keys.size.times do |i|
301
- elements << "#{CGI::escape(keys[i].to_s)}=#{CGI::escape(values[i].to_s)}"
331
+ def self.paramshash_string name, apikey, options
332
+ self.paramshash(name, apikey, options).collect { |k, v| "#{k}=#{v}" }.join("&")
302
333
  end
303
- elements.join("&")
334
+
304
335
  end
336
+
305
337
  end
metadata CHANGED
@@ -1,71 +1,59 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: KeyholeIO
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.2'
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Kishyr Ramdial
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-06-29 00:00:00 Z
19
- dependencies: []
20
-
21
- description: Connect and utilise Keyhole.IO's key-value pair database using this simple library.
22
- email:
23
- - kishyr@immedia.co.za
12
+ date: 2011-10-15 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: json
16
+ requirement: &70094479862500 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70094479862500
25
+ description: Keyhole.IO, the database-as-a-service that's so iosome, is a real-time,
26
+ streaming, key-value pair, object-friendly datastore. For you and your apps. This
27
+ is its official Ruby gem.
28
+ email: kishyr@immedia.co.za
24
29
  executables: []
25
-
26
30
  extensions: []
27
-
28
31
  extra_rdoc_files: []
29
-
30
- files:
31
- - .gitignore
32
- - Gemfile
33
- - Rakefile
34
- - keyholeio.gemspec
32
+ files:
35
33
  - lib/keyholeio.rb
36
- - lib/keyholeio/version.rb
37
- homepage: http://keyhole.io/
38
- licenses: []
39
-
34
+ homepage: http://keyhole.io/developer
35
+ licenses:
36
+ - MIT
40
37
  post_install_message:
41
38
  rdoc_options: []
42
-
43
- require_paths:
39
+ require_paths:
44
40
  - lib
45
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
46
42
  none: false
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- hash: 3
51
- segments:
52
- - 0
53
- version: "0"
54
- required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: 1.9.0
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
48
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
63
53
  requirements: []
64
-
65
54
  rubyforge_project:
66
- rubygems_version: 1.8.5
55
+ rubygems_version: 1.8.6
67
56
  signing_key:
68
57
  specification_version: 3
69
- summary: Ruby library for Keyhole.IO's key-value pair database-as-a-service
58
+ summary: The Official Keyhole.IO Ruby Gem
70
59
  test_files: []
71
-
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- pkg/*
2
- *.gem
3
- .bundle
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in keyholeio.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
data/keyholeio.gemspec DELETED
@@ -1,21 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "keyholeio/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "KeyholeIO"
7
- s.version = Keyholeio::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Kishyr Ramdial"]
10
- s.email = ["kishyr@immedia.co.za"]
11
- s.homepage = "http://keyhole.io/"
12
- s.summary = %q{Ruby library for Keyhole.IO's key-value pair database-as-a-service}
13
- s.description = %q{Connect and utilise Keyhole.IO's key-value pair database using this simple library.}
14
-
15
- #s.rubyforge_project = "keyholeio"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ["lib"]
21
- end
@@ -1,3 +0,0 @@
1
- module Keyholeio
2
- VERSION = "0.1.1"
3
- end