leapfrog-customer_scoring 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.0.2
2
+
3
+ * Stylistic changes
4
+
5
+
1
6
  ## v0.0.1
2
7
 
3
8
  * Initial release
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Leapfrog::CustomerScoring
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/leapfrog-customer_scoring.png)](http://badge.fury.io/rb/leapfrog-customer_scoring)
3
4
  [![Build Status](https://travis-ci.org/paulnsorensen/leapfrog-customer_scoring.png)](https://travis-ci.org/paulnsorensen/leapfrog-customer_scoring)
4
5
  [![Dependency Status](https://gemnasium.com/paulnsorensen/leapfrog-customer_scoring.png)](https://gemnasium.com/paulnsorensen/leapfrog-customer_scoring)
5
6
  [![Code Climate](https://codeclimate.com/github/paulnsorensen/leapfrog-customer_scoring.png)](https://codeclimate.com/github/paulnsorensen/leapfrog-customer_scoring)
@@ -23,6 +24,10 @@ Or install it yourself as:
23
24
 
24
25
  ## Usage
25
26
 
27
+ Require the gem.
28
+
29
+ require 'leapfrog/customer_scoring'
30
+
26
31
  Clients are instantiated with `http://internal.leapfrogonline/customer_scoring` as the default URL.
27
32
 
28
33
  client = Leapfrog::CustomerScoring::Client.new
@@ -14,8 +14,8 @@ module Leapfrog
14
14
  # client = Leapfrog::CustomerScoring::Client.new(other_url)
15
15
  #
16
16
  # This is the url to which the client will make requests
17
- def initialize(url="")
18
- @url = url.empty? ? DEFAULT_URL : url
17
+ def initialize(url=DEFAULT_URL)
18
+ @url = url
19
19
  end
20
20
 
21
21
  # Makes request to the initialized endpoint to retrieve customer
@@ -1,5 +1,5 @@
1
1
  module Leapfrog
2
2
  module CustomerScoring
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -4,12 +4,14 @@ describe Leapfrog::CustomerScoring do
4
4
  describe "#initialize" do
5
5
  it "should have the correct default url" do
6
6
  client = Leapfrog::CustomerScoring::Client.new
7
- expect(client.send(:url)).to eql(Leapfrog::CustomerScoring::Client::DEFAULT_URL)
7
+ default_url = "http://internal.leapfrogonline.com/customer_scoring"
8
+ expect(client.send(:url)).to eql(default_url)
8
9
  end
9
10
 
10
11
  it "should allow another url to be specified" do
11
- client = Leapfrog::CustomerScoring::Client.new("http://paulnsorensen.com")
12
- expect(client.send(:url)).to eql("http://paulnsorensen.com")
12
+ custom_url = "http://paulnsorensen.com"
13
+ client = Leapfrog::CustomerScoring::Client.new(custom_url)
14
+ expect(client.send(:url)).to eql(custom_url)
13
15
  end
14
16
  end
15
17
 
@@ -50,7 +52,7 @@ describe Leapfrog::CustomerScoring do
50
52
  end
51
53
  let(:client) { Leapfrog::CustomerScoring::Client.new }
52
54
 
53
- it "should raise an InvalidUrl exception" do
55
+ it "should raise an ResourceNotFound exception" do
54
56
  expect { client.get_score("50000", "60621", "35") }.
55
57
  to raise_error(Leapfrog::CustomerScoring::ResourceNotFound)
56
58
  end
@@ -95,7 +97,7 @@ describe Leapfrog::CustomerScoring do
95
97
  end
96
98
  let(:client) { Leapfrog::CustomerScoring::Client.new }
97
99
 
98
- it "should raise a Timeout exception" do
100
+ it "should raise a ServerTimeout exception" do
99
101
  expect { client.get_score("50000", "60621", "35") }.
100
102
  to raise_error(Leapfrog::CustomerScoring::ServerTimeout)
101
103
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leapfrog-customer_scoring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: 3260785113119909660
147
+ hash: 3680397720855541336
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  segments:
155
155
  - 0
156
- hash: 3260785113119909660
156
+ hash: 3680397720855541336
157
157
  requirements: []
158
158
  rubyforge_project:
159
159
  rubygems_version: 1.8.25