loopiator 0.3.6 → 0.3.7

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: c0052de38f588c5ec092a39c1db7c864cca70cce
4
- data.tar.gz: 0481091a1d6a62b3f1f60a623d6e15e789abef5a
3
+ metadata.gz: e49d19aea0aab251622f34c87274a5a965570aa9
4
+ data.tar.gz: d991ea57de4b16301620f5c36645e8ae4fb5ebc6
5
5
  SHA512:
6
- metadata.gz: 66b943cfe25acd2ae8fed98f0e735e45419f9146ef08de839407a98724d6924d5f3a2a51729d28a2095ae40bf2ad27ce23546edd4849969a54798ab2b4dc0f0c
7
- data.tar.gz: 14f432effad1d2f2fcf0190f1e2c931d125804e7a651147bbcf9f5068200b5c12e120c265d609602822a75f2394b109a303a742bb933b677c6fb9ac34e74f9f2
6
+ metadata.gz: 23c4b895f34741a7c44e714804c220e19235a5a6812ab62fea6cba7db98538584701bd719715df42896adcff51bea1c8b85e6686ba9dfae98ecb2de26a4cb4c2
7
+ data.tar.gz: 60015d7c1c5e81ae09fc792e58e1123468dd0e3ede15d7d7b0044ca48f057ecc4b559e0b9bf53828b4e8cc53733504558e88c9374fbdb2460fb270a7f8daa6b2
data/lib/loopiator.rb CHANGED
@@ -10,7 +10,7 @@ require File.join(File.dirname(__FILE__), 'loopiator/credits')
10
10
  require File.join(File.dirname(__FILE__), 'loopiator/client')
11
11
 
12
12
  module Loopiator
13
- VERSION = "0.3.6"
13
+ VERSION = "0.3.7"
14
14
 
15
15
  class << self
16
16
  attr_writer :configuration
@@ -35,12 +35,13 @@ module Loopiator
35
35
  response = response.downcase.to_sym
36
36
 
37
37
  case response
38
- when :ok then return response
39
- when :domain_occupied then return response
40
- when :auth_error then raise Loopiator::AuthError
41
- when :rate_limited then raise Loopiator::RateLimitError
42
- when :bad_indata then raise Loopiator::InvalidParameterError
43
- when :unknown_error then raise Loopiator::UnknownError
38
+ when :ok then return response
39
+ when :domain_occupied then return response
40
+ when :auth_error then raise Loopiator::AuthError
41
+ when :rate_limited then raise Loopiator::RateLimitError
42
+ when :insufficient_funds then raise Loopiator::InsufficientFundsError
43
+ when :bad_indata then raise Loopiator::InvalidParameterError
44
+ when :unknown_error then raise Loopiator::UnknownError
44
45
  else
45
46
  return response
46
47
  end
@@ -36,4 +36,10 @@ module Loopiator
36
36
  "The domain is occupied."
37
37
  end
38
38
  end
39
+
40
+ class InsufficientFundsError < ApiError
41
+ def message
42
+ "Insufficient funds. Please top up your prepaid account."
43
+ end
44
+ end
39
45
  end
data/loopiator.gemspec CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = 'loopiator'
6
- s.version = '0.3.6'
6
+ s.version = '0.3.7'
7
7
 
8
8
  s.homepage = "https://github.com/Agiley/Loopiator"
9
9
  s.email = "sebastian@agiley.se"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loopiator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Johnsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simpleidn