maestro 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cli.rb +4 -1
- data/lib/commands/story_commands.rb +12 -12
- data/lib/resources/story.rb +1 -1
- data/maestro.gemspec +1 -1
- metadata +2 -2
data/lib/cli.rb
CHANGED
@@ -20,6 +20,8 @@ module Maestro
|
|
20
20
|
puts e.message
|
21
21
|
rescue Maestro::Command::ArgumentError => e
|
22
22
|
puts e.message
|
23
|
+
rescue ActiveResource::UnauthorizedAccess => e
|
24
|
+
puts "Access denied: Please check your API key"
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
@@ -42,10 +44,11 @@ module Maestro
|
|
42
44
|
opts.banner = "Usage: maestro [options] <command> [arguments]"
|
43
45
|
opts.on("-a", "--api-key=abc123", "Specify an API key to use for access (default: ENV['MAESTRO_API_KEY'])") { |o| Config[:api_key] = o }
|
44
46
|
opts.on("-p", "--project=13", "Specify project ID (default: read from ./.maestro.yml)") { |o| Config[:project_id] = o }
|
47
|
+
opts.on("-u", "--url", "Specify URL of maestro instance (default: http://maestro.citrusbyte.com)") { |o| Config[:host] = o }
|
45
48
|
opts.on("-v", "--[no-]verbose", "Verbose output") { |o| Config[:verbose] = o }
|
46
49
|
|
47
50
|
opts.on_tail("--version", "Show version") do
|
48
|
-
puts 'Maestro CLI: 0.0.
|
51
|
+
puts 'Maestro CLI: 0.0.2'
|
49
52
|
exit
|
50
53
|
end
|
51
54
|
|
@@ -27,7 +27,7 @@ class Maestro::Command::StoryUpdater < Maestro::Command
|
|
27
27
|
private
|
28
28
|
|
29
29
|
def update(attribute, value)
|
30
|
-
story = Maestro::Story.find(@
|
30
|
+
story = Maestro::Story.find(@number, :params => { :context => 'user', :project_id => Maestro::Config[:project_id] })
|
31
31
|
story.update_attributes(attribute => value)
|
32
32
|
story
|
33
33
|
end
|
@@ -36,9 +36,9 @@ end
|
|
36
36
|
class Maestro::Command::Time < Maestro::Command::StoryUpdater
|
37
37
|
command "Update the actual time on the story", { 'time' => "Time spent working on story (HH:MM)" }
|
38
38
|
|
39
|
-
def initialize(
|
40
|
-
@
|
41
|
-
@time
|
39
|
+
def initialize(number, time)
|
40
|
+
@number = number
|
41
|
+
@time = time
|
42
42
|
end
|
43
43
|
|
44
44
|
def invoke
|
@@ -51,8 +51,8 @@ end
|
|
51
51
|
class Maestro::Command::StateUpdater < Maestro::Command::StoryUpdater
|
52
52
|
class << self;attr_reader :state;end;
|
53
53
|
|
54
|
-
def initialize(
|
55
|
-
@
|
54
|
+
def initialize(number)
|
55
|
+
@number = number
|
56
56
|
end
|
57
57
|
|
58
58
|
def invoke
|
@@ -67,31 +67,31 @@ class Maestro::Command::StateUpdater < Maestro::Command::StoryUpdater
|
|
67
67
|
end
|
68
68
|
|
69
69
|
class Maestro::Command::Start < Maestro::Command::StateUpdater
|
70
|
-
command "Start the story", { '
|
70
|
+
command "Start the story", { 'number' => "Number of story to start" }
|
71
71
|
@state = 'started'
|
72
72
|
end
|
73
73
|
|
74
74
|
class Maestro::Command::Finish < Maestro::Command::StateUpdater
|
75
|
-
command "Finish the story", { '
|
75
|
+
command "Finish the story", { 'number' => "Number of story to finish" }
|
76
76
|
@state = 'finished'
|
77
77
|
end
|
78
78
|
|
79
79
|
class Maestro::Command::Deliver < Maestro::Command::StateUpdater
|
80
|
-
command "Deliver the story", { '
|
80
|
+
command "Deliver the story", { 'number' => "Number of story to deliver" }
|
81
81
|
@state = 'delivered'
|
82
82
|
end
|
83
83
|
|
84
84
|
class Maestro::Command::Accept < Maestro::Command::StateUpdater
|
85
|
-
command "Accept the story", { '
|
85
|
+
command "Accept the story", { 'number' => "Number of story to accept" }
|
86
86
|
@state = 'accepted'
|
87
87
|
end
|
88
88
|
|
89
89
|
class Maestro::Command::Reject < Maestro::Command::StateUpdater
|
90
|
-
command "Reject the story", { '
|
90
|
+
command "Reject the story", { 'number' => "Number of story to reject" }
|
91
91
|
@state = 'rejected'
|
92
92
|
end
|
93
93
|
|
94
94
|
class Maestro::Command::Cancel < Maestro::Command::StateUpdater
|
95
|
-
command "Cancel the story", { '
|
95
|
+
command "Cancel the story", { 'number' => "Number of story to cancel" }
|
96
96
|
@state = 'cancelled'
|
97
97
|
end
|
data/lib/resources/story.rb
CHANGED
data/maestro.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "maestro"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.2"
|
4
4
|
s.summary = "A command line interface for Maestro project management."
|
5
5
|
s.description = "A command line interface for Maestro project management."
|
6
6
|
s.authors = ["Ben Alavi"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maestro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Alavi
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-14 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|