ticketmaster-github 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
- gem "ticketmaster", "0.6.10"
2
+ gem "ticketmaster", "0.7.0"
3
3
  gem "octokit", "~> 0.6"
4
4
  group :development do
5
5
  gem "jeweler", "~> 1.6"
data/Rakefile CHANGED
@@ -17,26 +17,15 @@ rescue LoadError
17
17
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
18
18
  end
19
19
 
20
- require 'spec/rake/spectask'
21
- Spec::Rake::SpecTask.new(:spec) do |spec|
22
- spec.libs << 'lib' << 'spec'
23
- spec.spec_files = FileList['spec/**/*_spec.rb']
20
+ require 'rspec/core'
21
+ require 'rspec/core/rake_task'
22
+ RSpec::Core::RakeTask.new(:spec) do |spec|
23
+ spec.pattern = FileList['spec/**/*_spec.rb']
24
24
  end
25
25
 
26
- Spec::Rake::SpecTask.new(:rcov) do |spec|
27
- spec.libs << 'lib' << 'spec'
26
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
28
27
  spec.pattern = 'spec/**/*_spec.rb'
29
28
  spec.rcov = true
30
29
  end
31
30
 
32
31
  task :default => :spec
33
-
34
- require 'rake/rdoctask'
35
- Rake::RDocTask.new do |rdoc|
36
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
37
-
38
- rdoc.rdoc_dir = 'rdoc'
39
- rdoc.title = "ticketmaster-github #{version}"
40
- rdoc.rdoc_files.include('README*')
41
- rdoc.rdoc_files.include('lib/**/*.rb')
42
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.8.0
@@ -35,7 +35,11 @@ module TicketMaster::Provider
35
35
  def description
36
36
  self.body
37
37
  end
38
-
38
+
39
+ def description=(val)
40
+ self.body = val
41
+ end
42
+
39
43
  def author
40
44
  self.user.respond_to?('login') ? self.user.login : self.user
41
45
  end
@@ -80,8 +84,9 @@ module TicketMaster::Provider
80
84
  end
81
85
 
82
86
  def self.open(project_id, *options)
83
- body = options.first.delete(:body)
84
- title = options.first.delete(:title)
87
+ ticket_hash = options.first
88
+ body = ticket_hash.delete(:description)
89
+ title = ticket_hash.delete(:title)
85
90
  new_issue = TicketMaster::Provider::Github.api.create_issue(project_id, title, body, options.first)
86
91
  new_issue.merge!(:project_id => project_id)
87
92
  self.new new_issue
@@ -104,11 +109,7 @@ module TicketMaster::Provider
104
109
  end
105
110
 
106
111
  def save
107
- issue = Ticket.find_by_id(project_id, number)
108
- return false if issue.title == title and issue.body == body
109
- ticket_update = TicketMaster::Provider::Github.api.update_issue(project_id, number, title, body)
110
- ticket_update.merge!(:project_id => project_id)
111
- Ticket.new ticket_update
112
+ TicketMaster::Provider::Github.api.update_issue(project_id, number, title, description)
112
113
  true
113
114
  end
114
115
 
@@ -4,10 +4,14 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
  require 'rubygems'
5
5
  require 'ticketmaster'
6
6
  require 'active_support/core_ext/string'
7
- require 'spec'
7
+ require 'rspec'
8
8
  require 'ticketmaster-github'
9
9
  require 'fakeweb'
10
10
 
11
+ RSpec.configure do |config|
12
+ config.color_enabled = true
13
+ end
14
+
11
15
  FakeWeb.allow_net_connect = false
12
16
 
13
17
  def fixture_file(filename)
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
  describe "Ticketmaster::Provider::Github::Ticket" do
4
4
  before(:each) do
5
5
  @github = TicketMaster.new(:github, {:login => 'ticketmaster-user', :password => 'Tm123456'})
6
- @project = @github.project('tmtest-repo')
6
+ @project = @github.projects.first
7
7
  @ticket_id = 1
8
8
  @klass = TicketMaster::Provider::Github::Ticket
9
9
 
@@ -40,15 +40,8 @@ describe "Ticketmaster::Provider::Github::Ticket" do
40
40
  @ticket.title.should be_eql('for testing')
41
41
  end
42
42
 
43
- it "should update a ticket" do
44
- @ticket = @project.ticket(@ticket_id)
45
- @ticket.save.should be_false
46
- @ticket.title = "Testing"
47
- @ticket.save.should be_true
48
- end
49
-
50
43
  it "should create a ticket" do
51
- ticket = @project.ticket!(:title => 'new ticket', :body => 'testing')
44
+ ticket = @project.ticket!(:title => 'new ticket', :description => 'testing')
52
45
  ticket.should be_an_instance_of(@klass)
53
46
  end
54
47
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ticketmaster-github"
8
- s.version = "0.7.1"
8
+ s.version = "0.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["HybridGroup"]
12
- s.date = "2012-03-16"
12
+ s.date = "2012-04-12"
13
13
  s.description = "This provides an interface with github through the ticketmaster gem."
14
14
  s.email = "hong.quach@abigfisch.com"
15
15
  s.extra_rdoc_files = [
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
59
59
  s.specification_version = 3
60
60
 
61
61
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
62
- s.add_runtime_dependency(%q<ticketmaster>, ["= 0.6.10"])
62
+ s.add_runtime_dependency(%q<ticketmaster>, ["= 0.7.0"])
63
63
  s.add_runtime_dependency(%q<octokit>, ["~> 0.6"])
64
64
  s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
65
65
  s.add_development_dependency(%q<rspec>, ["~> 2.3"])
@@ -67,7 +67,7 @@ Gem::Specification.new do |s|
67
67
  s.add_development_dependency(%q<simplecov>, ["~> 0.5"])
68
68
  s.add_development_dependency(%q<rcov>, ["~> 1.0"])
69
69
  else
70
- s.add_dependency(%q<ticketmaster>, ["= 0.6.10"])
70
+ s.add_dependency(%q<ticketmaster>, ["= 0.7.0"])
71
71
  s.add_dependency(%q<octokit>, ["~> 0.6"])
72
72
  s.add_dependency(%q<jeweler>, ["~> 1.6"])
73
73
  s.add_dependency(%q<rspec>, ["~> 2.3"])
@@ -76,7 +76,7 @@ Gem::Specification.new do |s|
76
76
  s.add_dependency(%q<rcov>, ["~> 1.0"])
77
77
  end
78
78
  else
79
- s.add_dependency(%q<ticketmaster>, ["= 0.6.10"])
79
+ s.add_dependency(%q<ticketmaster>, ["= 0.7.0"])
80
80
  s.add_dependency(%q<octokit>, ["~> 0.6"])
81
81
  s.add_dependency(%q<jeweler>, ["~> 1.6"])
82
82
  s.add_dependency(%q<rspec>, ["~> 2.3"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-github
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 7
9
- - 1
10
- version: 0.7.1
8
+ - 8
9
+ - 0
10
+ version: 0.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - HybridGroup
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-16 00:00:00 Z
18
+ date: 2012-04-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: ticketmaster
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - "="
28
28
  - !ruby/object:Gem::Version
29
- hash: 19
29
+ hash: 3
30
30
  segments:
31
31
  - 0
32
- - 6
33
- - 10
34
- version: 0.6.10
32
+ - 7
33
+ - 0
34
+ version: 0.7.0
35
35
  version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: octokit