tddium_client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Rakefile +7 -0
- data/config/environment.yml +1 -1
- data/lib/tddium_client/tddium_spec_helpers.rb +10 -6
- data/lib/tddium_client/version.rb +2 -2
- data/spec/tddium_client_spec.rb +0 -4
- data/tddium_client.gemspec +1 -1
- metadata +4 -4
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/config/environment.yml
CHANGED
@@ -2,10 +2,7 @@
|
|
2
2
|
Copyright (c) 2011 Solano Labs All Rights Reserved
|
3
3
|
=end
|
4
4
|
|
5
|
-
require '
|
6
|
-
require 'fakeweb'
|
7
|
-
|
8
|
-
FakeWeb.allow_net_connect = false
|
5
|
+
require 'fakefs'
|
9
6
|
|
10
7
|
module TddiumSpecHelpers
|
11
8
|
|
@@ -45,13 +42,20 @@ module TddiumSpecHelpers
|
|
45
42
|
URI.join(uri.to_s, "#{tddium_client_config["api"]["version"]}/#{path}").to_s
|
46
43
|
end
|
47
44
|
|
45
|
+
def config_path
|
46
|
+
File.join(File.dirname(__FILE__), "..", "..", "config", "environment.yml")
|
47
|
+
end
|
48
|
+
|
48
49
|
def tddium_client_config(raw = false, environment = "test")
|
49
50
|
unless @tddium_config
|
50
51
|
FakeFS.deactivate!
|
51
|
-
|
52
|
-
@tddium_config = File.read(File.join(File.dirname(__FILE__), "..", "..", "config", "environment.yml"))
|
52
|
+
@tddium_config = File.read(config_path)
|
53
53
|
FakeFS.activate!
|
54
54
|
end
|
55
55
|
raw ? @tddium_config : YAML.load(@tddium_config)[environment]
|
56
56
|
end
|
57
|
+
|
58
|
+
def stub_tddium_client_config
|
59
|
+
create_file(config_path, tddium_client_config(true))
|
60
|
+
end
|
57
61
|
end
|
data/spec/tddium_client_spec.rb
CHANGED
@@ -13,10 +13,6 @@ describe TddiumClient do
|
|
13
13
|
EXAMPLE_PARAMS = {"key" => "value"}
|
14
14
|
EXAMPLE_API_KEY = "afb12412bdafe124124asfasfabebafeabwbawf1312342erbfasbb"
|
15
15
|
|
16
|
-
def stub_tddium_client_config
|
17
|
-
create_file(File.join("config", "environment.yml"), tddium_client_config(true))
|
18
|
-
end
|
19
|
-
|
20
16
|
def stub_http_response(method, path, options = {})
|
21
17
|
uri = api_uri(path)
|
22
18
|
FakeWeb.register_uri(method, uri, register_uri_options(options))
|
data/tddium_client.gemspec
CHANGED
@@ -8,7 +8,7 @@ require "tddium_client/version"
|
|
8
8
|
|
9
9
|
Gem::Specification.new do |s|
|
10
10
|
s.name = "tddium_client"
|
11
|
-
s.version =
|
11
|
+
s.version = TddiumClientVersion::VERSION
|
12
12
|
s.platform = Gem::Platform::RUBY
|
13
13
|
s.authors = ["Jay Moorthi"]
|
14
14
|
s.email = ["info@tddium.com"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tddium_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jay Moorthi
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-16 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|