ticketmaster-lighthouse 0.3.7 → 0.3.8
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/README.md +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/lighthouse/lighthouse-api.rb +1 -1
- data/lib/provider/lighthouse.rb +3 -0
- data/spec/comments_spec.rb +9 -9
- data/spec/projects_spec.rb +10 -10
- data/spec/ticketmaster-lighthouse_spec.rb +2 -2
- data/spec/tickets_spec.rb +9 -9
- data/ticketmaster-lighthouse.gemspec +5 -5
- metadata +7 -7
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ begin
|
|
11
11
|
gem.homepage = "http://github.com/kiafaldorius/ticketmaster-lighthouse"
|
12
12
|
gem.authors = ["Hong"]
|
13
13
|
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
-
gem.add_dependency "ticketmaster", ">= 0.
|
14
|
+
gem.add_dependency "ticketmaster", ">= 0.3.0"
|
15
15
|
gem.add_dependency "activesupport", ">= 2.3.2"
|
16
16
|
gem.add_dependency "activeresource", ">= 2.3.2"
|
17
17
|
gem.add_dependency "addressable", ">= 2.1.2"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.8
|
data/lib/provider/lighthouse.rb
CHANGED
@@ -14,6 +14,9 @@ module TicketMaster::Provider
|
|
14
14
|
def authorize(auth = {})
|
15
15
|
@authentication ||= TicketMaster::Authenticator.new(auth)
|
16
16
|
auth = @authentication
|
17
|
+
if auth.account.nil? or (auth.token.nil? and (auth.username.nil? and auth.password.nil?))
|
18
|
+
raise "Please provide at least an account (subdomain) and token or username and password)"
|
19
|
+
end
|
17
20
|
LighthouseAPI.account = auth.account || auth.subdomain
|
18
21
|
if auth.token
|
19
22
|
LighthouseAPI.token = auth.token
|
data/spec/comments_spec.rb
CHANGED
@@ -22,33 +22,33 @@ describe "Ticketmaster::Provider::Lighthouse::Comment" do
|
|
22
22
|
|
23
23
|
it "should be able to load all comments" do
|
24
24
|
@comments = @ticket.comments
|
25
|
-
@comments.should be_an_instance_of
|
26
|
-
@comments.first.should be_an_instance_of
|
25
|
+
@comments.should be_an_instance_of(Array)
|
26
|
+
@comments.first.should be_an_instance_of(@klass)
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should be able to load all comments based on 'id's" do # lighthouse comments don't have ids, so we're faking them
|
30
30
|
@comments = @ticket.comments([0,2,3])
|
31
|
-
@comments.should be_an_instance_of
|
31
|
+
@comments.should be_an_instance_of(Array)
|
32
32
|
@comments.first.id.should == 0
|
33
33
|
@comments.last.id.should == 3
|
34
|
-
@comments[1].should be_an_instance_of
|
34
|
+
@comments[1].should be_an_instance_of(@klass)
|
35
35
|
end
|
36
36
|
|
37
37
|
it "should be able to load all comments based on attributes" do
|
38
38
|
@comments = @ticket.comments(:number => @ticket.id)
|
39
|
-
@comments.should be_an_instance_of
|
40
|
-
@comments.first.should be_an_instance_of
|
39
|
+
@comments.should be_an_instance_of(Array)
|
40
|
+
@comments.first.should be_an_instance_of(@klass)
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should be able to load a comment based on id" do
|
44
44
|
@comment = @ticket.comment(3)
|
45
|
-
@comment.should be_an_instance_of
|
45
|
+
@comment.should be_an_instance_of(@klass)
|
46
46
|
@comment.id.should == 3
|
47
47
|
end
|
48
48
|
|
49
49
|
it "should be able to load a comment based on attributes" do
|
50
50
|
@comment = @ticket.comment(:number => @ticket.id)
|
51
|
-
@comment.should be_an_instance_of
|
51
|
+
@comment.should be_an_instance_of(@klass)
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should return the class" do
|
@@ -59,6 +59,6 @@ describe "Ticketmaster::Provider::Lighthouse::Comment" do
|
|
59
59
|
@test = @klass.find_by_id(54448, 2, 10)
|
60
60
|
@klass.should_receive(:find_by_id).with(54448, 2, 11).and_return(@test)
|
61
61
|
@comment = @ticket.comment!(:body => 'hello there boys and girls')
|
62
|
-
@comment.should be_an_instance_of
|
62
|
+
@comment.should be_an_instance_of(@klass)
|
63
63
|
end
|
64
64
|
end
|
data/spec/projects_spec.rb
CHANGED
@@ -22,37 +22,37 @@ describe "Ticketmaster::Provider::Lighthouse::Project" do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should be able to load all projects" do
|
25
|
-
@ticketmaster.projects.should be_an_instance_of
|
26
|
-
@ticketmaster.projects.first.should be_an_instance_of
|
25
|
+
@ticketmaster.projects.should be_an_instance_of(Array)
|
26
|
+
@ticketmaster.projects.first.should be_an_instance_of(@klass)
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should be able to load projects from an array of ids" do
|
30
30
|
@projects = @ticketmaster.projects([@project_id])
|
31
|
-
@projects.should be_an_instance_of
|
32
|
-
@projects.first.should be_an_instance_of
|
31
|
+
@projects.should be_an_instance_of(Array)
|
32
|
+
@projects.first.should be_an_instance_of(@klass)
|
33
33
|
@projects.first.id.should == @project_id
|
34
34
|
end
|
35
35
|
|
36
36
|
it "should be able to load all projects from attributes" do
|
37
37
|
@projects = @ticketmaster.projects(:id => @project_id)
|
38
|
-
@projects.should be_an_instance_of
|
39
|
-
@projects.first.should be_an_instance_of
|
38
|
+
@projects.should be_an_instance_of(Array)
|
39
|
+
@projects.first.should be_an_instance_of(@klass)
|
40
40
|
@projects.first.id.should == @project_id
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should be able to find a project" do
|
44
44
|
@ticketmaster.project.should == @klass
|
45
|
-
@ticketmaster.project.find(@project_id).should be_an_instance_of
|
45
|
+
@ticketmaster.project.find(@project_id).should be_an_instance_of(@klass)
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should be able to find a project by id" do
|
49
|
-
@ticketmaster.project(@project_id).should be_an_instance_of
|
49
|
+
@ticketmaster.project(@project_id).should be_an_instance_of(@klass)
|
50
50
|
@ticketmaster.project(@project_id).id.should == @project_id
|
51
51
|
end
|
52
52
|
|
53
53
|
it "should be able to find a project by attributes" do
|
54
54
|
@ticketmaster.project(:id => @project_id).id.should == @project_id
|
55
|
-
@ticketmaster.project(:id => @project_id).should be_an_instance_of
|
55
|
+
@ticketmaster.project(:id => @project_id).should be_an_instance_of(@klass)
|
56
56
|
end
|
57
57
|
|
58
58
|
it "should be able to update and save a project" do
|
@@ -65,7 +65,7 @@ describe "Ticketmaster::Provider::Lighthouse::Project" do
|
|
65
65
|
|
66
66
|
it "should be able to create a project" do
|
67
67
|
@project = @ticketmaster.project.create(:name => 'Project #1')
|
68
|
-
@project.should be_an_instance_of
|
68
|
+
@project.should be_an_instance_of(@klass)
|
69
69
|
end
|
70
70
|
|
71
71
|
end
|
@@ -4,8 +4,8 @@ describe "Ticketmaster::Provider::Lighthouse" do
|
|
4
4
|
|
5
5
|
it "should be able to instantiate a new instance" do
|
6
6
|
@ticketmaster = TicketMaster.new(:lighthouse, {:account => 'ticketmaster', :token => '000000'})
|
7
|
-
@ticketmaster.should be_an_instance_of
|
8
|
-
@ticketmaster.should be_a_kind_of
|
7
|
+
@ticketmaster.should be_an_instance_of(TicketMaster)
|
8
|
+
@ticketmaster.should be_a_kind_of(TicketMaster::Provider::Lighthouse)
|
9
9
|
end
|
10
10
|
|
11
11
|
end
|
data/spec/tickets_spec.rb
CHANGED
@@ -21,21 +21,21 @@ describe "Ticketmaster::Provider::Lighthouse::Ticket" do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should be able to load all tickets" do
|
24
|
-
@project.tickets.should be_an_instance_of
|
25
|
-
@project.tickets.first.should be_an_instance_of
|
24
|
+
@project.tickets.should be_an_instance_of(Array)
|
25
|
+
@project.tickets.first.should be_an_instance_of(@klass)
|
26
26
|
end
|
27
27
|
|
28
28
|
it "should be able to load all tickets based on an array of ids" do
|
29
29
|
@tickets = @project.tickets([5])
|
30
|
-
@tickets.should be_an_instance_of
|
31
|
-
@tickets.first.should be_an_instance_of
|
30
|
+
@tickets.should be_an_instance_of(Array)
|
31
|
+
@tickets.first.should be_an_instance_of(@klass)
|
32
32
|
@tickets.first.id.should == 5
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should be able to load all tickets based on attributes" do
|
36
36
|
@tickets = @project.tickets(:id => 5)
|
37
|
-
@tickets.should be_an_instance_of
|
38
|
-
@tickets.first.should be_an_instance_of
|
37
|
+
@tickets.should be_an_instance_of(Array)
|
38
|
+
@tickets.first.should be_an_instance_of(@klass)
|
39
39
|
@tickets.first.id.should == 5
|
40
40
|
end
|
41
41
|
|
@@ -45,13 +45,13 @@ describe "Ticketmaster::Provider::Lighthouse::Ticket" do
|
|
45
45
|
|
46
46
|
it "should be able to load a single ticket" do
|
47
47
|
@ticket = @project.ticket(5)
|
48
|
-
@ticket.should be_an_instance_of
|
48
|
+
@ticket.should be_an_instance_of(@klass)
|
49
49
|
@ticket.id.should == 5
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should be able to load a single ticket based on attributes" do
|
53
53
|
@ticket = @project.ticket(:id => 5)
|
54
|
-
@ticket.should be_an_instance_of
|
54
|
+
@ticket.should be_an_instance_of(@klass)
|
55
55
|
@ticket.id.should == 5
|
56
56
|
end
|
57
57
|
|
@@ -64,7 +64,7 @@ describe "Ticketmaster::Provider::Lighthouse::Ticket" do
|
|
64
64
|
|
65
65
|
it "should be able to create a ticket" do
|
66
66
|
@ticket = @project.ticket!(:title => 'Ticket #12', :description => 'Body')
|
67
|
-
@ticket.should be_an_instance_of
|
67
|
+
@ticket.should be_an_instance_of(@klass)
|
68
68
|
end
|
69
69
|
|
70
70
|
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.3.
|
8
|
+
s.version = "0.3.8"
|
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{2010-07-
|
12
|
+
s.date = %q{2010-07-08}
|
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 = [
|
@@ -65,20 +65,20 @@ Gem::Specification.new do |s|
|
|
65
65
|
|
66
66
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
67
67
|
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
68
|
-
s.add_runtime_dependency(%q<ticketmaster>, [">= 0.
|
68
|
+
s.add_runtime_dependency(%q<ticketmaster>, [">= 0.3.0"])
|
69
69
|
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.2"])
|
70
70
|
s.add_runtime_dependency(%q<activeresource>, [">= 2.3.2"])
|
71
71
|
s.add_runtime_dependency(%q<addressable>, [">= 2.1.2"])
|
72
72
|
else
|
73
73
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
74
|
-
s.add_dependency(%q<ticketmaster>, [">= 0.
|
74
|
+
s.add_dependency(%q<ticketmaster>, [">= 0.3.0"])
|
75
75
|
s.add_dependency(%q<activesupport>, [">= 2.3.2"])
|
76
76
|
s.add_dependency(%q<activeresource>, [">= 2.3.2"])
|
77
77
|
s.add_dependency(%q<addressable>, [">= 2.1.2"])
|
78
78
|
end
|
79
79
|
else
|
80
80
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
81
|
-
s.add_dependency(%q<ticketmaster>, [">= 0.
|
81
|
+
s.add_dependency(%q<ticketmaster>, [">= 0.3.0"])
|
82
82
|
s.add_dependency(%q<activesupport>, [">= 2.3.2"])
|
83
83
|
s.add_dependency(%q<activeresource>, [">= 2.3.2"])
|
84
84
|
s.add_dependency(%q<addressable>, [">= 2.1.2"])
|
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:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 8
|
10
|
+
version: 0.3.8
|
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: 2010-07-
|
18
|
+
date: 2010-07-08 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -42,12 +42,12 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
hash:
|
45
|
+
hash: 19
|
46
46
|
segments:
|
47
47
|
- 0
|
48
|
-
-
|
48
|
+
- 3
|
49
49
|
- 0
|
50
|
-
version: 0.
|
50
|
+
version: 0.3.0
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|