release_me 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04f4b89cffe08046c254b5b74aa78bbdf219a821
4
- data.tar.gz: bedf4bf0ffd423f2abb533a3d5e7bc6b2aac0aba
3
+ metadata.gz: 6c307f61761c704dae34b3f7499dca57c8fab07d
4
+ data.tar.gz: bfc0503f83d7350fa5e138090fc325b97c72c4bd
5
5
  SHA512:
6
- metadata.gz: 75775ce6fb209f1d774a856621bdfdac4215f3837e9798ffdeac6fba2506f2309e832331a5e7034c5a34424f0e3cf543d8b15f32fb91f5e96c401fe0213e4cef
7
- data.tar.gz: af3dc6e9ade13b32e95ff7cd29e7de96ad5e93190bb57070ef0898cec7a40a036cfa2f8a5360a26b1726baf1616198c4d5c8f772dc2c2a48f49cf65812bdce37
6
+ metadata.gz: b59d25ce5eca2542bea194760fae0d148d4b264a2755b03403b385d1142de31668154f61f2b3c90861e6c75e9587d8c0c5439fc4348381c509e0121540ac4601
7
+ data.tar.gz: 3f0374c8f1cde5b14d216db2291e5b76fe3f41b979a0937f40530205e0bb340e5d39b1563e32e912bbfa44764ee926eff6a4334445f6133a66112c1576256fe8
@@ -12,8 +12,8 @@ module ReleaseMe
12
12
  config = local_config(path) || detect_adapter_config(path)
13
13
  raise 'Cannot find config' if config.nil?
14
14
  adapter = OpenStruct.new(config)
15
- adapter[:version_file] = version_file(adapter, path)
16
- adapter[:current_version] = current_version(adapter, adapter[:version_file])
15
+ adapter.version_file = version_file(path, adapter.version_file_relative_path)
16
+ adapter.current_version = current_version(adapter, adapter.version_file)
17
17
  adapter
18
18
  end
19
19
 
@@ -31,8 +31,11 @@ module ReleaseMe
31
31
  end
32
32
  end
33
33
 
34
- def version_file(adapter, path)
35
- Dir.glob(File.join(path, adapter.version_file_relative_path)).first
34
+ # @param project_path [String] - path to the directory in which you want to check
35
+ # @param version_path [String] - path to the version file or glob of version file
36
+ # @return [String] path to version file
37
+ def version_file(project_path, version_path)
38
+ Dir.glob(File.join(project_path, version_path)).first
36
39
  end
37
40
 
38
41
  private
@@ -62,6 +65,7 @@ module ReleaseMe
62
65
  pattern = File.join(path, adapter_config['detection_pattern']) || ''
63
66
  Dir.glob(pattern).count > 0
64
67
  end
68
+ puts "Adapter type: #{type} detected"
65
69
  config
66
70
  end
67
71
 
@@ -1,5 +1,5 @@
1
1
  # the relative path to the file to update
2
- version_file_relative_path: 'lib/*/version.rb'
2
+ version_file_relative_path: 'lib/**/version.rb'
3
3
  # the field in the file above to update
4
4
  version_field: 'VERSION'
5
5
  # type of versioning scheme, currently not used
@@ -1,3 +1,3 @@
1
1
  module ReleaseMe
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: release_me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Osman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-27 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.6.8
138
+ rubygems_version: 2.6.10
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Release related scripts for any type of code