social-share-button 0.8.8 → 0.9.0
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 +4 -4
 - data/CHANGELOG.md +7 -0
 - data/README.md +7 -6
 - data/app/assets/images/social-share-button/reddit.svg +4 -8
 - data/app/assets/images/social-share-button/telegram.svg +12 -0
 - data/app/assets/javascripts/social-share-button.coffee +3 -1
 - data/app/assets/stylesheets/social-share-button.css.erb +4 -0
 - data/config/locales/social_share_button.en.yml +1 -0
 - data/config/locales/social_share_button.fr.yml +1 -0
 - data/config/locales/social_share_button.zh-CN.yml +1 -0
 - data/config/locales/social_share_button.zh-TW.yml +1 -0
 - data/lib/generators/social_share_button/templates/config/initializers/social_share_button.rb +1 -1
 - data/lib/social_share_button/config.rb +1 -0
 - data/lib/social_share_button/engine.rb +1 -2
 - data/lib/social_share_button/helper.rb +0 -1
 - data/lib/social_share_button/railtie.rb +0 -1
 - data/lib/social_share_button/version.rb +1 -1
 - metadata +4 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 51cecb2307972c2819d48a869e6e9d51449d359b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 35b63b885e0b9ef350e2f6d5be834468ce843ab2
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8cad03f5ec8f920833640a9f85be256a11322b196e01129fd11b14d4e25add18c3a2fe961ffc4d713fa664bdda6e71d07abf073db9c77e884fbfb5a6dc58aa49
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ccf624f454c2ac83537f792eeb8535172c34654ea5876c3257cc92f2cffb451c97566e861ce0781abae1bdd260917d4a6f4c3f90fa900388b5413b03353a5a18
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -23,10 +23,11 @@ This is a gem to helper you quick create a share feature in you Rails apps. 
     | 
|
| 
       23 
23 
     | 
    
         
             
            * Xing
         
     | 
| 
       24 
24 
     | 
    
         
             
            * Reddit
         
     | 
| 
       25 
25 
     | 
    
         
             
            * Hacker News
         
     | 
| 
      
 26 
     | 
    
         
            +
            * Telegram
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
       27 
28 
     | 
    
         
             
            ## Screenshot
         
     | 
| 
       28 
29 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
            <img width=" 
     | 
| 
      
 30 
     | 
    
         
            +
            <img width="473" alt="2016-10-05 8 51 07" src="https://cloud.githubusercontent.com/assets/5518/19097657/ea7c0a20-8ad8-11e6-953f-83354d9a6384.png">
         
     | 
| 
       30 
31 
     | 
    
         | 
| 
       31 
32 
     | 
    
         
             
            ## Install
         
     | 
| 
       32 
33 
     | 
    
         | 
| 
         @@ -112,17 +113,18 @@ You can also specify the URL that it links to: 
     | 
|
| 
       112 
113 
     | 
    
         
             
            <%= social_share_button_tag(@post.title, :url => "http://myapp.com/foo/bar", :image => "http://foo.bar/images/a.jpg", desc: "The summary of page", via: "MyTwitterName") %>
         
     | 
| 
       113 
114 
     | 
    
         
             
            ```
         
     | 
| 
       114 
115 
     | 
    
         | 
| 
       115 
     | 
    
         
            -
            For the Tumblr there are an extra settings, prefixed with : 
     | 
| 
      
 116 
     | 
    
         
            +
            For the Tumblr there are an extra settings, prefixed with : `data-*`
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
       116 
118 
     | 
    
         
             
            ```erb
         
     | 
| 
       117 
119 
     | 
    
         
             
            <%= social_share_button_tag(@post.title, :image => "https://raw.github.com/vkulpa/social-share-button/master/lib/assets/images/sprites/social-share-button/tumblr.png", :'data-type' => 'photo') %>
         
     | 
| 
       118 
