ticketmaster 0.3.6 → 0.3.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/Rakefile CHANGED
@@ -5,14 +5,13 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "ticketmaster"
8
- gem.summary = %Q{Ticketmaster provides a universal API to trouble ticket and project management systems.}
9
- gem.description = %Q{Ticketmaster provides a universal API to trouble ticket and project management systems.}
10
- gem.email = "simon@hybridgroup.com"
8
+ gem.summary = %Q{Ticketmaster provides a universal API to ticket tracking and project management systems.}
9
+ gem.description = %Q{Ticketmaster provides a universal API to ticket tracking and project management systems.}
10
+ gem.email = "info@hybridgroup.com"
11
11
  gem.homepage = "http://ticketrb.com"
12
- gem.authors = ["Sirupsen", "deadprogrammer"]
12
+ gem.authors = ["kiafaldorius", "Sirupsen", "deadprogrammer"]
13
13
  gem.add_dependency "hashie", ">= 0"
14
14
  gem.add_dependency "activeresource", ">= 0"
15
- gem.add_development_dependency "shoulda", ">= 0"
16
15
  end
17
16
  Jeweler::GemcutterTasks.new
18
17
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.6
1
+ 0.3.7
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'ticketmaster'
3
+ require 'ticketmaster-lighthouse'
4
+
5
+ # display list of projects
6
+ tm = TicketMaster.new(:lighthouse)
7
+ tm.projects.each {|project|
8
+ puts "#{project.id} - #{project.name}"
9
+ }
10
+
11
+
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'ticketmaster'
3
+ require 'ticketmaster-pivotal'
4
+
5
+ # display list of tickets for last project
6
+ tm = TicketMaster.new(:pivotal)
7
+ project = tm.projects.last
8
+ project.tickets.each {|ticket|
9
+ puts "#{ticket.id} - #{ticket.title}"
10
+ }
11
+
@@ -0,0 +1,20 @@
1
+ require 'rubygems'
2
+ require 'ticketmaster'
3
+ require 'ticketmaster-pivotal'
4
+ require 'ticketmaster-lighthouse'
5
+
6
+ # copy all tickets and comments from pivotal tracker to new lighthouse project
7
+ pivotal = TicketMaster.new(:pivotal)
8
+ pivotal_project = pivotal.project(97107)
9
+ lighthouse = TicketMaster.new(:lighthouse)
10
+ lighthouse_project = lighthouse.project!(:name => "Copy Test on #{Time.now}", :description => "A copy test")
11
+
12
+ pivotal_project.tickets.each do |pivotal_ticket|
13
+ puts pivotal_ticket.title, pivotal_ticket.description
14
+
15
+ lighthouse_ticket = lighthouse_project.ticket!({:title => pivotal_ticket.title, :description => pivotal_ticket.description})
16
+ pivotal_ticket.comments.each do |comment|
17
+ lighthouse_ticket.comment!(:text => comment.body)
18
+ end
19
+ end
20
+
@@ -1,7 +1,7 @@
1
1
  # Parses the configuration information and puts it into options
2
2
  def parse_config!(options)
3
3
  config = YAML.load_file File.expand_path(options[:config])
4
- provider = (options[:provider] ||= config['default'] || config.first.first)
4
+ provider = (options[:provider] ||= config['default'] || config.keys.first)
5
5
  if provider and provider.length > 0
6
6
  options[:project] ||= config[provider]['project']
7
7
  options[:authentication] ||= config[provider]['authentication']
@@ -86,7 +86,7 @@ module TicketMaster::Provider
86
86
  # Must be defined by the provider
87
87
  def self.find_by_id(id)
88
88
  if self::API.is_a? Class
89
- self.new self::API.find id
89
+ self.new self::API.find(id)
90
90
  else
91
91
  raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
92
92
  end
data/spec/project_spec.rb CHANGED
@@ -11,19 +11,19 @@ describe "Projects" do
11
11
 
12
12
  describe "with a connection to a provider" do
13
13
  it "should return an array" do
14
- @ticketmaster.projects.should be_an_instance_of Array
14
+ @ticketmaster.projects.should be_an_instance_of(Array)
15
15
  end
16
16
 
17
17
  it "should return a project as first element" do
18
- @ticketmaster.projects.first.should be_an_instance_of @project_class
18
+ @ticketmaster.projects.first.should be_an_instance_of(@project_class)
19
19
  end
20
20
 
21
21
  it "should return a project as last element" do
