bugherd-api 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,84 +1,88 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{bugherd-api}
8
- s.version = "0.0.2"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Rafael George"]
12
- s.date = %q{2011-08-24}
13
- s.description = %q{BugherdAPI wrapper}
14
- s.email = %q{george.rafael@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rspec",
22
- ".rvmrc",
23
- "Gemfile",
24
- "Gemfile.lock",
25
- "LICENSE.txt",
26
- "README.rdoc",
27
- "Rakefile",
28
- "VERSION",
29
- "bugherd-api.gemspec",
30
- "lib/bugherd-api.rb",
31
- "lib/bugherd.rb",
32
- "lib/bugherd/.project.rb.swp",
33
- "lib/bugherd/base.rb",
34
- "lib/bugherd/project.rb",
35
- "lib/bugherd/task.rb",
36
- "lib/bugherd/user.rb",
37
- "spec/.project_spec.rb.swp",
38
- "spec/bugherd-api_spec.rb",
39
- "spec/fixtures/.projects.xml.swp",
40
- "spec/fixtures/projects.xml",
41
- "spec/fixtures/projects/.1458.xml.swp",
42
- "spec/fixtures/projects/1458.xml",
43
- "spec/fixtures/tasks.xml",
44
- "spec/fixtures/tasks/4950.xml",
45
- "spec/fixtures/users.xml",
46
- "spec/project_spec.rb",
47
- "spec/spec_helper.rb",
48
- "spec/task_spec.rb",
49
- "spec/user_spec.rb"
50
- ]
51
- s.homepage = %q{http://github.com/cored/bugherd-api}
52
- s.licenses = ["MIT"]
53
- s.require_paths = ["lib"]
54
- s.rubygems_version = %q{1.6.1}
55
- s.summary = %q{BugherdAPI wrapper}
56
-
57
- if s.respond_to? :specification_version then
58
- s.specification_version = 3
59
-
60
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
61
- s.add_runtime_dependency(%q<activesupport>, [">= 0"])
62
- s.add_runtime_dependency(%q<activeresource>, [">= 0"])
63
- s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
64
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
65
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
66
- s.add_development_dependency(%q<rcov>, [">= 0"])
67
- else
68
- s.add_dependency(%q<activesupport>, [">= 0"])
69
- s.add_dependency(%q<activeresource>, [">= 0"])
70
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
71
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
72
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
73
- s.add_dependency(%q<rcov>, [">= 0"])
74
- end
75
- else
76
- s.add_dependency(%q<activesupport>, [">= 0"])
77
- s.add_dependency(%q<activeresource>, [">= 0"])
78
- s.add_dependency(%q<rspec>, ["~> 2.3.0"])
79
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
80
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
81
- s.add_dependency(%q<rcov>, [">= 0"])
82
- end
83
- end
84
-
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{bugherd-api}
8
+ s.version = "0.0.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Rafael George"]
12
+ s.date = %q{2011-08-29}
13
+ s.description = %q{BugherdAPI wrapper}
14
+ s.email = %q{george.rafael@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ ".rvmrc",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bugherd-api.gemspec",
30
+ "lib/bugherd-api.rb",
31
+ "lib/bugherd.rb",
32
+ "lib/bugherd/.project.rb.swp",
33
+ "lib/bugherd/base.rb",
34
+ "lib/bugherd/comment.rb",
35
+ "lib/bugherd/project.rb",
36
+ "lib/bugherd/task.rb",
37
+ "lib/bugherd/user.rb",
38
+ "spec/.project_spec.rb.swp",
39
+ "spec/bugherd-api_spec.rb",
40
+ "spec/comment_spec.rb",
41
+ "spec/fixtures/.projects.xml.swp",
42
+ "spec/fixtures/comments.xml",
43
+ "spec/fixtures/comments/9760.xml",
44
+ "spec/fixtures/projects.xml",
45
+ "spec/fixtures/projects/.1458.xml.swp",
46
+ "spec/fixtures/projects/1458.xml",
47
+ "spec/fixtures/tasks.xml",
48
+ "spec/fixtures/tasks/4950.xml",
49
+ "spec/fixtures/users.xml",
50
+ "spec/project_spec.rb",
51
+ "spec/spec_helper.rb",
52
+ "spec/task_spec.rb",
53
+ "spec/user_spec.rb"
54
+ ]
55
+ s.homepage = %q{http://github.com/cored/bugherd-api}
56
+ s.licenses = ["MIT"]
57
+ s.require_paths = ["lib"]
58
+ s.rubygems_version = %q{1.7.2}
59
+ s.summary = %q{BugherdAPI wrapper}
60
+
61
+ if s.respond_to? :specification_version then
62
+ s.specification_version = 3
63
+
64
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
65
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
66
+ s.add_runtime_dependency(%q<activeresource>, [">= 0"])
67
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
68
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
69
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
70
+ s.add_development_dependency(%q<rcov>, [">= 0"])
71
+ else
72
+ s.add_dependency(%q<activesupport>, [">= 0"])
73
+ s.add_dependency(%q<activeresource>, [">= 0"])
74
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
75
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
76
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
77
+ s.add_dependency(%q<rcov>, [">= 0"])
78
+ end
79
+ else
80
+ s.add_dependency(%q<activesupport>, [">= 0"])
81
+ s.add_dependency(%q<activeresource>, [">= 0"])
82
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
83
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
84
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
85
+ s.add_dependency(%q<rcov>, [">= 0"])
86
+ end
87
+ end
88
+
@@ -11,6 +11,7 @@ module BugherdAPI
11
11
  autoload :User, 'bugherd/user'
12
12
  autoload :Project, 'bugherd/project'
13
13
  autoload :Task, 'bugherd/task'
14
+ autoload :Comment, 'bugherd/comment'
14
15
  class Error < StandardError; end
15
16
 
16
17
  class << self
@@ -0,0 +1,5 @@
1
+ module BugherdAPI
2
+ class Comment < Base
3
+ self.site += 'projects/:project_id/tasks/:task_id/'
4
+ end
5
+ end
@@ -0,0 +1,33 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "BugherdAPI::Comment" do
4
+ before(:each) do
5
+ headers = {'Authorization' => 'Basic dXNlckBlbWFpbC5jb206MTIzNDU=', 'Accept' => 'application/xml'}
6
+ ActiveResource::HttpMock.respond_to do |mock|
7
+ mock.get '/api_v1/projects/1458/tasks/4950/comments.xml', headers, fixture_for('comments', 'xml'), 200
8
+ mock.get '/api_v1/projects/1458/tasks/4950/comments/9760.xml', headers, fixture_for('comments/9760', 'xml'), 200
9
+ end
10
+ @project_id = 1458
11
+ @task_id = 4950
12
+ end
13
+
14
+ context "retrieve comments" do
15
+ it "should retrieve all comments" do
16
+ BugherdAPI.authenticate('user@email.com', '12345')
17
+ comments = BugherdAPI::Comment.find(:all, :params => {:project_id => 1458, :task_id => 4950})
18
+ comments.should_not be_nil
19
+ end
20
+
21
+ it "should retrieve a single comment" do
22
+ BugherdAPI.authenticate('user@email.com', '12345')
23
+ comments = BugherdAPI::Comment.find(9760, :params => {:project_id => 1458, :task_id => 4950})
24
+ comments.should_not be_nil
25
+ end
26
+ end
27
+
28
+ context "comment creation, deletion and update" do
29
+ it "should create a comment"
30
+ it "should delete a comment"
31
+ it "should update a comment"
32
+ end
33
+ end
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <comments type="array">
3
+ <comment>
4
+ <id type="integer">9760</id>
5
+ <created-at type="datetime">2011-08-18T19:57:56Z</created-at>
6
+ <text>I'm working on this already</text>
7
+ <user-id type="integer">1798</user-id>
8
+ </comment>
9
+ </comments>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <comment>
3
+ <id type="integer">9760</id>
4
+ <created-at type="datetime">2011-08-18T19:57:56Z</created-at>
5
+ <text>I'm working on this already</text>
6
+ <user-id type="integer">1798</user-id>
7
+ </comment>
metadata CHANGED
@@ -1,123 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bugherd-api
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Rafael George
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-08-24 00:00:00 -04:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- type: :runtime
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
32
- version_requirements: *id001
12
+ date: 2011-08-29 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
33
15
  name: activesupport
34
- prerelease: false
35
- - !ruby/object:Gem::Dependency
36
- type: :runtime
37
- requirement: &id002 !ruby/object:Gem::Requirement
16
+ requirement: &11287872 !ruby/object:Gem::Requirement
38
17
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
46
- version_requirements: *id002
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *11287872
25
+ - !ruby/object:Gem::Dependency
47
26
  name: activeresource
27
+ requirement: &11287548 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
48
34
  prerelease: false
49
- - !ruby/object:Gem::Dependency
50
- type: :development
51
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *11287548
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec
38
+ requirement: &11287260 !ruby/object:Gem::Requirement
52
39
  none: false
53
- requirements:
40
+ requirements:
54
41
  - - ~>
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 2
59
- - 3
60
- - 0
42
+ - !ruby/object:Gem::Version
61
43
  version: 2.3.0
62
- version_requirements: *id003
63
- name: rspec
64
- prerelease: false
65
- - !ruby/object:Gem::Dependency
66
44
  type: :development
67
- requirement: &id004 !ruby/object:Gem::Requirement
45
+ prerelease: false
46
+ version_requirements: *11287260
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: &11286948 !ruby/object:Gem::Requirement
68
50
  none: false
69
- requirements:
51
+ requirements:
70
52
  - - ~>
71
- - !ruby/object:Gem::Version
72
- hash: 23
73
- segments:
74
- - 1
75
- - 0
76
- - 0
53
+ - !ruby/object:Gem::Version
77
54
  version: 1.0.0
78
- version_requirements: *id004
79
- name: bundler
80
- prerelease: false
81
- - !ruby/object:Gem::Dependency
82
55
  type: :development
83
- requirement: &id005 !ruby/object:Gem::Requirement
56
+ prerelease: false
57
+ version_requirements: *11286948
58
+ - !ruby/object:Gem::Dependency
59
+ name: jeweler
60
+ requirement: &11286648 !ruby/object:Gem::Requirement
84
61
  none: false
85
- requirements:
62
+ requirements:
86
63
  - - ~>
87
- - !ruby/object:Gem::Version
88
- hash: 7
89
- segments:
90
- - 1
91
- - 6
92
- - 4
64
+ - !ruby/object:Gem::Version
93
65
  version: 1.6.4
94
- version_requirements: *id005
95
- name: jeweler
96
- prerelease: false
97
- - !ruby/object:Gem::Dependency
98
66
  type: :development
99
- requirement: &id006 !ruby/object:Gem::Requirement
100
- none: false
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- hash: 3
105
- segments:
106
- - 0
107
- version: "0"
108
- version_requirements: *id006
67
+ prerelease: false
68
+ version_requirements: *11286648
69
+ - !ruby/object:Gem::Dependency
109
70
  name: rcov
71
+ requirement: &11239224 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
110
78
  prerelease: false
79
+ version_requirements: *11239224
111
80
  description: BugherdAPI wrapper
112
81
  email: george.rafael@gmail.com
113
82
  executables: []
114
-
115
83
  extensions: []
116
-
117
- extra_rdoc_files:
84
+ extra_rdoc_files:
118
85
  - LICENSE.txt
119
86
  - README.rdoc
120
- files:
87
+ files:
121
88
  - .document
122
89
  - .rspec
123
90
  - .rvmrc
@@ -132,12 +99,16 @@ files:
132
99
  - lib/bugherd.rb
133
100
  - lib/bugherd/.project.rb.swp
134
101
  - lib/bugherd/base.rb
102
+ - lib/bugherd/comment.rb
135
103
  - lib/bugherd/project.rb
136
104
  - lib/bugherd/task.rb
137
105
  - lib/bugherd/user.rb
138
106
  - spec/.project_spec.rb.swp
139
107
  - spec/bugherd-api_spec.rb
108
+ - spec/comment_spec.rb
140
109
  - spec/fixtures/.projects.xml.swp
110
+ - spec/fixtures/comments.xml
111
+ - spec/fixtures/comments/9760.xml
141
112
  - spec/fixtures/projects.xml
142
113
  - spec/fixtures/projects/.1458.xml.swp
143
114
  - spec/fixtures/projects/1458.xml
@@ -148,39 +119,32 @@ files:
148
119
  - spec/spec_helper.rb
149
120
  - spec/task_spec.rb
150
121
  - spec/user_spec.rb
151
- has_rdoc: true
152
122
  homepage: http://github.com/cored/bugherd-api
153
- licenses:
123
+ licenses:
154
124
  - MIT
155
125
  post_install_message:
156
126
  rdoc_options: []
157
-
158
- require_paths:
127
+ require_paths:
159
128
  - lib
160
- required_ruby_version: !ruby/object:Gem::Requirement
129
+ required_ruby_version: !ruby/object:Gem::Requirement
161
130
  none: false
162
- requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- hash: 3
166
- segments:
131
+ requirements:
132
+ - - ! '>='
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ segments:
167
136
  - 0
168
- version: "0"
169
- required_rubygems_version: !ruby/object:Gem::Requirement
137
+ hash: 80452961
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
139
  none: false
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- hash: 3
175
- segments:
176
- - 0
177
- version: "0"
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
178
144
  requirements: []
179
-
180
145
  rubyforge_project:
181
- rubygems_version: 1.6.1
146
+ rubygems_version: 1.7.2
182
147
  signing_key:
183
148
  specification_version: 3
184
149
  summary: BugherdAPI wrapper
185
150
  test_files: []
186
-