hasoffersv3 0.1.0 → 0.1.1

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: 5e19c9439e228e95df8e9790cc5771bee7ca3442
4
- data.tar.gz: fa1150166459c267df061da7cac6901edf39c3c5
3
+ metadata.gz: be9c512dfc44d53461953f8353f4967141161945
4
+ data.tar.gz: 39bee7f9418095ce2e8b1dccd29b6e0e91d63d16
5
5
  SHA512:
6
- metadata.gz: 9d65f052b5c37b02b885608be5edd223f481fc9fafaa52b8ca437b117badf2680853a46f745a35d1c048e5a9f83ce967140b22e190d73ae2c56f1469f5a3edc9
7
- data.tar.gz: 0746fc08779f6cc2fff4d13ee66a020b74a184185c3f3cd0783dc031bb370a50b175410ed3f3c565a70e1dcddd55e77250b3d9e30b5d2b567284ff6a1a1facff
6
+ metadata.gz: 71aad852d49d27ad4d350bf4681f3254920078c5ee6c198b680112f445a4635b11364922c6c4819117aa05c54515cd61cfc67d4a0a8cc00ad13d72ebdf637fba
7
+ data.tar.gz: 48e64dfc17e655a86fe09726b04d3964f6dde9c9d7352a6715a90d46b4111d682e39f2709a14bdbfc5fb6d34b5627a9fe79fd3786cd6917b447dd5788d88ac84
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ script: bundle exec rspec spec
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.1.1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.1.1
2
+ - Support "Offer/getApprovedAffiliateIds" method
3
+
1
4
  # 0.1.0
2
5
 
3
6
  - [#14] added `.find_added_conversions` and `find_updated_conversions` calls
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ### Overview
2
2
 
3
- [![Build status](https://api.travis-ci.org/HitFox/hasoffersv3.png?branch=master)](http://travis-ci.org/HitFox/hasoffersv3)
3
+ [![Build status](https://api.travis-ci.org/applift/hasoffersv3.png?branch=master)](http://travis-ci.org/HitFox/hasoffersv3)
4
4
 
5
5
  ### Synopsis
6
6
 
data/hasoffersv3.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'oj' # for faster JSON parsing
22
22
  s.add_dependency 'activesupport' # for to_param method
23
23
  s.add_development_dependency 'webmock'
24
- s.add_development_dependency 'rspec'
24
+ s.add_development_dependency 'rspec', '~> 3.0.0'
25
25
  s.add_development_dependency "bundler", "~> 1.3"
26
26
  s.add_development_dependency "rake"
27
27
  end
@@ -24,6 +24,11 @@ module HasOffersV3
24
24
  requires! params, [:id]
25
25
  post_request 'getGroups', params
26
26
  end
27
+
28
+ def get_approved_affiliate_ids(params = {})
29
+ requires! params, [:id]
30
+ post_request 'getApprovedAffiliateIds', params
31
+ end
27
32
  end
28
33
  end
29
34
  end
@@ -1,3 +1,3 @@
1
1
  module HasOffersV3
2
- VERSION = "0.1.0"
2
+ VERSION = '0.1.1'
3
3
  end
data/lib/hasoffersv3.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'net/http'
2
+
1
3
  %w!base affiliate response conversion raw_log report configuration advertiser advertiser_user offer!.each do |file|
2
4
  require "hasoffersv3/#{file}"
3
5
  end
@@ -5,7 +5,9 @@ describe HasOffersV3::Affiliate do
5
5
 
6
6
  let(:url) { api_url 'Affiliate' }
7
7
 
8
- before(:each) { stub_call unless example.metadata[:no_stub] }
8
+ before(:each) do |example|
9
+ stub_call unless example.metadata[:no_stub]
10
+ end
9
11
 
10
12
  describe '.find_all' do
11
13
  it 'should make a proper request call' do
@@ -73,4 +73,19 @@ describe HasOffersV3::Offer do
73
73
  end
74
74
  end
75
75
  end
76
+
77
+ describe '.get_approved_affiliate_ids' do
78
+ it 'makes a proper API request' do
79
+ stub_call
80
+ response = HasOffersV3::Offer.get_approved_affiliate_ids id: 1
81
+ a_request(:post, url).with(body: hash_including({'Method' => 'getApprovedAffiliateIds'})).should have_been_made
82
+ validate_call response
83
+ end
84
+
85
+ context 'when id parameter is missed' do
86
+ it 'raises an exception' do
87
+ expect { HasOffersV3::Offer.get_approved_affiliate_ids }.to raise_error ArgumentError
88
+ end
89
+ end
90
+ end
76
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hasoffersv3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximilian Seifert
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-13 00:00:00.000000000 Z
12
+ date: 2014-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oj
@@ -57,16 +57,16 @@ dependencies:
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: 3.0.0
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: 3.0.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -107,6 +107,7 @@ files:
107
107
  - .rspec
108
108
  - .ruby-gemset
109
109
  - .ruby-version
110
+ - .travis.yml
110
111
  - CHANGELOG.md
111
112
  - Gemfile
112
113
  - LICENSE.txt