samwise 0.2.1 → 0.2.2

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: be663900bef4bcc5b44bb03260cf11aa8549dd08
4
- data.tar.gz: 3942367cf33cc3b8f79eddbd24d93109570934d9
3
+ metadata.gz: 0754234576533d754039f6b528c9faa216372c37
4
+ data.tar.gz: 17a52375c6fb751dd308d5f08cf2dca01f8acd77
5
5
  SHA512:
6
- metadata.gz: 81cde93f81c2066754ad6cca18eff99207887cad3d3465802c3ab7694dae132e9b4662886eb6fe5f8bac46f27d927af22b3e116c35a2ac94ab7fe7880e23d46b
7
- data.tar.gz: 3966567affdf93b3c369921ec5e726c279e8653735e46a5d8d2106709aa41b2f906355434f4d97f78559e711701a06d8b2aca9118ee417506c3403fc74e896bd
6
+ metadata.gz: 9ffb00161c0246c796db3aaa978c96a39b3483024b401b6ae4681d3a1ff4720a0b7b3f9ea264da7c6c7195aeb04068ca4023366add0a39ef0cefd7a6efe47ef9
7
+ data.tar.gz: 2e0d8d340d7763f18d8349a792104df283a3f01cdf712948b45c4145906db646c3147e1322829b1cc4d6b6c055a924df096a922f478ef1c31dd77913402d1dcc
data/lib/samwise/util.rb CHANGED
@@ -3,6 +3,8 @@ require 'pry'
3
3
  module Samwise
4
4
  module Util
5
5
  def self.duns_is_properly_formatted?(duns: nil)
6
+ return false if duns.nil?
7
+
6
8
  duns.gsub!('-', '')
7
9
 
8
10
  return true if duns_contains_forbidden_characters?(duns: duns)
@@ -1,3 +1,3 @@
1
1
  module Samwise
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/spec/util_spec.rb CHANGED
@@ -51,6 +51,12 @@ describe Samwise::Util do
51
51
 
52
52
  expect(is_formatted).to be(false)
53
53
  end
54
+
55
+ it 'should return false when the duns number is nil' do
56
+ is_formatted = Samwise::Util.duns_is_properly_formatted?(duns: nil)
57
+
58
+ expect(is_formatted).to be(false)
59
+ end
54
60
  end
55
61
 
56
62
  context '#format_duns' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samwise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan deLevie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codeclimate-test-reporter