one40_proof 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -43,7 +43,7 @@ To get an ad for a specific user
43
43
  require 'rubygems'
44
44
  require 'one40_proof'
45
45
 
46
- ad = One40Proof::UserAd.new(:user_id => 'reddavis', :publisher_id => 'your publisher id')
46
+ ad = One40Proof::UserAd.new(:user_id => 'reddavis', :app_id => 'your app_id')
47
47
 
48
48
 
49
49
  To get an ad for a specific query
@@ -51,8 +51,8 @@ To get an ad for a specific query
51
51
  require 'rubygems'
52
52
  require 'one40_proof'
53
53
 
54
- ad = One40Proof::Search.new(:user_id => 'reddavis', :publisher_id => 'your publisher id', :q => 'magic hats')
54
+ ad = One40Proof::Search.new(:user_id => 'reddavis', :app_id => 'your app_id', :q => 'magic hats')
55
55
 
56
56
  == Copyright
57
57
 
58
- Copyright (c) 2010 Red Davis. See LICENSE for details.
58
+ Copyright (c) 2010 Red Davis. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
@@ -8,7 +8,7 @@ module One40Proof
8
8
 
9
9
  # Options:
10
10
  # * user_id. Required. The Twitter ID or screen name of a user.
11
- # * publisher_id. Required. Your 140 Proof app id.
11
+ # * app_id. Required. Your 140 Proof app id.
12
12
  # * q. Required. The query the user entered. Query strings should be URL encoded. Queries are limited 140 URL encoded characters.
13
13
  # * lat. Optional. The user's current latitude. Note: The valid ranges for latitude is -90.0 to +90.0 (North is positive) inclusive.
14
14
  # This parameter will be ignored if outside that range, if it is not a number, or if there not a corresponding long parameter with this request.
@@ -21,4 +21,4 @@ module One40Proof
21
21
  end
22
22
 
23
23
  end
24
- end
24
+ end
@@ -8,7 +8,7 @@ module One40Proof
8
8
 
9
9
  # Options include
10
10
  # * user_id. Required. The Twitter ID or screen name of a user.
11
- # * publisher_id. Required. Your 140 Proof app id.
11
+ # * app_id. Required. Your 140 Proof app id.
12
12
  # * lat. Optional. The user's current latitude. Note:
13
13
  # The valid ranges for latitude is -90.0 to +90.0 (North is positive) inclusive.
14
14
  # This parameter will be ignored if outside that range, if it is not a number, or if there not a corresponding long parameter with this request.
@@ -21,4 +21,4 @@ module One40Proof
21
21
  end
22
22
 
23
23
  end
24
- end
24
+ end
@@ -0,0 +1,78 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{one40_proof}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["reddavis"]
12
+ s.date = %q{2010-02-19}
13
+ s.description = %q{A Ruby wrapper around the 140Proof API. Documentation can be found here - http://developers.140proof.com/docs/}
14
+ s.email = %q{reddavis@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/one40_proof.rb",
27
+ "lib/one40_proof/attributes/action_urls.rb",
28
+ "lib/one40_proof/attributes/user.rb",
29
+ "lib/one40_proof/base.rb",
30
+ "lib/one40_proof/exceptions.rb",
31
+ "lib/one40_proof/search.rb",
32
+ "lib/one40_proof/test.rb",
33
+ "lib/one40_proof/user_ad.rb",
34
+ "one40_proof.gemspec",
35
+ "spec/one40_proof/attributes/action_urls_spec.rb",
36
+ "spec/one40_proof/attributes/user_spec.rb",
37
+ "spec/one40_proof/base_spec.rb",
38
+ "spec/one40_proof/search_spec.rb",
39
+ "spec/one40_proof/test_spec.rb",
40
+ "spec/one40_proof/user_ad_spec.rb",
41
+ "spec/spec.opts",
42
+ "spec/spec_helper.rb"
43
+ ]
44
+ s.homepage = %q{http://github.com/reddavis/One40Proof}
45
+ s.rdoc_options = ["--charset=UTF-8"]
46
+ s.require_paths = ["lib"]
47
+ s.rubygems_version = %q{1.3.5}
48
+ s.summary = %q{A Ruby wrapper around the 140Proof API}
49
+ s.test_files = [
50
+ "spec/one40_proof/attributes/action_urls_spec.rb",
51
+ "spec/one40_proof/attributes/user_spec.rb",
52
+ "spec/one40_proof/base_spec.rb",
53
+ "spec/one40_proof/search_spec.rb",
54
+ "spec/one40_proof/test_spec.rb",
55
+ "spec/one40_proof/user_ad_spec.rb",
56
+ "spec/spec_helper.rb"
57
+ ]
58
+
59
+ if s.respond_to? :specification_version then
60
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
61
+ s.specification_version = 3
62
+
63
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
64
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
65
+ s.add_runtime_dependency(%q<json>, [">= 0"])
66
+ s.add_runtime_dependency(%q<httparty>, [">= 0"])
67
+ else
68
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
69
+ s.add_dependency(%q<json>, [">= 0"])
70
+ s.add_dependency(%q<httparty>, [">= 0"])
71
+ end
72
+ else
73
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
74
+ s.add_dependency(%q<json>, [">= 0"])
75
+ s.add_dependency(%q<httparty>, [">= 0"])
76
+ end
77
+ end
78
+
@@ -7,26 +7,26 @@ describe "ActionUrls" do
7
7
  end
8
8
 
9
9
  it "should return the click_url" do
10
- @action_urls.click_url.should == "http://api.140proof.com/clicks/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"
10
+ @action_urls.click_url.should == "http://api.140proof.com/clicks/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7"
11
11
  end
12
12
 
13
13
  it "should return favorite_url" do
14
- @action_urls.favorite_url.should == "http://api.140proof.com/favorites/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"
14
+ @action_urls.favorite_url.should == "http://api.140proof.com/favorites/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7"
15
15
  end
16
16
 
17
17
  it "should return impression_url" do
18
- @action_urls.impression_url.should == "http://api.140proof.com/impressions/verify.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"
18
+ @action_urls.impression_url.should == "http://api.140proof.com/impressions/verify.json?ad_id=1&impression_id=1&app_id=test&user_id=7"
19
19
  end
20
20
 
21
21
  it "should return friendship_url" do
22
- @action_urls.friendship_url.should == "http://api.140proof.com/friendships/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"
22
+ @action_urls.friendship_url.should == "http://api.140proof.com/friendships/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7"
23
23
  end
24
24
 
25
25
  it "should return reply url" do
26
- @action_urls.reply_url.should == "http://api.140proof.com/replies/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"
26
+ @action_urls.reply_url.should == "http://api.140proof.com/replies/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7"
27
27
  end
28
28
 
29
29
  it "should return retweet_url" do
30
- @action_urls.retweet_url.should == "http://api.140proof.com/retweets/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"
30
+ @action_urls.retweet_url.should == "http://api.140proof.com/retweets/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7"
31
31
  end
32
- end
32
+ end
@@ -2,9 +2,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
2
 
3
3
  describe "Search" do
4
4
  it "should request GET /ads/search.json..." do
5
- url = base_url + '/ads/search.json?user_id=sferik&publisher_id=test&q=New%20York%20Mets'
5
+ url = base_url + '/ads/search.json?user_id=sferik&app_id=test&q=New%20York%20Mets'
6
6
  stub_request(:get, url)
7
- One40Proof::Search.new(:user_id => 'sferik', :publisher_id => 'test', :q => 'New York Mets')
7
+ One40Proof::Search.new(:user_id => 'sferik', :app_id => 'test', :q => 'New York Mets')
8
8
 
9
9
  WebMock.should have_requested(:get, url)
10
10
  end
@@ -2,9 +2,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
2
 
3
3
  describe "UserAd" do
4
4
  it "should request GET /ads/user.json..." do
5
- url = base_url + '/ads/user.json?user_id=sferik&publisher_id=test'
5
+ url = base_url + '/ads/user.json?user_id=sferik&app_id=test'
6
6
  stub_request(:get, url)
7
- One40Proof::UserAd.new(:user_id => 'sferik', :publisher_id => 'test')
7
+ One40Proof::UserAd.new(:user_id => 'sferik', :app_id => 'test')
8
8
 
9
9
  WebMock.should have_requested(:get, url)
10
10
  end
data/spec/spec_helper.rb CHANGED
@@ -14,12 +14,12 @@ end
14
14
 
15
15
  # From http://api.140proof.com/test/ads.json
16
16
  def test_ad_data
17
- %{{"ads":[{"status":{"id":6017128450},"byline":"ads by 140 Proof","text":"NEW #Mets 2010 Alternate Jersey can be ordered here --> http://bit.ly/8P6xYm","action_urls":{"click_url":"http://api.140proof.com/clicks/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7","favorite_url":"http://api.140proof.com/favorites/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7","impression_url":"http://api.140proof.com/impressions/verify.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7","friendship_url":"http://api.140proof.com/friendships/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7","reply_url":"http://api.140proof.com/replies/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7","retweet_url":"http://api.140proof.com/retweets/create.json?ad_id=1&impression_id=1&publisher_id=test&user_id=7"},"user":{"profile_image_url":"http://img.tweetimag.es/i/Mets_n","name":"New York Mets","id":39367703,"screen_name":"Mets"},"image_url":"http://img.tweetimag.es/i/mets_b"}]}}
17
+ %{{"ads":[{"status":{"id":6017128450},"byline":"ads by 140 Proof","text":"NEW #Mets 2010 Alternate Jersey can be ordered here --> http://bit.ly/8P6xYm","action_urls":{"click_url":"http://api.140proof.com/clicks/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7","favorite_url":"http://api.140proof.com/favorites/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7","impression_url":"http://api.140proof.com/impressions/verify.json?ad_id=1&impression_id=1&app_id=test&user_id=7","friendship_url":"http://api.140proof.com/friendships/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7","reply_url":"http://api.140proof.com/replies/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7","retweet_url":"http://api.140proof.com/retweets/create.json?ad_id=1&impression_id=1&app_id=test&user_id=7"},"user":{"profile_image_url":"http://img.tweetimag.es/i/Mets_n","name":"New York Mets","id":39367703,"screen_name":"Mets"},"image_url":"http://img.tweetimag.es/i/mets_b"}]}}
18
18
  end
19
19
 
20
- # From http://api.140proof.com/ads/user.json?user_id=sferik&publisher_id=test
20
+ # From http://api.140proof.com/ads/user.json?user_id=sferik&app_id=test
21
21
  def user_ad_data
22
- %{{"ads":[{"status":{"id":null},"byline":"ads by 140 Proof","text":"Serving up farm-fresh soul food and San Francisco's finest chicken and waffles. Follow @LittleSkillet for today's specials.","action_urls":{"click_url":"http://api.140proof.com/clicks/create.json?ad_id=295&impression_id=7933117&publisher_id=test&user_id=7505382","favorite_url":null,"impression_url":"http://api.140proof.com/impressions/verify.json?ad_id=295&impression_id=7933117&publisher_id=test&user_id=7505382","friendship_url":"http://api.140proof.com/friendships/create.json?ad_id=295&impression_id=7933117&publisher_id=test&user_id=7505382","reply_url":"http://api.140proof.com/replies/create.json?ad_id=295&impression_id=7933117&publisher_id=test&user_id=7505382","retweet_url":null},"user":{"profile_image_url":"http://img.tweetimag.es/i/LittleSkillet_n","name":"Little Skillet","id":27710301,"screen_name":"LittleSkillet"},"image_url":"http://img.tweetimag.es/i/LittleSkillet_n"}]}}
22
+ %{{"ads":[{"status":{"id":null},"byline":"ads by 140 Proof","text":"Serving up farm-fresh soul food and San Francisco's finest chicken and waffles. Follow @LittleSkillet for today's specials.","action_urls":{"click_url":"http://api.140proof.com/clicks/create.json?ad_id=295&impression_id=7933117&app_id=test&user_id=7505382","favorite_url":null,"impression_url":"http://api.140proof.com/impressions/verify.json?ad_id=295&impression_id=7933117&app_id=test&user_id=7505382","friendship_url":"http://api.140proof.com/friendships/create.json?ad_id=295&impression_id=7933117&app_id=test&user_id=7505382","reply_url":"http://api.140proof.com/replies/create.json?ad_id=295&impression_id=7933117&app_id=test&user_id=7505382","retweet_url":null},"user":{"profile_image_url":"http://img.tweetimag.es/i/LittleSkillet_n","name":"Little Skillet","id":27710301,"screen_name":"LittleSkillet"},"image_url":"http://img.tweetimag.es/i/LittleSkillet_n"}]}}
23
23
  end
24
24
 
25
25
  Spec::Runner.configure do |config|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: one40_proof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - reddavis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-17 00:00:00 +00:00
12
+ date: 2010-02-19 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -66,6 +66,7 @@ files:
66
66
  - lib/one40_proof/search.rb
67
67
  - lib/one40_proof/test.rb
68
68
  - lib/one40_proof/user_ad.rb
69
+ - one40_proof.gemspec
69
70
  - spec/one40_proof/attributes/action_urls_spec.rb
70
71
  - spec/one40_proof/attributes/user_spec.rb
71
72
  - spec/one40_proof/base_spec.rb