ticketmaster-lighthouse 0.5.7 → 0.6.7

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.7
1
+ 0.6.7
@@ -24,7 +24,16 @@ module TicketMaster::Provider
24
24
  ::Lighthouse.authenticate(auth.username, auth.password)
25
25
  end
26
26
  end
27
-
27
+
28
+ def valid?
29
+ begin
30
+ PROJECT_API.find(:first)
31
+ true
32
+ rescue
33
+ false
34
+ end
35
+ end
36
+
28
37
  # The projects
29
38
  #
30
39
  # We have to merge in the auth information because, due to the class-based authentication
@@ -34,13 +43,13 @@ module TicketMaster::Provider
34
43
  authorize
35
44
  super(*options)
36
45
  end
37
-
46
+
38
47
  # The project
39
48
  def project(*options)
40
49
  authorize
41
50
  super(*options)
42
51
  end
43
-
52
+
44
53
  # The tickets
45
54
  #
46
55
  # Due to the nature of lighthouse, we must have the project_id to pull tickets. You can
@@ -56,12 +65,12 @@ module TicketMaster::Provider
56
65
  authorize
57
66
  super(*options)
58
67
  end
59
-
68
+
60
69
  # the ticket
61
70
  def ticket(*options)
62
71
  authorize
63
72
  super(*options)
64
73
  end
65
-
74
+
66
75
  end
67
76
  end
@@ -1,11 +1,22 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Ticketmaster::Provider::Lighthouse" do
4
-
5
- it "should be able to instantiate a new instance" do
4
+
5
+ before(:each) do
6
6
  @ticketmaster = TicketMaster.new(:lighthouse, {:account => 'ticketmaster', :token => '000000'})
7
+ headers = {'X-LighthouseToken' => '000000'}
8
+ ActiveResource::HttpMock.respond_to do |mock|
9
+ mock.get '/projects.xml', headers, fixture_for('projects'), 200
10
+ end
11
+ end
12
+
13
+ it "should be able to instantiate a new instance" do
7
14
  @ticketmaster.should be_an_instance_of(TicketMaster)
8
15
  @ticketmaster.should be_a_kind_of(TicketMaster::Provider::Lighthouse)
9
16
  end
10
-
17
+
18
+ it "should return true for a valid authentication" do
19
+ @ticketmaster.valid?.should be_true
20
+ end
21
+
11
22
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-lighthouse}
8
- s.version = "0.5.7"
8
+ s.version = "0.6.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Hong"]
12
- s.date = %q{2011-05-04}
12
+ s.date = %q{2011-06-06}
13
13
  s.description = %q{Allows ticketmaster to interact with Lighthouse's issue tracking system.}
14
14
  s.email = %q{hong.quach@abigfisch.com}
15
15
  s.extra_rdoc_files = [
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
44
44
  ]
45
45
  s.homepage = %q{http://github.com/kiafaldorius/ticketmaster-lighthouse}
46
46
  s.require_paths = ["lib"]
47
- s.rubygems_version = %q{1.6.0}
47
+ s.rubygems_version = %q{1.6.1}
48
48
  s.summary = %q{Ticketmaster Provider for Lighthouse}
49
49
  s.test_files = [
50
50
  "spec/comments_spec.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-lighthouse
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 7
10
- version: 0.5.7
10
+ version: 0.6.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hong
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-04 00:00:00 +00:00
18
+ date: 2011-06-06 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  requirements: []
178
178
 
179
179
  rubyforge_project:
180
- rubygems_version: 1.6.0
180
+ rubygems_version: 1.6.1
181
181
  signing_key:
182
182
  specification_version: 3
183
183
  summary: Ticketmaster Provider for Lighthouse