yieldmanager 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0
5
+ - 2.1
5
6
  - jruby-19mode
6
7
  env:
7
8
  global:
@@ -9,3 +10,4 @@ env:
9
10
  - secure: ZFxeI+npRXNbhQNIWNu1/MOl6fbNt84kD7AJF62E/LfjEVQZKohm6Zfm2pUrfAF7UWGnpb/ZYDusj3EnzazyUvfkd8Gj40XWXwjv0jvfnV3p8yUkAIbHKlEQqKWnbppMM7i0z+uAyJW1VFU/H50ZiuaPXTdB4LzJXH2crJQXnaQ=
10
11
  - secure: A8iYjMBh3OPznTKD/rPztz3tWGBrdJzmlakf3JrTLLWfHHxCE+lHip/Z/EVvTb3ec37owNjh0W8Z8yTPkz54FM++tM/t/W/eR8c71y2V4SI6ln+0wv5Uh5WNqVYpCsAn1DiZ3W4j1LpMGKbnw5ShyV89wfefC2JV55jQorQbth8=
11
12
  - secure: TE+/zUZh6brUT4q/oIKqgQH8P4mMPdeav+gUiRvkh5mtwX0HCPMW1Eq7+AoaxsTvksQfUbQLaObGGuQ3xn6ZkiE98lG6y1rk/3Q7keZLQ7zHDP2ucxAtRS/YBTKlcY5yVaj3oRoG4J0XGvN18YNXKB7jRb95HsIRIpSVmvbDjKA=
13
+ - secure: T0AM8anAGrZom/gGoOQPwsDkpP0yQWw5MMs0+GCHJTut0GURMJdbPy7S7UA8YE6PwRhvKRA7Jp//QUnWWq21152u+b25RwvOIXXeGqfDGHgp9Y8n0MMB8yL6GM3+c7gKTbAf544mkzjTWEQZOrTmeqtN91LstVz5W5RjqN5xkRU=
data/README.md CHANGED
@@ -21,7 +21,7 @@ Yieldmanager is available as a gem for easy installation.
21
21
  sudo gem install yieldmanager
22
22
  ```
23
23
 
24
- or if you're using [RVM](https://rvm.beginrescueend.com/) (and why on earth wouldn't you?)
24
+ or if you're using [RVM](https://rvm.io/) (and why on earth wouldn't you?)
25
25
 
26
26
  ```
27
27
  gem install yieldmanager
@@ -100,6 +100,28 @@ SOAP parser will interpret the returned SOAP object as
100
100
  an AR Creative object, resulting in bizarre errors. Uniquely
101
101
  re-name your AR object to eliminate the conflict.
102
102
 
103
+ ### WSDL validation checks
104
+
105
+ **NOTE** this feature is not thread-safe!
106
+
107
+ Due to an unknown bug, soap4r occasionally reports that a field is required when it really isn't. If you get an error along the lines of
108
+
109
+ ```
110
+ XSD::ValueSpaceError: {https://api.yieldmanager.com/types}enum_ad_tag_type: cannot accept ''
111
+ ```
112
+
113
+ ...you can disable this checking temporarily by calling
114
+
115
+ ```
116
+ @ym.disable_check_restriction
117
+ ```
118
+
119
+ When you're done with the call, re-enable it using
120
+
121
+ ```
122
+ @ym.enable_check_restriction
123
+ ```
124
+
103
125
  ### Pagination
104
126
 
105
127
  Some calls return datasets too large to retrieve all at once.
@@ -45,9 +45,11 @@ end
45
45
 
46
46
 
47
47
  # Monkey-patch to eliminate bogus "cannot be null" errors from YM wsdl
48
+ # "SKIP" is controlled via (enable|disable)_check_restriction methods
48
49
  class WSDL::XMLSchema::SimpleType
49
50
  private
50
51
  def check_restriction(value)
52
+ return value if ENV["YIELDMANAGER_CHECK_RESTRICTION"] == "SKIP"
51
53
  unless @restriction.valid?(value) || @name.to_s =~ /(enum_creative_third_party_types|enum_ym_numbers_difference)/
52
54
  raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
53
55
  end
@@ -177,6 +179,19 @@ module Yieldmanager
177
179
  report
178
180
  end
179
181
 
182
+ # Disable WSDL restriction checking until re-enabled
183
+ # Some services complain incorrectly about nillable fields requiring values
184
+ # Disabling this checking allows them to pass properly
185
+ def disable_check_restriction
186
+ ENV["YIELDMANAGER_CHECK_RESTRICTION"] = "SKIP"
187
+ end
188
+
189
+ # Enable WSDL restriction checking (it's on by default)
190
+ # This is only needed when you've explicitly disabled the behavior previously
191
+ def enable_check_restriction
192
+ ENV["YIELDMANAGER_CHECK_RESTRICTION"] = nil
193
+ end
194
+
180
195
  def self.api_version
