fisheye-crucible 0.0.1
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/History.txt +15 -0
- data/Manifest.txt +30 -0
- data/PostInstall.txt +6 -0
- data/README.rdoc +75 -0
- data/Rakefile +124 -0
- data/features/authenticate.feature +28 -0
- data/features/client_legacy.feature +73 -0
- data/features/development.feature +13 -0
- data/features/step_definitions/authenticate_steps.rb +35 -0
- data/features/step_definitions/client_legacy_steps.rb +28 -0
- data/features/step_definitions/common_steps.rb +168 -0
- data/features/support/common.rb +39 -0
- data/features/support/config.yaml +3 -0
- data/features/support/env.rb +16 -0
- data/features/support/hooks.rb +9 -0
- data/features/support/matchers.rb +11 -0
- data/lib/fisheye-crucible.rb +10 -0
- data/lib/fisheye-crucible/client.rb +33 -0
- data/lib/fisheye-crucible/client/legacy.rb +315 -0
- data/lib/fisheye-crucible/type_converter.rb +285 -0
- data/lib/fisheye_crucible_exception.rb +5 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/client/legacy_spec.rb +36 -0
- data/spec/client_spec.rb +3 -0
- data/spec/fisheye-crucible_spec.rb +11 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +10 -0
- data/tasks/rspec.rake +21 -0
- metadata +252 -0
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/fisheye-crucible.rb'}"
|
9
|
+
puts "Loading fisheye-crucible gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper.rb'
|
2
|
+
require 'fisheye-crucible/client/legacy'
|
3
|
+
|
4
|
+
describe FisheyeCrucible::Client::Legacy do
|
5
|
+
include FisheyeCrucible
|
6
|
+
|
7
|
+
GOOD_USERNAME = 'gemtest'
|
8
|
+
GOOD_PASSWORD = 'gemtest'
|
9
|
+
|
10
|
+
before :each do
|
11
|
+
server = 'http://sandbox.fisheye.atlassian.com'
|
12
|
+
|
13
|
+
@fc = Client::Legacy.new(server)
|
14
|
+
end
|
15
|
+
|
16
|
+
after :all do
|
17
|
+
@fc.logout
|
18
|
+
end
|
19
|
+
|
20
|
+
context "login" do
|
21
|
+
it "should login successfully with good credentials" do
|
22
|
+
token = @fc.login(GOOD_USERNAME, GOOD_PASSWORD)
|
23
|
+
token.should match(/^\w+:\d{3}:\w{32}$/)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context "revision" do
|
28
|
+
REVISION_RESPONSE =<<-EOF
|
29
|
+
<response><revision path="README.txt" rev="5774" author="parrt" date="2009-03-01T22:40:41.00Z" state="deleted" totalLines="0" linesAdded="0" linesRemoved="123" csid="5774" ancestor="5646"><log>mking tool dir</log></revision>
|
30
|
+
</response>
|
31
|
+
EOF
|
32
|
+
it "should return a Hash of properties" do
|
33
|
+
@fc.revision('antlr', '', '5774').class.should == Hash
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/spec/client_spec.rb
ADDED
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format specdoc
|
data/spec/spec_helper.rb
ADDED
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
5
|
+
require 'spec'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
rescue LoadError
|
10
|
+
puts <<-EOS
|
11
|
+
To use rspec for testing you must install rspec gem:
|
12
|
+
gem install rspec
|
13
|
+
EOS
|
14
|
+
exit(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Run the specs under spec/models"
|
18
|
+
Spec::Rake::SpecTask.new do |t|
|
19
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,252 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fisheye-crucible
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Steve Loveless
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-07-18 00:00:00 -07:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rest-client
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rubyforge
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 7
|
44
|
+
segments:
|
45
|
+
- 2
|
46
|
+
- 0
|
47
|
+
- 4
|
48
|
+
version: 2.0.4
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: hoe-yard
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 31
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
- 1
|
63
|
+
- 2
|
64
|
+
version: 0.1.2
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
version: "0"
|
79
|
+
type: :development
|
80
|
+
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: yard
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
93
|
+
type: :development
|
94
|
+
version_requirements: *id005
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: hoe-yard
|
97
|
+
prerelease: false
|
98
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
107
|
+
type: :development
|
108
|
+
version_requirements: *id006
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: cucumber
|
111
|
+
prerelease: false
|
112
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
hash: 3
|
118
|
+
segments:
|
119
|
+
- 0
|
120
|
+
version: "0"
|
121
|
+
type: :development
|
122
|
+
version_requirements: *id007
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: hoe
|
125
|
+
prerelease: false
|
126
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 21
|
132
|
+
segments:
|
133
|
+
- 2
|
134
|
+
- 6
|
135
|
+
- 1
|
136
|
+
version: 2.6.1
|
137
|
+
type: :development
|
138
|
+
version_requirements: *id008
|
139
|
+
description: |+
|
140
|
+
This gem is a wrapper around the REST API for Atlassian's {Fisheye}[http://www.atlassian.com/software/fisheye/] and {Crucible}[http://www.atlassian.com/software/crucible/]. It currently only provides access to their {legacy API}[http://confluence.atlassian.com/display/FECRUDEV/FishEye+Legacy+Remote+API];
|
141
|
+
wrapping of the current API is in the works.
|
142
|
+
|
143
|
+
email:
|
144
|
+
- steve.loveless@gmail.com
|
145
|
+
executables: []
|
146
|
+
|
147
|
+
extensions: []
|
148
|
+
|
149
|
+
extra_rdoc_files:
|
150
|
+
- History.txt
|
151
|
+
- Manifest.txt
|
152
|
+
- PostInstall.txt
|
153
|
+
files:
|
154
|
+
- History.txt
|
155
|
+
- Manifest.txt
|
156
|
+
- PostInstall.txt
|
157
|
+
- README.rdoc
|
158
|
+
- Rakefile
|
159
|
+
- features/authenticate.feature
|
160
|
+
- features/client_legacy.feature
|
161
|
+
- features/development.feature
|
162
|
+
- features/step_definitions/authenticate_steps.rb
|
163
|
+
- features/step_definitions/client_legacy_steps.rb
|
164
|
+
- features/step_definitions/common_steps.rb
|
165
|
+
- features/support/common.rb
|
166
|
+
- features/support/config.yaml
|
167
|
+
- features/support/env.rb
|
168
|
+
- features/support/hooks.rb
|
169
|
+
- features/support/matchers.rb
|
170
|
+
- lib/fisheye-crucible.rb
|
171
|
+
- lib/fisheye-crucible/client.rb
|
172
|
+
- lib/fisheye-crucible/client/legacy.rb
|
173
|
+
- lib/fisheye-crucible/type_converter.rb
|
174
|
+
- lib/fisheye_crucible_exception.rb
|
175
|
+
- script/console
|
176
|
+
- script/destroy
|
177
|
+
- script/generate
|
178
|
+
- spec/client/legacy_spec.rb
|
179
|
+
- spec/client_spec.rb
|
180
|
+
- spec/fisheye-crucible_spec.rb
|
181
|
+
- spec/spec.opts
|
182
|
+
- spec/spec_helper.rb
|
183
|
+
- tasks/rspec.rake
|
184
|
+
has_rdoc: yard
|
185
|
+
homepage: http://github.com/turboladen/fisheye-crucible
|
186
|
+
licenses: []
|
187
|
+
|
188
|
+
post_install_message:
|
189
|
+
- |
|
190
|
+
|
191
|
+
|
192
|
+
- |
|
193
|
+
Thanks for installing fisheye-crucible, I hope you get some good use out of it.
|
194
|
+
|
195
|
+
- |
|
196
|
+
|
197
|
+
|
198
|
+
- |
|
199
|
+
For more information on fisheye-crucible, see http://github.com/turboladen/fisheye-crucible
|
200
|
+
|
201
|
+
- |
|
202
|
+
|
203
|
+
|
204
|
+
- |
|
205
|
+
|
206
|
+
|
207
|
+
rdoc_options:
|
208
|
+
- --main
|
209
|
+
- README.rdoc
|
210
|
+
- --output-dir
|
211
|
+
- doc
|
212
|
+
- --private
|
213
|
+
- --protected
|
214
|
+
- --verbose
|
215
|
+
- --files
|
216
|
+
- - Manifest.txt
|
217
|
+
- History.txt
|
218
|
+
- --title
|
219
|
+
- fisheye-crucible Documentation (0.0.1)
|
220
|
+
- --markup
|
221
|
+
- :rdoc
|
222
|
+
require_paths:
|
223
|
+
- lib
|
224
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
hash: 3
|
230
|
+
segments:
|
231
|
+
- 0
|
232
|
+
version: "0"
|
233
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
|
+
none: false
|
235
|
+
requirements:
|
236
|
+
- - ">="
|
237
|
+
- !ruby/object:Gem::Version
|
238
|
+
hash: 3
|
239
|
+
segments:
|
240
|
+
- 0
|
241
|
+
version: "0"
|
242
|
+
requirements: []
|
243
|
+
|
244
|
+
rubyforge_project: fisheye-crucible
|
245
|
+
rubygems_version: 1.3.7
|
246
|
+
signing_key:
|
247
|
+
specification_version: 3
|
248
|
+
summary: REST wrapper around Atlassian's Fisheye/Crucible's API
|
249
|
+
test_files:
|
250
|
+
- spec/client_spec.rb
|
251
|
+
- spec/fisheye-crucible_spec.rb
|
252
|
+
- spec/spec_helper.rb
|