pin_it 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ module PinIt
18
18
  end
19
19
 
20
20
  def pin_it_js
21
- IO.read(File.expand_path("../../vendor/assets/javascripts/pin_it.js", __FILE__))
21
+ @pin_it_js ||= IO.read(File.expand_path("../../vendor/assets/javascripts/pin_it.js", __FILE__))
22
22
  end
23
23
  end
24
24
 
@@ -1,3 +1,3 @@
1
1
  module PinIt
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,22 +1,22 @@
1
- (function() {
2
- window.PinIt = window.PinIt || { loaded:false };
3
- if (window.PinIt.loaded) return;
4
- window.PinIt.loaded = true;
5
- function async_load(){
6
- var s = document.createElement("script");
7
- s.type = "text/javascript";
8
- s.async = true;
9
- if (window.location.protocol == "https:")
10
- s.src = "https://assets.pinterest.com/js/pinit.js";
11
- else
12
- s.src = "http://assets.pinterest.com/js/pinit.js";
13
-
14
- var x = document.getElementsByTagName("script")[0];
15
- x.parentNode.insertBefore(s, x);
16
- }
17
- if (window.attachEvent)
18
- window.attachEvent("onload", async_load);
19
- else
20
- window.addEventListener("load", async_load, false);
21
- })();
22
-
1
+ (function (w, d, load) {
2
+ var script,
3
+ first = d.getElementsByTagName('SCRIPT')[0],
4
+ n = load.length,
5
+ i = 0,
6
+ go = function () {
7
+ for (i = 0; i < n; i = i + 1) {
8
+ script = d.createElement('SCRIPT');
9
+ script.type = 'text/javascript';
10
+ script.async = true;
11
+ script.src = load[i];
12
+ first.parentNode.insertBefore(script, first);
13
+ }
14
+ }
15
+ if (w.attachEvent) {
16
+ w.attachEvent('onload', go);
17
+ } else {
18
+ w.addEventListener('load', go, false);
19
+ }
20
+ }(window, document,
21
+ ['//assets.pinterest.com/js/pinit.js']
22
+ ));
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pin_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-09 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70266961317820 !ruby/object:Gem::Requirement
16
+ requirement: &70161135006620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70266961317820
24
+ version_requirements: *70161135006620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70266961316780 !ruby/object:Gem::Requirement
27
+ requirement: &70161134833660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70266961316780
35
+ version_requirements: *70161134833660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70266961314860 !ruby/object:Gem::Requirement
38
+ requirement: &70161134657300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70266961314860
46
+ version_requirements: *70161134657300
47
47
  description: Rails helpers for adding Pinterest.com "Pin It" buttons to views
48
48
  email:
49
49
  - joshua@fanzter.com
@@ -75,18 +75,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
- segments:
79
- - 0
80
- hash: 4450300412736373687
81
78
  required_rubygems_version: !ruby/object:Gem::Requirement
82
79
  none: false
83
80
  requirements:
84
81
  - - ! '>='
85
82
  - !ruby/object:Gem::Version
86
83
  version: '0'
87
- segments:
88
- - 0
89
- hash: 4450300412736373687
90
84
  requirements: []
91
85
  rubyforge_project:
92
86
  rubygems_version: 1.8.15