ticketmaster-codaset 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -2,8 +2,8 @@ module TicketMaster::Provider
2
2
  # This is the Codaset Provider for ticketmaster
3
3
  module Codaset
4
4
  include TicketMaster::Provider::Base
5
- TICKET_API = Codaset::Ticket # The class to access the api's tickets
6
- PROJECT_API = Codaset::Project # The class to access the api's projects
5
+ TICKET_API = CodasetAPI::Ticket # The class to access the api's tickets
6
+ PROJECT_API = CodasetAPI::Project # The class to access the api's projects
7
7
 
8
8
  # This is for cases when you want to instantiate using TicketMaster::Provider::Codaset.new(auth)
9
9
  def self.new(auth = {})
@@ -25,6 +25,15 @@ module TicketMaster::Provider
25
25
  end
26
26
 
27
27
  # declare needed overloaded methods here
28
+ #
29
+ def valid?
30
+ begin
31
+ PROJECT_API.find(:first)
32
+ true
33
+ rescue
34
+ false
35
+ end
36
+ end
28
37
 
29
38
  end
30
39
  end
@@ -1,10 +1,10 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Ticketmaster::Provider::Codaset" do
4
- it "should be able to instantiate a new instance" do
5
-
6
- stubs = Faraday::Adapter::Test::Stubs.new do |stub|
7
- ACCESS_TOKEN = { "access_token" => "01234567890abcdef", "refresh_token" => "01234567890abcdef", "expires_in" => 1209600, "username" => "anymoto" }
4
+
5
+ before (:all) do
6
+ stubs = Faraday::Adapter::Test::Stubs.new do |stub|
7
+ #ACCESS_TOKEN = { "access_token" => "01234567890abcdef", "refresh_token" => "01234567890abcdef", "expires_in" => 1209600, "username" => "anymoto" }
8
8
  stub.post('/authorization/token') { [200, {}, ACCESS_TOKEN.to_json] }
9
9
  end
10
10
 
@@ -16,7 +16,14 @@ describe "Ticketmaster::Provider::Codaset" do
16
16
  end
17
17
 
18
18
  @ticketmaster = TicketMaster.new(:codaset, {:username => 'anymoto', :password => '000000', :client_id => '07f16ec7', :client_secret => '442fe0b16'})
19
+ end
20
+
21
+ it "should be able to instantiate a new instance" do
19
22
  @ticketmaster.should be_an_instance_of(TicketMaster)
20
23
  @ticketmaster.should be_a_kind_of(TicketMaster::Provider::Codaset)
21
24
  end
25
+
26
+ it "should return true with valid authentication" do
27
+ @ticketmaster.valid?.should be_true
28
+ end
22
29
  end
data/spec/tickets_spec.rb CHANGED
@@ -14,7 +14,7 @@ describe "Ticketmaster::Provider::Codaset::Ticket" do
14
14
  end
15
15
 
16
16
  stubs = Faraday::Adapter::Test::Stubs.new do |stub|
17
- #ACCESS_TOKEN = { "access_token" => "01234567890abcdef", "refresh_token" => "01234567890abcdef", "expires_in" => 1209600, "username" => "anymoto" }
17
+ ACCESS_TOKEN = { "access_token" => "01234567890abcdef", "refresh_token" => "01234567890abcdef", "expires_in" => 1209600, "username" => "anymoto" }
18
18
  stub.post('/authorization/token') { [200, {}, ACCESS_TOKEN.to_json] }
19
19
  end
20
20
 
@@ -77,4 +77,4 @@ describe "Ticketmaster::Provider::Codaset::Ticket" do
77
77
  end
78
78
 
79
79
  end
80
-
80
+
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-codaset}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["HybridGroup"]
12
- s.date = %q{2011-01-24}
12
+ s.date = %q{2011-06-23}
13
13
  s.description = %q{Allows ticketmaster to interact with Codaset.}
14
14
  s.email = %q{ana@hybridgroup.com}
15
15
  s.extra_rdoc_files = [
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
52
52
  ]
