productwars-api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/productwars/client.rb +1 -2
- data/lib/productwars.rb +6 -0
- data/productwars-api.gemspec +1 -1
- data/spec/product_wars_spec.rb +0 -2
- data/spec/spec_helper.rb +3 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/productwars/client.rb
CHANGED
@@ -11,12 +11,11 @@ module ProductWars
|
|
11
11
|
include HTTParty
|
12
12
|
|
13
13
|
### HTTParty Config ###
|
14
|
-
#@base_uri = 'www.productwars.com/api/v1'
|
15
|
-
base_uri 'productwars.com/api/v1'
|
16
14
|
format :json
|
17
15
|
#######################
|
18
16
|
|
19
17
|
def self.dispatch(method, *args, &block)
|
18
|
+
base_uri "#{ProductWars.domain}/api/v1"
|
20
19
|
response = self.send(method, *args, &block)
|
21
20
|
self.handle(response)
|
22
21
|
end
|
data/lib/productwars.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require 'productwars/client'
|
2
2
|
|
3
3
|
module ProductWars
|
4
|
+
extend self
|
5
|
+
|
6
|
+
attr_accessor :domain
|
7
|
+
|
8
|
+
self.domain = 'productwars.com'
|
9
|
+
|
4
10
|
def self.method_missing(method, *args, &block)
|
5
11
|
return super unless Client.respond_to?(method)
|
6
12
|
Client.dispatch(method, *args, &block)
|
data/productwars-api.gemspec
CHANGED
data/spec/product_wars_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: productwars-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Spencer Rogers
|