crab 0.2.7 → 0.2.8
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/README.md +0 -1
- data/bin/crab +27 -14
- data/bin/crab-help +10 -2
- data/bin/crab-it +25 -11
- data/bin/crab-it-help +11 -2
- data/bin/crab-it-list +25 -15
- data/bin/crab-iteration +25 -11
- data/bin/crab-iteration-help +11 -2
- data/bin/crab-iteration-list +25 -15
- data/bin/crab-login +24 -13
- data/bin/crab-logout +22 -9
- data/bin/crab-project +42 -32
- data/bin/crab-rel +25 -11
- data/bin/crab-rel-help +12 -3
- data/bin/crab-rel-list +23 -15
- data/bin/crab-release +25 -11
- data/bin/crab-release-help +12 -3
- data/bin/crab-release-list +23 -15
- data/bin/crab-st +24 -11
- data/bin/crab-st-add +18 -10
- data/bin/crab-st-change +53 -39
- data/bin/crab-st-create +18 -10
- data/bin/crab-st-del +19 -11
- data/bin/crab-st-delete +19 -11
- data/bin/crab-st-find +32 -21
- data/bin/crab-st-help +11 -2
- data/bin/crab-st-list +32 -21
- data/bin/crab-st-ls +32 -21
- data/bin/crab-st-move +26 -14
- data/bin/crab-st-mv +26 -14
- data/bin/crab-st-new +18 -10
- data/bin/crab-st-pull +28 -20
- data/bin/crab-st-ren +26 -14
- data/bin/crab-st-rename +26 -14
- data/bin/crab-st-rm +19 -11
- data/bin/crab-st-show +19 -11
- data/bin/crab-st-up +53 -39
- data/bin/crab-st-update +53 -39
- data/bin/crab-story +24 -11
- data/bin/crab-story-add +18 -10
- data/bin/crab-story-change +53 -39
- data/bin/crab-story-create +18 -10
- data/bin/crab-story-del +19 -11
- data/bin/crab-story-delete +19 -11
- data/bin/crab-story-diff +54 -0
- data/bin/crab-story-find +32 -21
- data/bin/crab-story-help +11 -2
- data/bin/crab-story-list +32 -21
- data/bin/crab-story-ls +32 -21
- data/bin/crab-story-move +26 -14
- data/bin/crab-story-mv +26 -14
- data/bin/crab-story-new +18 -10
- data/bin/crab-story-pull +28 -20
- data/bin/crab-story-ren +26 -14
- data/bin/crab-story-rename +26 -14
- data/bin/crab-story-rm +19 -11
- data/bin/crab-story-show +19 -11
- data/bin/crab-story-up +53 -39
- data/bin/crab-story-update +53 -39
- data/bin/crab-tc +24 -11
- data/bin/crab-tc-add +32 -20
- data/bin/crab-tc-change +18 -8
- data/bin/crab-tc-create +32 -20
- data/bin/crab-tc-del +18 -10
- data/bin/crab-tc-delete +18 -10
- data/bin/crab-tc-find +32 -21
- data/bin/crab-tc-help +11 -2
- data/bin/crab-tc-list +32 -21
- data/bin/crab-tc-ls +32 -21
- data/bin/crab-tc-new +32 -20
- data/bin/crab-tc-rm +18 -10
- data/bin/crab-tc-show +28 -15
- data/bin/crab-tc-up +18 -8
- data/bin/crab-tc-update +18 -8
- data/bin/crab-testcase +24 -11
- data/bin/crab-testcase-add +32 -20
- data/bin/crab-testcase-change +18 -8
- data/bin/crab-testcase-create +32 -20
- data/bin/crab-testcase-del +18 -10
- data/bin/crab-testcase-delete +18 -10
- data/bin/crab-testcase-find +32 -21
- data/bin/crab-testcase-help +11 -2
- data/bin/crab-testcase-list +32 -21
- data/bin/crab-testcase-ls +32 -21
- data/bin/crab-testcase-new +32 -20
- data/bin/crab-testcase-rm +18 -10
- data/bin/crab-testcase-show +28 -15
- data/bin/crab-testcase-up +18 -8
- data/bin/crab-testcase-update +18 -8
- data/bin/crab-truncate +1 -0
- data/bin/crab-version +2 -1
- data/features/subcommand-help.feature +1 -0
- data/lib/crab.rb +2 -0
- data/lib/crab/cucumber_to_rally_adapter.rb +48 -0
- data/lib/crab/rally.rb +21 -1
- data/lib/crab/utilities.rb +10 -2
- data/lib/crab/version.rb +1 -1
- metadata +7 -4
data/bin/crab-st-del
CHANGED
@@ -1,21 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
-
|
5
|
+
class Crab::StoryDelete
|
6
|
+
|
7
|
+
def self.run(args=ARGV)
|
8
|
+
opts = Trollop::options(args) do
|
9
|
+
banner <<-BANNER
|
6
10
|
crab story delete: delete an existing story in Rally
|
7
11
|
|
8
12
|
Usage: crab story delete <id> [options*]
|
9
|
-
|
10
|
-
|
11
|
-
end
|
13
|
+
BANNER
|
14
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
15
|
+
end
|
12
16
|
|
13
|
-
id =
|
14
|
-
Trollop::die "Story ID must be specified" if id.blank?
|
17
|
+
id = args.join(" ")
|
18
|
+
Trollop::die "Story ID must be specified" if id.blank?
|
15
19
|
|
16
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
17
|
-
|
18
|
-
|
20
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
21
|
+
story = rally.find_story_with_id id
|
22
|
+
story.delete
|
19
23
|
|
20
|
-
|
24
|
+
puts "Story #{id} deleted."
|
25
|
+
end
|
26
|
+
end
|
21
27
|
end
|
28
|
+
|
29
|
+
Crab::StoryDelete.run
|
data/bin/crab-st-delete
CHANGED
@@ -1,21 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
-
|
5
|
+
class Crab::StoryDelete
|
6
|
+
|
7
|
+
def self.run(args=ARGV)
|
8
|
+
opts = Trollop::options(args) do
|
9
|
+
banner <<-BANNER
|
6
10
|
crab story delete: delete an existing story in Rally
|
7
11
|
|
8
12
|
Usage: crab story delete <id> [options*]
|
9
|
-
|
10
|
-
|
11
|
-
end
|
13
|
+
BANNER
|
14
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
15
|
+
end
|
12
16
|
|
13
|
-
id =
|
14
|
-
Trollop::die "Story ID must be specified" if id.blank?
|
17
|
+
id = args.join(" ")
|
18
|
+
Trollop::die "Story ID must be specified" if id.blank?
|
15
19
|
|
16
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
17
|
-
|
18
|
-
|
20
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
21
|
+
story = rally.find_story_with_id id
|
22
|
+
story.delete
|
19
23
|
|
20
|
-
|
24
|
+
puts "Story #{id} deleted."
|
25
|
+
end
|
26
|
+
end
|
21
27
|
end
|
28
|
+
|
29
|
+
Crab::StoryDelete.run
|
data/bin/crab-st-find
CHANGED
@@ -1,34 +1,45 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
+
class Crab::StoryFind
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
class << self
|
8
|
+
|
9
|
+
include Crab::Utilities
|
10
|
+
|
11
|
+
def run(args=ARGV)
|
12
|
+
opts = Trollop::options(args) do
|
13
|
+
banner <<-BANNER
|
8
14
|
crab story find: find a story in Rally
|
9
15
|
|
10
16
|
Usage: crab story find [options*] [text]
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
17
|
+
BANNER
|
18
|
+
opt :project, "Project to use (required unless set by 'crab project')", :short => "-p", :type => String
|
19
|
+
opt :iteration, "Limit search to this iteration", :short => "-i", :type => String
|
20
|
+
opt :release, "Limit search to this release", :short => "-r", :type => String
|
21
|
+
opt :parent, "Limit search to children of this story", :short => "-P", :type => String
|
22
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
23
|
+
end
|
18
24
|
|
19
|
-
pattern =
|
20
|
-
project_name = valid_project_name(opts)
|
25
|
+
pattern = args.map(&:strip).reject(&:empty?)
|
26
|
+
project_name = valid_project_name(opts)
|
21
27
|
|
22
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
23
|
-
|
24
|
-
|
28
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
29
|
+
project = rally.find_project(project_name)
|
30
|
+
Trollop::die "Project #{opts[:project].inspect} not found" if project.nil?
|
25
31
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
32
|
+
find_opts = {}
|
33
|
+
find_opts[:iteration] = rally.find_iteration_by_name opts[:iteration], project if opts[:iteration_given]
|
34
|
+
find_opts[:release] = rally.find_release_by_name opts[:release], project if opts[:release_given]
|
35
|
+
find_opts[:parent] = rally.find_story_with_id opts[:parent] if opts[:parent_given]
|
30
36
|
|
31
|
-
|
32
|
-
|
37
|
+
rally.find_stories(project, pattern, find_opts).each do |story|
|
38
|
+
puts "#{story.formatted_id}: #{story.name} (#{story.state})"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
33
42
|
end
|
34
43
|
end
|
44
|
+
|
45
|
+
Crab::StoryFind.run
|
data/bin/crab-st-help
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
3
|
+
require 'crab'
|
2
4
|
|
3
|
-
|
5
|
+
class Crab::StoryHelp
|
6
|
+
|
7
|
+
def self.run
|
8
|
+
puts <<-HELP
|
4
9
|
Usage: crab story <command> [options*]
|
5
10
|
|
6
11
|
Available commands:
|
@@ -16,4 +21,8 @@ Usage: crab story <command> [options*]
|
|
16
21
|
update Update stories
|
17
22
|
|
18
23
|
--help, -h: Show this message
|
19
|
-
HELP
|
24
|
+
HELP
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
Crab::StoryHelp.run
|
data/bin/crab-st-list
CHANGED
@@ -1,34 +1,45 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
+
class Crab::StoryFind
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
class << self
|
8
|
+
|
9
|
+
include Crab::Utilities
|
10
|
+
|
11
|
+
def run(args=ARGV)
|
12
|
+
opts = Trollop::options(args) do
|
13
|
+
banner <<-BANNER
|
8
14
|
crab story find: find a story in Rally
|
9
15
|
|
10
16
|
Usage: crab story find [options*] [text]
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
17
|
+
BANNER
|
18
|
+
opt :project, "Project to use (required unless set by 'crab project')", :short => "-p", :type => String
|
19
|
+
opt :iteration, "Limit search to this iteration", :short => "-i", :type => String
|
20
|
+
opt :release, "Limit search to this release", :short => "-r", :type => String
|
21
|
+
opt :parent, "Limit search to children of this story", :short => "-P", :type => String
|
22
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
23
|
+
end
|
18
24
|
|
19
|
-
pattern =
|
20
|
-
project_name = valid_project_name(opts)
|
25
|
+
pattern = args.map(&:strip).reject(&:empty?)
|
26
|
+
project_name = valid_project_name(opts)
|
21
27
|
|
22
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
23
|
-
|
24
|
-
|
28
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
29
|
+
project = rally.find_project(project_name)
|
30
|
+
Trollop::die "Project #{opts[:project].inspect} not found" if project.nil?
|
25
31
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
32
|
+
find_opts = {}
|
33
|
+
find_opts[:iteration] = rally.find_iteration_by_name opts[:iteration], project if opts[:iteration_given]
|
34
|
+
find_opts[:release] = rally.find_release_by_name opts[:release], project if opts[:release_given]
|
35
|
+
find_opts[:parent] = rally.find_story_with_id opts[:parent] if opts[:parent_given]
|
30
36
|
|
31
|
-
|
32
|
-
|
37
|
+
rally.find_stories(project, pattern, find_opts).each do |story|
|
38
|
+
puts "#{story.formatted_id}: #{story.name} (#{story.state})"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
33
42
|
end
|
34
43
|
end
|
44
|
+
|
45
|
+
Crab::StoryFind.run
|
data/bin/crab-st-ls
CHANGED
@@ -1,34 +1,45 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
+
class Crab::StoryFind
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
class << self
|
8
|
+
|
9
|
+
include Crab::Utilities
|
10
|
+
|
11
|
+
def run(args=ARGV)
|
12
|
+
opts = Trollop::options(args) do
|
13
|
+
banner <<-BANNER
|
8
14
|
crab story find: find a story in Rally
|
9
15
|
|
10
16
|
Usage: crab story find [options*] [text]
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
17
|
+
BANNER
|
18
|
+
opt :project, "Project to use (required unless set by 'crab project')", :short => "-p", :type => String
|
19
|
+
opt :iteration, "Limit search to this iteration", :short => "-i", :type => String
|
20
|
+
opt :release, "Limit search to this release", :short => "-r", :type => String
|
21
|
+
opt :parent, "Limit search to children of this story", :short => "-P", :type => String
|
22
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
23
|
+
end
|
18
24
|
|
19
|
-
pattern =
|
20
|
-
project_name = valid_project_name(opts)
|
25
|
+
pattern = args.map(&:strip).reject(&:empty?)
|
26
|
+
project_name = valid_project_name(opts)
|
21
27
|
|
22
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
23
|
-
|
24
|
-
|
28
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
29
|
+
project = rally.find_project(project_name)
|
30
|
+
Trollop::die "Project #{opts[:project].inspect} not found" if project.nil?
|
25
31
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
32
|
+
find_opts = {}
|
33
|
+
find_opts[:iteration] = rally.find_iteration_by_name opts[:iteration], project if opts[:iteration_given]
|
34
|
+
find_opts[:release] = rally.find_release_by_name opts[:release], project if opts[:release_given]
|
35
|
+
find_opts[:parent] = rally.find_story_with_id opts[:parent] if opts[:parent_given]
|
30
36
|
|
31
|
-
|
32
|
-
|
37
|
+
rally.find_stories(project, pattern, find_opts).each do |story|
|
38
|
+
puts "#{story.formatted_id}: #{story.name} (#{story.state})"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
33
42
|
end
|
34
43
|
end
|
44
|
+
|
45
|
+
Crab::StoryFind.run
|
data/bin/crab-st-move
CHANGED
@@ -1,26 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
+
class Crab::StoryMove
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
class << self
|
8
|
+
|
9
|
+
include Crab::Utilities
|
10
|
+
|
11
|
+
def run(args=ARGV)
|
12
|
+
|
13
|
+
opts = Trollop::options(args) do
|
14
|
+
banner <<-BANNER
|
8
15
|
crab story move: move a story from one status to the next (or previous)
|
9
16
|
|
10
17
|
Usage: crab story move <id> [options*]
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
18
|
+
BANNER
|
19
|
+
opt :back, "Move story backwards (from accepted to completed, for example)"
|
20
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
21
|
+
end
|
15
22
|
|
16
|
-
id =
|
17
|
-
Trollop::die "No story given" if id.empty?
|
23
|
+
id = args.join(" ")
|
24
|
+
Trollop::die "No story given" if id.empty?
|
18
25
|
|
19
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
20
|
-
|
21
|
-
|
26
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
27
|
+
story = rally.find_story_with_id id
|
28
|
+
state = state_from(story.state)
|
22
29
|
|
23
|
-
|
30
|
+
story.update :schedule_state => (opts[:back] ? state_before(state) : state_after(state))
|
24
31
|
|
25
|
-
|
32
|
+
puts "#{story.formatted_id}: #{story.name} (#{story.state})"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
26
36
|
end
|
37
|
+
|
38
|
+
Crab::StoryMove.run
|
data/bin/crab-st-mv
CHANGED
@@ -1,26 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
+
class Crab::StoryMove
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
class << self
|
8
|
+
|
9
|
+
include Crab::Utilities
|
10
|
+
|
11
|
+
def run(args=ARGV)
|
12
|
+
|
13
|
+
opts = Trollop::options(args) do
|
14
|
+
banner <<-BANNER
|
8
15
|
crab story move: move a story from one status to the next (or previous)
|
9
16
|
|
10
17
|
Usage: crab story move <id> [options*]
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
18
|
+
BANNER
|
19
|
+
opt :back, "Move story backwards (from accepted to completed, for example)"
|
20
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
21
|
+
end
|
15
22
|
|
16
|
-
id =
|
17
|
-
Trollop::die "No story given" if id.empty?
|
23
|
+
id = args.join(" ")
|
24
|
+
Trollop::die "No story given" if id.empty?
|
18
25
|
|
19
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
20
|
-
|
21
|
-
|
26
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
27
|
+
story = rally.find_story_with_id id
|
28
|
+
state = state_from(story.state)
|
22
29
|
|
23
|
-
|
30
|
+
story.update :schedule_state => (opts[:back] ? state_before(state) : state_after(state))
|
24
31
|
|
25
|
-
|
32
|
+
puts "#{story.formatted_id}: #{story.name} (#{story.state})"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
26
36
|
end
|
37
|
+
|
38
|
+
Crab::StoryMove.run
|
data/bin/crab-st-new
CHANGED
@@ -1,19 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
1
2
|
# vim: set ft=ruby :
|
2
3
|
require 'crab'
|
3
4
|
|
4
|
-
|
5
|
-
|
5
|
+
class Crab::StoryCreate
|
6
|
+
|
7
|
+
def self.run(args=ARGV)
|
8
|
+
opts = Trollop::options(args) do
|
9
|
+
banner <<-BANNER
|
6
10
|
crab story create: create a new story in Rally
|
7
11
|
|
8
12
|
Usage: crab story create <name> [options*]
|
9
|
-
|
10
|
-
|
11
|
-
end
|
13
|
+
BANNER
|
14
|
+
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
15
|
+
end
|
12
16
|
|
13
|
-
name =
|
14
|
-
Trollop::die "Please specify a name for the story" if name.blank?
|
17
|
+
name = args.join(" ")
|
18
|
+
Trollop::die "Please specify a name for the story" if name.blank?
|
15
19
|
|
16
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
17
|
-
|
18
|
-
|
20
|
+
Crab::Rally.new(opts[:dry]) do |rally|
|
21
|
+
story = rally.create_story :name => name
|
22
|
+
puts "#{story.formatted_id}: #{story.name} (#{story.state})"
|
23
|
+
end
|
24
|
+
end
|
19
25
|
end
|
26
|
+
|
27
|
+
Crab::StoryCreate.run
|