ucengine 0.1.1 → 0.1.2
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.
- data/Rakefile +6 -10
- data/VERSION +1 -1
- data/lib/ucengine.rb +80 -13
- data/spec/spec_helper.rb +11 -0
- data/spec/ucengine_mock.rb +93 -0
- data/spec/ucengine_spec.rb +90 -0
- data/ucengine.gemspec +87 -0
- data/ucengine.rb.gemspec +57 -0
- metadata +37 -16
- data/test/helper.rb +0 -10
- data/test/test_ucengine.rb +0 -7
data/Rakefile
CHANGED
@@ -10,8 +10,9 @@ begin
|
|
10
10
|
gem.email = "victor.goya@af83.com"
|
11
11
|
gem.homepage = "http://github.com/AF83/ucengine.rb"
|
12
12
|
gem.authors = ["AF83"]
|
13
|
-
gem.
|
14
|
-
gem.add_dependency "
|
13
|
+
gem.add_dependency "json", "~>1.4"
|
14
|
+
gem.add_dependency "rest-client", "~>1.6"
|
15
|
+
gem.add_dependency "daemons", "~>1.1.0"
|
15
16
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
17
|
end
|
17
18
|
Jeweler::GemcutterTasks.new
|
@@ -19,13 +20,6 @@ rescue LoadError
|
|
19
20
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
21
|
end
|
21
22
|
|
22
|
-
require 'rake/testtask'
|
23
|
-
Rake::TestTask.new(:test) do |test|
|
24
|
-
test.libs << 'lib' << 'test'
|
25
|
-
test.pattern = 'test/**/test_*.rb'
|
26
|
-
test.verbose = true
|
27
|
-
end
|
28
|
-
|
29
23
|
begin
|
30
24
|
require 'rcov/rcovtask'
|
31
25
|
Rcov::RcovTask.new do |test|
|
@@ -39,7 +33,9 @@ rescue LoadError
|
|
39
33
|
end
|
40
34
|
end
|
41
35
|
|
42
|
-
task :test => :check_dependencies
|
36
|
+
task :test => :check_dependencies do
|
37
|
+
sh "rspec spec"
|
38
|
+
end
|
43
39
|
|
44
40
|
task :default => :test
|
45
41
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/ucengine.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'yaml'
|
2
3
|
|
3
|
-
require '
|
4
|
-
|
4
|
+
require 'rest-client'
|
5
|
+
|
6
|
+
require 'daemons'
|
5
7
|
|
6
8
|
# ucengine.rb implements the UCEngine API, it can currently handle
|
7
9
|
# publish/subscribe to any event stream.
|
@@ -36,6 +38,33 @@ class UCEngine
|
|
36
38
|
# Don't print anything (default).
|
37
39
|
QUIET = 4
|
38
40
|
|
41
|
+
API_ROOT = "/api"
|
42
|
+
|
43
|
+
API_VERSION = "0.1"
|
44
|
+
|
45
|
+
attr_reader :sid, :uid
|
46
|
+
|
47
|
+
# Load configuration file (default: config.yaml). The returned configuration
|
48
|
+
# is a Hash, as returned by YAML.load_file().
|
49
|
+
def UCEngine.load_config(path = "config.yaml")
|
50
|
+
YAML.load_file(path)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Run the ucengine server with all the options from the 'daemons' gem. This
|
54
|
+
# function is not mandatory and it is possible to run a UCEngine client without
|
55
|
+
# having to run it in background.
|
56
|
+
# The 'name' parameter is the name you want to give to your brick.
|
57
|
+
#
|
58
|
+
# UCEngine.run('test') do
|
59
|
+
# UCEngine.new(...)
|
60
|
+
# ...
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
#
|
64
|
+
def UCEngine.run(name, &proc)
|
65
|
+
Daemons.run_proc(name, &proc)
|
66
|
+
end
|
67
|
+
|
39
68
|
# Create a new UCEngine object. 'host' is the hostname of the UCEngine server
|
40
69
|
# and 'port' is to TCP port to connect to. Note that this method doesn't create
|
41
70
|
# a new connection, see the #connect method.
|
@@ -65,7 +94,11 @@ class UCEngine
|
|
65
94
|
debug(UCEngine::DEBUG, "Authentification complete for #{@uid}/#{@sid}.")
|
66
95
|
yield self
|
67
96
|
@threads.each do |thread|
|
68
|
-
|
97
|
+
begin
|
98
|
+
thread.join
|
99
|
+
rescue => error
|
100
|
+
debug(UCEngine::WARNING, "Thread aborted: #{error}")
|
101
|
+
end
|
69
102
|
end
|
70
103
|
end
|
71
104
|
|
@@ -94,14 +127,17 @@ class UCEngine
|
|
94
127
|
while true
|
95
128
|
begin
|
96
129
|
events = get("/event/#{location.join("/")}", params, http)['result']
|
97
|
-
rescue
|
130
|
+
rescue RestClient::RequestTimeout
|
98
131
|
debug(UCEngine::WARNING, "Subscribe timeout ... retry")
|
99
132
|
retry
|
100
133
|
rescue EOFError
|
101
134
|
debug(UCEngine::WARNING, "Subscribe closed ... retry")
|
102
|
-
sleep
|
135
|
+
sleep 1
|
103
136
|
retry
|
104
137
|
end
|
138
|
+
|
139
|
+
next if events == []
|
140
|
+
|
105
141
|
events.each do |event|
|
106
142
|
yield event
|
107
143
|
end
|
@@ -146,13 +182,42 @@ class UCEngine
|
|
146
182
|
return time
|
147
183
|
end
|
148
184
|
|
149
|
-
|
185
|
+
# Download a file from UCEngine. The 'location' parameter is the couple [organisation, meeting]
|
186
|
+
# where the file sits. The 'id' parameters is the file idenfication number
|
187
|
+
#
|
188
|
+
# uce.download(["af83", "demo_meeting"], "file_43243243253253.pdf")
|
189
|
+
#
|
190
|
+
def download(location, id)
|
191
|
+
Net::HTTP.start(@host, @port) do |http|
|
192
|
+
params = Hash.new
|
193
|
+
params[:uid] = @uid if @uid
|
194
|
+
params[:sid] = @sid if @sid
|
195
|
+
url = "http://#{@host}:#{@port}#{API_ROOT}/#{API_VERSION}/file/#{location.join('/')}/#{id}"
|
150
196
|
|
151
|
-
|
152
|
-
|
153
|
-
|
197
|
+
debug(UCEngine::DEBUG, "Download: #{url}")
|
198
|
+
result = RestClient.get(url, {:params => params})
|
199
|
+
debug(UCEngine::DEBUG, "Download complete")
|
200
|
+
return result
|
201
|
+
end
|
154
202
|
end
|
155
203
|
|
204
|
+
# Upload a file to UCEngine. The 'location' parameter is the couple [organisation, meeting] where
|
205
|
+
# you want the file to be uploaded. The 'file' parameter is a File object.
|
206
|
+
# This function returns a JSON structure {'result': file_id} where 'file_id' is the identification
|
207
|
+
# number of the file.
|
208
|
+
#
|
209
|
+
# uce.upload(["af83", "demo_meeting"], File.new("/path/file_to_upload.pdf"))
|
210
|
+
#
|
211
|
+
def upload(location, file)
|
212
|
+
url = "http://#{@host}:#{@port}#{API_ROOT}/#{API_VERSION}/file/#{location.join('/')}?uid=#{@uid}&sid=#{@sid}"
|
213
|
+
debug(UCEngine::DEBUG, "Upload: #{file.path} to #{url}")
|
214
|
+
result = JSON.parse(RestClient.post(url, {:upload => file}))
|
215
|
+
debug(UCEngine::DEBUG, "Upload complete")
|
216
|
+
return result
|
217
|
+
end
|
218
|
+
|
219
|
+
protected
|
220
|
+
|
156
221
|
# Print debug messages
|
157
222
|
def debug(level, message)
|
158
223
|
$stderr.write("#{message}\n\n") if level >= @debug
|
@@ -162,8 +227,9 @@ class UCEngine
|
|
162
227
|
def get(path, params, http = @http)
|
163
228
|
params[:uid] = @uid if @uid
|
164
229
|
params[:sid] = @sid if @sid
|
165
|
-
|
166
|
-
|
230
|
+
url = "http://#{@host}:#{@port}#{API_ROOT}/#{API_VERSION}#{path}"
|
231
|
+
debug(UCEngine::DEBUG, "Request: GET #{url}")
|
232
|
+
result = JSON.parse(RestClient.get(url, {:params => params}))
|
167
233
|
debug(UCEngine::DEBUG, "Result: #{result}")
|
168
234
|
return result
|
169
235
|
end
|
@@ -172,8 +238,9 @@ class UCEngine
|
|
172
238
|
def post(path, params, http = @http)
|
173
239
|
params[:uid] = @uid if @uid
|
174
240
|
params[:sid] = @sid if @sid
|
175
|
-
|
176
|
-
|
241
|
+
url = "http://#{@host}:#{@port}#{API_ROOT}/#{API_VERSION}#{path}"
|
242
|
+
debug(UCEngine::DEBUG, "Request: POST #{url}")
|
243
|
+
result = JSON.parse(RestClient.post(url, params, :accept => :json))
|
177
244
|
debug(UCEngine::DEBUG, "Result: #{result}")
|
178
245
|
return result
|
179
246
|
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'ucengine'
|
2
|
+
|
3
|
+
UCE_HOST = "localhost"
|
4
|
+
UCE_PORT = 5281
|
5
|
+
UCE_ORG = "test_org"
|
6
|
+
UCE_MEETING = "test_meeting"
|
7
|
+
UCE_URL = "http://#{UCE_HOST}#{UCEngine::API_ROOT}/#{UCEngine::API_VERSION}"
|
8
|
+
USER = "test_user@#{UCE_HOST}"
|
9
|
+
PASSWORD = "test_password"
|
10
|
+
FILE_CONTENT="test_content"
|
11
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'sinatra'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
require 'spec_helper'
|
5
|
+
|
6
|
+
class UCEngineMock < Sinatra::Base
|
7
|
+
use Rack::MethodOverride
|
8
|
+
|
9
|
+
VERSION = '0.1'
|
10
|
+
|
11
|
+
put "/api/#{VERSION}/presence/:uid" do
|
12
|
+
if params[:uid] == USER
|
13
|
+
status 200
|
14
|
+
{:result => "test_sid"}.to_json
|
15
|
+
else
|
16
|
+
status 401
|
17
|
+
{:error => "unauthorized"}.to_json
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
get "/api/#{VERSION}/time" do
|
22
|
+
status 200
|
23
|
+
{:result => 1234}.to_json
|
24
|
+
end
|
25
|
+
|
26
|
+
put "/api/#{VERSION}/event/:org/:meeting" do
|
27
|
+
if params[:org] == UCE_ORG && params[:meeting] == UCE_MEETING
|
28
|
+
if params[:type] == "test_type" &&
|
29
|
+
params[:parent] == "test_parent" &&
|
30
|
+
params[:metadata]["a"] == "b" &&
|
31
|
+
params[:metadata]["c"] == "d"
|
32
|
+
status 200
|
33
|
+
{:result => "test_event_id"}.to_json
|
34
|
+
else
|
35
|
+
status 400
|
36
|
+
{:error => "missing_parameters"}.to_json
|
37
|
+
end
|
38
|
+
else
|
39
|
+
status 404
|
40
|
+
{:error => "not_found"}.to_json
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
get "/api/#{VERSION}/event/:org/:meeting" do
|
45
|
+
if params[:org] == UCE_ORG && params[:meeting] == UCE_MEETING
|
46
|
+
if params[:type] == "test.event"
|
47
|
+
status 200
|
48
|
+
{:result => [{:id => "12345",
|
49
|
+
:type => "test.event",
|
50
|
+
:datetime => 1234,
|
51
|
+
:org => UCE_ORG,
|
52
|
+
:meeting => UCE_MEETING,
|
53
|
+
:metadata => {},
|
54
|
+
:from => "frank"
|
55
|
+
}]}.to_json
|
56
|
+
else
|
57
|
+
status 400
|
58
|
+
{:error => "missing_parameters"}.to_json
|
59
|
+
end
|
60
|
+
else
|
61
|
+
status 404
|
62
|
+
{:error => "not_found"}.to_json
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Download
|
67
|
+
get "/api/#{VERSION}/file/:org/:meeting/:id" do
|
68
|
+
if params[:org] == UCE_ORG && params[:meeting] == UCE_MEETING && params[:id] == "test_file"
|
69
|
+
status 200
|
70
|
+
FILE_CONTENT
|
71
|
+
else
|
72
|
+
status 404
|
73
|
+
{:error => "not_found"}.to_json
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Upload
|
78
|
+
post "/api/#{VERSION}/file/:org/:meeting" do
|
79
|
+
if params[:org] == UCE_ORG && params[:meeting] == UCE_MEETING
|
80
|
+
if params[:upload][:tempfile].read == FILE_CONTENT
|
81
|
+
status 200
|
82
|
+
{:result => "test_upload"}.to_json
|
83
|
+
else
|
84
|
+
status 500
|
85
|
+
{:error => "bad_file_content"}.to_json
|
86
|
+
end
|
87
|
+
else
|
88
|
+
status 404
|
89
|
+
{:error => "not_found"}.to_json
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ucengine_mock'
|
3
|
+
|
4
|
+
describe UCEngine do
|
5
|
+
|
6
|
+
before(:all) do
|
7
|
+
Thread.new do
|
8
|
+
UCEngineMock.run! :host => UCE_HOST, :port => UCE_PORT
|
9
|
+
end
|
10
|
+
sleep 5
|
11
|
+
end
|
12
|
+
|
13
|
+
after do
|
14
|
+
end
|
15
|
+
|
16
|
+
it "connects to the UCEngine server" do
|
17
|
+
uce = UCEngine.new(UCE_HOST, UCE_PORT)
|
18
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
19
|
+
uce.sid.should eql("test_sid")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it "fails to connect to the UCEngine server" do
|
24
|
+
begin
|
25
|
+
did_connect = false
|
26
|
+
uce = UCEngine.new("localhost", 65000)
|
27
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
28
|
+
did_connect = true
|
29
|
+
break
|
30
|
+
end
|
31
|
+
rescue
|
32
|
+
ensure
|
33
|
+
did_connect.should eql(false)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
it "returns the current datetime of the server" do
|
38
|
+
uce = UCEngine.new(UCE_HOST, UCE_PORT)
|
39
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
40
|
+
uce.time.should eql(1234)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
it "publishes an event" do
|
45
|
+
uce = UCEngine.new(UCE_HOST, UCE_PORT)
|
46
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
47
|
+
result = uce.publish(:location => [UCE_ORG, UCE_MEETING],
|
48
|
+
:type => "test_type",
|
49
|
+
:parent => "test_parent",
|
50
|
+
:metadata => {"a" => "b", "c" => "d"})
|
51
|
+
result['result'].should eql("test_event_id")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
it "subscribes to all events" do
|
56
|
+
uce = UCEngine.new(UCE_HOST, UCE_PORT)
|
57
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
58
|
+
uce.subscribe([UCE_ORG, UCE_MEETING], :type => "test.event") do |event|
|
59
|
+
event['id'].should eql("12345")
|
60
|
+
event['type'].should eql("test.event")
|
61
|
+
event['datetime'].should eql(1234)
|
62
|
+
event['org'].should eql(UCE_ORG)
|
63
|
+
event['meeting'].should eql(UCE_MEETING)
|
64
|
+
event['metadata'].should eql({})
|
65
|
+
event['from'].should eql("frank")
|
66
|
+
break
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
it "downloads a file" do
|
72
|
+
uce = UCEngine.new(UCE_HOST, UCE_PORT)
|
73
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
74
|
+
result = uce.download([UCE_ORG, UCE_MEETING], "test_file")
|
75
|
+
result.should eql(FILE_CONTENT)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
it "uploads a file" do
|
80
|
+
uce = UCEngine.new(UCE_HOST, UCE_PORT)
|
81
|
+
uce.connect(USER, :credential => PASSWORD) do |uce|
|
82
|
+
file = Tempfile.open("test_file")
|
83
|
+
file.write(FILE_CONTENT)
|
84
|
+
result = uce.upload([UCE_ORG, UCE_MEETING], file.open)
|
85
|
+
result['result'].should eql("test_upload")
|
86
|
+
break
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
data/ucengine.gemspec
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ucengine}
|
8
|
+
s.version = "0.1.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["AF83"]
|
12
|
+
s.date = %q{2010-12-01}
|
13
|
+
s.description = %q{ucengine.rb is a Ruby library to consume the UCEngine API}
|
14
|
+
s.email = %q{victor.goya@af83.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"doc/UCEngine.html",
|
27
|
+
"doc/UCEngine/Debug.html",
|
28
|
+
"doc/created.rid",
|
29
|
+
"doc/images/brick.png",
|
30
|
+
"doc/images/brick_link.png",
|
31
|
+
"doc/images/bug.png",
|
32
|
+
"doc/images/bullet_black.png",
|
33
|
+
"doc/images/bullet_toggle_minus.png",
|
34
|
+
"doc/images/bullet_toggle_plus.png",
|
35
|
+
"doc/images/date.png",
|
36
|
+
"doc/images/find.png",
|
37
|
+
"doc/images/loadingAnimation.gif",
|
38
|
+
"doc/images/macFFBgHack.png",
|
39
|
+
"doc/images/package.png",
|
40
|
+
"doc/images/page_green.png",
|
41
|
+
"doc/images/page_white_text.png",
|
42
|
+
"doc/images/page_white_width.png",
|
43
|
+
"doc/images/plugin.png",
|
44
|
+
"doc/images/ruby.png",
|
45
|
+
"doc/images/tag_green.png",
|
46
|
+
"doc/images/wrench.png",
|
47
|
+
"doc/images/wrench_orange.png",
|
48
|
+
"doc/images/zoom.png",
|
49
|
+
"doc/index.html",
|
50
|
+
"doc/js/darkfish.js",
|
51
|
+
"doc/js/jquery.js",
|
52
|
+
"doc/js/quicksearch.js",
|
53
|
+
"doc/js/thickbox-compressed.js",
|
54
|
+
"doc/lib/ucengine_rb.html",
|
55
|
+
"doc/rdoc.css",
|
56
|
+
"lib/ucengine.rb",
|
57
|
+
"test/helper.rb",
|
58
|
+
"test/test_ucengine.rb",
|
59
|
+
"ucengine.rb.gemspec"
|
60
|
+
]
|
61
|
+
s.homepage = %q{http://github.com/AF83/ucengine.rb}
|
62
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
63
|
+
s.require_paths = ["lib"]
|
64
|
+
s.rubygems_version = %q{1.3.7}
|
65
|
+
s.summary = %q{Ruby library for UCEngine}
|
66
|
+
s.test_files = [
|
67
|
+
"test/helper.rb",
|
68
|
+
"test/test_ucengine.rb"
|
69
|
+
]
|
70
|
+
|
71
|
+
if s.respond_to? :specification_version then
|
72
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
73
|
+
s.specification_version = 3
|
74
|
+
|
75
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
76
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
77
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
78
|
+
else
|
79
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
80
|
+
s.add_dependency(%q<json>, [">= 0"])
|
81
|
+
end
|
82
|
+
else
|
83
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
84
|
+
s.add_dependency(%q<json>, [">= 0"])
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
data/ucengine.rb.gemspec
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ucengine.rb}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["AF83"]
|
12
|
+
s.date = %q{2010-11-23}
|
13
|
+
s.description = %q{ucengine.rb is a Ruby library to consume the UCEngine API}
|
14
|
+
s.email = %q{victor.goya@af83.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/ucengine.rb",
|
27
|
+
"test/helper.rb",
|
28
|
+
"test/test_ucengine.rb.rb",
|
29
|
+
"ucengine.rb.gemspec"
|
30
|
+
]
|
31
|
+
s.homepage = %q{http://github.com/AF83/ucengine.rb}
|
32
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
33
|
+
s.require_paths = ["lib"]
|
34
|
+
s.rubygems_version = %q{1.3.7}
|
35
|
+
s.summary = %q{Ruby library for UCEngine}
|
36
|
+
s.test_files = [
|
37
|
+
"test/helper.rb",
|
38
|
+
"test/test_ucengine.rb.rb"
|
39
|
+
]
|
40
|
+
|
41
|
+
if s.respond_to? :specification_version then
|
42
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
43
|
+
s.specification_version = 3
|
44
|
+
|
45
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
47
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
48
|
+
else
|
49
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
50
|
+
s.add_dependency(%q<json>, [">= 0"])
|
51
|
+
end
|
52
|
+
else
|
53
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
54
|
+
s.add_dependency(%q<json>, [">= 0"])
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- AF83
|
@@ -14,35 +14,52 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-31 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
21
|
+
name: json
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
segments:
|
29
|
-
-
|
30
|
-
|
31
|
-
|
29
|
+
- 1
|
30
|
+
- 4
|
31
|
+
version: "1.4"
|
32
|
+
type: :runtime
|
32
33
|
version_requirements: *id001
|
33
34
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
35
|
+
name: rest-client
|
35
36
|
prerelease: false
|
36
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
38
|
none: false
|
38
39
|
requirements:
|
39
|
-
- -
|
40
|
+
- - ~>
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
segments:
|
42
|
-
-
|
43
|
-
|
43
|
+
- 1
|
44
|
+
- 6
|
45
|
+
version: "1.6"
|
44
46
|
type: :runtime
|
45
47
|
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: daemons
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 1
|
58
|
+
- 1
|
59
|
+
- 0
|
60
|
+
version: 1.1.0
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id003
|
46
63
|
description: ucengine.rb is a Ruby library to consume the UCEngine API
|
47
64
|
email: victor.goya@af83.com
|
48
65
|
executables: []
|
@@ -89,8 +106,11 @@ files:
|
|
89
106
|
- doc/lib/ucengine_rb.html
|
90
107
|
- doc/rdoc.css
|
91
108
|
- lib/ucengine.rb
|
92
|
-
-
|
93
|
-
-
|
109
|
+
- spec/spec_helper.rb
|
110
|
+
- spec/ucengine_mock.rb
|
111
|
+
- spec/ucengine_spec.rb
|
112
|
+
- ucengine.gemspec
|
113
|
+
- ucengine.rb.gemspec
|
94
114
|
has_rdoc: true
|
95
115
|
homepage: http://github.com/AF83/ucengine.rb
|
96
116
|
licenses: []
|
@@ -124,5 +144,6 @@ signing_key:
|
|
124
144
|
specification_version: 3
|
125
145
|
summary: Ruby library for UCEngine
|
126
146
|
test_files:
|
127
|
-
-
|
128
|
-
-
|
147
|
+
- spec/spec_helper.rb
|
148
|
+
- spec/ucengine_mock.rb
|
149
|
+
- spec/ucengine_spec.rb
|
data/test/helper.rb
DELETED