chaperone 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Chaperone
2
2
 
3
- Getting as close to automated as we can.
3
+ Holding your hand when Automation can't take the wheel.
4
4
 
5
5
  Sometimes there are processes that just can't be automated.
6
6
  Chaperone is a CLI for watching over someone as they go
@@ -68,17 +68,22 @@ the content as well as it's order
68
68
  - `current` What the guidee is currently using related to the needs
69
69
  - `notes` A plain block of text
70
70
  - `code` Highlighted block of exact syntax that they can copy and paste
71
+ - `debug` Text that is displayed when a user selects the debug option.
71
72
  - `question` The text displayed on the action prompt
72
73
 
73
74
  #### Actions
74
75
 
75
76
  Each prompt is blocked by a command line input:
76
77
 
77
- [c]ontinue, e[x]it, [r]etry
78
+ [C]ontinue, e[x]it, [r]etry
79
+
80
+ If the user has assigned a string to the debug attribute, the prompt will look like:
81
+
82
+ [C]ontinue, [d]ebug, e[x]it, [r]etry
78
83
 
79
84
  If you passed a question into the prompt block, you'll see it before the actions:
80
85
 
81
- Ready to continue? [c]ontinue, e[x]it, [r]etry
86
+ Ready to continue? [C]ontinue, e[x]it, [r]etry
82
87
 
83
88
  The default is to continue, retry is handy for things like git branch checks which
84
89
  a user can update in another terminal and confirm the change is recognized.
@@ -31,4 +31,7 @@ end
31
31
  module Chaperone
32
32
  autoload :Prompt, 'chaperone/prompt'
33
33
  autoload :Guide, 'chaperone/guide'
34
+ module Helpers
35
+ autoload :Git, 'chaperone/helpers/git'
36
+ end
34
37
  end
@@ -0,0 +1,26 @@
1
+ module Chaperone::Helpers
2
+ module Git
3
+ include Cocaine
4
+
5
+ VERSION = { major: 0, minor: 1, build: 2 }
6
+
7
+ def staging_commits
8
+ CommandLine.new('git fetch && git log --pretty=format:"%h %an %Cred%ar %Cgreen%s" staging...master').run
9
+ end
10
+
11
+ def current_tag
12
+ CommandLine.new('git describe --abbrev=0 --tags').run.gsub(/v|\n/,'')
13
+ end
14
+
15
+ def next_tag(bump = :build)
16
+ segments = Gem::Version.new(current_tag).segments
17
+ segments[VERSION[bump]] = segments[VERSION[bump]].to_i + 1
18
+ segments.join('.')
19
+ end
20
+
21
+ def current_sha
22
+ CommandLine.new('git rev-parse HEAD').run.gsub("\n",'')
23
+ end
24
+
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module Chaperone
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chaperone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-20 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -140,6 +140,7 @@ files:
140
140
  - examples/deploy.rb
141
141
  - lib/chaperone.rb
142
142
  - lib/chaperone/guide.rb
143
+ - lib/chaperone/helpers/git.rb
143
144
  - lib/chaperone/prompt.rb
144
145
  - lib/chaperone/version.rb
145
146
  - spec/models/guide_spec.rb