step-up 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/GEM_VERSION +1 -1
- data/lib/step-up/driver/git.rb +33 -5
- metadata +5 -5
data/GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v0.8.
|
1
|
+
v0.8.1
|
data/lib/step-up/driver/git.rb
CHANGED
@@ -35,11 +35,39 @@ module StepUp
|
|
35
35
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
36
36
|
top = args.shift
|
37
37
|
top = "-n#{ top }" unless top.nil?
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
encoding = CONFIG["log_output_encoding"] || "ISO-8859-1"
|
39
|
+
commits = `git log --pretty=oneline --encoding=#{ encoding } --no-color #{ top } #{ commit_base }`
|
40
|
+
commits.force_encoding(encoding) if RUBY_VERSION.to_f >= 1.9
|
41
|
+
begin
|
42
|
+
if options[:with_messages]
|
43
|
+
commits.scan(/^(\w+)\s+(.*)$/)
|
44
|
+
else
|
45
|
+
commits.scan(/^(\w+)\s/).flatten
|
46
|
+
end
|
47
|
+
rescue ArgumentError => e
|
48
|
+
if e.message.start_with?("invalid byte sequence")
|
49
|
+
puts <<-MSG
|
50
|
+
Could not read information from git-log because of an #{e.message}.
|
51
|
+
|
52
|
+
To fix this you can insert an attribute "log_output_encoding" on
|
53
|
+
file .stepuprc into your GIT project. Example:
|
54
|
+
|
55
|
+
\033[30;1m# .stepuprc\033[0m
|
56
|
+
\033[32m+log_output_encoding: "ISO-8859-1"\033[0m
|
57
|
+
notes:
|
58
|
+
after_versioned:
|
59
|
+
strategy: "keep" # Valid options: "keep" or "remove"
|
60
|
+
\033[30;1m# ...\033[0m
|
61
|
+
|
62
|
+
To see the current encoding from your GIT repository, you may
|
63
|
+
check with the following bash command:
|
64
|
+
|
65
|
+
`git log --pretty=oneline --no-color > test.txt && file test.txt && rm test.txt`
|
66
|
+
|
67
|
+
MSG
|
68
|
+
exit 1
|
69
|
+
end
|
70
|
+
raise
|
43
71
|
end
|
44
72
|
end
|
45
73
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: step-up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 1
|
10
|
+
version: 0.8.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marcelo Manzan
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2012-03-21 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: thor
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements: []
|
132
132
|
|
133
133
|
rubyforge_project: step-up
|
134
|
-
rubygems_version: 1.8.
|
134
|
+
rubygems_version: 1.8.15
|
135
135
|
signing_key:
|
136
136
|
specification_version: 3
|
137
137
|
summary: The best way to manage your project's versioning
|