francois-ad_gear_client 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -113,5 +113,17 @@ namespace :test do
113
113
  end
114
114
 
115
115
  task :shell do
116
- sh "irb -Ilib:vendor/activeresource/lib:vendor/activemodel/lib:vendor/activesupport/lib -rad_gear"
116
+ require "pp"
117
+ FileList["vendor/*/lib"].each do |path|
118
+ $LOAD_PATH.unshift path
119
+ end
120
+ $LOAD_PATH.unshift "lib"
121
+
122
+ require "ad_gear"
123
+ AdGear.config = AdGear::Config.new("examples/ad_gear.yml", "development")
124
+
125
+ require "irb"
126
+ ARGV.clear
127
+ include AdGear
128
+ IRB.start
117
129
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ad_gear_client}
5
- s.version = "0.1.1"
5
+ s.version = "0.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Fran\303\247ois Beausoleil"]
9
- s.date = %q{2009-08-12}
8
+ s.authors = ["François Beausoleil"]
9
+ s.date = %q{2009-09-02}
10
10
  s.email = %q{francois@teksol.info}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
  "ad_gear_client.gemspec",
23
23
  "examples/.gitignore",
24
24
  "examples/ad_gear.yml.sample",
25
+ "examples/create_placement.rb",
25
26
  "examples/prelude.rb",
26
27
  "examples/read_write_site.rb",
27
28
  "examples/upload_file_to_ad_unit.rb",
@@ -32,6 +33,7 @@ Gem::Specification.new do |s|
32
33
  "lib/ad_gear/ad_unit_file.rb",
33
34
  "lib/ad_gear/ad_unit_interaction.rb",
34
35
  "lib/ad_gear/ad_unit_variable.rb",
36
+ "lib/ad_gear/advertiser.rb",
35
37
  "lib/ad_gear/base.rb",
36
38
  "lib/ad_gear/campaign.rb",
37
39
  "lib/ad_gear/click.rb",
@@ -40,6 +42,10 @@ Gem::Specification.new do |s|
40
42
  "lib/ad_gear/format.rb",
41
43
  "lib/ad_gear/has_many_array.rb",
42
44
  "lib/ad_gear/interaction.rb",
45
+ "lib/ad_gear/placement_membership.rb",
46
+ "lib/ad_gear/placement_rule.rb",
47
+ "lib/ad_gear/publisher.rb",
48
+ "lib/ad_gear/publisher_placement.rb",
43
49
  "lib/ad_gear/site.rb",
44
50
  "lib/ad_gear/template.rb",
45
51
  "lib/ad_gear/upload.rb",
@@ -48,25 +54,29 @@ Gem::Specification.new do |s|
48
54
  "lib/core_ext.rb",
49
55
  "test/ad_gear/ad_spot_test.rb",
50
56
  "test/ad_gear/config_test.rb",
57
+ "test/ad_gear/placement_rule_test.rb",
51
58
  "test/ad_gear/site_test.rb",
52
59
  "test/ad_gear/upload_test.rb",
53
60
  "test/ad_gear_test.rb",
54
61
  "test/fixtures/access-denied-no-auth.txt",
55
62
  "test/test_helper.rb"
56
63
  ]
