fiftyfifty 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/fiftyfifty.gemspec +1 -1
  3. data/lib/fiftyfifty.rb +3 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/fiftyfifty.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fiftyfifty"
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Peter Hamilton"]
data/lib/fiftyfifty.rb CHANGED
@@ -54,9 +54,11 @@ class FiftyFifty
54
54
  def campaigner_details(campaigner_id)
55
55
  return get("/campaigners/#{campaigner_id}")
56
56
  end
57
+
58
+ # Get's response for a URL request. If the status is 400, raise a BadRequest
59
+ # exception, otherwise, return the associated data
57
60
  def get(url)
58
61
  response = Hashie::Mash.new(self.class.get(url))
59
-
60
62
  if response.status == 400
61
63
  raise BadRequest
62
64
  else
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: fiftyfifty
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.1
5
+ version: 0.4.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Peter Hamilton