crab 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +40 -35
- data/crab.gemspec +0 -1
- data/lib/crab.rb +1 -1
- data/lib/crab/story.rb +1 -5
- data/lib/crab/testcase.rb +2 -6
- data/lib/crab/utilities.rb +14 -4
- data/lib/crab/version.rb +1 -1
- metadata +5 -19
data/README.md
CHANGED
@@ -15,8 +15,10 @@ stay out of the way as much as possible.
|
|
15
15
|
Installing
|
16
16
|
----------
|
17
17
|
|
18
|
-
`crab` is distributed as a Ruby Gem. To install it,
|
19
|
-
|
18
|
+
`crab` is distributed as a Ruby Gem. To install it, make sure you are
|
19
|
+
running a recent version of Ruby (1.8.7 and up) and RubyGems (`crab`
|
20
|
+
was tested against 1.6.2) and then simply issue (where `$` is your
|
21
|
+
command prompt):
|
20
22
|
|
21
23
|
$ gem install crab
|
22
24
|
|
@@ -30,7 +32,8 @@ Usage
|
|
30
32
|
-----
|
31
33
|
|
32
34
|
As `crab` is still in its infancy, it doesn't support very complex
|
33
|
-
workflows, but does the job for the author and his team so far.
|
35
|
+
workflows, but does the job for the author and his team so far. Help us
|
36
|
+
extend it!
|
34
37
|
|
35
38
|
The team wrote a few stories directly in Rally before deciding that
|
36
39
|
writing them straight in Cucumber features would be better suited.
|
@@ -82,7 +85,7 @@ into Cucumber scenarios:
|
|
82
85
|
|
83
86
|
...
|
84
87
|
|
85
|
-
To convert a bunch of stories in one go, this pipe
|
88
|
+
To convert a bunch of stories in one go, this pipe should do the trick:
|
86
89
|
|
87
90
|
$ crab story list --iteration "Iteration 7" | cut -f 1 -d : | xargs crab story pull
|
88
91
|
|
@@ -112,8 +115,10 @@ Updating and moving:
|
|
112
115
|
|
113
116
|
$ crab story move US1002
|
114
117
|
US1002: Launches Rockets Upon Command from Evil Mastermind (completed)
|
118
|
+
|
115
119
|
$ crab story move US1002
|
116
120
|
US1002: Launches Rockets Upon Command from Evil Mastermind (accepted)
|
121
|
+
|
117
122
|
# eek, found a few problems!
|
118
123
|
$ crab story move US1002 --back
|
119
124
|
US1002: Launches Rockets Upon Command from Evil Mastermind (completed)
|
@@ -127,10 +132,10 @@ It is also possible to create, update and delete test cases inside Rally
|
|
127
132
|
straight from the command line:
|
128
133
|
|
129
134
|
$ crab testcase create US1001 "Rocket Silo Is Unlocked"
|
130
|
-
US1001/TC1501: Rocket Silo Is Unlocked (
|
135
|
+
US1001/TC1501: Rocket Silo Is Unlocked ()
|
131
136
|
|
132
137
|
$ crab testcase update TC1501 --priority critical --risk low
|
133
|
-
US1001/TC1501: Rocket Silo Is Unlocked (critical low
|
138
|
+
US1001/TC1501: Rocket Silo Is Unlocked (critical low)
|
134
139
|
|
135
140
|
$ crab testcase delete TC1501
|
136
141
|
Test case TC1501 deleted.
|
@@ -138,32 +143,6 @@ straight from the command line:
|
|
138
143
|
There are many more switches. Try exploring `crab --help` to find
|
139
144
|
out more.
|
140
145
|
|
141
|
-
Troubleshooting
|
142
|
-
---------------
|
143
|
-
|
144
|
-
This is still very rudimentary, but you can set `CRAB_LOG_LEVEL`
|
145
|
-
to one of the constants defined in `Logger` to see more output for
|
146
|
-
diagnosis. They are:
|
147
|
-
|
148
|
-
- 0: DEBUG
|
149
|
-
- 1: INFO
|
150
|
-
- 2: WARN
|
151
|
-
- 3: ERROR
|
152
|
-
- 4: FATAL
|
153
|
-
- 5: UNKNOWN
|
154
|
-
|
155
|
-
The default is `WARN`, which should be good enough for most day-to-day
|
156
|
-
usage, but if you are having trouble and would like to submit a bug
|
157
|
-
report, please try again with `CRAB_LOG_LEVEL` set to `0` or `1`:
|
158
|
-
|
159
|
-
$ CRAB_LOG_LEVEL=0 crab story show US1001
|
160
|
-
I, [2011-10-04T02:33:22.795535 #16754] INFO -- crab: Getting credentials...
|
161
|
-
I, [2011-10-04T02:33:22.795789 #16754] INFO -- crab: Connecting to Rally as cvillela@thoughtworks.com...
|
162
|
-
I, [2011-10-04T02:33:28.343039 #16754] INFO -- crab: Looking up story with ID US1001
|
163
|
-
I, [2011-10-04T02:33:31.861501 #16754] INFO -- crab: US1001: 1 test case(s) found
|
164
|
-
I, [2011-10-04T02:33:38.681445 #16754] INFO -- crab: TC10001: 3 step(s) found
|
165
|
-
...
|
166
|
-
|
167
146
|
i18n Support
|
168
147
|
------------
|
169
148
|
|
@@ -193,7 +172,7 @@ Hopefully this will be enough for your case, but if not please let us know!
|
|
193
172
|
Bash Completion
|
194
173
|
---------------
|
195
174
|
|
196
|
-
|
175
|
+
`crab` comes with bash completion support built in. Enable it by running:
|
197
176
|
|
198
177
|
$ . "`bundle show crab`/scripts/crab_bash_completion"
|
199
178
|
|
@@ -218,6 +197,32 @@ If you have any problems, please let us know.
|
|
218
197
|
[4]: http://gembundler.com
|
219
198
|
[5]: https://github.com/cucumber/aruba
|
220
199
|
|
200
|
+
Troubleshooting
|
201
|
+
---------------
|
202
|
+
|
203
|
+
This is still very rudimentary, but you can set `CRAB_LOG_LEVEL`
|
204
|
+
to one of the constants defined in `Logger` to see more output for
|
205
|
+
diagnosis. They are:
|
206
|
+
|
207
|
+
- 0: DEBUG
|
208
|
+
- 1: INFO
|
209
|
+
- 2: WARN
|
210
|
+
- 3: ERROR
|
211
|
+
- 4: FATAL
|
212
|
+
- 5: UNKNOWN
|
213
|
+
|
214
|
+
The default is `WARN`, which should be good enough for most day-to-day
|
215
|
+
usage, but if you are having trouble and would like to submit a bug
|
216
|
+
report, please try again with `CRAB_LOG_LEVEL` set to `0` or `1`:
|
217
|
+
|
218
|
+
$ CRAB_LOG_LEVEL=0 crab story show US1001
|
219
|
+
I, [2011-10-04T02:33:22.795535 #16754] INFO -- crab: Getting credentials...
|
220
|
+
I, [2011-10-04T02:33:22.795789 #16754] INFO -- crab: Connecting to Rally as cvillela@thoughtworks.com...
|
221
|
+
I, [2011-10-04T02:33:28.343039 #16754] INFO -- crab: Looking up story with ID US1001
|
222
|
+
I, [2011-10-04T02:33:31.861501 #16754] INFO -- crab: US1001: 1 test case(s) found
|
223
|
+
I, [2011-10-04T02:33:38.681445 #16754] INFO -- crab: TC10001: 3 step(s) found
|
224
|
+
...
|
225
|
+
|
221
226
|
To do / Roadmap / Known Bugs
|
222
227
|
----------------------------
|
223
228
|
|
@@ -237,8 +242,8 @@ Authors and Contributors
|
|
237
242
|
And last but not least, Rodrigo Spohr <rspohr@thoughtworks.com> and
|
238
243
|
Camilo Ribeiro <cribeiro@thoughtworks.com> for the user testing.
|
239
244
|
|
240
|
-
Disclaimers
|
241
|
-
|
245
|
+
Disclaimers and Acknowledgements
|
246
|
+
--------------------------------
|
242
247
|
|
243
248
|
This project and its authors have no affiliation with Rally Software
|
244
249
|
Development Corp. or the Cucumber project.
|
data/crab.gemspec
CHANGED
data/lib/crab.rb
CHANGED
data/lib/crab/story.rb
CHANGED
@@ -37,11 +37,7 @@ module Crab
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def description
|
40
|
-
|
41
|
-
# biggest problem is that Cucumber breaks if text in description looks like something
|
42
|
-
# it might know how to parse, but doesn't
|
43
|
-
# our feature descriptions are quite like that, so I was being ultra-conservative
|
44
|
-
sanitize(@rally_story.description || '').gsub(/ +/, "\n").gsub(/\n\n/, "\n").gsub(/\n/, "\n ")
|
40
|
+
sanitize(@rally_story.description || '')
|
45
41
|
end
|
46
42
|
|
47
43
|
def scenarios
|
data/lib/crab/testcase.rb
CHANGED
@@ -23,16 +23,12 @@ module Crab
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def description
|
26
|
-
|
27
|
-
# biggest problem is that Cucumber breaks if text in description looks like something
|
28
|
-
# it might know how to parse, but doesn't
|
29
|
-
# our feature descriptions are quite like that, so I was being ultra-conservative
|
30
|
-
sanitize(@rally_test_case.description || '').gsub(/ +/, "\n").gsub(/\n\n/, "\n").gsub(/\n/, "\n ")
|
26
|
+
sanitize(@rally_test_case.description || '')
|
31
27
|
end
|
32
28
|
|
33
29
|
def tags
|
34
30
|
[priority, risk, test_method, test_type].map(&:parameterize).reject do |tag|
|
35
|
-
%w{important medium manual
|
31
|
+
%w{important medium manual functional}.include? tag
|
36
32
|
end
|
37
33
|
end
|
38
34
|
|
data/lib/crab/utilities.rb
CHANGED
@@ -70,10 +70,20 @@ module Crab
|
|
70
70
|
result
|
71
71
|
end
|
72
72
|
|
73
|
-
#
|
74
|
-
#
|
75
|
-
|
76
|
-
|
73
|
+
# use a web service to seriously clean up Rally's HTML -- I could not find any HTML-to-text libraries
|
74
|
+
# that satisfied the following conditions:
|
75
|
+
#
|
76
|
+
# - displaying nested lists properly (indented, etc)
|
77
|
+
# - being easy to include into the project
|
78
|
+
# - had no licensing issues
|
79
|
+
# - understood UTF8 natively
|
80
|
+
# - understood entities (emdash etc)
|
81
|
+
# - allowed dashes as list item markers
|
82
|
+
#
|
83
|
+
def sanitize(html)
|
84
|
+
require 'net/http'
|
85
|
+
require 'uri'
|
86
|
+
Net::HTTP.post_form(URI.parse("http://html2text.herokuapp.com/"), {:html => html}).body
|
77
87
|
end
|
78
88
|
|
79
89
|
def dotcrab_file(file)
|
data/lib/crab/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 14
|
10
|
+
version: 0.2.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Carlos Villela
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-10 00:00:00 -03:00
|
19
19
|
default_executable: crab
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
type: :runtime
|
118
118
|
version_requirements: *id007
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
120
|
+
name: trollop
|
121
121
|
prerelease: false
|
122
122
|
requirement: &id008 !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
@@ -130,20 +130,6 @@ dependencies:
|
|
130
130
|
version: "0"
|
131
131
|
type: :runtime
|
132
132
|
version_requirements: *id008
|
133
|
-
- !ruby/object:Gem::Dependency
|
134
|
-
name: trollop
|
135
|
-
prerelease: false
|
136
|
-
requirement: &id009 !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ">="
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
hash: 3
|
142
|
-
segments:
|
143
|
-
- 0
|
144
|
-
version: "0"
|
145
|
-
type: :runtime
|
146
|
-
version_requirements: *id009
|
147
133
|
description: CRaB is a bridge between Cucumber and Rally
|
148
134
|
email:
|
149
135
|
- cvillela@thoughtworks.com
|