nationbuilder-rb 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/README.md +2 -0
- data/VERSION +1 -1
- data/lib/nationbuilder/client.rb +5 -1
- data/lib/nationbuilder/endpoint.rb +5 -1
- data/nationbuilder-rb.gemspec +7 -5
- data/spec/nationbuilder_client_spec.rb +2 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74725e766258bbda70bc52329f7b9cadb7283cdb
|
4
|
+
data.tar.gz: 87eceb294433899c5c3c47408401c18f4a0737f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50e4516b6eb50f2d044ce80a4779a20b07f788f00eb762712d471725fcfa13e781a55e71441d8aeeea3c613c0e356a1e43c7d3fb203b75b3dcfe34388067764d
|
7
|
+
data.tar.gz: 4d4647dadcc464a77dc807ac4c7321224dd76a692ffe7d7bcdca4dc30dc9ef323cd2a0a77ac936e668ecf2d41ba10d0d37d21896db25c17363730e5fd5bef1e6
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.0.0
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/nationbuilder/client.rb
CHANGED
@@ -14,8 +14,12 @@ class NationBuilder::Client
|
|
14
14
|
.parse(File.join(File.dirname(__FILE__), 'api_spec.json'))
|
15
15
|
end
|
16
16
|
|
17
|
+
class InvalidEndpoint < ArgumentError; end
|
18
|
+
|
17
19
|
def [](endpoint)
|
18
|
-
@name_to_endpoint[endpoint]
|
20
|
+
e = @name_to_endpoint[endpoint]
|
21
|
+
raise InvalidEndpoint.new(endpoint) if e.nil?
|
22
|
+
e
|
19
23
|
end
|
20
24
|
|
21
25
|
def endpoints
|
@@ -17,8 +17,12 @@ class NationBuilder::Endpoint
|
|
17
17
|
@methods ||= @name_to_method.keys
|
18
18
|
end
|
19
19
|
|
20
|
+
class InvalidMethod < ArgumentError; end
|
21
|
+
|
20
22
|
def [](method_name)
|
21
|
-
@name_to_method[method_name]
|
23
|
+
m = @name_to_method[method_name]
|
24
|
+
raise InvalidMethod.new(method_name) if m.nil?
|
25
|
+
m
|
22
26
|
end
|
23
27
|
|
24
28
|
end
|
data/nationbuilder-rb.gemspec
CHANGED
@@ -2,15 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: nationbuilder-rb 0.0.
|
5
|
+
# stub: nationbuilder-rb 0.0.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "nationbuilder-rb"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
12
13
|
s.authors = ["David Huie"]
|
13
|
-
s.date = "2014-
|
14
|
+
s.date = "2014-07-05"
|
14
15
|
s.description = "A Ruby client to the NationBuilder API"
|
15
16
|
s.email = "david@nationbuilder.com"
|
16
17
|
s.executables = ["nbdoc"]
|
@@ -22,6 +23,8 @@ Gem::Specification.new do |s|
|
|
22
23
|
".document",
|
23
24
|
".rspec",
|
24
25
|
".ruby-gemset",
|
26
|
+
".ruby-version",
|
27
|
+
".travis.yml",
|
25
28
|
"Gemfile",
|
26
29
|
"Gemfile.lock",
|
27
30
|
"LICENSE.txt",
|
@@ -46,8 +49,7 @@ Gem::Specification.new do |s|
|
|
46
49
|
]
|
47
50
|
s.homepage = "http://github.com/3dna/nationbuilder-rb"
|
48
51
|
s.licenses = ["MIT"]
|
49
|
-
s.
|
50
|
-
s.rubygems_version = "2.1.11"
|
52
|
+
s.rubygems_version = "2.2.2"
|
51
53
|
s.summary = "A Ruby client to the NationBuilder API"
|
52
54
|
|
53
55
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nationbuilder-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Huie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -106,6 +106,8 @@ files:
|
|
106
106
|
- .document
|
107
107
|
- .rspec
|
108
108
|
- .ruby-gemset
|
109
|
+
- .ruby-version
|
110
|
+
- .travis.yml
|
109
111
|
- Gemfile
|
110
112
|
- Gemfile.lock
|
111
113
|
- LICENSE.txt
|
@@ -147,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
149
|
version: '0'
|
148
150
|
requirements: []
|
149
151
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.2.2
|
151
153
|
signing_key:
|
152
154
|
specification_version: 4
|
153
155
|
summary: A Ruby client to the NationBuilder API
|