53
53
  s.homepage = %q{http://ticket.rb}
54
54
  s.require_paths = ["lib"]
55
- s.rubygems_version = %q{1.4.2}
55
+ s.rubygems_version = %q{1.6.2}
56
56
  s.summary = %q{This is a ticketmaster provider for interacting with Codaset}
57
57
  s.test_files = [
58
58
  "spec/comments_spec.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-codaset
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - HybridGroup
@@ -15,14 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-24 00:00:00 -06:00
18
+ date: 2011-06-23 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  prerelease: false
23
- name: ticketmaster
24
23
  type: :runtime
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
26
25
  none: false
27
26
  requirements:
28
27
  - - "="
@@ -33,12 +32,12 @@ dependencies:
33
32
  - 5
34
33
  - 2
35
34
  version: 0.5.2
36
- requirement: *id001
35
+ name: ticketmaster
36
+ version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
38
  prerelease: false
39
- name: oauth2
40
39
  type: :runtime
41
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ requirement: &id002 !ruby/object:Gem::Requirement
42
41
  none: false
43
42
  requirements:
44
43
  - - ">="
@@ -47,12 +46,12 @@ dependencies:
47
46
  segments:
48
47
  - 0
49
48
  version: "0"
50
- requirement: *id002
49
+ name: oauth2
50
+ version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency
52
52
  prerelease: false
53
- name: rspec
54
53
  type: :development
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
56
55
  none: false
57
56
  requirements:
58
57
  - - ">="
@@ -63,12 +62,12 @@ dependencies:
63
62
  - 2
64
63
  - 9
65
64
  version: 1.2.9
66
- requirement: *id003
65
+ name: rspec
66
+ version_requirements: *id003
67
67
  - !ruby/object:Gem::Dependency
68
68
  prerelease: false
69
- name: bundler
70
69
  type: :development
71
- version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ requirement: &id004 !ruby/object:Gem::Requirement
72
71
  none: false
73
72
  requirements:
74
73
  - - ~>
@@ -79,12 +78,12 @@ dependencies:
79
78
  - 0
80
79
  - 0
81
80
  version: 1.0.0
82
- requirement: *id004
81
+ name: bundler
82
+ version_requirements: *id004
83
83
  - !ruby/object:Gem::Dependency
84
84
  prerelease: false
85
- name: jeweler
86
85
  type: :development
87
- version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ requirement: &id005 !ruby/object:Gem::Requirement
88
87
  none: false
89
88
  requirements:
90
89
  - - ~>
@@ -95,12 +94,12 @@ dependencies:
95
94
  - 5
96
95
  - 1
97
96
  version: 1.5.1
98
- requirement: *id005
97
+ name: jeweler
98
+ version_requirements: *id005
99
99
  - !ruby/object:Gem::Dependency
100
100
  prerelease: false
101
- name: rcov
102
101
  type: :development
103
- version_requirements: &id006 !ruby/object:Gem::Requirement
102
+ requirement: &id006 !ruby/object:Gem::Requirement
104
103
  none: false
105
104
  requirements:
106
105
  - - ">="
@@ -109,12 +108,12 @@ dependencies:
109
108
  segments:
110
109
  - 0
111
110
  version: "0"
112
- requirement: *id006
111
+ name: rcov
112
+ version_requirements: *id006
113
113
  - !ruby/object:Gem::Dependency
114
114
  prerelease: false
115
- name: activesupport
116
115
  type: :runtime
117
- version_requirements: &id007 !ruby/object:Gem::Requirement
116
+ requirement: &id007 !ruby/object:Gem::Requirement
118
117
  none: false
119
118
  requirements:
120
119
  - - ">="
@@ -125,12 +124,12 @@ dependencies:
125
124
  - 3
126
125
  - 0
127
126
  version: 2.3.0
128
- requirement: *id007
127
+ name: activesupport
128
+ version_requirements: *id007
129
129
  - !ruby/object:Gem::Dependency
130
130
  prerelease: false
131
- name: activeresource
132
131
  type: :runtime
133
- version_requirements: &id008 !ruby/object:Gem::Requirement
132
+ requirement: &id008 !ruby/object:Gem::Requirement
134
133
  none: false
135
134
  requirements:
136
135
  - - ">="
@@ -141,7 +140,8 @@ dependencies:
141
140
  - 3
142
141
  - 0
143
142
  version: 2.3.0
144
- requirement: *id008
143
+ name: activeresource
144
+ version_requirements: *id008
145
145
  description: Allows ticketmaster to interact with Codaset.
146
146
  email: ana@hybridgroup.com
147
147
  executables: []
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  requirements: []
215
215
 
216
216
  rubyforge_project:
217
- rubygems_version: 1.4.2
217
+ rubygems_version: 1.6.2
218
218
  signing_key:
219
219
  specification_version: 3
220
220
  summary: This is a ticketmaster provider for interacting with Codaset