ticketmaster 0.4.9 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/lib/ticketmaster/helper.rb +4 -0
- data/lib/ticketmaster/project.rb +3 -3
- data/lib/ticketmaster/ticket.rb +3 -3
- data/ticketmaster.gemspec +9 -5
- metadata +27 -10
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm 1.8.7@ticketmaster --create
|
data/Rakefile
CHANGED
@@ -11,14 +11,14 @@ begin
|
|
11
11
|
gem.homepage = "http://ticketrb.com"
|
12
12
|
gem.authors = ["kiafaldorius", "Sirupsen", "deadprogrammer"]
|
13
13
|
gem.add_dependency "hashie", ">= 0"
|
14
|
-
gem.add_dependency "
|
14
|
+
gem.add_dependency "activesupport", ">= 2.3.2"
|
15
|
+
gem.add_dependency "activeresource", ">= 2.3.2"
|
15
16
|
end
|
16
17
|
Jeweler::GemcutterTasks.new
|
17
18
|
rescue LoadError
|
18
19
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
22
|
require 'spec/rake/spectask'
|
23
23
|
Spec::Rake::SpecTask.new(:spec) do |spec|
|
24
24
|
spec.libs << 'lib' << 'spec'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/ticketmaster/helper.rb
CHANGED
@@ -19,6 +19,10 @@ module TicketMaster::Provider
|
|
19
19
|
k
|
20
20
|
end
|
21
21
|
|
22
|
+
def provider_parent(klass)
|
23
|
+
TicketMaster::Provider.const_get(klass.to_s.split('::')[-2])
|
24
|
+
end
|
25
|
+
|
22
26
|
# Goes through all the things and returns results that match the options attributes hash
|
23
27
|
def search_by_attribute(things, options = {}, limit = 1000)
|
24
28
|
things.find_all do |thing|
|
data/lib/ticketmaster/project.rb
CHANGED
@@ -117,7 +117,7 @@ module TicketMaster::Provider
|
|
117
117
|
# returns an array of Ticket objects.
|
118
118
|
def tickets(*options)
|
119
119
|
options.insert 0, id
|
120
|
-
easy_finder(self.class
|
120
|
+
easy_finder(provider_parent(self.class)::Ticket, :all, options, 1)
|
121
121
|
end
|
122
122
|
|
123
123
|
# Very similar to tickets, and is practically an alias of it
|
@@ -125,13 +125,13 @@ module TicketMaster::Provider
|
|
125
125
|
# unlike tickets which returns an array of all tickets when given no parameters
|
126
126
|
def ticket(*options)
|
127
127
|
options.insert(0, id) if options.length > 0
|
128
|
-
easy_finder(self.class
|
128
|
+
easy_finder(provider_parent(self.class)::Ticket, :first, options, 1)
|
129
129
|
end
|
130
130
|
|
131
131
|
# Create a ticket
|
132
132
|
def ticket!(*options)
|
133
133
|
options[0].merge!(:project_id => id) if options.first.is_a?(Hash)
|
134
|
-
self.class
|
134
|
+
provider_parent(self.class)::Ticket.create(*options)
|
135
135
|
end
|
136
136
|
|
137
137
|
# Define some provider specific initalizations
|
data/lib/ticketmaster/ticket.rb
CHANGED
@@ -120,7 +120,7 @@ module TicketMaster::Provider
|
|
120
120
|
def comments(*options)
|
121
121
|
options.insert 0, project_id
|
122
122
|
options.insert 1, id
|
123
|
-
easy_finder(self.class
|
123
|
+
easy_finder(provider_parent(self.class)::Comment, :all, options, 2)
|
124
124
|
end
|
125
125
|
|
126
126
|
def comment(*options)
|
@@ -128,13 +128,13 @@ module TicketMaster::Provider
|
|
128
128
|
options.insert(0, project_id)
|
129
129
|
options.insert(1, id)
|
130
130
|
end
|
131
|
-
easy_finder(self.class
|
131
|
+
easy_finder(provider_parent(self.class)::Comment, :first, options, 2)
|
132
132
|
end
|
133
133
|
|
134
134
|
# Create a comment
|
135
135
|
def comment!(*options)
|
136
136
|
options[0].merge!(:project_id => project_id, :ticket_id => id) if options.first.is_a?(Hash)
|
137
|
-
self.class
|
137
|
+
provider_parent(self.class)::Comment.create(*options)
|
138
138
|
end
|
139
139
|
|
140
140
|
# Close this ticket
|
data/ticketmaster.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ticketmaster}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["kiafaldorius", "Sirupsen", "deadprogrammer"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-20}
|
13
13
|
s.default_executable = %q{tm}
|
14
14
|
s.description = %q{Ticketmaster provides a universal API to ticket tracking and project management systems.}
|
15
15
|
s.email = %q{info@hybridgroup.com}
|
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.files = [
|
23
23
|
".document",
|
24
24
|
".gitignore",
|
25
|
+
".rvmrc",
|
25
26
|
"LICENSE",
|
26
27
|
"NOTES",
|
27
28
|
"README.md",
|
@@ -95,14 +96,17 @@ Gem::Specification.new do |s|
|
|
95
96
|
|
96
97
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
97
98
|
s.add_runtime_dependency(%q<hashie>, [">= 0"])
|
98
|
-
s.add_runtime_dependency(%q<
|
99
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.2"])
|
100
|
+
s.add_runtime_dependency(%q<activeresource>, [">= 2.3.2"])
|
99
101
|
else
|
100
102
|
s.add_dependency(%q<hashie>, [">= 0"])
|
101
|
-
s.add_dependency(%q<
|
103
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.2"])
|
104
|
+
s.add_dependency(%q<activeresource>, [">= 2.3.2"])
|
102
105
|
end
|
103
106
|
else
|
104
107
|
s.add_dependency(%q<hashie>, [">= 0"])
|
105
|
-
s.add_dependency(%q<
|
108
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.2"])
|
109
|
+
s.add_dependency(%q<activeresource>, [">= 2.3.2"])
|
106
110
|
end
|
107
111
|
end
|
108
112
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticketmaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kiafaldorius
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-10-20 00:00:00 -07:00
|
21
21
|
default_executable: tm
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -35,21 +35,37 @@ dependencies:
|
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
name:
|
38
|
+
name: activesupport
|
39
39
|
prerelease: false
|
40
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
hash: 7
|
46
46
|
segments:
|
47
|
+
- 2
|
47
48
|
- 3
|
48
|
-
-
|
49
|
-
|
50
|
-
version: 3.0.0
|
49
|
+
- 2
|
50
|
+
version: 2.3.2
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: activeresource
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 7
|
62
|
+
segments:
|
63
|
+
- 2
|
64
|
+
- 3
|
65
|
+
- 2
|
66
|
+
version: 2.3.2
|
67
|
+
type: :runtime
|
68
|
+
version_requirements: *id003
|
53
69
|
description: Ticketmaster provides a universal API to ticket tracking and project management systems.
|
54
70
|
email: info@hybridgroup.com
|
55
71
|
executables:
|
@@ -63,6 +79,7 @@ extra_rdoc_files:
|
|
63
79
|
files:
|
64
80
|
- .document
|
65
81
|
- .gitignore
|
82
|
+
- .rvmrc
|
66
83
|
- LICENSE
|
67
84
|
- NOTES
|
68
85
|
- README.md
|