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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ad9ca96dddee8b678aca2823be4a0c31156ff81
4
- data.tar.gz: 35eda91eee07cbe6bb87ed92b6479c52f3a02321
3
+ metadata.gz: fb2816ac6d2f194aeb1098427d3ec332d92e96a3
4
+ data.tar.gz: aff5809113c5a99bae20278026715e3880beb8fd
5
5
  SHA512:
6
- metadata.gz: 3520321422902f2450b6e25f37f7a8fce01155f4ca861e6cedbe23a5db70759da7b47e1116c6a174d26e67ba669e9dfc9864856908f993d6f1a9f0f7acc850f3
7
- data.tar.gz: 6ea3e0016f33b6093595b7c63dbd21a1c770a3d587ae6e28f716e8ff9160204c962721eb8b0686dfebd5dd151f29975af09533f5e76cd3f619d5cd9f8c7ccd5f
6
+ metadata.gz: 07ef27694d767275ea752a7896c152bb66740806063e8fed213886c6f552c37ddd57d5830c2653ad6942dd7c6e7e82391ad2adb65b31f138f8204a6188040418
7
+ data.tar.gz: cfef6000f82ca780e03dfc5f3b64a2da37eeb3cb0abe7744effbe2210ed6211ef6f6be4c9fa4551e36ec77b66a572953009fe9f868574b5a66c51dbbbe8eeda0
@@ -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
@@ -4,6 +4,8 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :test do
7
- gem "simplecov"
8
- gem "codeclimate-test-reporter", "~> 1.0.0"
7
+ if RUBY_VERSION > '2'
8
+ gem "simplecov"
9
+ gem "codeclimate-test-reporter", "~> 1.0.0"
10
+ end
9
11
  end
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
 
@@ -1,11 +1,15 @@
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'
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
@@ -1,4 +1,4 @@
1
- require_relative 'helpers'
1
+ require File.dirname(File.expand_path(__FILE__)) + '/helpers'
2
2
 
3
3
  module Versioneer
4
4
  class Bypass < Repo
@@ -1,6 +1,6 @@
1
- require_relative 'helpers'
2
- require_relative 'runtime_error'
3
- require_relative 'missing_config_error'
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 Dir.exist?(base_dir_or_config_file)
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.to_h).merge(repo_options.to_h)
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: version)
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."
@@ -1,4 +1,4 @@
1
- require_relative 'helpers'
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 Dir.exist?(File.join(file_within_repo, '.git'))
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
@@ -26,22 +26,22 @@ module Versioneer
26
26
 
27
27
  def cl_no_stdout
28
28
  {
29
- unix: '>/dev/null',
30
- windows: '>nul'
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: '2>/dev/null',
37
- windows: '2>nul'
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: '>/dev/null 2>&1',
44
- windows: '>nul 2>&1'
43
+ :unix => '>/dev/null 2>&1',
44
+ :windows => '>nul 2>&1'
45
45
  }.fetch(platform)
46
46
  end
47
47
 
@@ -1,4 +1,4 @@
1
- require_relative 'runtime_error'
1
+ require File.dirname(File.expand_path(__FILE__)) + '/runtime_error'
2
2
 
3
3
  module Versioneer
4
4
  class InvalidRepoError < RuntimeError
@@ -1,4 +1,4 @@
1
- require_relative 'runtime_error'
1
+ require File.dirname(File.expand_path(__FILE__)) + '/runtime_error'
2
2
 
3
3
  module Versioneer
4
4
  class MissingConfigError < RuntimeError
@@ -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', '~> 12.0'
26
- spec.add_development_dependency 'minitest', '~> 5.0'
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.5
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-05 00:00:00.000000000 Z
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: '12.0'
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: '12.0'
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: