nationbuilder-rb 0.0.1 → 0.0.2

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: 83841921d09006469ddc14f13acb12e99ba87277
4
- data.tar.gz: 35766c21dbb833903cd33d27ebdd1b4ecebbcf1d
3
+ metadata.gz: a877976af943cf6c7206f03dd82e1803baeccfa5
4
+ data.tar.gz: b26dd058f6e6222cfa8bf0248fbcefb753a3641b
5
5
  SHA512:
6
- metadata.gz: 92dbc9527dbb3162b1c6303e21248e7d708bb53508e62e70b8c6a53e272cd87f81b9878315c77e3bd71a3d55b425c4772bc5daf7aeaf21f9b9b27e7fa1aaf894
7
- data.tar.gz: 4ebd640859fa7673ed3f129de176600af1fcaff2c3ce62ebd5b10396fe567d7a84178c8d75205622b4de972ef85ab9366e40ffec7ad0e3ce692c310f5fdd16bb
6
+ metadata.gz: eecd9c8b9d82733b5572bb474010e13705f0d852b8ee158d63231fe353cec59b49c00a8a5a21ffdb596c87a802a45253d6eabbe661dd04593fbe69792e48dfed
7
+ data.tar.gz: f9de63b9a4f087a7c06302da8f0f5a965e71dfe526821a3f1855214a973387669c3ca6c447f2d113ef3fe7f4c270fee86f838bea327b7feffab3d30593a97197
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -77,12 +77,24 @@ class NationBuilder::Client
77
77
  end
78
78
 
79
79
  def print_description(endpoint_name)
80
+ endpoint_name = endpoint_name.to_sym
81
+
82
+ unless self.endpoints.include?(endpoint_name)
83
+ puts "Invalid endpoint name: #{endpoint_name}"
84
+ puts
85
+ puts "Valid endpoint names:"
86
+ self.endpoints.each do |endpoint|
87
+ puts " #{endpoint}"
88
+ end
89
+ return
90
+ end
91
+
80
92
  endpoint_str = "Endpoint: #{endpoint_name}"
81
93
  puts "=" * endpoint_str.length
82
94
  puts endpoint_str
83
95
  puts "=" * endpoint_str.length
84
96
 
85
- self[endpoint_name.to_sym].methods.each do |method_name|
97
+ self[endpoint_name].methods.each do |method_name|
86
98
  puts
87
99
  method = self[endpoint_name][method_name]
88
100
  puts " Method: #{method_name.inspect}"
@@ -2,11 +2,11 @@
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.1 ruby lib
5
+ # stub: nationbuilder-rb 0.0.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "nationbuilder-rb"
9
- s.version = "0.0.1"
9
+ s.version = "0.0.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["David Huie"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nationbuilder-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Huie