ticketmaster-fogbugz 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,43 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # jeweler generated
15
+ pkg
16
+
17
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18
+ #
19
+ # * Create a file at ~/.gitignore
20
+ # * Include files you want ignored
21
+ # * Run: git config --global core.excludesfile ~/.gitignore
22
+ #
23
+ # After doing this, these files will be ignored in all your git projects,
24
+ # saving you from having to 'pollute' every project you touch with them
25
+ #
26
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
27
+ #
28
+ # For MacOS:
29
+ #
30
+ #.DS_Store
31
+ #
32
+ # For TextMate
33
+ #*.tmproj
34
+ #tmtags
35
+ #
36
+ # For emacs:
37
+ #*~
38
+ #\#*
39
+ #.\#*
40
+ #
41
+ # For vim:
42
+ #*.swp
43
+ *.un~
data/Gemfile CHANGED
@@ -1,17 +1,13 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- gem 'ticketmaster', '0.6.10'
9
- gem "ruby-fogbugz", '~> 0.1'
10
- group :development do
11
- gem "rspec", "~> 2.0"
12
- gem "fakeweb", "~> 1.3"
13
- gem "vcr", "~> 1.11"
14
- gem "jeweler", "~> 1.5"
15
- gem "simplecov", "~> 0.5", :platforms => :ruby_19
16
- gem "rcov", "~> 1.0", :platforms => :ruby_18
3
+ gem 'ticketmaster', '~> 0.7'
4
+ gem 'rake', '~> 0.9'
5
+ gem 'ruby-fogbugz', '~> 0.1'
6
+
7
+ group :development do
8
+ gem 'rspec', '~> 2.0'
9
+ gem 'fakeweb', '~> 1.3'
10
+ gem 'vcr', '~> 1.11'
11
+ gem "simplecov", "~> 0.5.0", :platform => :ruby_19
12
+ gem "rcov", "~> 1.0.0", :platform => :ruby_18
17
13
  end
@@ -1,28 +1,23 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (3.2.2)
5
- activesupport (= 3.2.2)
4
+ activemodel (3.2.3)
5
+ activesupport (= 3.2.3)
6
6
  builder (~> 3.0.0)
7
- activeresource (3.2.2)
8
- activemodel (= 3.2.2)
9
- activesupport (= 3.2.2)
10
- activesupport (3.2.2)
7
+ activeresource (3.2.3)
8
+ activemodel (= 3.2.3)
9
+ activesupport (= 3.2.3)
10
+ activesupport (3.2.3)
11
11
  i18n (~> 0.6)
12
12
  multi_json (~> 1.0)
13
13
  builder (3.0.0)
14
14
  crack (0.3.1)
15
15
  diff-lcs (1.1.3)
16
16
  fakeweb (1.3.0)
17
- git (1.2.5)
18
17
  hashie (1.2.0)
19
18
  i18n (0.6.0)
20
- jeweler (1.5.2)
21
- bundler (~> 1.0.0)
22
- git (>= 1.2.5)
23
- rake
24
19
  multi_json (1.0.4)
25
- rake (0.9.2)
20
+ rake (0.9.2.2)
26
21
  rcov (1.0.0)
27
22
  rspec (2.0.1)
28
23
  rspec-core (~> 2.0.1)
@@ -40,7 +35,7 @@ GEM
40
35
  multi_json (~> 1.0.3)
41
36
  simplecov-html (~> 0.5.3)
42
37
  simplecov-html (0.5.3)
43
- ticketmaster (0.6.10)
38
+ ticketmaster (0.7.0)
44
39
  activeresource (~> 3.0)
45
40
  activesupport (~> 3.0)
46
41
  hashie (~> 1.2)
@@ -51,10 +46,10 @@ PLATFORMS
51
46
 
52
47
  DEPENDENCIES
53
48
  fakeweb (~> 1.3)
54
- jeweler (~> 1.5)
55
- rcov (~> 1.0)
49
+ rake (~> 0.9)
50
+ rcov (~> 1.0.0)
56
51
  rspec (~> 2.0)
57
52
  ruby-fogbugz (~> 0.1)
58
- simplecov (~> 0.5)
59
- ticketmaster (= 0.6.10)
53
+ simplecov (~> 0.5.0)
54
+ ticketmaster (~> 0.7)
60
55
  vcr (~> 1.11)
data/Rakefile CHANGED
@@ -1,22 +1,7 @@
1
+ require 'bundler/gem_tasks'
1
2
  require 'rubygems'
2
3
  require 'rake'
3
4
 
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "ticketmaster-fogbugz"
8
- gem.summary = %Q{Ticketmaster Provider for Fogbugz}
9
- gem.description = %Q{Allows ticketmaster to interact with Fogbugz.}
10
- gem.email = "rafael@hybridgroup.com"
11
- gem.homepage = "http://github.com/hybridgroup/ticketmaster-fogbugz"
12
- gem.authors = ["Rafael George"]
13
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
- end
15
- Jeweler::GemcutterTasks.new
16
- rescue LoadError
17
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
18
- end
19
-
20
5
  require 'rspec/core'
21
6
  require 'rspec/core/rake_task'
22
7
  RSpec::Core::RakeTask.new(:spec) do |spec|
@@ -58,6 +58,10 @@ module TicketMaster::Provider
58
58
  raise "You can only search for a single ticket based on id"
59
59
  end
60
60
  end
61
+
62
+ def ticket!(attributes_hash)
63
+ provider_parent(self.class)::Ticket.create(attributes_hash.merge :project_id => id)
64
+ end
61
65
 
62
66
  def self.find(*options)
63
67
  if options[0].first.is_a? Array
@@ -87,5 +91,3 @@ module TicketMaster::Provider
87
91
  end
88
92
  end
89
93
  end
90
-
91
-
@@ -37,6 +37,10 @@ module TicketMaster::Provider
37
37
  def title
38
38
  self['sTitle']
39
39
  end
40
+
41
+ def title=(val)
42
+ self['sTitle'] = val
43
+ end
40
44
 
41
45
  def description
42
46
  self['LatestTextSummary']
@@ -69,6 +73,10 @@ module TicketMaster::Provider
69
73
  def created_at
70
74
  nil
71
75
  end
76
+
77
+ def project_id
78
+ self["ixProject"]
79
+ end
72
80
 
73
81
  def updated_at
74
82
  Time.parse(self['dtLastUpdated'])
@@ -83,7 +91,25 @@ module TicketMaster::Provider
83
91
  nil
84
92
  warn "Fogbugz API doesn't support comments"
85
93
  end
86
-
94
+
95
+ def self.create(attributes_hash)
96
+ warn "Fogbugz Case doesn't not handle description'" if attributes_hash.has_key? :description
97
+
98
+ options = translate attributes_hash,
99
+ :title => :sTitle,
100
+ :priority => :ixPriority,
101
+ :assignee => :ixPersonAssignedTo,
102
+ :project_id => :ixProject
103
+
104
+ new_case = TicketMaster::Provider::Fogbugz.api.command(:new, options)
105
+
106
+ self.new options.merge :ixBug => new_case["case"]["ixBug"]
107
+ end
108
+
109
+ def save
110
+ !update_case.has_key?("error")
111
+ end
112
+
87
113
  def self.find(project_id, options)
88
114
  if options.first.is_a? Array
89
115
  self.find_all(project_id).select do |ticket|
@@ -111,6 +137,23 @@ module TicketMaster::Provider
111
137
  end
112
138
  tickets.flatten.map { |xticket| self.new xticket }
113
139
  end
140
+
141
+ private
142
+ def update_case
143
+ TicketMaster::Provider::Fogbugz.api.command :edit, to_case_hash
144
+ end
145
+
146
+ def self.translate(hash, mapping)
147
+ Hash[hash.map { |k, v| [mapping[k] ||= k, v]}]
148
+ end
149
+
150
+ #just title until now
151
+ def to_case_hash
152
+ {
153
+ :ixBug => id,
154
+ :sTitle => title
155
+ }
156
+ end
114
157
  end
