fit-commit 3.0.0 → 3.0.1

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: 993eadcd7440c4c9d90a439b33fe1267130b588e
4
- data.tar.gz: 288bd8d1af9bcd4ad34b868019ef25e59d6c0005
3
+ metadata.gz: 7ad77d4fef04820ea606a791e318dfd42b296b76
4
+ data.tar.gz: 636584b83de8821f587846dd5be38acc2867fdc4
5
5
  SHA512:
6
- metadata.gz: 8657be275a9f8e7f1649b174fa01fc38e3f621eb546c138848f1269635b455e7f760dbfc38c653f2ea31feeb482ef40d0d1d4eb563a42afa976c9a1a04451509
7
- data.tar.gz: 58084b2d2fb38dd72784ae8e44558c1b18f6b21caf51e190d1644a86fc0abe696c7cc7a583015a03cdf93d44d54ad6709e92821698b480f6aadc421903d42363
6
+ metadata.gz: d1a1af025a01e22528921a00201e9e6706d8d3c09eec51e51d6b5e55400cb92cbed7e3b87082c069bea2ffc9ce470bf10548e3ed095fd9b96e766d159834f13a
7
+ data.tar.gz: 2decbff9cb0fb3aa3e88170a962776d9384ed0b54efbfa30fb4db314eb0a739c9cc5baf422133f9d92e786bce9f7bd5a45ac95b658710eeba675452453ad1ae1
data/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ### master
4
- - N/A
3
+ ### v3.0.1 (2015-09-21)
4
+ - Allow granular configuration overrides
5
5
 
6
- ### v3.0.0 (2015-09-18)
6
+ ## v3.0.0 (2015-09-18)
7
7
  - Rename SummaryPeriod validator to SubjectPeriod (can break existing config files)
8
8
  - Add CapitalizeSubject validator
9
9
 
@@ -19,7 +19,7 @@
19
19
  ### v2.1.0 (2015-08-29)
20
20
  - Add `fit-commit uninstall` command
21
21
 
22
- ### v2.0.0 (2015-08-27)
22
+ ## v2.0.0 (2015-08-27)
23
23
  - Breaking changes made to Git hook. If upgrading from an older version you'll need to re-run `fit-commit install` in your repos.
24
24
 
25
25
  ### v1.1.0 (2015-08-26)
@@ -4,7 +4,9 @@ module FitCommit
4
4
  class ConfigurationLoader
5
5
  def global_configuration
6
6
  all_filepaths.each_with_object({}) do |filepath, config|
7
- config.merge!(read_config(filepath))
7
+ config.merge!(read_config(filepath)) do |_key, oldval, newval|
8
+ oldval.merge(newval)
9
+ end
8
10
  end
9
11
  end
10
12
 
@@ -49,7 +51,7 @@ module FitCommit
49
51
  end
50
52
 
51
53
  def load_yaml(path)
52
- content = YAML.load_file(path) if File.exist?(path)
54
+ content = YAML.load_file(path) if File.readable?(path)
53
55
  content || {}
54
56
  rescue => e
55
57
  raise e, "Error parsing config file: #{e.message}"
@@ -1,3 +1,3 @@
1
1
  module FitCommit
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
@@ -9,11 +9,11 @@ describe FitCommit::ConfigurationLoader do
9
9
  end
10
10
 
11
11
  let(:global_configuration) do
12
- subject.stub :default_filepath, "nofile" do
13
- subject.stub :system_filepath, (system_file ? system_file.path : "nofile") do
14
- subject.stub :user_filepath, (user_file ? user_file.path : "nofile") do
15
- subject.stub :config_filepath, "nofile" do
16
- subject.stub :local_filepath, "nofile" do
12
+ subject.stub :default_filepath, "/dev/null" do
13
+ subject.stub :system_filepath, (system_file ? system_file.path : "/dev/null") do
14
+ subject.stub :user_filepath, (user_file ? user_file.path : "/dev/null") do
15
+ subject.stub :config_filepath, "/dev/null" do
16
+ subject.stub :local_filepath, "/dev/null" do
17
17
  subject.stub :git_top_level, "." do
18
18
  subject.global_configuration
19
19
  end
@@ -59,7 +59,7 @@ describe FitCommit::ConfigurationLoader do
59
59
  let(:system_file) { tempfile("system_file", system_file_content) }
60
60
  let(:user_file) { tempfile("user_file", user_file_content) }
61
61
  let(:system_file_content) do
62
- "Foo/Bar:\n Baz: false\nQux/Norf/Blah:\n - !ruby/regexp /\\Afoo/"
62
+ "Foo/Bar:\n Baz: false\nQux/Norf/Blah:\n Foobar:\n - !ruby/regexp /\\Afoo/\n Booyah: false"
63
63
  end
64
64
  let(:user_file_content) do
65
65
  "Qux/Norf/Blah:\n Foobar: true\nBuz:\n - hi"
@@ -68,7 +68,7 @@ describe FitCommit::ConfigurationLoader do
68
68
  it "is a merged configuration that takes precedence into account" do
69
69
  expected = {
70
70
  "FitCommit::Foo::Bar" => { "Baz" => false },
71
- "FitCommit::Qux::Norf::Blah" => { "Foobar" => true },
71
+ "FitCommit::Qux::Norf::Blah" => { "Foobar" => true, "Booyah" => false },
72
72
  "FitCommit::Buz" => ["hi"]
73
73
  }
74
74
  assert_equal expected, global_configuration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fit-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Foley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-18 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: swearjar