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 +1 -1
- data/bugherd-api.gemspec +88 -84
- data/lib/bugherd.rb +1 -0
- data/lib/bugherd/comment.rb +5 -0
- data/spec/comment_spec.rb +33 -0
- data/spec/fixtures/comments.xml +9 -0
- data/spec/fixtures/comments/9760.xml +7 -0
- metadata +75 -111
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/bugherd-api.gemspec
CHANGED
@@ -1,84 +1,88 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{bugherd-api}
|
8
|
-
s.version = "0.0.
|
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-
|
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/
|
35
|
-
"lib/bugherd/
|
36
|
-
"lib/bugherd/
|
37
|
-
"
|
38
|
-
"spec
|
39
|
-
"spec/
|
40
|
-
"spec/
|
41
|
-
"spec/fixtures
|
42
|
-
"spec/fixtures/
|
43
|
-
"spec/fixtures/
|
44
|
-
"spec/fixtures/
|
45
|
-
"spec/fixtures/
|
46
|
-
"spec/
|
47
|
-
"spec/
|
48
|
-
"spec/
|
49
|
-
"spec/
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
s.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
s.
|
66
|
-
s.
|
67
|
-
|
68
|
-
s.
|
69
|
-
s.
|
70
|
-
s.
|
71
|
-
|
72
|
-
s.add_dependency(%q<
|
73
|
-
s.add_dependency(%q<
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
s.add_dependency(%q<
|
81
|
-
s.add_dependency(%q<
|
82
|
-
|
83
|
-
|
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
|
+
|
data/lib/bugherd.rb
CHANGED
@@ -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>
|
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
|
-
|
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
|
-
|
19
|
-
|
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
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
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
|
-
|
50
|
-
|
51
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
100
|
-
|
101
|
-
|
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
|
-
|
166
|
-
segments:
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
segments:
|
167
136
|
- 0
|
168
|
-
|
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
|
-
|
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.
|
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
|
-
|