versioneer 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -1
- data/Gemfile +4 -2
- data/README.md +1 -1
- data/lib/versioneer.rb +12 -8
- data/lib/versioneer/bypass.rb +1 -1
- data/lib/versioneer/config.rb +7 -6
- 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 +2 -3
- metadata +8 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb2816ac6d2f194aeb1098427d3ec332d92e96a3
|
4
|
+
data.tar.gz: aff5809113c5a99bae20278026715e3880beb8fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07ef27694d767275ea752a7896c152bb66740806063e8fed213886c6f552c37ddd57d5830c2653ad6942dd7c6e7e82391ad2adb65b31f138f8204a6188040418
|
7
|
+
data.tar.gz: cfef6000f82ca780e03dfc5f3b64a2da37eeb3cb0abe7744effbe2210ed6211ef6f6be4c9fa4551e36ec77b66a572953009fe9f868574b5a66c51dbbbe8eeda0
|
data/.travis.yml
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
sudo: false
|
2
|
+
matrix:
|
3
|
+
fast_finish: true
|
2
4
|
language: ruby
|
3
5
|
rvm:
|
4
6
|
- 2.3.1
|
7
|
+
- 1.9.2
|
8
|
+
- 1.8.7
|
5
9
|
before_install:
|
6
10
|
- gem update bundler
|
7
11
|
after_success:
|
8
|
-
- bundle exec codeclimate-test-reporter
|
12
|
+
- ruby -e 'exit RUBY_VERSION > "2"' && bundle exec codeclimate-test-reporter
|
9
13
|
notifications:
|
10
14
|
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**. Matrix testing for **Ruby** ` 1.8` — `2.3`
|
14
14
|
|
15
15
|
## Overview
|
16
16
|
|
data/lib/versioneer.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
%w{
|
2
|
+
runtime_error
|
3
|
+
invalid_repo_error
|
4
|
+
missing_config_error
|
5
|
+
repo
|
6
|
+
config
|
7
|
+
bypass
|
8
|
+
git
|
9
|
+
gem_version
|
10
|
+
}.each do |f|
|
11
|
+
load "#{File.dirname(File.expand_path(__FILE__))}/versioneer/#{f}.rb"
|
12
|
+
end
|
9
13
|
|
10
14
|
module Versioneer
|
11
15
|
end
|
data/lib/versioneer/bypass.rb
CHANGED
data/lib/versioneer/config.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require File.dirname(File.expand_path(__FILE__)) + '/helpers'
|
2
|
+
require File.dirname(File.expand_path(__FILE__)) + '/runtime_error'
|
3
|
+
require File.dirname(File.expand_path(__FILE__)) + '/missing_config_error'
|
4
4
|
require 'yaml'
|
5
5
|
|
6
6
|
module Versioneer
|
@@ -11,8 +11,9 @@ 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
|
14
15
|
|
15
|
-
if
|
16
|
+
if File.directory?(base_dir_or_config_file)
|
16
17
|
@config_base = base_dir_or_config_file
|
17
18
|
@config_file = File.join(base_dir_or_config_file, DEFAULT_FILE)
|
18
19
|
unless File.exist?(@config_file)
|
@@ -32,7 +33,7 @@ module Versioneer
|
|
32
33
|
@lock_file = File.join(@config_base, params.delete(:lock_file) || DEFAULT_LOCK)
|
33
34
|
@repo = nil
|
34
35
|
@repo_type = (params.delete(:type) || DEFAULT_TYPE).capitalize.to_sym
|
35
|
-
@repo_options = Hash.new().merge(params
|
36
|
+
@repo_options = Hash.new().merge(params).merge(repo_options)
|
36
37
|
end
|
37
38
|
|
38
39
|
attr_reader :config_file, :lock_file
|
@@ -41,7 +42,7 @@ module Versioneer
|
|
41
42
|
return @repo unless @repo.nil?
|
42
43
|
@repo = case locked?
|
43
44
|
when true
|
44
|
-
Bypass.new(@config_base, release
|
45
|
+
Bypass.new(@config_base, :release => version)
|
45
46
|
else
|
46
47
|
unless ::Versioneer.const_defined? @repo_type
|
47
48
|
raise RuntimeError, "Versioneer::#{@repo_type} is an unknown VCS type."
|
data/lib/versioneer/git.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require File.dirname(File.expand_path(__FILE__)) + '/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 File.directory?(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
|
-
unix
|
30
|
-
windows
|
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
|
-
unix
|
37
|
-
windows
|
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
|
-
unix
|
44
|
-
windows
|
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,7 +22,6 @@ 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'
|
27
|
-
spec.add_development_dependency 'pry', '~> 0'
|
25
|
+
spec.add_development_dependency 'rake'
|
26
|
+
spec.add_development_dependency 'minitest'
|
28
27
|
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.6
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,42 +28,28 @@ 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: '
|
33
|
+
version: '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: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
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
|
-
- - "~>"
|
45
|
+
- - ">="
|
60
46
|
- !ruby/object:Gem::Version
|
61
47
|
version: '0'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- - "
|
52
|
+
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
description:
|