git-semver-cop 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git-semver-cop/semver.rb +4 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 736f1724f7bf5e8cbda82eb020ce86958ee02c5c
|
4
|
+
data.tar.gz: 750a3ba967c8ef320bd62f791306abdd961844f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5085e21a6cfec811774fc168b32c5db9cce87cef2f89aacd90318102cab3ea854ee326390a1924d8f692fa972e481b6e225338521f130f48165b7801c070a79
|
7
|
+
data.tar.gz: 06bebc4b285683f02629b9a0e56b9d340606ff959f04b2e928f7f757fda9bdeb25081b29335bb7c3e9a1482fb72a40ea047c32eece5bdcb92ba5ef8a3240a0db
|
@@ -22,9 +22,11 @@ module GitSemverCop
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def ask_increment
|
25
|
-
puts "How big of an increment is this
|
25
|
+
puts "How big of an increment is this? (semver: M.m.p)\n"\
|
26
|
+
"[n] none (default)\n[p] patch\n[m] minor\n[M] Major"
|
26
27
|
inc = gets.chomp
|
27
|
-
|
28
|
+
val = %w(none patch minor Major).find { |v| v =~ /^#{inc[0]}/ }
|
29
|
+
val == "none" ? exit(0) : semver_inc(val)
|
28
30
|
end
|
29
31
|
|
30
32
|
# #
|
@@ -43,12 +45,6 @@ module GitSemverCop
|
|
43
45
|
|
44
46
|
private
|
45
47
|
|
46
|
-
# #
|
47
|
-
# Valid increment options
|
48
|
-
def inc_opts
|
49
|
-
%w(patch minor major none)
|
50
|
-
end
|
51
|
-
|
52
48
|
# #
|
53
49
|
# Command line operations
|
54
50
|
def add_to_git
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-semver-cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernardo Farah
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semver2
|