115
158
  end
116
159
  end
@@ -0,0 +1,5 @@
1
+ module TicketMaster
2
+ module Fogbugz
3
+ VERSION = "0.3.0"
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://ticketrb.fogbugz.com:443/api.asp?cmd=new&sTitle=Should+be+able+to+create+ticket&ixPriority=2&ixPersonAssignedTo=ticketmaster&token=26jgegikmofn27rcd6ql676fso9r22&ixProject=2
6
+ body:
7
+ headers:
8
+ content-type:
9
+ - text/xml
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ content-type:
16
+ - text/xml;charset=utf-8
17
+ cache-control:
18
+ - private
19
+ etag:
20
+ - ""
21
+ server:
22
+ - Microsoft-IIS/6.0
23
+ x-powered-by:
24
+ - ASP.NET
25
+ date:
26
+ - Thu, 12 Apr 2012 21:00:39 GMT
27
+ expires:
28
+ - Tue, 05 Sep 2000 09:00:00 GMT
29
+ x-aspnet-version:
30
+ - 2.0.50727
31
+ transfer-encoding:
32
+ - chunked
33
+ set-cookie:
34
+ - sUniqueID=20120412210038-190.80.182.182-t0jq6j8938; expires=Wed, 13-Apr-2022 01:00:38 GMT; path=/; secure; HttpOnly
35
+ body: <?xml version="1.0" encoding="UTF-8"?><response><case ixBug="4" operations="edit,assign,resolve,email,remind"></case></response>
36
+ http_version: "1.1"
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: https://ticketrb.fogbugz.com:443/api.asp?cmd=search&cols=dtLastUpdated%2CixBug%2CsStatus%2CsTitle%2CsLatestTextSummary%2CixProject%2CsProject%2CsPersonAssignedTo%2CsPriority&token=26jgegikmofn27rcd6ql676fso9r22&q=project%3A%3D2
5
+ uri: https://ticketrb.fogbugz.com:443/api.asp?cmd=search&q=project%3A%3D2&cols=dtLastUpdated%2CixBug%2CsStatus%2CsTitle%2CsLatestTextSummary%2CixProject%2CsProject%2CsPersonAssignedTo%2CsPriority&token=26jgegikmofn27rcd6ql676fso9r22
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -12,25 +12,25 @@
12
12
  code: 200
13
13
  message: OK
14
14
  headers:
15
+ set-cookie:
16
+ - sUniqueID=20120412185552-190.80.182.182-q1b9qu3lcg; expires=Tue, 12-Apr-2022 22:55:52 GMT; path=/; secure; HttpOnly
15
17
  expires:
16
18
  - Tue, 05 Sep 2000 09:00:00 GMT
19
+ x-powered-by:
20
+ - ASP.NET
17
21
  etag:
18
22
  - ""
19
- content-type:
20
- - text/xml;charset=utf-8
23
+ server:
24
+ - Microsoft-IIS/6.0
25
+ date:
26
+ - Thu, 12 Apr 2012 18:56:20 GMT
21
27
  cache-control:
22
28
  - private
23
- x-powered-by:
24
- - ASP.NET
25
- date:
26
- - Wed, 21 Mar 2012 22:26:48 GMT
27
- transfer-encoding:
28
- - chunked
29
29
  x-aspnet-version:
30
30
  - 2.0.50727
31
- server:
32
- - Microsoft-IIS/6.0
33
- set-cookie:
34
- - sUniqueID=20120321222648-201.229.129.45-p2obga736n; expires=Tue, 22-Mar-2022 02:26:48 GMT; path=/; secure; HttpOnly
31
+ content-type:
32
+ - text/xml;charset=utf-8
33
+ transfer-encoding:
34
+ - chunked
35
35
  body: <?xml version="1.0" encoding="UTF-8"?><response><cases count="1"><case ixBug="1" operations="edit,assign,resolve,email,remind"><ixBug>1</ixBug><sStatus><![CDATA[Active]]></sStatus><sTitle><![CDATA["Welcome to FogBugz" Sample Case]]></sTitle><sLatestTextSummary></sLatestTextSummary><ixProject>2</ixProject><sProject><![CDATA[Inbox]]></sProject><sPersonAssignedTo><![CDATA[Ramon Martinez]]></sPersonAssignedTo><sPriority><![CDATA[Must Fix]]></sPriority><dtLastUpdated>2012-03-21T21:27:33Z</dtLastUpdated></case></cases></response>
36
36
  http_version: "1.1"
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://ticketrb.fogbugz.com:443/api.asp?cmd=edit&ixBug=1&sTitle=updated&token=26jgegikmofn27rcd6ql676fso9r22
6
+ body:
7
+ headers:
8
+ content-type:
9
+ - text/xml
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ set-cookie:
16
+ - sUniqueID=20120419154527-190.166.7.121-73sn3rn18n; expires=Tue, 19-Apr-2022 19:45:27 GMT; path=/; secure; HttpOnly
17
+ expires:
18
+ - Tue, 05 Sep 2000 09:00:00 GMT
19
+ server:
20
+ - Microsoft-IIS/6.0
21
+ cache-control:
22
+ - private
23
+ content-type:
24
+ - text/xml;charset=utf-8
25
+ etag:
26
+ - ""
27
+ transfer-encoding:
28
+ - chunked
29
+ x-aspnet-version:
30
+ - 2.0.50727
31
+ date:
32
+ - Thu, 19 Apr 2012 15:45:27 GMT
33
+ x-powered-by:
34
+ - ASP.NET
35
+ body: <?xml version="1.0" encoding="UTF-8"?><response><case ixBug="1" operations="edit,assign,resolve,email,remind"></case></response>
36
+ http_version: "1.1"
@@ -36,5 +36,27 @@ describe TicketMaster::Provider::Fogbugz::Ticket do
36
36
  @ticket.should be_an_instance_of(@klass)
37
37
  @ticket.id.should == @ticket_id
38
38
  end
39
+
40
+ it "should be able to create a ticket" do
41
+ ticket = nil
42
+
43
+ VCR.use_cassette('create-ticket') do
44
+ ticket = @project.ticket! :title => "Should be able to create ticket",
45
+ :priority => 2,
46
+ :assignee => 'ticketmaster'
47
+ end
48
+
49
+ ticket.should be_an_instance_of(@klass)
50
+ ticket.id.should_not be_nil
51
+ ticket.project_id.should == @project.id
52
+ end
53
+
54
+ it "should be able to update a ticket" do
55
+ ticket = nil
56
+ VCR.use_cassette('fogbugz-single-ticket') { ticket = @project.ticket @ticket_id }
57
+ ticket.title = "updated"
58
+ VCR.use_cassette('update-ticket') { ticket.save.should == true }
59
+ ticket.title.should == "updated"
60
+ end
39
61
 
40
62
  end
@@ -3,100 +3,28 @@
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "ticketmaster-fogbugz"
8
- s.version = "0.2.4"
6
+ require File.expand_path('../lib/version', __FILE__)
9
7
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Rafael George"]
12
- s.date = "2012-03-21"
13
- s.description = "Allows ticketmaster to interact with Fogbugz."
14
- s.email = "rafael@hybridgroup.com"
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rbenv-gemsets",
22
- ".rbenv-version",
23
- ".rvmrc",
24
- ".travis.yml",
25
- "Gemfile",
26
- "Gemfile.lock",
27
- "LICENSE.txt",
28
- "README.rdoc",
29
- "Rakefile",
30
- "VERSION",
31
- "lib/provider/comment.rb",
32
- "lib/provider/fogbugz.rb",
33
- "lib/provider/project.rb",
34
- "lib/provider/ticket.rb",
35
- "lib/ticketmaster-fogbugz.rb",
36
- "spec/fixtures/vcr_cassettes/all-fogbugz-projects.yml",
37
- "spec/fixtures/vcr_cassettes/fogbugz-projects.yml",
38
- "spec/fixtures/vcr_cassettes/fogbugz-single-ticket.yml",
39
- "spec/fixtures/vcr_cassettes/fogbugz-tickets-by-attributes.yml",
40
- "spec/fixtures/vcr_cassettes/fogbugz-tickets-by-ids.yml",
41
- "spec/fixtures/vcr_cassettes/fogbugz-tickets.yml",
42
- "spec/fixtures/vcr_cassettes/fogbugz.yml",
43
- "spec/fixtures/vcr_cassettes/load-project-by-id.yml",
44
- "spec/fixtures/vcr_cassettes/load-projects-attributes.yml",
45
- "spec/fixtures/vcr_cassettes/load-projects-by-ids.yml",
46
- "spec/projects_spec.rb",
47
- "spec/spec_helper.rb",
48
- "spec/tickets_spec.rb",
49
- "spec/vcr_setup.rb",
50
- "test/helper.rb",
51
- "test/test_project.rb",
52
- "test/test_ticketmaster-fogbugz.rb",
53
- "ticketmaster-fogbugz.gemspec"
54
- ]
55
- s.homepage = "http://github.com/hybridgroup/ticketmaster-fogbugz"
56
- s.require_paths = ["lib"]
57
- s.rubygems_version = "1.8.15"
58
- s.summary = "Ticketmaster Provider for Fogbugz"
59
- s.test_files = [
60
- "spec/projects_spec.rb",
61
- "spec/spec_helper.rb",
62
- "spec/tickets_spec.rb",
63
- "spec/vcr_setup.rb",
64
- "test/helper.rb",
65
- "test/test_project.rb",
66
- "test/test_ticketmaster-fogbugz.rb"
67
- ]
8
+ Gem::Specification.new do |gem|
9
+ gem.authors = ["Rafael George"]
10
+ gem.email = ["rafael@hybridgroup.com"]
11
+ gem.description = %q{Allows ticketmaster to interact with Fogbugz.}
12
+ gem.summary = %q{Allows ticketmaster to interact with Fogbugz.}
13
+ gem.homepage = ""
68
14
 
69
- if s.respond_to? :specification_version then
70
- s.specification_version = 3
15
+ gem.files = `git ls-files`.split($\)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.name = "ticketmaster-fogbugz"
19
+ gem.require_paths = ["lib"]
20
+ gem.version = TicketMaster::Fogbugz::VERSION
71
21
 
72
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
73
- s.add_runtime_dependency(%q<ticketmaster>, ["= 0.6.10"])
74
- s.add_runtime_dependency(%q<ruby-fogbugz>, ["~> 0.1"])
75
- s.add_development_dependency(%q<rspec>, ["~> 2.0"])
76
- s.add_development_dependency(%q<fakeweb>, ["~> 1.3"])
77
- s.add_development_dependency(%q<vcr>, ["~> 1.11"])
78
- s.add_development_dependency(%q<jeweler>, ["~> 1.5"])
79
- s.add_development_dependency(%q<simplecov>, ["~> 0.5"])
80
- s.add_development_dependency(%q<rcov>, ["~> 1.0"])
81
- else
82
- s.add_dependency(%q<ticketmaster>, ["= 0.6.10"])
83
- s.add_dependency(%q<ruby-fogbugz>, ["~> 0.1"])
84
- s.add_dependency(%q<rspec>, ["~> 2.0"])
85
- s.add_dependency(%q<fakeweb>, ["~> 1.3"])
86
- s.add_dependency(%q<vcr>, ["~> 1.11"])
87
- s.add_dependency(%q<jeweler>, ["~> 1.5"])
88
- s.add_dependency(%q<simplecov>, ["~> 0.5"])
89
- s.add_dependency(%q<rcov>, ["~> 1.0"])
90
- end
91
- else
92
- s.add_dependency(%q<ticketmaster>, ["= 0.6.10"])
93
- s.add_dependency(%q<ruby-fogbugz>, ["~> 0.1"])
94
- s.add_dependency(%q<rspec>, ["~> 2.0"])
95
- s.add_dependency(%q<fakeweb>, ["~> 1.3"])
96
- s.add_dependency(%q<vcr>, ["~> 1.11"])
97
- s.add_dependency(%q<jeweler>, ["~> 1.5"])
98
- s.add_dependency(%q<simplecov>, ["~> 0.5"])
99
- s.add_dependency(%q<rcov>, ["~> 1.0"])
100
- end
101
- end
22
+ gem.add_dependency 'ticketmaster', '~> 0.7'
23
+ gem.add_dependency 'rake', '~> 0.9'
24
+ gem.add_dependency 'ruby-fogbugz', '~> 0.1'
102
25
 
26
+ gem.add_development_dependency 'rspec', '~> 2.0'
27
+ gem.add_development_dependency 'fakeweb', '~> 1.3'
28
+ gem.add_development_dependency 'vcr', '~> 1.11'
29
+ gem.add_development_dependency 'rcov', '~> 1.0'
30
+ end
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: 31
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 4
10
- version: 0.2.4
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rafael George
@@ -15,116 +15,102 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-21 00:00:00 Z
18
+ date: 2012-04-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
+ name: ticketmaster
22
+ prerelease: false
21
23
  requirement: &id001 !ruby/object:Gem::Requirement
22
24
  none: false
23
25
  requirements:
24
- - - "="
26
+ - - ~>
25
27
  - !ruby/object:Gem::Version
26
- hash: 19
28
+ hash: 5
27
29
  segments:
28
30
  - 0
29
- - 6
30
- - 10
31
- version: 0.6.10
32
- version_requirements: *id001
33
- name: ticketmaster
34
- prerelease: false
31
+ - 7
32
+ version: "0.7"
35
33
  type: :runtime
34
+ version_requirements: *id001
36
35
  - !ruby/object:Gem::Dependency
36
+ name: rake
37
+ prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
40
41
  - - ~>
41
42
  - !ruby/object:Gem::Version
42
- hash: 9
43
+ hash: 25
43
44
  segments:
44
45
  - 0
45
- - 1
46
- version: "0.1"
46
+ - 9
47
+ version: "0.9"
48
+ type: :runtime
47
49
  version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
48
51
  name: ruby-fogbugz
49
52
  prerelease: false
50
- type: :runtime
51
- - !ruby/object:Gem::Dependency
52
53
  requirement: &id003 !ruby/object:Gem::Requirement
53
54
  none: false
54
55
  requirements:
55
56
  - - ~>
56
57
  - !ruby/object:Gem::Version
57
- hash: 3
58
+ hash: 9
58
59
  segments:
59
- - 2
60
60
  - 0
61
- version: "2.0"
61
+ - 1
62
+ version: "0.1"
63
+ type: :runtime
62
64
  version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
63
66
  name: rspec
64
67
  prerelease: false
65
- type: :development
66
- - !ruby/object:Gem::Dependency
67
68
  requirement: &id004 !ruby/object:Gem::Requirement
68
69
  none: false
69
70
  requirements:
70
71
  - - ~>
71
72
  - !ruby/object:Gem::Version
72
- hash: 9
73
+ hash: 3
73
74
  segments:
74
- - 1
75
- - 3
76
- version: "1.3"
75
+ - 2
76
+ - 0
77
+ version: "2.0"
78
+ type: :development
77
79
  version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
78
81
  name: fakeweb
79
82
  prerelease: false
80
- type: :development
81
- - !ruby/object:Gem::Dependency
82
83
  requirement: &id005 !ruby/object:Gem::Requirement
83
84
  none: false
84
85
  requirements:
85
86
  - - ~>
86
87
  - !ruby/object:Gem::Version
87
- hash: 25
88
+ hash: 9
88
89
  segments:
89
90
  - 1
90
- - 11
91
- version: "1.11"
91
+ - 3
92
+ version: "1.3"
93
+ type: :development
92
94
  version_requirements: *id005
95
+ - !ruby/object:Gem::Dependency
93
96
  name: vcr
94
97
  prerelease: false
95
- type: :development
96
- - !ruby/object:Gem::Dependency
97
98
  requirement: &id006 !ruby/object:Gem::Requirement
98
99
  none: false
99
100
  requirements:
100
101
  - - ~>
101
102
  - !ruby/object:Gem::Version
102
- hash: 5
103
+ hash: 25
103
104
  segments:
104
105
  - 1
105
- - 5
106
- version: "1.5"
107
- version_requirements: *id006
108
- name: jeweler
109
- prerelease: false
106
+ - 11
107
+ version: "1.11"
110
108
  type: :development
109
+ version_requirements: *id006
111
110
  - !ruby/object:Gem::Dependency
112
- requirement: &id007 !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- hash: 1
118
- segments:
119
- - 0
120
- - 5
121
- version: "0.5"
122
- version_requirements: *id007
123
- name: simplecov
111
+ name: rcov
124
112
  prerelease: false
125
- type: :development
126
- - !ruby/object:Gem::Dependency
127
- requirement: &id008 !ruby/object:Gem::Requirement
113
+ requirement: &id007 !ruby/object:Gem::Requirement
128
114
  none: false
129
115
  requirements:
130
116
  - - ~>
@@ -134,21 +120,20 @@ dependencies:
134
120
  - 1
135
121
  - 0
136
122
  version: "1.0"
137
- version_requirements: *id008
138
- name: rcov
139
- prerelease: false
140
123
  type: :development
124
+ version_requirements: *id007
141
125
  description: Allows ticketmaster to interact with Fogbugz.
142
- email: rafael@hybridgroup.com
126
+ email:
127
+ - rafael@hybridgroup.com
143
128
  executables: []
144
129
 
145
130
  extensions: []
146
131
 
147
- extra_rdoc_files:
148
- - LICENSE.txt
149
- - README.rdoc
132
+ extra_rdoc_files: []
133
+
150
134
  files:
151
135
  - .document
136
+ - .gitignore
152
137
  - .rbenv-gemsets
153
138
  - .rbenv-version
154
139
  - .rvmrc
@@ -158,13 +143,15 @@ files:
158
143
  - LICENSE.txt
159
144
  - README.rdoc
160
145
  - Rakefile
161
- - VERSION
162
146
  - lib/provider/comment.rb
163
147
  - lib/provider/fogbugz.rb
164
148
  - lib/provider/project.rb
165
149
  - lib/provider/ticket.rb
166
150
  - lib/ticketmaster-fogbugz.rb
151
+ - lib/version.rb
152
+ - spec/.tickets_spec.rb.un~
167
153
  - spec/fixtures/vcr_cassettes/all-fogbugz-projects.yml
154
+ - spec/fixtures/vcr_cassettes/create-ticket.yml
168
155
  - spec/fixtures/vcr_cassettes/fogbugz-projects.yml
169
156
  - spec/fixtures/vcr_cassettes/fogbugz-single-ticket.yml
170
157
  - spec/fixtures/vcr_cassettes/fogbugz-tickets-by-attributes.yml
@@ -174,15 +161,13 @@ files:
174
161
  - spec/fixtures/vcr_cassettes/load-project-by-id.yml
175
162
  - spec/fixtures/vcr_cassettes/load-projects-attributes.yml
176
163
  - spec/fixtures/vcr_cassettes/load-projects-by-ids.yml
164
+ - spec/fixtures/vcr_cassettes/update-ticket.yml
177
165
  - spec/projects_spec.rb
178
166
  - spec/spec_helper.rb
179
167
  - spec/tickets_spec.rb
180
168
  - spec/vcr_setup.rb
181
- - test/helper.rb
182
- - test/test_project.rb
183
- - test/test_ticketmaster-fogbugz.rb
184
169
  - ticketmaster-fogbugz.gemspec
185
- homepage: http://github.com/hybridgroup/ticketmaster-fogbugz
170
+ homepage: ""
186
171
  licenses: []
187
172
 
188
173
  post_install_message:
@@ -211,15 +196,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
196
  requirements: []
212
197
 
213
198
  rubyforge_project:
214
- rubygems_version: 1.8.15
199
+ rubygems_version: 1.8.17
215
200
  signing_key:
216
201
  specification_version: 3
217
- summary: Ticketmaster Provider for Fogbugz
202
+ summary: Allows ticketmaster to interact with Fogbugz.
218
203
  test_files:
204
+ - spec/.tickets_spec.rb.un~
205
+ - spec/fixtures/vcr_cassettes/all-fogbugz-projects.yml
206
+ - spec/fixtures/vcr_cassettes/create-ticket.yml
207
+ - spec/fixtures/vcr_cassettes/fogbugz-projects.yml
208
+ - spec/fixtures/vcr_cassettes/fogbugz-single-ticket.yml
209
+ - spec/fixtures/vcr_cassettes/fogbugz-tickets-by-attributes.yml
210
+ - spec/fixtures/vcr_cassettes/fogbugz-tickets-by-ids.yml
211
+ - spec/fixtures/vcr_cassettes/fogbugz-tickets.yml
212
+ - spec/fixtures/vcr_cassettes/fogbugz.yml
213
+ - spec/fixtures/vcr_cassettes/load-project-by-id.yml
214
+ - spec/fixtures/vcr_cassettes/load-projects-attributes.yml
215
+ - spec/fixtures/vcr_cassettes/load-projects-by-ids.yml
216
+ - spec/fixtures/vcr_cassettes/update-ticket.yml
219
217
  - spec/projects_spec.rb
220
218
  - spec/spec_helper.rb
221
219
  - spec/tickets_spec.rb
222
220
  - spec/vcr_setup.rb
223
- - test/helper.rb
224
- - test/test_project.rb
225
- - test/test_ticketmaster-fogbugz.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.4
@@ -1,15 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'minitest/spec'
11
- require 'minitest/autorun'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'ticketmaster-fogbugz'
@@ -1,37 +0,0 @@
1
- require 'helper'
2
-
3
- describe ProjectSpec
4
- CREDENTIALS = {:email => 'rafael@hybridgroup.com', :password => '123456', :uri => 'https://clutchapp.fogbugz.com'}
5
-
6
- def setup
7
- @klass = TicketMaster::Provider::Fogbugz::Project
8
- @tm = TicketMaster.new(:fogbugz, CREDENTIALS)
9
- end
10
-
11
- should "be able to load all projects" do
12
- projects = @tm.projects
13
- assert_equal true, projects.instance_of?(Array)
14
- assert_equal true, projects.first.instance_of?(@klass)
15
- end
16
-
17
- should "be able to load a group of projects based on array of id's" do
18
- projects = @tm.projects([1,2])
19
- assert_equal true, projects.instance_of?(Array)
20
- assert_equal true, projects.first.instance_of?(@klass)
21
- assert_equal 2, projects.first.id
22
- end
23
-
24
- should "be able to load tickets based on attributes" do
25
- projects = @tm.projects(:id => 1)
26
- assert_equal true, projects.instance_of?(Array)
27
- assert_equal true, projects.first.instance_of?(@klass)
28
- assert_equal "Sample Project", projects.first.name
29
- end
30
-
31
- should "be able to load a single ticket based on id" do
32
- project = @tm.project(1)
33
- assert_equal true, project.instance_of?(@klass)
34
- assert_equal 1, project.id
35
- end
36
-
37
- end
@@ -1,18 +0,0 @@
1
- require 'helper'
2
-
3
- class TestTicketmasterFogbugz < Test::Unit::TestCase
4
- context "checking for ticketmaster initialization" do
5
- should "be able to instatiate a new instance with a hash with credentials where keys are symbols" do
6
- @fogbugz = TicketMaster.new(:fogbugz, :email => 'rafael@hybridgroup.com', :password => '12345', :uri => 'https://clutchapp.fogbugz.com')
7
- assert_equal true, @fogbugz.instance_of?(TicketMaster)
8
- assert_equal true, @fogbugz.kind_of?(TicketMaster::Provider::Fogbugz)
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
-
17
- end
18
- end