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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a877976af943cf6c7206f03dd82e1803baeccfa5
4
- data.tar.gz: b26dd058f6e6222cfa8bf0248fbcefb753a3641b
3
+ metadata.gz: 74725e766258bbda70bc52329f7b9cadb7283cdb
4
+ data.tar.gz: 87eceb294433899c5c3c47408401c18f4a0737f5
5
5
  SHA512:
6
- metadata.gz: eecd9c8b9d82733b5572bb474010e13705f0d852b8ee158d63231fe353cec59b49c00a8a5a21ffdb596c87a802a45253d6eabbe661dd04593fbe69792e48dfed
7
- data.tar.gz: f9de63b9a4f087a7c06302da8f0f5a965e71dfe526821a3f1855214a973387669c3ca6c447f2d113ef3fe7f4c270fee86f838bea327b7feffab3d30593a97197
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
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ before_script: bundle install
7
+ script: bundle exec rake
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # nationbuilder-rb
2
2
 
3
+ [![Build Status](https://travis-ci.org/3dna/nationbuilder-rb.svg?branch=master)](https://travis-ci.org/3dna/nationbuilder-rb)
4
+
3
5
  A Ruby client for the NationBuilder API.
4
6
 
5
7
  ## Installing
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -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
@@ -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.2 ruby lib
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.2"
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-06-26"
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.require_paths = ["lib"]
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
@@ -1,3 +1,5 @@
1
+ # coding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe NationBuilder::Client do
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.2
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-06-26 00:00:00.000000000 Z
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.1.11
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