pr-with-params 1.0.2 → 1.0.3

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
  SHA256:
3
- metadata.gz: bd62108def63836659f73059843a5260211596b80e344a2543939688b3dadaba
4
- data.tar.gz: b538c821030781006c3df77169c082ada6ccf68c7a74d330f23363d93792ccaa
3
+ metadata.gz: 445be6f9d1bb4ce51a180ab2461e571f9493fe99a0449513368ebec0af97a452
4
+ data.tar.gz: f1f45b9f921973258461cdb61b61f058bf9ad7e60e3fe79043bff02804189e60
5
5
  SHA512:
6
- metadata.gz: e7d30fbe9b54a10925d688bd9ece749c034ada2b300e0f4bbb3022a0ae0380f335257506aa7b41c8bf7593ceab8639cefc55a84fad88585d288ccf365b33587d
7
- data.tar.gz: 3fe80d1fdbae5795051485882a56d5ff5ac26e1bdabf01b62121655fe52a34d7f95d0fa3a302b0d064ca64ca6b5a52d6969f6dd541bab0e60ff6526297f11a25
6
+ metadata.gz: d2b60aa172d6def35082fee5ac9826a6e155eaae786b1a2aa8a2eacde81448417a42883672f08b5defaaac41be40c725fba0d0084860b8b96df6d1b703a403d0
7
+ data.tar.gz: 4d651b5b57042e4d25daadabeb4088863cabf38d3106b0d12b10226973bfc0eb736b52223744fe8218cecb37963631ca6bf1d71bd5d5e06073fe27d39a67733c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pr-with-params (1.0.2)
4
+ pr-with-params (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -36,8 +36,8 @@ module PR
36
36
  end
37
37
 
38
38
  def validate_file_type!
39
- raise ArgumentError.new('Config file path is invalid or file does not exist.') unless file_exists?
40
39
  raise TypeError.new('Config file type must be YAML (.yaml or .yml)') unless yaml_file?
40
+ raise ArgumentError.new("Config file path is invalid or file does not exist: #{config_file_path}") unless file_exists?
41
41
  end
42
42
 
43
43
  def yaml_file?
@@ -3,7 +3,7 @@
3
3
  module PR
4
4
  module With
5
5
  module Params
6
- VERSION = "1.0.2"
6
+ VERSION = "1.0.3"
7
7
  end
8
8
  end
9
9
  end
@@ -20,7 +20,9 @@ module PR
20
20
  end
21
21
 
22
22
  def parse_config(file_path, scope)
23
- config_options = ConfigParser.new(config_file_path: file_path, scope: scope).parse!
23
+ return {} if file_path.empty?
24
+
25
+ ConfigParser.new(config_file_path: file_path, scope: scope).parse!
24
26
  rescue StandardError => e
25
27
  error_message = {
26
28
  message: "Error parsing config file. Using defaults",
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = "Pushes current local branch to remote with upstream at origin/[local-branch-name]. It also opens a new pull request browser window at a URL with customized query params, based on specified options, which pre-populates certain fields in the pull request. This is especially useful when supporting multiple PR templates within a code base."
12
12
  spec.homepage = "https://github.com/2k-joker/pr-with-params"
13
+ spec.licenses = ["MIT"]
13
14
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
15
 
15
16
  spec.metadata["homepage_uri"] = spec.homepage
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pr-with-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 2k-joker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-08-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -35,7 +35,8 @@ files:
35
35
  - lib/pr/with/params/version.rb
36
36
  - pr-with-params.gemspec
37
37
  homepage: https://github.com/2k-joker/pr-with-params
38
- licenses: []
38
+ licenses:
39
+ - MIT
39
40
  metadata:
40
41
  homepage_uri: https://github.com/2k-joker/pr-with-params
41
42
  post_install_message: