versioneer 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -5
- data/Gemfile +2 -4
- data/README.md +1 -1
- data/lib/versioneer.rb +8 -12
- data/lib/versioneer/bypass.rb +1 -1
- data/lib/versioneer/config.rb +6 -7
- data/lib/versioneer/git.rb +2 -2
- data/lib/versioneer/helpers.rb +6 -6
- data/lib/versioneer/invalid_repo_error.rb +1 -1
- data/lib/versioneer/missing_config_error.rb +1 -1
- data/versioneer.gemspec +3 -2
- metadata +22 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc668b701ea2c95f8e28111c1cde3615211ea19c
|
4
|
+
data.tar.gz: 7bd65f094f4acd01162afda411bc430bdf678990
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ca3a2ebb7cde6e72540630c77a2fc5e1e42f743a7859bbea97b89a036327af8da350a4165ca04d46d01208d9f041e16642780f829ffc742ed9bda512c28847d
|
7
|
+
data.tar.gz: a38cccd7bb925acb3d1845f70a6359da69ae23fe62be6e2592f8acd33670d304d274387665587dd0f4a82be814215bc4a56f9b418ad843bd5f231d73e590460b
|
data/.travis.yml
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
sudo: false
|
2
|
-
matrix:
|
3
|
-
fast_finish: true
|
4
2
|
language: ruby
|
5
3
|
rvm:
|
6
4
|
- 2.3.1
|
7
|
-
- 1.9.2
|
8
|
-
- 1.8.7
|
9
5
|
before_install:
|
10
6
|
- gem update bundler
|
11
7
|
after_success:
|
12
|
-
-
|
8
|
+
- bundle exec codeclimate-test-reporter
|
13
9
|
notifications:
|
14
10
|
email: false
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ __Dynamic project versioning (alpha/beta/rc) from commits since last Git Tag.__
|
|
10
10
|
|
11
11
|
Versioneer **determines a project's version** from the latest source-control tag, then **adjusts automatically** by adding/bumping prereleases based on changes made since the last tagged release.
|
12
12
|
|
13
|
-
Integration tested on **UNIX/macOS and Windows**.
|
13
|
+
Integration tested on **UNIX/macOS and Windows**.
|
14
14
|
|
15
15
|
## Overview
|
16
16
|
|
data/lib/versioneer.rb
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
gem_version
|
10
|
-
}.each do |f|
|
11
|
-
load "#{File.dirname(File.expand_path(__FILE__))}/versioneer/#{f}.rb"
|
12
|
-
end
|
1
|
+
load 'versioneer/runtime_error.rb'
|
2
|
+
load 'versioneer/invalid_repo_error.rb'
|
3
|
+
load 'versioneer/missing_config_error.rb'
|
4
|
+
load 'versioneer/repo.rb'
|
5
|
+
load 'versioneer/config.rb'
|
6
|
+
load 'versioneer/bypass.rb'
|
7
|
+
load 'versioneer/git.rb'
|
8
|
+
load 'versioneer/gem_version.rb'
|
13
9
|
|
14
10
|
module Versioneer
|
15
11
|
end
|
data/lib/versioneer/bypass.rb
CHANGED
data/lib/versioneer/config.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require_relative 'helpers'
|
2
|
+
require_relative 'runtime_error'
|
3
|
+
require_relative 'missing_config_error'
|
4
4
|
require 'yaml'
|
5
5
|
|
6
6
|
module Versioneer
|
@@ -11,9 +11,8 @@ module Versioneer
|
|
11
11
|
|
12
12
|
def initialize(base_dir_or_config_file, repo_options=nil)
|
13
13
|
base_dir_or_config_file = base_dir_or_config_file.to_s
|
14
|
-
repo_options = Hash.new unless repo_options.is_a? Hash
|
15
14
|
|
16
|
-
if
|
15
|
+
if Dir.exist?(base_dir_or_config_file)
|
17
16
|
@config_base = base_dir_or_config_file
|
18
17
|
@config_file = File.join(base_dir_or_config_file, DEFAULT_FILE)
|
19
18
|
unless File.exist?(@config_file)
|
@@ -33,7 +32,7 @@ module Versioneer
|
|
33
32
|
@lock_file = File.join(@config_base, params.delete(:lock_file) || DEFAULT_LOCK)
|
34
33
|
@repo = nil
|
35
34
|
@repo_type = (params.delete(:type) || DEFAULT_TYPE).capitalize.to_sym
|
36
|
-
@repo_options = Hash.new().merge(params).merge(repo_options)
|
35
|
+
@repo_options = Hash.new().merge(params.to_h).merge(repo_options.to_h)
|
37
36
|
end
|
38
37
|
|
39
38
|
attr_reader :config_file, :lock_file
|
@@ -42,7 +41,7 @@ module Versioneer
|
|
42
41
|
return @repo unless @repo.nil?
|
43
42
|
@repo = case locked?
|
44
43
|
when true
|
45
|
-
Bypass.new(@config_base, :
|
44
|
+
Bypass.new(@config_base, release: version)
|
46
45
|
else
|
47
46
|
unless ::Versioneer.const_defined? @repo_type
|
48
47
|
raise RuntimeError, "Versioneer::#{@repo_type} is an unknown VCS type."
|
data/lib/versioneer/git.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'helpers'
|
2
2
|
|
3
3
|
module Versioneer
|
4
4
|
class Git < Repo
|
@@ -6,7 +6,7 @@ module Versioneer
|
|
6
6
|
|
7
7
|
def initialize(file_within_repo, options=nil)
|
8
8
|
super
|
9
|
-
unless
|
9
|
+
unless Dir.exist?(File.join(file_within_repo, '.git'))
|
10
10
|
unless H.lines? `git ls-files #{file_within_repo} --error-unmatch #{H.cl_no_stderr}`
|
11
11
|
raise InvalidRepoError, "Not inside a Git repo. (#{file_within_repo})"
|
12
12
|
end
|
data/lib/versioneer/helpers.rb
CHANGED
@@ -26,22 +26,22 @@ module Versioneer
|
|
26
26
|
|
27
27
|
def cl_no_stdout
|
28
28
|
{
|
29
|
-
:
|
30
|
-
:
|
29
|
+
unix: '>/dev/null',
|
30
|
+
windows: '>nul'
|
31
31
|
}.fetch(platform)
|
32
32
|
end
|
33
33
|
|
34
34
|
def cl_no_stderr
|
35
35
|
{
|
36
|
-
:
|
37
|
-
:
|
36
|
+
unix: '2>/dev/null',
|
37
|
+
windows: '2>nul'
|
38
38
|
}.fetch(platform)
|
39
39
|
end
|
40
40
|
|
41
41
|
def cl_silence
|
42
42
|
{
|
43
|
-
:
|
44
|
-
:
|
43
|
+
unix: '>/dev/null 2>&1',
|
44
|
+
windows: '>nul 2>&1'
|
45
45
|
}.fetch(platform)
|
46
46
|
end
|
47
47
|
|
data/versioneer.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.13'
|
25
|
-
spec.add_development_dependency 'rake'
|
26
|
-
spec.add_development_dependency 'minitest'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
27
|
+
spec.add_development_dependency 'pry', '~> 0'
|
27
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: versioneer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BinaryBabel OSS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,28 +28,42 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
description:
|