semvergen 1.11.0 → 1.12.0

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: 7298eb501fafec0e4cc1b11362715fae06417891
4
- data.tar.gz: 60b478859b2beec3062713206662dbe66d8b3332
3
+ metadata.gz: c53db247a53eba6a4ad02f72acf3b1e4b3029bdb
4
+ data.tar.gz: 93c38666ece06d58bc9352aa93e9d673d23bb6d8
5
5
  SHA512:
6
- metadata.gz: 8b9e9be9ccc374f9136334438e21237604f5925bb6124f28c2f6d351ff8d9e405a68d0ae2113b44590aaf3710043fe19c6019955c57cec0b7b61b184201cf3e7
7
- data.tar.gz: bf0e4ed58c52954b81e9adb5628b03f4cfcbbbd22880041ea59d2aaaea3f8c7368788e3bbeac87aa296b6060a586ff07f9e77cdbcdc4dc3d5bf8918f05c2cb66
6
+ metadata.gz: e69d0a5cf81db478c74474c0dc9b9b0b66307dd91ac9070710e3fbd67c1bb2278f09c469bb0baf9fd2f1401ccd4e0bea89185966198fbfe9cc98da054b516d7e
7
+ data.tar.gz: 64c142c1633169c2e944002087222ab6dd25f458c90e7c26b8434327666213dd6c9c201350e29b2a569ee5cf858909fe9ca254cfcab88847da9442cac212d1ea
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ # 1.12.0 - Release date: 2018-07-24
4
+ * Allow nested version class
5
+
6
+
7
+ # 1.11.2 - Release date: 2017-10-10
8
+ * Just spec fixes
9
+
10
+
11
+ # 1.11.1 - Release date: 2017-09-05
12
+ * Use ISO_8601 format for release date #17
13
+
14
+
3
15
  # 1.11.0 - Release date: 2017-11-08
4
16
  * Adds date to CHANGELOG title
5
17
 
@@ -91,7 +91,7 @@ module Semvergen
91
91
  end
92
92
  end
93
93
 
94
- change_log_lines = ["# #{new_version} - Release date: #{Time.now.strftime("%Y-%d-%m")}"] + features
94
+ change_log_lines = ["# #{new_version} - Release date: #{Time.now.strftime("%Y-%m-%d")}"] + features
95
95
  change_log_message = change_log_lines.join("\n")
96
96
  diff_change_log = change_log_lines.map { |l| color("+++ ", :white) + color(l, :green) }.join("\n")
97
97
 
@@ -15,6 +15,8 @@ module Semvergen
15
15
  def version_file
16
16
  if File.exist? version_path
17
17
  VersionFile.new(File.open(version_path, "r+"))
18
+ elsif File.exist? nested_version_path
19
+ VersionFile.new(File.open(nested_version_path, "r+"))
18
20
  else
19
21
  interface.fail_exit "A bundler style version file should be found at #{version_path}"
20
22
  end
@@ -42,6 +44,10 @@ module Semvergen
42
44
  File.join("lib", gem_name, "version.rb")
43
45
  end
44
46
 
47
+ def nested_version_path
48
+ File.join("lib", gem_name.gsub("-", "/"), "version.rb")
49
+ end
50
+
45
51
  def node_version_path
46
52
  File.join("package.json")
47
53
  end
@@ -1,3 +1,3 @@
1
1
  module Semvergen
2
- VERSION = "1.11.0"
2
+ VERSION = "1.12.0"
3
3
  end
@@ -1,8 +1,12 @@
1
1
  describe Semvergen::Bump do
2
2
  let(:semvergen) { Semvergen::Bump.new nil, nil, nil, nil, nil, nil, nil, nil }
3
+ PATCH = "Patch: Bug fixes, recommended for all (default)"
4
+ MINOR = "Minor: New features, but backwards compatible"
5
+ MAJOR = "Major: Breaking changes"
6
+ let(:release_types) { [PATCH, MINOR, MAJOR] }
3
7
 
4
8
  describe :next_version do
5
- let(:next_version) { semvergen.next_version current_version, release_type }
9
+ let(:next_version) { semvergen.next_version current_version, release_type, release_types }
6
10
  let(:current_version) { "3.2.19" }
7
11
 
8
12
  context "when bumping a major version" do
@@ -1,8 +1,8 @@
1
1
  require "simplecov"
2
2
 
3
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
3
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
4
4
  SimpleCov::Formatter::HTMLFormatter
5
- ]
5
+ )
6
6
 
7
7
  SimpleCov.start do
8
8
  add_filter "/spec/"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semvergen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendon McLean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-11 00:00:00.000000000 Z
11
+ date: 2018-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline