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 +4 -4
- data/.travis.yml +5 -0
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/hasoffersv3.gemspec +1 -1
- data/lib/hasoffersv3/offer.rb +5 -0
- data/lib/hasoffersv3/version.rb +1 -1
- data/lib/hasoffersv3.rb +2 -0
- data/spec/lib/affiliate_spec.rb +3 -1
- data/spec/lib/offer_spec.rb +15 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be9c512dfc44d53461953f8353f4967141161945
|
4
|
+
data.tar.gz: 39bee7f9418095ce2e8b1dccd29b6e0e91d63d16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71aad852d49d27ad4d350bf4681f3254920078c5ee6c198b680112f445a4635b11364922c6c4819117aa05c54515cd61cfc67d4a0a8cc00ad13d72ebdf637fba
|
7
|
+
data.tar.gz: 48e64dfc17e655a86fe09726b04d3964f6dde9c9d7352a6715a90d46b4111d682e39f2709a14bdbfc5fb6d34b5627a9fe79fd3786cd6917b447dd5788d88ac84
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### Overview
|
2
2
|
|
3
|
-
[![Build status](https://api.travis-ci.org/
|
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
|
data/lib/hasoffersv3/offer.rb
CHANGED
data/lib/hasoffersv3/version.rb
CHANGED
data/lib/hasoffersv3.rb
CHANGED
data/spec/lib/affiliate_spec.rb
CHANGED
@@ -5,7 +5,9 @@ describe HasOffersV3::Affiliate do
|
|
5
5
|
|
6
6
|
let(:url) { api_url 'Affiliate' }
|
7
7
|
|
8
|
-
before(:each)
|
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
|
data/spec/lib/offer_spec.rb
CHANGED
@@ -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.
|
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-
|
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:
|
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:
|
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
|