hasoffers 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGMyYjZmYTRlOTZmZjVlOThmMDc4NWMxODI4ZTdlMDUzZDc5MzljZQ==
5
+ data.tar.gz: !binary |-
6
+ NjYyZTY2N2E1ZmZjOWEwZTQxZTdkZjU0MzExYTViMzZjYzUxZTI4Nw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YWViNGIyZGRlM2I4MWFkOWJjZGE4YmQzZGJmNmMxYTVlMTI3ODBiNzViYmU0
10
+ NmQzN2ExMjgzZGM5ZDA0NTA0YjFlMzAwNzU0Nzk4ZTliNjgwYThjNjlmNTJi
11
+ NTFmNThlNjBkZmIyN2U4YTlkMWViNjJlMmQ1M2FjOTJhZTJjYWQ=
12
+ data.tar.gz: !binary |-
13
+ MzkwN2Y1MTg1ZGZkYzVkYWZmY2I2YjRkYmQ1OTUzZTA1YjFiMDM2MWM4YTY3
14
+ MmEyNmM1ZmMxOTU3YzFhMTM1MDg0ZWRhNWQ0MzkyZjc1MTNkNjNhMDNhMTkz
15
+ ZjQ3MzMwZjc0ZDA5MTUyMGQyZDI5NTFkOWM0OTFhNzgwYzhlZTU=
@@ -0,0 +1 @@
1
+ hasoffers
@@ -0,0 +1 @@
1
+ 1.9.3
@@ -1,16 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hasoffers (0.1.6)
4
+ hasoffers (0.1.8)
5
5
  crack
6
6
  yajl-ruby
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- crack (0.3.1)
11
+ crack (0.4.2)
12
+ safe_yaml (~> 1.0.0)
12
13
  rake (0.9.2)
13
- yajl-ruby (1.1.0)
14
+ safe_yaml (1.0.1)
15
+ yajl-ruby (1.2.0)
14
16
 
15
17
  PLATFORMS
16
18
  ruby
@@ -0,0 +1,20 @@
1
+ Copyright 2013 Sport Ngin
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "https://github.com/sportngin/hasoffers"
12
12
  s.summary = %q{Implementation of the HasOffers API for affiliate advertising.}
13
13
  s.description = %q{Implementation of the HasOffers API for affiliate advertising.}
14
+ s.license = "MIT"
14
15
 
15
16
  s.rubyforge_project = "hasoffers"
16
17
 
@@ -1,14 +1,10 @@
1
-
2
1
  module HasOffers
3
-
4
2
  class Base
5
-
6
3
  @@base_uri = 'https://api.hasoffers.com/Api'
7
4
  @@api_mode = ((defined?(Rails) and Rails.env.production?) or ENV['HAS_OFFERS_LIVE'] == '1') ? :live : :test
8
5
  @@default_params = nil
9
6
 
10
7
  class << self
11
-
12
8
  def base_uri=(uri)
13
9
  @@base_uri = uri
14
10
  end
@@ -78,7 +74,7 @@ module HasOffers
78
74
  def query_string(data_hash)
79
75
  # Rails to_params adds an extra open close brackets to multi-dimensional array parameters which
80
76
  # hasoffers doesn't like, so the gsub here takes care of that.
81
- data_hash.to_param.gsub(/\[\]\[/,'[')
77
+ URI.escape(URI.unescape(data_hash.to_param).gsub(/\[\]\[/,'['))
82
78
  end
83
79
 
84
80
  def make_request(http_method, target, method, params)
@@ -111,9 +107,6 @@ module HasOffers
111
107
  def build_data(data, return_object = false)
112
108
  {'data' => data, 'return_object' => return_object}
113
109
  end
114
-
115
110
  end
116
-
117
111
  end
118
-
119
112
  end
@@ -1,3 +1,3 @@
1
1
  module Hasoffers
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hasoffers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
5
- prerelease:
4
+ version: 0.1.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Luke Ludwig
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-19 00:00:00.000000000 Z
11
+ date: 2014-02-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: crack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: yajl-ruby
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -67,9 +60,12 @@ extensions: []
67
60
  extra_rdoc_files: []
68
61
  files:
69
62
  - .gitignore
63
+ - .ruby-gemset
64
+ - .ruby-version
70
65
  - CHANGELOG
71
66
  - Gemfile
72
67
  - Gemfile.lock
68
+ - MIT-LICENSE
73
69
  - README.rdoc
74
70
  - Rakefile
75
71
  - config/has_offers.yml
@@ -95,28 +91,28 @@ files:
95
91
  - test/report_test.rb
96
92
  - test/test_helper.rb
97
93
  homepage: https://github.com/sportngin/hasoffers
98
- licenses: []
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
99
97
  post_install_message:
100
98
  rdoc_options: []
101
99
  require_paths:
102
100
  - lib
103
101
  required_ruby_version: !ruby/object:Gem::Requirement
104
- none: false
105
102
  requirements:
106
103
  - - ! '>='
107
104
  - !ruby/object:Gem::Version
108
105
  version: '0'
109
106
  required_rubygems_version: !ruby/object:Gem::Requirement
110
- none: false
111
107
  requirements:
112
108
  - - ! '>='
113
109
  - !ruby/object:Gem::Version
114
110
  version: '0'
115
111
  requirements: []
116
112
  rubyforge_project: hasoffers
117
- rubygems_version: 1.8.24
113
+ rubygems_version: 2.0.14
118
114
  signing_key:
119
- specification_version: 3
115
+ specification_version: 4
120
116
  summary: Implementation of the HasOffers API for affiliate advertising.
121
117
  test_files:
122
118
  - test/advertiser_test.rb