120 
     | 
    
         
             
            <%= social_share_button_tag(@post.title, :'data-source' => "https://raw.github.com/vkulpa/social-share-button/master/lib/assets/images/sprites/social-share-button/tumblr.png", :'data-type' => 'photo') %>
         
     | 
| 
       119 
121 
     | 
    
         
             
            ```
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
       120 
123 
     | 
    
         
             
            Those two above calls are identical.
         
     | 
| 
       121 
124 
     | 
    
         
             
            Here are the mapping of attributes depending on you data-type parameter
         
     | 
| 
       122 
125 
     | 
    
         | 
| 
       123 
     | 
    
         
            -
            <pre>
         
     | 
| 
       124 
126 
     | 
    
         
             
            | data-type         | standard  | custom :"data-*" prefixed  |
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
      
 127 
     | 
    
         
            +
            | ----------------- | --------- | -------------------------- |
         
     | 
| 
       126 
128 
     | 
    
         
             
            | link (default)    | title     | data-title                 |
         
     | 
| 
       127 
129 
     | 
    
         
             
            |                   | url       | data-url                   |
         
     | 
| 
       128 
130 
     | 
    
         
             
            | text              | title     | data-title                 |
         
     | 
| 
         @@ -130,7 +132,6 @@ Here are the mapping of attributes depending on you data-type parameter 
     | 
|
| 
       130 
132 
     | 
    
         
             
            |                   | image     | data-source                |
         
     | 
| 
       131 
133 
     | 
    
         
             
            | quote             | title     | data-quote                 |
         
     | 
| 
       132 
134 
     | 
    
         
             
            |                   |           | data-source                |
         
     | 
| 
       133 
     | 
    
         
            -
            </pre>
         
     | 
| 
       134 
135 
     | 
    
         | 
| 
       135 
136 
     | 
    
         
             
            ## How to change icon size?
         
     | 
| 
       136 
137 
     | 
    
         | 
| 
         @@ -152,4 +153,4 @@ $size: 24px; 
     | 
|
| 
       152 
153 
     | 
    
         | 
| 
       153 
154 
     | 
    
         
             
            ## Demo
         
     | 
| 
       154 
155 
     | 
    
         | 
| 
       155 
     | 
    
         
            -
            [ 
     | 
| 
      
 156 
     | 
    
         
            +
            [https://ruby-china.org/wiki/about](https://ruby-china.org/wiki/about)
         
     | 
| 
         @@ -1,10 +1,6 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            < 
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
                <path d="M40,0 L216,0 C238.091,0 256,17.909 256,40 L256,216 C256,238.091 238.091,256 216,256 L40,256 C17.909,256 0,238.091 0,216 L0,40 C0,17.909 17.909,0 40,0 z" fill="#FF4200" id="bg"/>
         
     | 
| 
       6 
     | 
    
         
            -
                <text transform="matrix(1, 0, 0, 1, 128, 128)" id="icon">
         
     | 
| 
       7 
     | 
    
         
            -
                  <tspan x="-112" y="76" font-family="FontAwesome" font-size="224" fill="#FFFFFF"></tspan>
         
     | 
| 
       8 
     | 
    
         
            -
                </text>
         
     | 
| 
      
 1 
     | 
    
         
            +
            <svg width="256px" height="256px" viewBox="-2 111 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
         
     | 
| 
      
 2 
     | 
    
         
            +
             	<g id="reddit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-2.000000, 111.000000)">
         
     | 
| 
      
 3 
     | 
    
         
            +
                <rect id="bg" fill="#FF4200" x="0" y="0" width="256" height="256" rx="40"></rect>
         
     | 
| 
      
 4 
     | 
    
         
            +
            		<path d="M213.2 128.6Q213.2 134.4 210.25 139.15T202.3 146.4Q203.5 151 203.5 156 203.5 171.5 192.85 184.7T163.8 205.55 123.8 213.2 83.85 205.55 54.85 184.7 44.2 156Q44.2 151.3 45.3 146.6 40.2 144.1 37.1 139.25T34 128.6Q34 120.4 39.8 114.55T53.9 108.7Q62.4 108.7 68.4 115 90.2 99.8 119.9 98.8L131.5 46.7Q131.8 45.4 133 44.6T135.6 44.1L172.5 52.2Q174.3 48.5 177.9 46.25T185.8 44Q192 44 196.4 48.35T200.8 58.9 196.4 69.5 185.8 73.9 175.25 69.55 170.9 59L137.5 51.6 127.1 98.8Q157.1 99.7 179 114.8 184.8 108.7 193.3 108.7 201.6 108.7 207.4 114.55T213.2 128.6zM75.8 148.5Q75.8 154.7 80.15 159.1T90.7 163.5 101.3 159.1 105.7 148.5 101.3 137.95 90.7 133.6Q84.6 133.6 80.2 138T75.8 148.5zM156.8 184Q157.9 182.9 157.9 181.4T156.8 178.8Q155.8 177.8 154.3 177.8T151.7 178.8Q147.6 183 139.6 185T123.6 187 107.6 185 95.5 178.8Q94.4 177.8 92.9 177.8T90.4 178.8Q89.3 179.8 89.3 181.35T90.4 184Q94.7 188.3 102.25 190.8T114.5 193.75 123.6 194.2 132.7 193.75 144.95 190.8 156.8 184zM156.5 163.5Q162.7 163.5 167.05 159.1T171.4 148.5Q171.4 142.4 167 138T156.5 133.6Q150.3 133.6 145.9 137.95T141.5 148.5 145.9 159.1 156.5 163.5z" id="Shape" fill="#FFFFFF"/>
         
     | 
| 
       9 
5 
     | 
    
         
             
              </g>
         
     | 
| 
       10 
6 
     | 
    
         
             
            </svg>
         
     | 
| 
         @@ -0,0 +1,12 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
         
     | 
| 
      
 3 
     | 
    
         
            +
                <defs></defs>
         
     | 
| 
      
 4 
     | 
    
         
            +
                <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
         
     | 
| 
      
 5 
     | 
    
         
            +
                    <g id="Telegram" fill-rule="nonzero">
         
     | 
| 
      
 6 
     | 
    
         
            +
                        <g>
         
     | 
| 
      
 7 
     | 
    
         
            +
                            <rect id="bg" fill="#2CA5E0" x="0" y="0" width="256" height="256" rx="40"></rect>
         
     | 
| 
      
 8 
     | 
    
         
            +
                            <path d="M204.880365,65.162903 C208.60471,47.8937213 200.808099,46.2077658 183.075486,51.9998895 C165.342888,57.7920147 119.866369,74.6474875 112.212217,77.3642762 C104.558065,80.0810649 67.2943384,92.6052512 59.5686067,96.3422173 C43.7886805,104.806232 51.4649755,117.723167 69.1055729,124.430145 C121.831303,149.738762 106.859895,136.841866 130.399221,183.67197 C135.243558,195.635178 146.666149,216.012662 157.606248,200.609263 C163.357432,191.848576 171.061557,166.027781 175.467686,153.985604 C181.070621,138.672462 201.5864,80.4365211 204.880365,65.162903 Z" id="sharp" fill="#FFFFFF"></path>
         
     | 
| 
      
 9 
     | 
    
         
            +
                        </g>
         
     | 
| 
      
 10 
     | 
    
         
            +
                    </g>
         
     | 
| 
      
 11 
     | 
    
         
            +
                </g>
         
     | 
| 
      
 12 
     | 
    
         
            +
            </svg>
         
     | 
| 
         @@ -44,7 +44,7 @@ window.SocialShareButton = 
     | 
|
| 
       44 
44 
     | 
    
         
             
                  when "google_bookmark"
         
     | 
| 
       45 
45 
     | 
    
         
             
                    SocialShareButton.openUrl("https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=#{url}&title=#{title}")
         
     | 
| 
       46 
46 
     | 
    
         
             
                  when "delicious"
         
     | 
| 
       47 
     | 
    
         
            -
                    SocialShareButton.openUrl(" 
     | 
| 
      
 47 
     | 
    
         
            +
                    SocialShareButton.openUrl("https://del.icio.us/save?url=#{url}&title=#{title}&jump=yes&pic=#{img}")
         
     | 
| 
       48 
48 
     | 
    
         
             
                  when "pinterest"
         
     | 
| 
       49 
49 
     | 
    
         
             
                    SocialShareButton.openUrl("http://www.pinterest.com/pin/create/button/?url=#{url}&media=#{img}&description=#{title}")
         
     | 
| 
       50 
50 
     | 
    
         
             
                  when "linkedin"
         
     | 
| 
         @@ -94,4 +94,6 @@ window.SocialShareButton = 
     | 
|
| 
       94 
94 
     | 
    
         
             
                    SocialShareButton.openUrl("http://www.reddit.com/submit?url=#{url}&newwindow=1", 555, 400)
         
     | 
| 
       95 
95 
     | 
    
         
             
                  when "hacker_news"
         
     | 
| 
       96 
96 
     | 
    
         
             
                    SocialShareButton.openUrl("http://news.ycombinator.com/submitlink?u=#{url}&t=#{title}", 770, 500)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  when "telegram"
         
     | 
| 
      
 98 
     | 
    
         
            +
                    SocialShareButton.openUrl("https://telegram.me/share/url?text=#{title}&url=#{url}")
         
     | 
| 
       97 
99 
     | 
    
         
             
                false
         
     | 
| 
         @@ -75,6 +75,10 @@ 
     | 
|
| 
       75 
75 
     | 
    
         
             
              background-image: url(<%= asset_path('social-share-button/hacker_news.svg') %>);
         
     | 
| 
       76 
76 
     | 
    
         
             
            }
         
     | 
| 
       77 
77 
     | 
    
         | 
| 
      
 78 
     | 
    
         
            +
            .social-share-button .ssb-telegram {
         
     | 
| 
      
 79 
     | 
    
         
            +
              background-image: url(<%= asset_path('social-share-button/telegram.svg') %>);
         
     | 
| 
      
 80 
     | 
    
         
            +
            }
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
       78 
82 
     | 
    
         
             
            .ss-wechat-dialog {
         
     | 
| 
       79 
83 
     | 
    
         
             
              width: 300px;
         
     | 
| 
       80 
84 
     | 
    
         
             
              position: fixed;
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: social-share-button
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.9.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jason Lee
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-03-08 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -59,6 +59,7 @@ files: 
     | 
|
| 
       59 
59 
     | 
    
         
             
            - app/assets/images/social-share-button/pinterest.svg
         
     | 
| 
       60 
60 
     | 
    
         
             
            - app/assets/images/social-share-button/qq.svg
         
     | 
| 
       61 
61 
     | 
    
         
             
            - app/assets/images/social-share-button/reddit.svg
         
     | 
| 
      
 62 
     | 
    
         
            +
            - app/assets/images/social-share-button/telegram.svg
         
     | 
| 
       62 
63 
     | 
    
         
             
            - app/assets/images/social-share-button/tumblr.svg
         
     | 
| 
       63 
64 
     | 
    
         
             
            - app/assets/images/social-share-button/twitter.svg
         
     | 
| 
       64 
65 
     | 
    
         
             
            - app/assets/images/social-share-button/vkontakte.svg
         
     | 
| 
         @@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       101 
102 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       102 
103 
     | 
    
         
             
            requirements: []
         
     | 
| 
       103 
104 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       104 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 105 
     | 
    
         
            +
            rubygems_version: 2.6.8
         
     | 
| 
       105 
106 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       106 
107 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       107 
108 
     | 
    
         
             
            summary: Helper for add social share feature in your Rails app. Twitter, Facebook,
         
     |