ticketmaster-fogbugz 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/provider/fogbugz.rb +7 -3
- data/test/test_ticketmaster-fogbugz.rb +8 -1
- data/ticketmaster-fogbugz.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/provider/fogbugz.rb
CHANGED
@@ -18,11 +18,15 @@ module TicketMaster::Provider
|
|
18
18
|
# parameters to access the API
|
19
19
|
def authorize(auth = {})
|
20
20
|
@authentication ||= TicketMaster::Authenticator.new(auth)
|
21
|
-
|
22
|
-
|
21
|
+
auth = @authentication
|
22
|
+
|
23
|
+
unless auth.email? && auth.password? && auth.uri?
|
24
|
+
raise TicketMaster::Exception.new 'Please provide email, password and uri'
|
23
25
|
end
|
26
|
+
|
24
27
|
begin
|
25
|
-
@fogbugz = ::Fogbugz::Interface.new(auth
|
28
|
+
@fogbugz = ::Fogbugz::Interface.new(:email => auth.email,
|
29
|
+
:uri => auth.uri, :password => auth.password)
|
26
30
|
TicketMaster::Provider::Fogbugz.api = @fogbugz
|
27
31
|
@fogbugz.authenticate
|
28
32
|
rescue Exception => ex
|
@@ -2,10 +2,17 @@ require 'helper'
|
|
2
2
|
|
3
3
|
class TestTicketmasterFogbugz < Test::Unit::TestCase
|
4
4
|
context "checking for ticketmaster initialization" do
|
5
|
-
should "be able to instatiate a new instance" do
|
5
|
+
should "be able to instatiate a new instance with a hash with credentials where keys are symbols" do
|
6
6
|
@fogbugz = TicketMaster.new(:fogbugz, :email => 'rafael@hybridgroup.com', :password => '12345', :uri => 'https://clutchapp.fogbugz.com')
|
7
7
|
assert_equal true, @fogbugz.instance_of?(TicketMaster)
|
8
8
|
assert_equal true, @fogbugz.kind_of?(TicketMaster::Provider::Fogbugz)
|
9
9
|
end
|
10
|
+
|
11
|
+
should "be able to instatiate a new instance with a hash with credentials where keys are strings" do
|
12
|
+
@fogbugz = TicketMaster.new(:fogbugz, 'email' => 'rafael@hybridgroup.com', 'password' => '12345', 'uri' => 'https://clutchapp.fogbugz.com')
|
13
|
+
assert_equal true, @fogbugz.instance_of?(TicketMaster)
|
14
|
+
assert_equal true, @fogbugz.kind_of?(TicketMaster::Provider::Fogbugz)
|
15
|
+
end
|
16
|
+
|
10
17
|
end
|
11
18
|
end
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ticketmaster-fogbugz}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Rafael George"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-20}
|
13
13
|
s.description = %q{Ticketmaster provider for Fogbugz}
|
14
14
|
s.email = %q{rafael@hybridgroup.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticketmaster-fogbugz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rafael George
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-20 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|