181
196
  version_file = "API_VERSION"
182
197
  path = File.join(File.dirname(__FILE__), '..', '..', version_file)
@@ -1,3 +1,3 @@
1
1
  module Yieldmanager
2
- VERSION = "0.9.10"
2
+ VERSION = "0.9.11"
3
3
  end
@@ -139,6 +139,26 @@ describe "A new Yieldmanager client" do
139
139
  expect(e.message).not_to match(/enum_ym_numbers_difference: cannot accept ''/)
140
140
  end
141
141
  end
142
+
143
+ it "skips check_restriction when necessary" do
144
+ @ym.session do |t|
145
+ expect{ get_pub_tags(t) }.to raise_error(/enum_ad_tag_type: cannot accept ''/)
146
+
147
+ begin
148
+ @ym.disable_check_restriction
149
+ get_pub_tags(t)
150
+ ensure
151
+ @ym.enable_check_restriction
152
+ end
153
+
154
+ expect{ get_pub_tags(t) }.to raise_error(/enum_ad_tag_type: cannot accept ''/)
155
+ end
156
+ end
157
+
158
+ def get_pub_tags t
159
+ id = ENV["YIELDMANAGER_PUBLISHER_SECTION_ID"].to_i
160
+ @ym.entity.getPubAdTags(t, [id], { banners_size_ids: [2,6,10] })
161
+ end
142
162
 
143
163
  describe "A Yieldmanager report" do
144
164
 
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yieldmanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Bill Gathen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-12-17 00:00:00.000000000 Z
12
+ date: 2014-01-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rspec
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rdoc
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: nokogiri
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: mini_portile
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - '='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - '='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: soap4r
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - '='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - '='
95
108
  - !ruby/object:Gem::Version
@@ -137,26 +150,27 @@ files:
137
150
  homepage: http://github.com/billgathen/yieldmanager
138
151
  licenses:
139
152
  - MIT
140
- metadata: {}
141
153
  post_install_message:
142
154
  rdoc_options: []
143
155
  require_paths:
144
156
  - lib
145
157
  required_ruby_version: !ruby/object:Gem::Requirement
158
+ none: false
146
159
  requirements:
147
160
  - - ! '>='
148
161
  - !ruby/object:Gem::Version
149
162
  version: '0'
150
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
+ none: false
151
165
  requirements:
152
166
  - - ! '>='
153
167
  - !ruby/object:Gem::Version
154
168
  version: '0'
155
169
  requirements: []
156
170
  rubyforge_project:
157
- rubygems_version: 2.1.10
171
+ rubygems_version: 1.8.23
158
172
  signing_key:
159
- specification_version: 4
173
+ specification_version: 3
160
174
  summary: YieldManager API Tool
161
175
  test_files:
162
176
  - spec/patch_detector_spec.rb
@@ -165,3 +179,4 @@ test_files:
165
179
  - spec/spec_helper.rb
166
180
  - spec/yieldmanager/client_spec.rb
167
181
  - spec/yieldmanager/report_spec.rb
182
+ has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjcwYTg3N2NkMTEzOWJkMjRiNzRjMDljNjIyZjE4ZWVjNzg3YmFjOA==
5
- data.tar.gz: !binary |-
6
- YzEzZGViZDU5OGM1MGQ5NDJjNzc3YzVlMDAzNGZjYzAwZDhmN2JlYw==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- ZjJhNTkxOWZmNjRhMWI3NzU2NWMzY2I4MzMxMTdkNzhkNDE4YzgzNjcxYmZm
10
- YzhhYTllN2E2OTkxODlhYWU1ZTIzZGUxYzc0MjUxZGQzZTlmZDgzMTY1ZWM2
11
- ZTA5YWNlMThhZDhhNzExOWE3MWMzNzNkZWRmNjk4ODI0OGYyM2Q=
12
- data.tar.gz: !binary |-
13
- MDYxMmFkOWY2NTcyNDlhNjUyYzk3MjI1NDdkNDU1YjBhMTA5N2QxMjMwOGJh
14
- MzQ2NzNkNTU2YmM2Y2ViM2UwN2I5MjhmZDkzMjIzOGIxNWNjNWQ3ZDliMzI1
15
- MGJmNzEzNzhkMzI2ZDJkZWY5NjBmYjdlMmY5NTgzYmE2ZDg0ZDE=