gitversion 5.1.4.beta1.105 → 5.1.4.beta1.108

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8b315c2ec3f952e5d175ea15e07ddb77dbac6230b682e041ed25f5d9c8e6fcd
4
- data.tar.gz: 5725787e69f4b9706b68c7c90f836f06c292d0c4273870546c575184cfe03edb
3
+ metadata.gz: 89b14af0761d101b07cf5830ea036de4941085d7a97a1c01c841dbe12d6abe11
4
+ data.tar.gz: ce76a4beefe963102ddf87789d47e9138b24e5ffd57c2364979b1a42f8f88eb3
5
5
  SHA512:
6
- metadata.gz: 3570cce1a6ed4bcc0d699cf950b457dc70909a3721f3b26cf1d2d53e51e9e5d17a8ec4784a5d6dd1c61264fc165333f2a527b875d6473b652b3414dff690b895
7
- data.tar.gz: 6b34817fbb07568f1fbe78b4fbb8d9ea3707b2b9a8c7cee0ca1238554b7f9b502148069c76d90c8b3d0ed3972e0adff99357ae684a31da444317a0295fca4d00
6
+ metadata.gz: 14eb7878f49648157d17802e71bf26e548f78c4c06df17c4c99a1eb59b568ecacacca6741d645b468656c0284416f23b575f9a298af2b718a7d5ca1658c79a0c
7
+ data.tar.gz: d712cc6e44f8c19fa31e47958f3abe67804184faa7e91512fe20ea9a6ce7e5aa9719b161961104035ef37db966ff4acdd22aba6e729ac74a23063b31074d96b8
data/bin/GitVersion.exe CHANGED
Binary file
data/bin/gitversion CHANGED
@@ -1,4 +1,4 @@
1
- #! ruby
2
-
3
- result = system(File.dirname(__FILE__) + "/GitVersion.exe " + ARGV.join(' '))
4
- exit 1 unless result
1
+ #! ruby
2
+
3
+ result = system(File.dirname(__FILE__) + "/GitVersion.exe " + ARGV.join(' '))
4
+ exit 1 unless result
data/gitversion.gemspec CHANGED
@@ -1,18 +1,18 @@
1
- Gem::Specification.new do |spec|
2
- spec.platform = Gem::Platform::RUBY
3
- spec.name = 'gitversion'
4
- spec.licenses = ['MIT']
5
- spec.version = '5.1.4.beta1.105'
6
- spec.summary = 'Easy Semantic Versioning (http://semver.org) for projects using Git'
7
- spec.description = <<-EOF
8
- Versioning when using git, solved. GitVersion looks at your git history and works out the semantic version of the commit being built.
9
- EOF
10
-
11
- spec.authors = ['GitTools and Contributors']
12
- spec.homepage = 'https://github.com/GitTools/GitVersion'
13
-
14
- spec.files = Dir['bin/**/*', 'lib/**/*', '*.gemspec'].reject { |f| File.directory?(f) }
15
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }.reject { |f| f =~ /\.(exe|pdb|dll|so|dylib|config)$/}
16
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
- spec.require_paths = ['lib']
18
- end
1
+ Gem::Specification.new do |spec|
2
+ spec.platform = Gem::Platform::RUBY
3
+ spec.name = 'gitversion'
4
+ spec.licenses = ['MIT']
5
+ spec.version = '5.1.4.beta1.108'
6
+ spec.summary = 'Easy Semantic Versioning (http://semver.org) for projects using Git'
7
+ spec.description = <<-EOF
8
+ Versioning when using git, solved. GitVersion looks at your git history and works out the semantic version of the commit being built.
9
+ EOF
10
+
11
+ spec.authors = ['GitTools and Contributors']
12
+ spec.homepage = 'https://github.com/GitTools/GitVersion'
13
+
14
+ spec.files = Dir['bin/**/*', 'lib/**/*', '*.gemspec'].reject { |f| File.directory?(f) }
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }.reject { |f| f =~ /\.(exe|pdb|dll|so|dylib|config)$/}
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ['lib']
18
+ end
@@ -1,76 +1,76 @@
1
- require 'json'
2
- require 'open3'
3
-
4
- module GitVersion
5
- class Parser
6
- attr_reader :args
7
- attr_accessor :gitversion_exe
8
-
9
- def initialize(args = [])
10
- @args = args
11
- end
12
-
13
- def method_missing(symbol, *args)
14
- keys = [symbol.to_s, pascal_case(symbol.to_s)]
15
-
16
- found_key = keys.find { |key| json.has_key?(key) }
17
- return json[found_key] if found_key
18
-
19
- super
20
- end
21
-
22
- def json
23
- @json ||= run_gitversion
24
- end
25
-
26
- def gitversion_exe
27
- @gitversion_exe ||= File.expand_path(File.join(File.dirname(__FILE__), '../../bin/GitVersion.exe'))
28
- end
29
-
30
- def inspect
31
- unless @json
32
-
33
- return <<EOF
34
- #{to_s}
35
- Will invoke #{cmd_string} when first used.
36
- EOF
37
-
38
- else
39
-
40
- return <<EOF
41
- #{to_s}
42
- Invoked #{cmd_string} and parsed its output:
43
- #{json.inspect}
44
- EOF
45
-
46
- end
47
- end
48
-
49
- private
50
- def run_gitversion
51
- stdout_and_stderr, status = Open3.capture2e(*cmd)
52
-
53
- raise StandardError.new("Failed running #{cmd_string}, #{status}. We received the following output:\n#{stdout_and_stderr}") unless status.success?
54
-
55
- JSON.parse(stdout_and_stderr)
56
- end
57
-
58
- def cmd
59
- cmd = [gitversion_exe]
60
- cmd << args
61
- cmd.flatten.reject(&:nil?)
62
- end
63
-
64
- def cmd_string
65
- cmd.join(' ')
66
- end
67
-
68
- def pascal_case(str)
69
- str
70
- .to_s
71
- .split('_')
72
- .inject([]) { |buffer, e| buffer.push(e.capitalize) }
73
- .join
74
- end
75
- end
76
- end
1
+ require 'json'
2
+ require 'open3'
3
+
4
+ module GitVersion
5
+ class Parser
6
+ attr_reader :args
7
+ attr_accessor :gitversion_exe
8
+
9
+ def initialize(args = [])
10
+ @args = args
11
+ end
12
+
13
+ def method_missing(symbol, *args)
14
+ keys = [symbol.to_s, pascal_case(symbol.to_s)]
15
+
16
+ found_key = keys.find { |key| json.has_key?(key) }
17
+ return json[found_key] if found_key
18
+
19
+ super
20
+ end
21
+
22
+ def json
23
+ @json ||= run_gitversion
24
+ end
25
+
26
+ def gitversion_exe
27
+ @gitversion_exe ||= File.expand_path(File.join(File.dirname(__FILE__), '../../bin/GitVersion.exe'))
28
+ end
29
+
30
+ def inspect
31
+ unless @json
32
+
33
+ return <<EOF
34
+ #{to_s}
35
+ Will invoke #{cmd_string} when first used.
36
+ EOF
37
+
38
+ else
39
+
40
+ return <<EOF
41
+ #{to_s}
42
+ Invoked #{cmd_string} and parsed its output:
43
+ #{json.inspect}
44
+ EOF
45
+
46
+ end
47
+ end
48
+
49
+ private
50
+ def run_gitversion
51
+ stdout_and_stderr, status = Open3.capture2e(*cmd)
52
+
53
+ raise StandardError.new("Failed running #{cmd_string}, #{status}. We received the following output:\n#{stdout_and_stderr}") unless status.success?
54
+
55
+ JSON.parse(stdout_and_stderr)
56
+ end
57
+
58
+ def cmd
59
+ cmd = [gitversion_exe]
60
+ cmd << args
61
+ cmd.flatten.reject(&:nil?)
62
+ end
63
+
64
+ def cmd_string
65
+ cmd.join(' ')
66
+ end
67
+
68
+ def pascal_case(str)
69
+ str
70
+ .to_s
71
+ .split('_')
72
+ .inject([]) { |buffer, e| buffer.push(e.capitalize) }
73
+ .join
74
+ end
75
+ end
76
+ end
data/lib/git_version.rb CHANGED
@@ -1,12 +1,12 @@
1
- require 'git_version/parser'
2
-
3
- module GitVersion
4
- def git_version(args = nil)
5
- parsers.fetch(args) { |a| parsers[a] = Parser.new(a) }
6
- end
7
-
8
- private
9
- def parsers
10
- @parsers ||= {}
11
- end
12
- end
1
+ require 'git_version/parser'
2
+
3
+ module GitVersion
4
+ def git_version(args = nil)
5
+ parsers.fetch(args) { |a| parsers[a] = Parser.new(a) }
6
+ end
7
+
8
+ private
9
+ def parsers
10
+ @parsers ||= {}
11
+ end
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitversion
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.4.beta1.105
4
+ version: 5.1.4.beta1.108
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitTools and Contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: " Versioning when using git, solved. GitVersion looks at your git
14
14
  history and works out the semantic version of the commit being built.\n"