64
+ s.has_rdoc = true
57
65
  s.homepage = %q{http://github.com/francois/ad_gear_client}
58
66
  s.rdoc_options = ["--charset=UTF-8"]
59
67
  s.require_paths = ["lib"]
60
68
  s.rubyforge_project = %q{ad_gear_client}
61
- s.rubygems_version = %q{1.3.5}
69
+ s.rubygems_version = %q{1.3.1}
62
70
  s.summary = %q{A Ruby client for accessing AdGear http://bloomdigital.com/}
63
71
  s.test_files = [
64
72
  "test/ad_gear/ad_spot_test.rb",
65
73
  "test/ad_gear/config_test.rb",
74
+ "test/ad_gear/placement_rule_test.rb",
66
75
  "test/ad_gear/site_test.rb",
67
76
  "test/ad_gear/upload_test.rb",
68
77
  "test/ad_gear_test.rb",
69
78
  "test/test_helper.rb",
79
+ "examples/create_placement.rb",
70
80
  "examples/prelude.rb",
71
81
  "examples/read_write_site.rb",
72
82
  "examples/upload_file_to_ad_unit.rb"
@@ -74,7 +84,7 @@ Gem::Specification.new do |s|
74
84
 
75
85
  if s.respond_to? :specification_version then
76
86
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
77
- s.specification_version = 3
87
+ s.specification_version = 2
78
88
 
79
89
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
80
90
  s.add_development_dependency(%q<lsegal-yard>, [">= 0.2.3"])
@@ -0,0 +1,49 @@
1
+ require "prelude"
2
+
3
+ begin
4
+ publishers = AdGear::Publisher.find(:all)
5
+ publisher = publishers.detect(&:active?)
6
+ assert_not_nil publisher, "Missing a Publisher"
7
+
8
+ formats = AdGear::Format.find(:all)
9
+ format = formats.first
10
+ assert_not_nil format, "Missing a Format"
11
+
12
+ campaigns = AdGear::Campaign.find(:all)
13
+ campaign = campaigns.first
14
+ assert_not_nil campaign, "Missing a Campaign"
15
+
16
+ ad_units = AdGear::AdUnit.find(:all)
17
+ active_ad_units = ad_units.select(&:active?)
18
+ assert active_ad_units.any?, "No active AdUnits available"
19
+
20
+ placement = AdGear::PublisherPlacement.new(
21
+ :campaign => campaign,
22
+ :format => format,
23
+ :selection_mechanism => "rotated",
24
+ :name => "Snow Leopard for a week",
25
+ :start_at => 3.days.from_now,
26
+ :end_at => 7.days.from_now,
27
+ :placement_rules => [
28
+ AdGear::PlacementRule.new(:kind => "PlacementInclusion", :bookable => publisher)],
29
+ :placement_memberships => [
30
+ AdGear::PlacementMembership.new(:selection_attribute => "1", :ad_unit => active_ad_units[0]),
31
+ AdGear::PlacementMembership.new(:selection_attribute => "2", :ad_unit => active_ad_units[1])])
32
+ placement.save
33
+
34
+ placement = AdGear::PublisherPlacement.new(
35
+ :campaign => campaign,
36
+ :format => format,
37
+ :selection_mechanism => "weighted",
38
+ :name => "BMW M5",
39
+ :start_at => 3.days.from_now,
40
+ :end_at => 7.days.from_now,
41
+ :placement_rules => [
42
+ AdGear::PlacementRule.new(:kind => "PlacementInclusion", :bookable => publisher)],
43
+ :placement_memberships => [
44
+ AdGear::PlacementMembership.new(:selection_attribute => "30", :ad_unit => active_ad_units[0]),
45
+ AdGear::PlacementMembership.new(:selection_attribute => "70", :ad_unit => active_ad_units[1])])
46
+ placement.save
47
+ rescue ActiveResource::BadRequest => e
48
+ p ActiveResource::Formats[:xml].decode(e.response.body)
49
+ end
@@ -1,19 +1,22 @@
1
1
  require "prelude"
2
2
 
3
- p AdGear::Site.find(:all)
3
+ begin
4
+ formats = AdGear::Format.find(:all)
5
+ p formats
4
6
 
5
- formats = AdGear::Format.find(:all)
6
- site = AdGear::Site.new(:name => "XLsuite", :url => "http://xlsuite.com/", :ad_spots => [{:format_id => formats.first.id, :name => "sidebar top"}])
7
- site.ad_spots << AdGear::AdSpot.new(:format_id => formats.first.id, :name => "homepage banner")
7
+ sites = AdGear::Site.find(:all)
8
+ p sites
9
+
10
+ site = AdGear::Site.new(:name => "XLsuite", :url => "http://xlsuite.com/", :ad_spots => [{:format_id => formats.first.id, :name => "sidebar top"}])
11
+ site.ad_spots << AdGear::AdSpot.new(:format_id => formats.first.id, :name => "homepage banner")
8
12
 
9
- begin
10
13
  p site.new?
11
14
  p site.save
12
15
  p site.new?
13
16
  p "Saved"
14
17
 
15
- p site.embed_code
16
- p site.ad_spots
18
+ pp site.embed_code
19
+ pp site.ad_spots
17
20
 
18
21
  p site.ad_spots.class
19
22
 
@@ -21,6 +24,11 @@ begin
21
24
  site.ad_spots.detect {|as| as.name == "homepage banner"}.name = "home page banner"
22
25
  assert_equal 3, site.ad_spots.length, site.to_xml
23
26
 
27
+ ad_spot = AdGear::AdSpot.new(:format_id => formats.first.id, :name => "east", :site_id => site.id)
28
+ assert ad_spot.save, "Could not save new AdSpot"
29
+ site = AdGear::Site.find(site.id) # TODO: Support #reload
30
+ assert site.ad_spots.detect {|as| as.name == "east"}, "Could not find new AdSpot linked to old site"
31
+
24
32
  puts site.to_xml
25
33
  site.save
26
34
 
@@ -28,5 +36,4 @@ begin
28
36
  assert_equal 3, site.ad_spots.length, site.to_xml
29
37
  rescue ActiveResource::BadRequest => e
30
38
  p ActiveResource::Formats[:xml].decode(e.response.body)
31
- p "Could not save"
32
39
  end
@@ -2,5 +2,13 @@ module AdGear
2
2
  class AdUnit < AdGear::Base
3
3
  has_many :ad_unit_files, :ad_unit_clicks, :ad_unit_interactions, :ad_unit_variables
4
4
  belongs_to :campaign, :format
5
+
6
+ def active?
7
+ state == "active"
8
+ end
9
+
10
+ def deleted?
11
+ state == "deleted"
12
+ end
5
13
  end
6
14
  end
@@ -0,0 +1,4 @@
1
+ module AdGear
2
+ class Advertiser < AdGear::Base
3
+ end
4
+ end
data/lib/ad_gear/base.rb CHANGED
@@ -1,17 +1,10 @@
1
1
  module AdGear
2
2
  class Base < ActiveResource::Base
3
3
  def initialize(params={})
4
- params = params.inject(Hash.new) do |memo, (name, value)|
5
- name = name.to_s
6
- if self.class.belongs_to_associations.include?(name) then
7
- name = self.class.belongs_to_attribute_name_for(name)
8
- value = self.class.unpack_belongs_to_association(value)
9
- end
10
-
11
- memo[name] = value
12
- memo
4
+ super({})
5
+ params.each do |key, value|
6
+ send("#{key}=", value)
13
7
  end
14
- super(params)
15
8
  end
16
9
 
17
10
  # Declares a relationship where we store the ID, but accept and/or return the full object.
@@ -19,22 +12,30 @@ module AdGear
19
12
  # @example
20
13
  # class AdGear::AdSpot < AdGear::Base
21
14
  # belongs_to :format
15
+ # belongs_to :bookable, :polymorphic => true
22
16
  # end
23
17
  #
24
- # AdGear::AdSpot.new(:format => Format.find(1)).attributes
25
- # #=> {"format_id" => 1}
18
+ # include AdGear
19
+ # AdSpot.new(:format => Format.find(1), :bookable => Publisher.find(2)).attributes
20
+ # #=> {"format_id" => 1, "bookable_id" => 2, "bookable_type" => "Publisher"}
26
21
  def self.belongs_to(*attributes)
27
- attributes.flatten.compact.each do |attribute|
22
+ options = attributes.extract_options!
23
+ attributes.each do |attribute|
28
24
  attribute_name = attribute.to_s
29
- belongs_to_associations << attribute_name
30
-
31
- belongs_to_attribute_writer_for(attribute_name)
32
- belongs_to_attribute_reader_for(attribute_name)
25
+ belongs_to_associations[attribute_name] = options
26
+
27
+ if options[:polymorphic] then
28
+ polymorphic_belongs_to_attribute_writer_for(attribute_name)
29
+ polymorphic_belongs_to_attribute_reader_for(attribute_name)
30
+ else
31
+ belongs_to_attribute_writer_for(attribute_name)
32
+ belongs_to_attribute_reader_for(attribute_name)
33
+ end
33
34
  end
34
35
  end
35
36
 
36
37
  def self.belongs_to_associations #:nodoc:
37
- @belongs_to_associations ||= []
38
+ @belongs_to_associations ||= {}
38
39
  end
39
40
 
40
41
  # Defines a managed sub-collection. Elements managed through a #has_many are
@@ -69,7 +70,15 @@ module AdGear
69
70
  define_method(collection_name) do
70
71
  arr = @attributes[collection_name]
71
72
  return arr if arr.kind_of?(AdGear::HasManyArray)
72
- @attributes[collection_name] = AdGear::HasManyArray.new(collection_name.to_sym, arr)
73
+ @attributes[collection_name] = AdGear::HasManyArray.new(collection_name.to_sym, AdGear.const_get(collection_name.classify), arr)
74
+ end
75
+
76
+ define_method("#{collection_name}=") do |arr|
77
+ @attributes[collection_name] = if arr.kind_of?(AdGear::HasManyArray) then
78
+ arr
79
+ else
80
+ AdGear::HasManyArray.new(collection_name.to_sym, AdGear.const_get(collection_name.classify), arr)
81
+ end
73
82
  end
74
83
  end
75
84
  end
@@ -120,25 +129,40 @@ module AdGear
120
129
 
121
130
  private
122
131
 
132
+ def self.polymorphic_belongs_to_attribute_writer_for(attribute_name) #:nodoc:
133
+ define_method("#{attribute_name}=") do |value|
134
+ @attributes[self.class.belongs_to_attribute_name_for_id(attribute_name)] = value ? value.id : nil
135
+ @attributes[self.class.belongs_to_attribute_name_for_class(attribute_name)] = value ? value.class.name.demodulize : nil
136
+ end
137
+ end
138
+
139
+ def self.polymorphic_belongs_to_attribute_reader_for(attribute_name) #:nodoc:
140
+ define_method(attribute_name) do
141
+ klass = @attributes[belongs_to_attribute_name_for_class(attribute_name)]
142
+ id = @attributes[belongs_to_attribute_name_for_id(attribute_name)]
143
+ id.blank? ? nil : AdGear.const_get(AdGear.const_get(klass)).find(id)
144
+ end
145
+ end
146
+
123
147
  def self.belongs_to_attribute_writer_for(attribute_name) #:nodoc:
124
148
  define_method("#{attribute_name}=") do |value|
125
- @attributes[self.class.belongs_to_attribute_name_for(attribute_name)] = self.class.unpack_belongs_to_association(value)
149
+ @attributes[self.class.belongs_to_attribute_name_for_id(attribute_name)] = value ? value.id : nil
126
150
  end
127
151
  end
128
152
 
129
153
  def self.belongs_to_attribute_reader_for(attribute_name) #:nodoc:
130
154
  define_method(attribute_name) do
131
- id = @attributes[belongs_to_attribute_name_for(attribute_name)]
155
+ id = @attributes[belongs_to_attribute_name_for_id(attribute_name)]
132
156
  id.blank? ? nil : AdGear.const_get(attribute_name.classify).find(id)
133
157
  end
134
158
  end
135
159
 
136
- def self.belongs_to_attribute_name_for(association_name)
137
- "#{association_name}_id"
160
+ def self.belongs_to_attribute_name_for_class(association_name)
161
+ "#{association_name}_type"
138
162
  end
139
163
 
140
- def self.unpack_belongs_to_association(value)
141
- value ? value.id : nil
164
+ def self.belongs_to_attribute_name_for_id(association_name)
165
+ "#{association_name}_id"
142
166
  end
143
167
  end
144
168
  end
@@ -2,8 +2,9 @@ module AdGear
2
2
  class HasManyArray
3
3
  include Enumerable
4
4
 
5
- def initialize(name, saved=nil)
5
+ def initialize(name, klass, saved=nil)
6
6
  @name = name.to_s.singularize.dasherize + "-attributes"
7
+ @klass = klass
7
8
  @new = []
8
9
  @saved = []
9
10
  saved.each do |obj|
@@ -12,8 +13,15 @@ module AdGear
12
13
  end
13
14
 
14
15
  def <<(object)
15
- is_new = object.respond_to?(:new_record?) && object.new_record?
16
- root = is_new ? @new : @saved
16
+ root = if object.kind_of?(Hash) then
17
+ # Instantiate an object from the Hash, which will obviously be a new object
18
+ object = @klass.new(object)
19
+ @new
20
+ elsif object.respond_to?(:new_record?) && object.new_record?
21
+ @new
22
+ else
23
+ @saved
24
+ end
17
25
  root << object
18
26
  end
19
27
 
@@ -0,0 +1,5 @@
1
+ module AdGear
2
+ class PlacementMembership < AdGear::Base
3
+ belongs_to :ad_unit
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module AdGear
2
+ class PlacementRule < AdGear::Base
3
+ belongs_to :bookable, :polymorphic => true
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module AdGear
2
+ class Publisher < AdGear::Base
3
+ def active?
4
+ state == "active"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,26 @@
1
+ module AdGear
2
+ class PublisherPlacement < AdGear::Base
3
+ belongs_to :campaign, :format
4
+ has_many :placement_rules, :placement_memberships
5
+
6
+ def selection_mechanism
7
+ case value = attributes["selection_mechanism"]
8
+ when "R" ; "rotated"
9
+ when "W" ; "weighted"
10
+ else ; value
11
+ end
12
+ end
13
+
14
+ def selection_mechanism=(value)
15
+ case value
16
+ when /^r/i
17
+ attributes["selection_mechanism"] = "R"
18
+ when /^w/i
19
+ attributes["selection_mechanism"] = "W"
20
+ else
21
+ # Assign whatever we received, and hope for the best
22
+ attributes["selection_mechanism"] = value
23
+ end
24
+ end
25
+ end
26
+ end
data/lib/ad_gear.rb CHANGED
@@ -38,6 +38,12 @@ module AdGear
38
38
  autoload :Campaign, "ad_gear/campaign"
39
39
  autoload :Format, "ad_gear/format"
40
40
  autoload :Upload, "ad_gear/upload"
41
+ autoload :Publisher, "ad_gear/publisher"
42
+
43
+ # Placements and it's dependencies
44
+ autoload :PublisherPlacement, "ad_gear/publisher_placement"
45
+ autoload :PlacementRule, "ad_gear/placement_rule"
46
+ autoload :PlacementMembership, "ad_gear/placement_membership"
41
47
 
42
48
  # AdUnits and it's child models
43
49
  autoload :AdUnit, "ad_gear/ad_unit"
@@ -0,0 +1,22 @@
1
+ require "test_helper"
2
+
3
+ class AdGear::PublisherPlacementTest < Test::Unit::TestCase
4
+ def setup
5
+ super
6
+ AdGear.config = OpenStruct.new(:site => "http://test.host", :format => :xml)
7
+ end
8
+
9
+ def teardown
10
+ AdGear::Base.site = nil
11
+ super
12
+ end
13
+
14
+ should "polymorphically assign the bookable" do
15
+ publisher = AdGear::Publisher.new
16
+ publisher.stubs(:id).returns(42)
17
+
18
+ rule = AdGear::PlacementRule.new(:bookable => publisher)
19
+ assert_equal "Publisher", rule.bookable_type
20
+ assert_equal 42, rule.bookable_id
21
+ end
22
+ end
@@ -12,15 +12,16 @@ class AdGear::UploadTest < Test::Unit::TestCase
12
12
  end
13
13
 
14
14
  should "upload the data using RestClient" do
15
- xml = Builder::XmlMarkup.new
16
- xml.upload do
17
- xml.id 42
18
- end
19
-
20
- RestClient.expects(:post).with(responds_with(:to_s, URI.parse("http://test.host/api/uploads.xml").to_s), has_entry(:upload, has_entry(:uploaded_data, kind_of(File))), kind_of(Hash)).returns(xml.target!)
21
- upload = AdGear::Upload.new(:filename => "test/fixtures/access-denied-no-auth.txt")
22
- upload.save
23
- assert_equal 42, upload.id.to_i
15
+ xml = Builder::XmlMarkup.new
16
+ xml.upload do
17
+ xml.id 42
18
+ end
19
+
20
+ uri = URI.parse("http://test.host/api/uploads.xml")
21
+ RestClient.expects(:post).with(uri.to_s, all_of(has_key("upload[uploaded_data]"), has_key("upload[filename]")), {}).returns(xml.target!)
22
+ upload = AdGear::Upload.new(:filename => "test/fixtures/access-denied-no-auth.txt")
23
+ upload.save
24
+ assert_equal 42, upload.id.to_i
24
25
  end
25
26
 
26
27
  should "raise an exception when calling #update_attribute" do
@@ -34,4 +35,24 @@ class AdGear::UploadTest < Test::Unit::TestCase
34
35
  AdGear::Upload.new.update_attributes
35
36
  end
36
37
  end
38
+
39
+ should "retry with Digest authentication when RestClient::Unauthorized is raised" do
40
+ xml = Builder::XmlMarkup.new
41
+ xml.upload do
42
+ xml.id 42
43
+ end
44
+
45
+ uri = URI.parse("http://test.host/api/uploads.xml")
46
+
47
+ ActiveResource::Digest.stubs(:authenticate).returns("Calculated Authorization Header")
48
+ headers = {"www-authenticate" => ""}
49
+ unauthorized_response = stub("response", :[] => "Server Generated WWW-Authenticate Header")
50
+
51
+ RestClient.stubs(:post).with(anything, anything, {}).raises(RestClient::Unauthorized.new(unauthorized_response))
52
+ RestClient.expects(:post).with(anything, anything, has_key("Authorization")).returns(xml.target!)
53
+
54
+ upload = AdGear::Upload.new(:filename => "test/fixtures/access-denied-no-auth.txt")
55
+ upload.save
56
+ assert_equal 42, upload.id.to_i
57
+ end
37
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: francois-ad_gear_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Fran\xC3\xA7ois Beausoleil"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-12 00:00:00 -07:00
12
+ date: 2009-09-02 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -71,6 +71,7 @@ files:
71
71
  - ad_gear_client.gemspec
72
72
  - examples/.gitignore
73
73
  - examples/ad_gear.yml.sample
74
+ - examples/create_placement.rb
74
75
  - examples/prelude.rb
75
76
  - examples/read_write_site.rb
76
77
  - examples/upload_file_to_ad_unit.rb
@@ -81,6 +82,7 @@ files:
81
82
  - lib/ad_gear/ad_unit_file.rb
82
83
  - lib/ad_gear/ad_unit_interaction.rb
83
84
  - lib/ad_gear/ad_unit_variable.rb
85
+ - lib/ad_gear/advertiser.rb
84
86
  - lib/ad_gear/base.rb
85
87
  - lib/ad_gear/campaign.rb
86
88
  - lib/ad_gear/click.rb
@@ -89,6 +91,10 @@ files:
89
91
  - lib/ad_gear/format.rb
90
92
  - lib/ad_gear/has_many_array.rb
91
93
  - lib/ad_gear/interaction.rb
94
+ - lib/ad_gear/placement_membership.rb
95
+ - lib/ad_gear/placement_rule.rb
96
+ - lib/ad_gear/publisher.rb
97
+ - lib/ad_gear/publisher_placement.rb
92
98
  - lib/ad_gear/site.rb
93
99
  - lib/ad_gear/template.rb
94
100
  - lib/ad_gear/upload.rb
@@ -97,14 +103,14 @@ files:
97
103
  - lib/core_ext.rb
98
104
  - test/ad_gear/ad_spot_test.rb
99
105
  - test/ad_gear/config_test.rb
106
+ - test/ad_gear/placement_rule_test.rb
100
107
  - test/ad_gear/site_test.rb
101
108
  - test/ad_gear/upload_test.rb
102
109
  - test/ad_gear_test.rb
103
110
  - test/fixtures/access-denied-no-auth.txt
104
111
  - test/test_helper.rb
105
- has_rdoc: false
112
+ has_rdoc: true
106
113
  homepage: http://github.com/francois/ad_gear_client
107
- licenses:
108
114
  post_install_message:
109
115
  rdoc_options:
110
116
  - --charset=UTF-8
@@ -125,17 +131,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
131
  requirements: []
126
132
 
127
133
  rubyforge_project: ad_gear_client
128
- rubygems_version: 1.3.5
134
+ rubygems_version: 1.2.0
129
135
  signing_key:
130
- specification_version: 3
136
+ specification_version: 2
131
137
  summary: A Ruby client for accessing AdGear http://bloomdigital.com/
132
138
  test_files:
133
139
  - test/ad_gear/ad_spot_test.rb
134
140
  - test/ad_gear/config_test.rb
141
+ - test/ad_gear/placement_rule_test.rb
135
142
  - test/ad_gear/site_test.rb
136
143
  - test/ad_gear/upload_test.rb
137
144
  - test/ad_gear_test.rb
138
145
  - test/test_helper.rb
146
+ - examples/create_placement.rb
139
147
  - examples/prelude.rb
140
148
  - examples/read_write_site.rb
141
149
  - examples/upload_file_to_ad_unit.rb