social_linker 0.4.0 → 0.4.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: 130065e466b759dc45ad255c2d7edb4732157e96
4
- data.tar.gz: d38b6a8f53b355fe42d21d6b66ac16c8ab1eb3a3
3
+ metadata.gz: 8e77fbe6908550222519fb8ece36979e94d838b1
4
+ data.tar.gz: 91f4f0aea7b2e005208104ba141b36a159f3c6ac
5
5
  SHA512:
6
- metadata.gz: d1d021035b356fd120e6699a4c811f282dbfbb28b81780d8ff120eb39bbdde6abc964eac090cee2b3c81df3ff240a169bb01cd7517a4cd344d8781a72f10c590
7
- data.tar.gz: 37ec6ed35bb5904cc0d567c0cf4b64584daab334237cc1230a155cfd46b653e9c7dade19b53a862740aa94694d4f2aa9c2f658d3ebdfd7681f76b9a9bebc0f6d
6
+ metadata.gz: 22e1030ff7b5caaee4282d40b618d6425537eb8aff53048d2991127fc5a3529c0eae6f7463a0262437d726e66e7d4046b6342016f57a2672873967ec84eacaf2
7
+ data.tar.gz: 1c688b26eedf8079a83dc1bc1c21144545a49269f1dc8c2ffdb4332da7aa37588c4d2d1afc94781048731c85152520a07930e2a64ae4ae33678a36e39ff6eb4e
@@ -94,12 +94,12 @@ module ViewHelpers
94
94
 
95
95
  def social_link_to_image(network, image_path=nil)
96
96
  if image_path == nil
97
- image_path = image_path('social_linker/icons.svg') if self.methods.include?(:image_path)
97
+ image_path = asset_path("social_linker/icons.svg") if self.methods.include?(:image_path)
98
98
  end
99
99
 
100
100
  if network and image_path
101
101
  html = "<svg class=\"icon icon-#{network} icon-default-style\"><title>#{network.capitalize}</title><use xlink:href=\"#{image_path}#icon-#{network}\"></use></svg>"
102
- html = html.html_safe if html.methods.include?(:html_safe)
102
+ # html = html.html_safe if html.methods.include?(:html_safe)
103
103
  html
104
104
  end
105
105
  end
@@ -122,7 +122,7 @@ module ViewHelpers
122
122
  raise ArgumentError, "subject can't be nil" unless subject
123
123
  raise ArgumentError, "network can't be nil" unless network
124
124
  options_with_defaults = {
125
- social_icons_image_path: 'social_linker/icons.svg',
125
+ social_icons_asset_path: 'social_linker/icons.svg',
126
126
  title: network.to_s.capitalize,
127
127
  target_blank: true,
128
128
  }.merge(options)
@@ -132,10 +132,10 @@ module ViewHelpers
132
132
  if block_given?
133
133
  link_content = capture{ yield }
134
134
  else
135
- social_icons_image_path = options_with_defaults[:social_icons_image_path]
136
- social_icons_image_path = image_path(social_icons_image_path) if self.methods.include?(:image_path)
135
+ social_icons_asset_path = options_with_defaults[:social_icons_asset_path]
136
+ social_icons_asset_path = asset_path(social_icons_asset_path) if self.methods.include?(:image_path)
137
137
 
138
- link_content = social_link_to_image(network, social_icons_image_path)
138
+ link_content = social_link_to_image(network, social_icons_asset_path)
139
139
  end
140
140
 
141
141
  title = options_with_defaults[:title]
@@ -1,3 +1,3 @@
1
1
  module SocialLinker
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_linker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - murb