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 CHANGED
@@ -3,3 +3,5 @@ pkg/*
3
3
  .bundle
4
4
  nbproject
5
5
  .DS_Store
6
+ *.swp
7
+ Gemfile.lock
data/Rakefile CHANGED
@@ -2,3 +2,10 @@
2
2
 
3
3
  require 'bundler'
4
4
  Bundler::GemHelper.install_tasks
5
+
6
+ require 'rspec/core/rake_task'
7
+
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.rspec_opts = "--color"
10
+ end
11
+ task :default => :spec
@@ -18,4 +18,4 @@ test:
18
18
  scheme: http
19
19
  host: localhost
20
20
  port: 3000
21
- version: 1
21
+ version: 1
@@ -2,10 +2,7 @@
2
2
  Copyright (c) 2011 Solano Labs All Rights Reserved
3
3
  =end
4
4
 
5
- require 'httparty'
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
@@ -2,6 +2,6 @@
2
2
  Copyright (c) 2011 Solano Labs All Rights Reserved
3
3
  =end
4
4
 
5
- module TddiumClient
6
- VERSION = "0.0.1"
5
+ module TddiumClientVersion
6
+ VERSION = "0.0.2"
7
7
  end
@@ -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))
@@ -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 = TddiumClient::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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
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-15 00:00:00 -07:00
18
+ date: 2011-03-16 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency