tangocard 3.2.1 → 3.2.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: 6301d8a68fb4449ec345faa1055276f48eb90df5
4
- data.tar.gz: 5397a0fb9bb1359d3f826cd0d73bd7d155e88a11
3
+ metadata.gz: eb29e103e970f53672c6f453da330bd1bf0b5d8e
4
+ data.tar.gz: abbaa0d59df394630be3b979fc04f5ecbd0137b6
5
5
  SHA512:
6
- metadata.gz: 39ed9914e74757b53ff198994bc148f10c0c1c554e224fc0a685ec542bb9df6b3208e53fb638a5c0d3922aa2778d96bb469b9116b1805b6107ba60f0ce0f12fe
7
- data.tar.gz: 9a67fcdc4e42e2af362fe65720966160e361a028313aa55094de676979dbd2fab9b5f654d2df070c09eeabc240d5b4ee3eeee30000a908f0cc077b94d26b6d6b
6
+ metadata.gz: 4f89c1dbaedec7244c84fb198a52653703daacd38be65b4e50eef3d655aa7e6d4330c3b168aaee47b7a48d1a030f7a56b12f68b3db7dce39359c2c15b84ae739
7
+ data.tar.gz: f74a4d66608ae73067c694a0cf4a8f45f6cbdd4b28adc104860f590c151adcd7a56c2d3ea3126fad1e0d845681c1eb03f7dd097545c0cbaa74e0946bebea32b8
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Tangocard
2
+ [ ![Codeship Status for bonusly/tangocard](https://codeship.com/projects/06e6ede0-ac7d-0132-5432-16eb0c65b489/status?branch=master)](https://codeship.com/projects/68509)
2
3
 
3
4
  Ruby Wrapper for Tango Card RaaS API.
4
5
 
data/lib/tangocard.rb CHANGED
@@ -9,7 +9,7 @@ module Tangocard
9
9
  def initialize
10
10
  self.name = nil
11
11
  self.key = nil
12
- self.base_uri = "https://sandbox.tangocard.com"
12
+ self.base_uri = 'https://sandbox.tangocard.com'
13
13
  self.default_brands = ['Tango Card']
14
14
  self.local_images = {}
15
15
  self.sku_blacklist = []
@@ -1,9 +1,5 @@
1
1
  class Tangocard::Brand
2
2
  attr_reader :description, :rewards
3
- @result = nil
4
- @brands = nil
5
- @default_brands = nil
6
- @brand_finder = {}
7
3
 
8
4
  # Clear all cached responses. Next request for brand info will pull fresh from the Tango Card API.
9
5
  #
@@ -14,11 +10,7 @@ class Tangocard::Brand
14
10
  # Arguments:
15
11
  # none
16
12
  def self.clear_cache!
17
- @result = nil
18
- @brands = nil
19
- @default_brands = nil
20
- @brand_finder = {}
21
- true
13
+ Tangocard::Raas.clear_cache!
22
14
  end
23
15
 
24
16
  # Return an array of all brands.
@@ -30,8 +22,7 @@ class Tangocard::Brand
30
22
  # Arguments:
31
23
  # none
32
24
  def self.all
33
- @result ||= Tangocard::Raas.rewards_index.parsed_response
34
- @brands ||= @result['brands'].map{|p| Tangocard::Brand.new(p)}
25
+ Tangocard::Raas.rewards_index.parsed_response['brands'].map{|p| Tangocard::Brand.new(p)}
35
26
  end
36
27
 
37
28
  # Return an array of default brands. Must set default_brands in your Tangocard initializer (see README).
@@ -43,7 +34,7 @@ class Tangocard::Brand
43
34
  # Arguments:
44
35
  # none
45
36
  def self.default_brands
46
- @default_brands ||= self.all.select{|b| Tangocard.configuration.default_brands.include?(b.description)}
37
+ self.all.select{|b| Tangocard.configuration.default_brands.include?(b.description)}
47
38
  end
48
39
 
49
40
  # Find a brand by its :description field.
@@ -59,7 +50,7 @@ class Tangocard::Brand
59
50
  # Arguments:
60
51
  # brand_name: (String)
61
52
  def self.find(brand_name)
62
- @brand_finder[brand_name] ||= self.all.select{|b| b.description == brand_name}.first
53
+ self.all.select{|b| b.description == brand_name}.first
63
54
  end
64
55
 
65
56
  def initialize(params)
@@ -1,3 +1,3 @@
1
1
  module Tangocard
2
- VERSION = '3.2.1'
2
+ VERSION = '3.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tangocard
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Crawford-Marks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.2.2
126
+ rubygems_version: 2.4.3
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Ruby Wrapper for Tango Card RaaS API.