social-url 1.0.2 → 1.0.3

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: 28a027709c1200494803491a1d0d14ddc03adb47
4
- data.tar.gz: a9f2f6f641860483a1112e6a8984f5cc97b9d6e2
3
+ metadata.gz: 7da8ae1fb196885bceeb75aa9eb759b2caddfe15
4
+ data.tar.gz: 86a3f78bca01f19e012f867eb609fef26ea186f0
5
5
  SHA512:
6
- metadata.gz: 3e0539f39b37dbe19a518e05285f92a486e661c8498e6112ce35eb740fc36358f211d88a8f7d1c0aa96af96d26635280a9fc32539158829ac9fc5fca09005a72
7
- data.tar.gz: 3d362b3e446507e617abc521c1fedcfd082fd1bb315bb3f24d333dece593345947e5d3ba2b0e854c8cb057d5b19cd94a7c8e532b6f96745cb1c6b8f49afb58b3
6
+ metadata.gz: 1b8fddbee83d030ad5f4a403b529519e068ccde7c949900c19f3d1400204487db3373326e6cad7086a84c1d47377c4a5c7b7d7ff879a3d2552e90805195e3f91
7
+ data.tar.gz: 894ce18765a86b740e7dafd4490eb1abc53f4a06ce96c0b042b145beb32786f608348cc6b20c909a11c70e04d5accd12923a24d97d26ece2c8aecf8341712746
@@ -60,8 +60,9 @@ module SocialUrl
60
60
 
61
61
  def filtered_params(options, params)
62
62
  params.collect do |param|
63
+ next unless options[param]
63
64
  "#{param}=#{options[param]}"
64
- end.join('&')
65
+ end.compact.join('&')
65
66
  end
66
67
  end
67
68
  end
@@ -1,3 +1,3 @@
1
1
  module SocialUrl
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -48,7 +48,7 @@ class SocialUrlTest < Minitest::Test
48
48
 
49
49
  def test_filtered_params
50
50
  filtered_params = 'text=Hello%20World&url=http%3A%2F%2Fexample.com%2F'
51
- params = [:text, :url]
51
+ params = [:text, :url, :derp]
52
52
 
53
53
  assert_equal filtered_params, SocialUrl.filtered_params(@normalized_options, params)
54
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social-url
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
  - Richard Venneman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-10 00:00:00.000000000 Z
11
+ date: 2015-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake