yieldmanager 0.4.2 → 0.4.3
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.
- data/TODO +3 -0
- data/VERSION +1 -1
- data/lib/yieldmanager/client.rb +10 -0
- data/spec/yieldmanager/client_spec.rb +19 -0
- data/yieldmanager.gemspec +2 -2
- metadata +2 -2
data/TODO
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
* add "compatibility mode" to tolerate ActiveRecord naming collisions
|
1
2
|
* resolve bug using local wsdls (currently using remote)
|
2
3
|
"unknown element: {http://schemas.xmlsoap.org/wsdl/}definitions"
|
3
4
|
* throwing warning when running in autotest, but not spec?: monkeypatch net/http?
|
4
5
|
"warning: peer certificate won't be verified in this SSL session"
|
6
|
+
* DONE add monkey-patch to WSDL::XMLSchema::SimpleType to ignore enum_creative_third_party_types|enum_ym_numbers_difference
|
7
|
+
cannot be null errors
|
5
8
|
* DONE (chris) Monkey-patch 1.8.7 to handle targetnamespace bug
|
6
9
|
* DONE Using :env => "test" actually hits test environment
|
7
10
|
* DONE add session start/end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/lib/yieldmanager/client.rb
CHANGED
@@ -3,6 +3,16 @@ require 'soap/wsdlDriver'
|
|
3
3
|
require 'open-uri'
|
4
4
|
require 'hpricot'
|
5
5
|
|
6
|
+
# Monkey-patch to eliminate bogus "cannot be null" errors from YM wsdl
|
7
|
+
class WSDL::XMLSchema::SimpleType
|
8
|
+
private
|
9
|
+
def check_restriction(value)
|
10
|
+
unless @restriction.valid?(value) || @name.to_s =~ /(enum_creative_third_party_types|enum_ym_numbers_difference)/
|
11
|
+
raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
6
16
|
module Yieldmanager
|
7
17
|
# This is the frontend for using Yieldmanager programmatically.
|
8
18
|
# It can be directly used by the user by creating a
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
2
|
|
3
|
+
INACTIVE= false
|
3
4
|
CLIENT_NEED_ENV_ARGS_MSG = <<EOM
|
4
5
|
Please set these environment variables to match your Yieldmanager account:
|
5
6
|
* YIELDMANAGER_USER
|
@@ -112,6 +113,24 @@ describe "A new Yieldmanager client" do
|
|
112
113
|
end
|
113
114
|
end
|
114
115
|
|
116
|
+
it "ignores bogus 'cannot be null' errors" do
|
117
|
+
desc = "bogus line - delete"
|
118
|
+
l = {
|
119
|
+
:description => desc,
|
120
|
+
:status => INACTIVE,
|
121
|
+
:insertion_order_id => -1,
|
122
|
+
:start_time => "#{Date.today-1}T05:00:00", #offset by timezone
|
123
|
+
:end_time => "#{Date.today}T05:00:00", # offset by timezone
|
124
|
+
:pricing_type => "CPM",
|
125
|
+
:amount => 0.00,
|
126
|
+
:budget => 0.00,
|
127
|
+
:imp_budget => 0,
|
128
|
+
:priority => "Normal"
|
129
|
+
}
|
130
|
+
lambda { @ym.session { |t| @ym.line_item.add(t,l) } }.
|
131
|
+
should_not raise_error(/enum_ym_numbers_difference: cannot accept ''/)
|
132
|
+
end
|
133
|
+
|
115
134
|
describe "A Yieldmanager report" do
|
116
135
|
|
117
136
|
before(:each) do
|
data/yieldmanager.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{yieldmanager}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bill Gathen"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-04-21}
|
13
13
|
s.description = %q{This gem offers full access to YieldManager's API tools (read/write) as well as ad-hoc reporting through the Reportware tool}
|
14
14
|
s.email = %q{bill@billgathen.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yieldmanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Gathen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-04-21 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|