thumblemonks-evoke_client 0.1.1 → 0.1.3
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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Gem::Specification.new do |s|
|
|
2
|
+
s.name = "evoke_client"
|
|
3
|
+
s.version = "0.1.3"
|
|
4
|
+
s.date = "2009-06-06"
|
|
5
|
+
s.summary = "Rest client interface for talking REST to the evoke service"
|
|
6
|
+
s.email = %w[gus@gusg.us]
|
|
7
|
+
s.homepage = "http://github.com/thumblemonks/evoke_client"
|
|
8
|
+
s.description = "Rest client interface for talking REST to the evoke service"
|
|
9
|
+
s.authors = %w[Justin\ Knowlden]
|
|
10
|
+
s.post_install_message = %q{Choosy architectonics choose Thumble Monks.}
|
|
11
|
+
|
|
12
|
+
s.has_rdoc = false
|
|
13
|
+
s.rdoc_options = ["--main", "README.markdown"]
|
|
14
|
+
s.extra_rdoc_files = ["README.markdown"]
|
|
15
|
+
|
|
16
|
+
s.add_dependency("rest-client", [">= 0.9.2"])
|
|
17
|
+
|
|
18
|
+
# run git ls-files to get an updated list
|
|
19
|
+
s.files = %w[
|
|
20
|
+
MIT-LICENSE
|
|
21
|
+
README.markdown
|
|
22
|
+
Rakefile
|
|
23
|
+
evoke_client.gemspec
|
|
24
|
+
lib/evoke_client.rb
|
|
25
|
+
lib/query_string.rb
|
|
26
|
+
shoulda_macros/rest_client.rb
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
s.test_files = %w[
|
|
30
|
+
test/evoke_client_test.rb
|
|
31
|
+
test/test_helper.rb
|
|
32
|
+
]
|
|
33
|
+
end
|
data/lib/evoke_client.rb
CHANGED
|
@@ -4,6 +4,8 @@ require 'query_string'
|
|
|
4
4
|
class Evoke
|
|
5
5
|
class ConnectionRefused < Exception; end
|
|
6
6
|
|
|
7
|
+
# Configuration
|
|
8
|
+
|
|
7
9
|
def self.host; @host || 'evoke.thumblemonks.com'; end
|
|
8
10
|
def self.host=(host) @host = host; end
|
|
9
11
|
|
|
@@ -14,6 +16,8 @@ class Evoke
|
|
|
14
16
|
[host, port].compact.join(':')
|
|
15
17
|
end
|
|
16
18
|
|
|
19
|
+
# Logic
|
|
20
|
+
|
|
17
21
|
def self.create_or_update!(*args)
|
|
18
22
|
Evoke.new(*args).save
|
|
19
23
|
end
|
|
File without changes
|
data/test/evoke_client_test.rb
CHANGED
|
@@ -64,9 +64,15 @@ class EvokeTest < Test::Unit::TestCase
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
context "host and port:" do
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
context "when unchanged" do
|
|
68
|
+
setup do
|
|
69
|
+
Evoke.host = nil
|
|
70
|
+
Evoke.port = nil
|
|
71
|
+
end
|
|
72
|
+
should("return default host") { assert_equal 'evoke.thumblemonks.com', Evoke.host }
|
|
73
|
+
should("return default port") { assert_nil Evoke.port }
|
|
74
|
+
should("return default host and port") { assert_equal 'evoke.thumblemonks.com', Evoke.host_and_port }
|
|
75
|
+
end
|
|
70
76
|
|
|
71
77
|
context "when changed" do
|
|
72
78
|
setup do
|
data/test/test_helper.rb
CHANGED
|
@@ -3,6 +3,9 @@ require 'shoulda'
|
|
|
3
3
|
require 'mocha'
|
|
4
4
|
require 'redgreen'
|
|
5
5
|
|
|
6
|
-
Shoulda.autoload_macros(File.join(File.dirname(__FILE__), '..'))
|
|
6
|
+
Shoulda.autoload_macros(File.join(File.dirname(__FILE__), '..'), ['.'])
|
|
7
7
|
|
|
8
|
-
require 'evoke_client'
|
|
8
|
+
require 'evoke_client'
|
|
9
|
+
|
|
10
|
+
Evoke.host = 'localhost'
|
|
11
|
+
Evoke.port = 4567
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thumblemonks-evoke_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Knowlden
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-06-06 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -35,8 +35,10 @@ files:
|
|
|
35
35
|
- MIT-LICENSE
|
|
36
36
|
- README.markdown
|
|
37
37
|
- Rakefile
|
|
38
|
+
- evoke_client.gemspec
|
|
38
39
|
- lib/evoke_client.rb
|
|
39
40
|
- lib/query_string.rb
|
|
41
|
+
- shoulda_macros/rest_client.rb
|
|
40
42
|
has_rdoc: false
|
|
41
43
|
homepage: http://github.com/thumblemonks/evoke_client
|
|
42
44
|
post_install_message: Choosy architectonics choose Thumble Monks.
|
|
@@ -66,5 +68,4 @@ specification_version: 2
|
|
|
66
68
|
summary: Rest client interface for talking REST to the evoke service
|
|
67
69
|
test_files:
|
|
68
70
|
- test/evoke_client_test.rb
|
|
69
|
-
- test/shoulda_macros/rest_client.rb
|
|
70
71
|
- test/test_helper.rb
|