22
- @ticketmaster.projects.last.should be_an_instance_of @project_class
22
+ @ticketmaster.projects.last.should be_an_instance_of(@project_class)
23
23
  end
24
24
 
25
25
  it "should return a Project by name from collection" do
26
- @ticketmaster.project(:name => "Whack whack what?").should be_an_instance_of @project_class
26
+ @ticketmaster.project(:name => "Whack whack what?").should be_an_instance_of(@project_class)
27
27
  end
28
28
 
29
29
  it "should have a project description for first project" do
@@ -40,7 +40,7 @@ describe "Projects" do
40
40
  end
41
41
 
42
42
  it "should return an array" do
43
- @project.should be_an_instance_of @project_class
43
+ @project.should be_an_instance_of(@project_class)
44
44
  end
45
45
 
46
46
  it "should return Project with the correct ID" do
@@ -54,11 +54,11 @@ describe "Projects" do
54
54
  end
55
55
 
56
56
  it "should return an array" do
57
- @projects.should be_an_instance_of Array
57
+ @projects.should be_an_instance_of(Array)
58
58
  end
59
59
 
60
60
  it "should return a Project as first element" do
61
- @projects.first.should be_an_instance_of @project_class
61
+ @projects.first.should be_an_instance_of(@project_class)
62
62
  end
63
63
 
64
64
  it "should return Project with the correct ID" do
@@ -72,11 +72,11 @@ describe "Projects" do
72
72
  end
73
73
 
74
74
  it "should return an array" do
75
- @projects.should be_an_instance_of Array
75
+ @projects.should be_an_instance_of(Array)
76
76
  end
77
77
 
78
78
  it "should return a Project as first element" do
79
- @projects.first.should be_an_instance_of @project_class
79
+ @projects.first.should be_an_instance_of(@project_class)
80
80
  end
81
81
 
82
82
  it "should return Project with the correct ID" do
@@ -102,7 +102,7 @@ describe "Projects" do
102
102
 
103
103
  describe "when searching by hash" do
104
104
  it "should return first Project" do
105
- @ticketmaster.project.find(:first, :description => "Shocking Dirb").should be_an_instance_of @project_class
105
+ @ticketmaster.project.find(:first, :description => "Shocking Dirb").should be_an_instance_of(@project_class)
106
106
  end
107
107
 
108
108
  it "should return first Project with correct description" do
@@ -110,7 +110,7 @@ describe "Projects" do
110
110
  end
111
111
 
112
112
  it "should return last Project" do
113
- @ticketmaster.project.find(:last, :description => "Shocking Dirb").should be_an_instance_of @project_class
113
+ @ticketmaster.project.find(:last, :description => "Shocking Dirb").should be_an_instance_of(@project_class)
114
114
  end
115
115
 
116
116
  it "should return last Project with correct description" do
@@ -121,7 +121,7 @@ describe "Projects" do
121
121
 
122
122
  describe "declaring a new project" do
123
123
  it "should return the correct class" do
124
- @ticketmaster.project.new(default_info).should be_an_instance_of @project_class
124
+ @ticketmaster.project.new(default_info).should be_an_instance_of(@project_class)
125
125
  end
126
126
 
127
127
  it "should have the correct name" do
@@ -135,7 +135,7 @@ describe "Projects" do
135
135
 
136
136
  describe "creating a new project" do
137
137
  it "should return the correct class" do
138
- @ticketmaster.project.create(default_info).should be_an_instance_of @project_class
138
+ @ticketmaster.project.create(default_info).should be_an_instance_of(@project_class)
139
139
  end
140
140
 
141
141
  it "should have the correct name" do
data/ticketmaster.gemspec CHANGED
@@ -5,14 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster}
8
- s.version = "0.3.6"
8
+ s.version = "0.3.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Sirupsen", "deadprogrammer"]
12
- s.date = %q{2010-07-07}
11
+ s.authors = ["kiafaldorius", "Sirupsen", "deadprogrammer"]
12
+ s.date = %q{2010-07-08}
13
13
  s.default_executable = %q{tm}
14
- s.description = %q{Ticketmaster provides a universal API to trouble ticket and project management systems.}
15
- s.email = %q{simon@hybridgroup.com}
14
+ s.description = %q{Ticketmaster provides a universal API to ticket tracking and project management systems.}
15
+ s.email = %q{info@hybridgroup.com}
16
16
  s.executables = ["tm"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
@@ -29,6 +29,9 @@ Gem::Specification.new do |s|
29
29
  "TODO",
30
30
  "VERSION",
31
31
  "bin/tm",
32
+ "examples/tm_example.rb",
33
+ "examples/tm_example_2.rb",
34
+ "examples/tm_example_3.rb",
32
35
  "lib/ticketmaster.rb",
33
36
  "lib/ticketmaster/authenticator.rb",
34
37
  "lib/ticketmaster/cli/commands/config.rb",
@@ -67,13 +70,16 @@ Gem::Specification.new do |s|
67
70
  s.rdoc_options = ["--charset=UTF-8"]
68
71
  s.require_paths = ["lib"]
69
72
  s.rubygems_version = %q{1.3.7}
70
- s.summary = %q{Ticketmaster provides a universal API to trouble ticket and project management systems.}
73
+ s.summary = %q{Ticketmaster provides a universal API to ticket tracking and project management systems.}
71
74
  s.test_files = [
72
75
  "spec/project_spec.rb",
73
76
  "spec/spec_helper.rb",
74
77
  "spec/ticket_spec.rb",
75
78
  "spec/ticketmaster-cli_spec.rb",
76
- "spec/ticketmaster_spec.rb"
79
+ "spec/ticketmaster_spec.rb",
80
+ "examples/tm_example.rb",
81
+ "examples/tm_example_2.rb",
82
+ "examples/tm_example_3.rb"
77
83
  ]
78
84
 
79
85
  if s.respond_to? :specification_version then
@@ -83,16 +89,13 @@ Gem::Specification.new do |s|
83
89
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
84
90
  s.add_runtime_dependency(%q<hashie>, [">= 0"])
85
91
  s.add_runtime_dependency(%q<activeresource>, [">= 0"])
86
- s.add_development_dependency(%q<shoulda>, [">= 0"])
87
92
  else
88
93
  s.add_dependency(%q<hashie>, [">= 0"])
89
94
  s.add_dependency(%q<activeresource>, [">= 0"])
90
- s.add_dependency(%q<shoulda>, [">= 0"])
91
95
  end
92
96
  else
93
97
  s.add_dependency(%q<hashie>, [">= 0"])
94
98
  s.add_dependency(%q<activeresource>, [">= 0"])
95
- s.add_dependency(%q<shoulda>, [">= 0"])
96
99
  end
97
100
  end
98
101
 
metadata CHANGED
@@ -1,22 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 7
10
+ version: 0.3.7
11
11
  platform: ruby
12
12
  authors:
13
+ - kiafaldorius
13
14
  - Sirupsen
14
15
  - deadprogrammer
15
16
  autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2010-07-07 00:00:00 -07:00
20
+ date: 2010-07-08 00:00:00 -07:00
20
21
  default_executable: tm
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
@@ -47,22 +48,8 @@ dependencies:
47
48
  version: "0"
48
49
  type: :runtime
49
50
  version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: shoulda
52
- prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
62
- type: :development
63
- version_requirements: *id003
64
- description: Ticketmaster provides a universal API to trouble ticket and project management systems.
65
- email: simon@hybridgroup.com
51
+ description: Ticketmaster provides a universal API to ticket tracking and project management systems.
52
+ email: info@hybridgroup.com
66
53
  executables:
67
54
  - tm
68
55
  extensions: []
@@ -81,6 +68,9 @@ files:
81
68
  - TODO
82
69
  - VERSION
83
70
  - bin/tm
71
+ - examples/tm_example.rb
72
+ - examples/tm_example_2.rb
73
+ - examples/tm_example_3.rb
84
74
  - lib/ticketmaster.rb
85
75
  - lib/ticketmaster/authenticator.rb
86
76
  - lib/ticketmaster/cli/commands/config.rb
@@ -147,10 +137,13 @@ rubyforge_project:
147
137
  rubygems_version: 1.3.7
148
138
  signing_key:
149
139
  specification_version: 3
150
- summary: Ticketmaster provides a universal API to trouble ticket and project management systems.
140
+ summary: Ticketmaster provides a universal API to ticket tracking and project management systems.
151
141
  test_files:
152
142
  - spec/project_spec.rb
153
143
  - spec/spec_helper.rb
154
144
  - spec/ticket_spec.rb
155
145
  - spec/ticketmaster-cli_spec.rb
156
146
  - spec/ticketmaster_spec.rb
147
+ - examples/tm_example.rb
148
+ - examples/tm_example_2.rb
149
+ - examples/tm_example_3.rb