uri_config 0.0.5 → 0.0.6

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: 74885d68caeccf82e952a6ce398a5f7654fa786c
4
- data.tar.gz: 09f483f9adfa600fff414cc4d84c3387dd2cc303
3
+ metadata.gz: 7b373ef2d82a823bb1ffe17b6536a101dc5be818
4
+ data.tar.gz: 60a858ef26e839112539a3e629d96f68f8c3ca08
5
5
  SHA512:
6
- metadata.gz: ea85a00459641c82c88d5c812465cc1d3a7bc47e5e31a78cbf840ff580b78d4200ec30d8ae5e4b793f9f1ffebc99d7c25e015c1778a234b4579e63f456efd156
7
- data.tar.gz: 6a8ad50258942d0fdcd9ae183e5419f5020cc72d4dc6788fa45b802d02ac2d175906d97b3e2a3142ad03d4f8dadda667deff5c5206e4ef8bcab13852d026e8c1
6
+ metadata.gz: fc39c5668d40398dedcf374c9612704240bffaf1e6924d16119f528c5c21896a58eae8f05a653eeda4a2543cf9b6178e0ae39436b59b9e66b858de154676c46e
7
+ data.tar.gz: a15c824f2a28cfb898435445640f64107315e0d323b0ed51e0f02b9e80c5ed11b084bb4c30d9ef2d032ef91888dbbe582c1f307b024a955ba7f7a91e1dcd76fc
@@ -81,6 +81,9 @@ module URIConfig
81
81
 
82
82
  def uri
83
83
  @uri ||= URI.parse url
84
+ rescue => e
85
+ e.message.gsub!(url, "<URL_SUPPRESSED>")
86
+ raise e
84
87
  end
85
88
  end
86
89
  end
@@ -1,3 +1,3 @@
1
1
  module URIConfig
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/spec/config_spec.rb CHANGED
@@ -56,7 +56,7 @@ module URIConfig
56
56
 
57
57
  specify do
58
58
  expect(
59
- URIConfig::Config.values_from("TEST_URL", :username, :password)
59
+ URIConfig::Config.values_from("TEST_URL", :username, :password),
60
60
  ).to eq(%w(user pass))
61
61
  end
62
62
  end
@@ -87,5 +87,14 @@ module URIConfig
87
87
  end
88
88
  end
89
89
  end
90
+
91
+ # This behaviour will make it ... difficult to troubleshoot
92
+ it "should not leak secrets on error" do
93
+ url = "https://USER:secret@foo.bar.com@foo.bar.com/"
94
+
95
+ expect do
96
+ URIConfig::Config.new(url).password
97
+ end.to raise_error("bad URI(is not URI?): <URL_SUPPRESSED>")
98
+ end
90
99
  end
91
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uri_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon M. Abbott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-05 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler