sharing_tags 0.0.16 → 0.0.17

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: 4600530fcd767146095f9f85445425d33149df32
4
- data.tar.gz: f40753ce534e15ab6efa1881ea45f414b5187bd6
3
+ metadata.gz: eb73d93fba7ee64fa8cb099f06c5ea6a4710ab49
4
+ data.tar.gz: e5f430b5a32be565d28a2ae35e0a37a02652a441
5
5
  SHA512:
6
- metadata.gz: d2f1289cf0fe412c372cec5869597b89588cc89cbd337b0394b295f17ca4faa2528efaa83b87094b2b3050ff036c7e0321016bb71e97f4c98639bae02e89eb92
7
- data.tar.gz: e9232d62c2b0b870d2b4da6197419eb9d5bef8735a081ae806531bd651c50ab8d925f9dd89a3a69591f923c47fed49262f2bc3da5a0773e5561c77577ef38350
6
+ metadata.gz: f364f946bda666597a66e2e9e02d67ebbcef6f7f828c22945c9574b15b636365c748fa69840b45b1f60a32db2ba6fd22a829ad1ebab01f693eb3ec880f4012c4
7
+ data.tar.gz: acba60164c6bc8e27aef1ee7690558ce35d3a7a6d40bc97f0fb37c3c7972eae2baf7d5ceac407f26eed315339dd8c2cbb75ce9e36e1d3ec05f26301a0be060eb
data/Todo.md CHANGED
@@ -1,17 +1,20 @@
1
1
  # TODO
2
2
 
3
3
  * Write specs views/js/requests
4
- * Add language variable
4
+ * Add language variable (in dev)
5
5
  * Add recommendation about image size and length of text for development mode. (Twitter message lenght, fb_app id)
6
- * Define network list
6
+ * Define network list (in dev)
7
7
  * Add auto link params. Context name -> utm_medium => (short_context_name || context_name), utm_source => (short_network_name || network_name)
8
8
  * Add version to sharing tags: append ?version=1 to links and assets
9
9
  * Add debug param
10
10
  * Init context running helper class on init railie (should work in console)
11
- * Correct merge values in default context and defined
11
+ * Correct merge values in default context and defined (in dev)
12
12
  * Add to install task sample of view and require assets
13
13
  * Update facebook info for fetching urls
14
14
  * Add twitter card settings
15
15
  * Add sharing through Vk js SDK
16
16
  * Generate sass styles only for choiced icons
17
- * if return nil in proc try get variable from parent settings
17
+ * if return nil in proc try get variable from parent settings
18
+ * delete Jquery events and create custom event
19
+ * upload images to facebook
20
+ * sharing_tags.buttons and sharing_tags.meta and sharing_tags.context :user
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77 77"><path class="fb-sharing-tags-icon-fill sharing-tags-icon-fill" d="M38.67 1.485c20.558 0 37.224 16.576 37.224 37.024 0 20.45-16.666 37.024-37.224 37.024-20.557 0-37.222-16.575-37.222-37.025S18.113 1.484 38.67 1.484z"/><path class="fb-sharing-tags-icon-in sharing-tags-icon-in" d="M33.158 38.535c.11.136.047 1.08.047 1.258l.007 19.93H41.9c.05-5.246 0-10.63 0-15.9 0-.076-.017-5.107.007-5.212.016-.067.018-.06.036-.088.01.002 5.526.046 5.718 0l.098-.03.763-7.272-6.592-.002c-.026-1.073.005-2.178.007-3.256 0-.983-.025-2.198.564-2.738l5.987-.6-.01-7.296c-1.133-.07-2.476-.006-3.632-.006-1.204 0-2.422-.026-3.605.053-2.255.15-4.076.817-5.392 1.933-1.91 3.043-2.648.43-2.662 11.913l-4.365.003.01 7.307 4.328.005z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78"><path class="fb-sharing-tags-icon-fill sharing-tags-icon-fill" d="M38.67 1.485c20.558 0 37.224 16.576 37.224 37.024 0 20.45-16.666 37.024-37.224 37.024-20.557 0-37.222-16.575-37.222-37.025S18.113 1.484 38.67 1.484z"/><path class="fb-sharing-tags-icon-in sharing-tags-icon-in" d="M33.158 38.535c.11.136.047 1.08.047 1.258l.007 19.93H41.9c.05-5.246 0-10.63 0-15.9 0-.076-.017-5.107.007-5.212.016-.067.018-.06.036-.088.01.002 5.526.046 5.718 0l.098-.03.763-7.272-6.592-.002c-.026-1.073.005-2.178.007-3.256 0-.983-.025-2.198.564-2.738l5.987-.6-.01-7.296c-1.133-.07-2.476-.006-3.632-.006-1.204 0-2.422-.026-3.605.053-2.255.15-4.076.817-5.392 1.933-1.91 3.043-2.648.43-2.662 11.913l-4.365.003.01 7.307 4.328.005z"/></svg>
@@ -1 +1 @@
1
- <svg viewBox="-1 -1 36 36" xmlns="http://www.w3.org/2000/svg"><path class="gl-sharing-tags-icon-fill sharing-tags-icon-fill" d="M17.63 34.085c9.394 0 17.008-7.615 17.008-17.008C34.638 7.684 27.024.07 17.63.07 8.237.07.622 7.684.622 17.077S8.237 34.085 17.63 34.085"/><path class="gl-sharing-tags-icon-in sharing-tags-icon-in" d="M25.825 15.835h-2.05v-2.05h-1.65v2.05h-2.05v1.65h2.05v2.05h1.65v-2.05h2.05v-1.65zM18.16 18.32c-.475-.338-1.385-1.158-1.385-1.64 0-.565.162-.842 1.01-1.506.872-.682 1.49-1.64 1.49-2.75 0-1.326-.59-2.617-1.7-3.044h1.67l1.18-.85h-5.268c-2.36 0-4.583 1.788-4.583 3.86 0 2.117 1.61 3.827 4.012 3.827.167 0 .33-.004.488-.015-.156.298-.268.635-.268.983 0 .59.317 1.066.717 1.456-.302 0-.595.01-.912.01-2.923 0-5.175 1.863-5.175 3.795 0 1.902 2.468 3.092 5.393 3.092 3.334 0 5.176-1.89 5.176-3.794 0-1.526-.45-2.44-1.842-3.423zm-2.812-2.64c-1.357-.04-2.647-1.52-2.88-3.3-.236-1.783.675-3.146 2.032-3.106 1.356.04 2.646 1.47 2.88 3.252.234 1.782-.675 3.194-2.032 3.153zm-.532 9.015c-2.022 0-3.482-1.28-3.482-2.817 0-1.507 1.812-2.76 3.833-2.74.472.006.912.082 1.31.21 1.098.765 1.885 1.195 2.107 2.065.042.177.065.358.065.543 0 1.538-.99 2.74-3.835 2.74z"/></svg>
1
+ <svg viewBox="0 -1 36.5 36.5" xmlns="http://www.w3.org/2000/svg"><path class="gl-sharing-tags-icon-fill sharing-tags-icon-fill" d="M17.63 34.085c9.394 0 17.008-7.615 17.008-17.008C34.638 7.684 27.024.07 17.63.07 8.237.07.622 7.684.622 17.077S8.237 34.085 17.63 34.085"/><path class="gl-sharing-tags-icon-in sharing-tags-icon-in" d="M25.825 15.835h-2.05v-2.05h-1.65v2.05h-2.05v1.65h2.05v2.05h1.65v-2.05h2.05v-1.65zM18.16 18.32c-.475-.338-1.385-1.158-1.385-1.64 0-.565.162-.842 1.01-1.506.872-.682 1.49-1.64 1.49-2.75 0-1.326-.59-2.617-1.7-3.044h1.67l1.18-.85h-5.268c-2.36 0-4.583 1.788-4.583 3.86 0 2.117 1.61 3.827 4.012 3.827.167 0 .33-.004.488-.015-.156.298-.268.635-.268.983 0 .59.317 1.066.717 1.456-.302 0-.595.01-.912.01-2.923 0-5.175 1.863-5.175 3.795 0 1.902 2.468 3.092 5.393 3.092 3.334 0 5.176-1.89 5.176-3.794 0-1.526-.45-2.44-1.842-3.423zm-2.812-2.64c-1.357-.04-2.647-1.52-2.88-3.3-.236-1.783.675-3.146 2.032-3.106 1.356.04 2.646 1.47 2.88 3.252.234 1.782-.675 3.194-2.032 3.153zm-.532 9.015c-2.022 0-3.482-1.28-3.482-2.817 0-1.507 1.812-2.76 3.833-2.74.472.006.912.082 1.31.21 1.098.765 1.885 1.195 2.107 2.065.042.177.065.358.065.543 0 1.538-.99 2.74-3.835 2.74z"/></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77 77"><g class="od-sharing-tags-icon-fill sharing-tags-icon-fill"><path d="M38.02 1.22C17.46 1.22.79 17.8.79 38.24c0 20.45 16.67 37.03 37.23 37.03 20.55 0 37.22-16.58 37.22-37.03 0-20.44-16.67-37.02-37.22-37.02z"/></g><g class="od-sharing-tags-icon-in sharing-tags-icon-in"><path d="M50.86 60.81c-2.49 2.51-5.14.2-7.07-1.65-1.66-1.59-3.65-3.58-5.39-4.93-4.53 4.75-8.21 10.46-11.93 7.3-4.46-3.79 4.29-9.34 6.43-12.61-2.23-.5-5.97-1.7-7.73-3.03-1.77-1.34-2.1-4.42.04-5.94 2.56-1.83 4.28.18 7.3 1.15 11.45 3.67 15.88-6.6 19.27-.58 2.89 5.13-6.94 7.4-8.12 8.19 4.73 4.5 10.78 8.47 7.2 12.1z" class="s0"/><path d="M40.19 13.49c-6.23-1.05-13.59 2.72-14.75 10.3-2.55 16.7 22.81 20.62 25.21 3.86.89-6.19-3.11-12.91-10.46-14.16m-1.94 17.6c-6.93.09-7.44-9.82-.55-10.3 7.26-.51 7.34 10.22.55 10.3z"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78"><g class="od-sharing-tags-icon-fill sharing-tags-icon-fill"><path d="M38.02 1.22C17.46 1.22.79 17.8.79 38.24c0 20.45 16.67 37.03 37.23 37.03 20.55 0 37.22-16.58 37.22-37.03 0-20.44-16.67-37.02-37.22-37.02z"/></g><g class="od-sharing-tags-icon-in sharing-tags-icon-in"><path d="M50.86 60.81c-2.49 2.51-5.14.2-7.07-1.65-1.66-1.59-3.65-3.58-5.39-4.93-4.53 4.75-8.21 10.46-11.93 7.3-4.46-3.79 4.29-9.34 6.43-12.61-2.23-.5-5.97-1.7-7.73-3.03-1.77-1.34-2.1-4.42.04-5.94 2.56-1.83 4.28.18 7.3 1.15 11.45 3.67 15.88-6.6 19.27-.58 2.89 5.13-6.94 7.4-8.12 8.19 4.73 4.5 10.78 8.47 7.2 12.1z" class="s0"/><path d="M40.19 13.49c-6.23-1.05-13.59 2.72-14.75 10.3-2.55 16.7 22.81 20.62 25.21 3.86.89-6.19-3.11-12.91-10.46-14.16m-1.94 17.6c-6.93.09-7.44-9.82-.55-10.3 7.26-.51 7.34 10.22.55 10.3z"/></g></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -1 78 79"><path class="tw-sharing-tags-icon-fill sharing-tags-icon-fill" fill="none" d="M38.9.3C18.2.3 1.4 17.4 1.4 38.5s16.8 38.2 37.5 38.2 37.5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-1.2-.1-2.4-.4-3.4-.8-1-.3-2.1-.8-3.2-1.2-.7-.4-1.7-1-2.6-1.7z"/></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 77"><g class="vk-sharing-tags-icon-fill sharing-tags-icon-fill"><path d="M38.24 1.16C17.78 1.16 1.2 17.78 1.2 38.29s16.58 37.13 37.04 37.13c20.45 0 37.03-16.62 37.03-37.13S58.69 1.16 38.24 1.16z"/></g><g class="vk-sharing-tags-icon-in sharing-tags-icon-in"><path d="M56.38 41.34c3.12 2.74 5.29 4.97 6.52 6.69.57.86.76 1.62.55 2.28-.2.67-.68 1-1.41 1l-8.12.35c-1.14.08-2.54-.58-4.18-1.99-1.64-1.41-2.74-2.58-3.32-3.52-.32-.55-.92-.86-1.78-.94-.86-.08-1.41.31-1.66 1.17l-.24 3.05c-.09.63-.33 1.1-.74 1.41-.41.32-.76.49-1.05.53-.28.04-.76.1-1.41.18-2.13.08-4-.02-5.6-.3-1.59-.27-3.05-.84-4.36-1.7-1.31-.86-2.36-1.64-3.13-2.34-.78-.71-1.91-1.84-3.39-3.41-4.01-5.47-7-10.21-8.97-14.2-.74-1.56-1.15-2.89-1.23-3.99.33-.31.94-.51 1.84-.59.91-.07 2.22-.09 3.94-.05 1.72.04 2.74.05 3.07.05.82-.07 1.48.36 1.97 1.3 2.05 4.38 4.06 7.78 6.02 10.21 1.31 1.17 2.17.97 2.59-.59.16 0 .24-1.92.24-5.75.08-2.43-.94-3.95-3.07-4.58.49-1.25 2.21-1.88 5.16-1.88.74 0 1.64.04 2.71.12 1.06.08 1.63.12 1.72.12 2.46 0 3.69.94 3.69 2.82 0 .23-.05.8-.13 1.7-.08.9-.14 1.76-.18 2.58-.04.82-.06 1.68-.06 2.58 0 .9.12 1.66.37 2.29.24.63.57 1.02.98 1.17.45-.31.88-.6 1.29-.88.41-.27.84-.72 1.29-1.35.45-.62.8-1.09 1.04-1.4.25-.32.62-.91 1.11-1.77.49-.86.78-1.4.86-1.64.08-.23.37-.84.86-1.82.49-.98.74-1.46.74-1.46l.18-.36c.33-.7.6-1.11.8-1.23.21-.12.72-.18 1.54-.18h7.62c.91 0 1.44.03 1.6.06.17.04.41.22.74.53.57.71.06 2.23-1.54 4.58-1.59 2.35-3.13 4.3-4.61 5.87-2.05 2.19-2.33 3.95-.86 5.28z"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78"><g class="vk-sharing-tags-icon-fill sharing-tags-icon-fill"><path d="M38.24 1.16C17.78 1.16 1.2 17.78 1.2 38.29s16.58 37.13 37.04 37.13c20.45 0 37.03-16.62 37.03-37.13S58.69 1.16 38.24 1.16z"/></g><g class="vk-sharing-tags-icon-in sharing-tags-icon-in"><path d="M56.38 41.34c3.12 2.74 5.29 4.97 6.52 6.69.57.86.76 1.62.55 2.28-.2.67-.68 1-1.41 1l-8.12.35c-1.14.08-2.54-.58-4.18-1.99-1.64-1.41-2.74-2.58-3.32-3.52-.32-.55-.92-.86-1.78-.94-.86-.08-1.41.31-1.66 1.17l-.24 3.05c-.09.63-.33 1.1-.74 1.41-.41.32-.76.49-1.05.53-.28.04-.76.1-1.41.18-2.13.08-4-.02-5.6-.3-1.59-.27-3.05-.84-4.36-1.7-1.31-.86-2.36-1.64-3.13-2.34-.78-.71-1.91-1.84-3.39-3.41-4.01-5.47-7-10.21-8.97-14.2-.74-1.56-1.15-2.89-1.23-3.99.33-.31.94-.51 1.84-.59.91-.07 2.22-.09 3.94-.05 1.72.04 2.74.05 3.07.05.82-.07 1.48.36 1.97 1.3 2.05 4.38 4.06 7.78 6.02 10.21 1.31 1.17 2.17.97 2.59-.59.16 0 .24-1.92.24-5.75.08-2.43-.94-3.95-3.07-4.58.49-1.25 2.21-1.88 5.16-1.88.74 0 1.64.04 2.71.12 1.06.08 1.63.12 1.72.12 2.46 0 3.69.94 3.69 2.82 0 .23-.05.8-.13 1.7-.08.9-.14 1.76-.18 2.58-.04.82-.06 1.68-.06 2.58 0 .9.12 1.66.37 2.29.24.63.57 1.02.98 1.17.45-.31.88-.6 1.29-.88.41-.27.84-.72 1.29-1.35.45-.62.8-1.09 1.04-1.4.25-.32.62-.91 1.11-1.77.49-.86.78-1.4.86-1.64.08-.23.37-.84.86-1.82.49-.98.74-1.46.74-1.46l.18-.36c.33-.7.6-1.11.8-1.23.21-.12.72-.18 1.54-.18h7.62c.91 0 1.44.03 1.6.06.17.04.41.22.74.53.57.71.06 2.23-1.54 4.58-1.59 2.35-3.13 4.3-4.61 5.87-2.05 2.19-2.33 3.95-.86 5.28z"/></g></svg>
@@ -1,21 +1,20 @@
1
1
 
2
2
  $(document).on 'click', "@sharing_tags_share", (event) ->
3
- event.preventDefault()
4
- self = $(@)
5
- network = self.data('network')
6
- context = self.data('context')
7
- jQuery?(window).trigger(type: "sharing_tags.click_action", network: network, context: context, target: self)
3
+ event.preventDefault()
4
+ self = $(@)
8
5
 
9
- SharingTags.share(
10
- network,
11
- page_url: self.attr 'href'
12
- url: self.data 'share-url'
13
- title: self.data 'title'
14
- description: self.data 'description'
15
- image: self.data 'image'
16
- app_id: self.data 'app-id'
17
- provider: self.data 'provider'
18
- caption: self.data 'caption'
19
- context: context
20
- message: self.data 'description' # @note deprecated
21
- )
6
+ share = SharingTags.share(
7
+ self.data('network'),
8
+ page_url: self.attr 'href'
9
+ url: self.data 'share-url'
10
+ title: self.data 'title'
11
+ description: self.data 'description'
12
+ image: self.data 'image'
13
+ app_id: self.data 'app-id'
14
+ provider: self.data 'provider'
15
+ caption: self.data 'caption'
16
+ context: self.data 'context'
17
+ message: self.data 'description' # @note deprecated
18
+ )
19
+
20
+ share.callback.click_action(target: self)
@@ -3,6 +3,9 @@ class @SharingTags.Share.Callback
3
3
  @network = @share.network
4
4
  @context = @share.context
5
5
 
6
+ click_action: (params)=>
7
+ @trigger("click_action", params)
8
+
6
9
  before_share: (provider)=>
7
10
  @trigger("before_share", provider: provider)
8
11
 
@@ -19,8 +22,10 @@ class @SharingTags.Share.Callback
19
22
  @trigger("open_popup", url: open_url, popup_window: popup_window)
20
23
 
21
24
  trigger: (trigger_name, params...)->
25
+ params['type'] = "sharing_tags.#{trigger_name}"
22
26
  trigger_params = @_share_params(params)
23
- jQuery?(window).trigger("sharing_tags.#{trigger_name}", [trigger_params])
27
+ jQuery?(window).trigger(trigger_params)
28
+ jQuery?(document).trigger(trigger_params)
24
29
 
25
30
  _share_params: (params)->
26
31
  properties = {
@@ -89,6 +89,7 @@ class @SharingTags
89
89
 
90
90
  @share_popup: ({network, url, popup_url, popup_params})->
91
91
  social_share = new Share(arguments[0])
92
+ social_share.callback.before_share()
92
93
  social_share.open_popup(popup_url, popup_params)
93
94
  social_share
94
95
 
@@ -11,6 +11,8 @@
11
11
  / TODO:
12
12
  /link rel="image_src" href="/site-preview.jpg"
13
13
 
14
+ /meta name="description" content="#{t('shared_phrases.description')}"
15
+
14
16
 
15
17
  /meta name=”description” content=”155 characters of message matching text with a call to action goes here”
16
18
  /<title>Up to 70 Characters of Keyword-relevant text here</title>
@@ -1,3 +1,3 @@
1
1
  module SharingTags
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -26,6 +26,12 @@ describe "SharingTags.Share.Callback", ->
26
26
  spyOn(@callback, "trigger")
27
27
  @response = jasmine.createSpy('response')
28
28
 
29
+ it "#click_action", ->
30
+ @callback.click_action(target: "target_object")
31
+ expect(@callback.trigger).toHaveBeenCalledWith(
32
+ "click_action", jasmine.objectContaining(target: "target_object")
33
+ )
34
+
29
35
  it "#before_share", ->
30
36
  @callback.before_share("auto")
31
37
  expect(@callback.trigger).toHaveBeenCalledWith(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sharing_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoliy Kovalchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails