step-up 0.9.14 → 0.9.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/GEM_VERSION +1 -1
- data/lib/step-up/cli.rb +2 -1
- data/lib/step-up/notes_util.rb +13 -1
- metadata +4 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d03c89014d133140d42ebf3ba3a7d7f356cc947
|
4
|
+
data.tar.gz: e4ceeb620cc75fb5b6917b25de5e3cce7f772e92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cd9801df478ea2e50fb8e55ac4569080f3057196989771c4a6ca3d874b333cb15f95a4f04ecee60a069f82bac1d1112d96f672d7b535109ef27a4a2bd34de15
|
7
|
+
data.tar.gz: 93e1f951fa329f7f352742303c583b5142bfdad275e16c7c032a7c27e07b5f2178780e43d9a67e11f6d85e993e1c4f206159009e6a654a28682e5683ab5d46b7
|
data/GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v0.9.
|
1
|
+
v0.9.15
|
data/lib/step-up/cli.rb
CHANGED
@@ -492,7 +492,8 @@ module StepUp
|
|
492
492
|
puts "Make sure of having set the editor as appropriate."
|
493
493
|
exit 1
|
494
494
|
end
|
495
|
-
File.read(temp_file)
|
495
|
+
f = File.read(temp_file)
|
496
|
+
NotesUtil.safe_gsub(f){ |m| m.gsub(/^\#.*/m, '').rstrip }
|
496
497
|
else
|
497
498
|
puts <<-TEXT
|
498
499
|
No editor found.
|
data/lib/step-up/notes_util.rb
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
module StepUp
|
2
2
|
module NotesUtil
|
3
3
|
def parse_message(message)
|
4
|
-
message = message.rstrip.force_encoding(
|
4
|
+
message = safe_gsub(message.rstrip.force_encoding("UTF-8")){ |m| m.gsub(/^((?: )*)( )?([^ \-\n])/){ "%s %s %s" % [$1, $2 || '-', $3] } }
|
5
5
|
begin
|
6
6
|
changed = message.sub!(/^(\s*-\s.*?\n)(?:\s*\n)+(\s*-\s)/, '\1\2')
|
7
7
|
end until changed.nil?
|
8
8
|
message
|
9
9
|
end
|
10
|
+
|
11
|
+
def safe_gsub(message)
|
12
|
+
begin
|
13
|
+
yield message
|
14
|
+
rescue Exception => e
|
15
|
+
if e.message.start_with?('invalid byte')
|
16
|
+
yield(message.force_encoding('ISO-8859-1').encode('UTF-8'))
|
17
|
+
else
|
18
|
+
raise e
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
10
22
|
extend self
|
11
23
|
end
|
12
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: step-up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Manzan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -142,13 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: 1.3.6
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project: step-up
|
145
|
-
rubygems_version: 2.5.
|
145
|
+
rubygems_version: 2.5.2
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: The best way to manage your project's versioning
|
149
|
-
test_files:
|
150
|
-
- spec/lib/config_spec.rb
|
151
|
-
- spec/lib/step-up/driver/git_spec.rb
|
152
|
-
- spec/lib/step-up/parser/version_mask_spec.rb
|
153
|
-
- spec/lib/step-up/ranged_notes_spec.rb
|
154
|
-
- spec/spec_helper.rb
|
149
|
+
test_files: []
|