facebook_js 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,13 +14,17 @@
|
|
14
14
|
<%= block %>
|
15
15
|
<% end %>
|
16
16
|
};
|
17
|
-
(function(d,
|
18
|
-
var js,
|
17
|
+
(function(d, s, id){
|
18
|
+
var js, fjs = d.getElementsByTagName(s)[0];
|
19
19
|
if (d.getElementById(id)) {return;}
|
20
|
-
js = d.createElement(
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
js = d.createElement(s); js.id = id;
|
21
|
+
<% if debug %>
|
22
|
+
js.src = "//connect.facebook.net/<%= locale %>/all/debug.js";
|
23
|
+
<% else %>
|
24
|
+
js.src = "//connect.facebook.net/<%= locale %>/all.js";
|
25
|
+
<% end %>
|
26
|
+
fjs.parentNode.insertBefore(js, fjs);
|
27
|
+
}(document, 'script', 'facebook-jssdk'));
|
24
28
|
</script>
|
25
29
|
<% else %>
|
26
30
|
<script>
|
data/lib/facebook_js/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1740,3 +1740,132 @@ Started GET "/channel.html" for 127.0.0.1 at 2013-03-19 23:09:53 -0700
|
|
1740
1740
|
NavigationTest: test_/channel.html_should_show_proper_locale
|
1741
1741
|
------------------------------------------------------------
|
1742
1742
|
Started GET "/channel.html" for 127.0.0.1 at 2013-03-19 23:09:53 -0700
|
1743
|
+
----------------------------------------------------------------------------------
|
1744
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_block
|
1745
|
+
----------------------------------------------------------------------------------
|
1746
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (4.0ms)
|
1747
|
+
------------------------------------------------------------------------------------------
|
1748
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_cookie
|
1749
|
+
------------------------------------------------------------------------------------------
|
1750
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1751
|
+
-----------------------------------------------------------------------------------------
|
1752
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_debug
|
1753
|
+
-----------------------------------------------------------------------------------------
|
1754
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1755
|
+
------------------------------------------------------------------------------------------
|
1756
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_locale
|
1757
|
+
------------------------------------------------------------------------------------------
|
1758
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1759
|
+
------------------------------------------------------------------------------------------
|
1760
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_status
|
1761
|
+
------------------------------------------------------------------------------------------
|
1762
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1763
|
+
-----------------------------------------------------------------------------------------
|
1764
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_xfbml
|
1765
|
+
-----------------------------------------------------------------------------------------
|
1766
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1767
|
+
-------------------------------------------------------------------------------
|
1768
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_default_content
|
1769
|
+
-------------------------------------------------------------------------------
|
1770
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1771
|
+
--------------------------
|
1772
|
+
FacebookJsTest: test_truth
|
1773
|
+
--------------------------
|
1774
|
+
-----------------------------------------------------------------
|
1775
|
+
NavigationTest: test_/channel.html_should_have_the_proper_content
|
1776
|
+
-----------------------------------------------------------------
|
1777
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:37:36 -0700
|
1778
|
+
-----------------------------------------------------------------
|
1779
|
+
NavigationTest: test_/channel.html_should_have_the_proper_headers
|
1780
|
+
-----------------------------------------------------------------
|
1781
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:37:36 -0700
|
1782
|
+
------------------------------------------------------------
|
1783
|
+
NavigationTest: test_/channel.html_should_show_proper_locale
|
1784
|
+
------------------------------------------------------------
|
1785
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:37:36 -0700
|
1786
|
+
----------------------------------------------------------------------------------
|
1787
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_block
|
1788
|
+
----------------------------------------------------------------------------------
|
1789
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (2.9ms)
|
1790
|
+
------------------------------------------------------------------------------------------
|
1791
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_cookie
|
1792
|
+
------------------------------------------------------------------------------------------
|
1793
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.3ms)
|
1794
|
+
-----------------------------------------------------------------------------------------
|
1795
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_debug
|
1796
|
+
-----------------------------------------------------------------------------------------
|
1797
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.5ms)
|
1798
|
+
------------------------------------------------------------------------------------------
|
1799
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_locale
|
1800
|
+
------------------------------------------------------------------------------------------
|
1801
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1802
|
+
------------------------------------------------------------------------------------------
|
1803
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_status
|
1804
|
+
------------------------------------------------------------------------------------------
|
1805
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1806
|
+
-----------------------------------------------------------------------------------------
|
1807
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_xfbml
|
1808
|
+
-----------------------------------------------------------------------------------------
|
1809
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.8ms)
|
1810
|
+
-------------------------------------------------------------------------------
|
1811
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_default_content
|
1812
|
+
-------------------------------------------------------------------------------
|
1813
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1814
|
+
--------------------------
|
1815
|
+
FacebookJsTest: test_truth
|
1816
|
+
--------------------------
|
1817
|
+
-----------------------------------------------------------------
|
1818
|
+
NavigationTest: test_/channel.html_should_have_the_proper_content
|
1819
|
+
-----------------------------------------------------------------
|
1820
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:39:18 -0700
|
1821
|
+
-----------------------------------------------------------------
|
1822
|
+
NavigationTest: test_/channel.html_should_have_the_proper_headers
|
1823
|
+
-----------------------------------------------------------------
|
1824
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:39:18 -0700
|
1825
|
+
------------------------------------------------------------
|
1826
|
+
NavigationTest: test_/channel.html_should_show_proper_locale
|
1827
|
+
------------------------------------------------------------
|
1828
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:39:18 -0700
|
1829
|
+
----------------------------------------------------------------------------------
|
1830
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_block
|
1831
|
+
----------------------------------------------------------------------------------
|
1832
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (3.0ms)
|
1833
|
+
------------------------------------------------------------------------------------------
|
1834
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_cookie
|
1835
|
+
------------------------------------------------------------------------------------------
|
1836
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.3ms)
|
1837
|
+
-----------------------------------------------------------------------------------------
|
1838
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_debug
|
1839
|
+
-----------------------------------------------------------------------------------------
|
1840
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.3ms)
|
1841
|
+
------------------------------------------------------------------------------------------
|
1842
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_locale
|
1843
|
+
------------------------------------------------------------------------------------------
|
1844
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.4ms)
|
1845
|
+
------------------------------------------------------------------------------------------
|
1846
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_status
|
1847
|
+
------------------------------------------------------------------------------------------
|
1848
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.3ms)
|
1849
|
+
-----------------------------------------------------------------------------------------
|
1850
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_content_with_proper_xfbml
|
1851
|
+
-----------------------------------------------------------------------------------------
|
1852
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.3ms)
|
1853
|
+
-------------------------------------------------------------------------------
|
1854
|
+
FacebookJsHelperTest: test_facebook_js_should_render_the_proper_default_content
|
1855
|
+
-------------------------------------------------------------------------------
|
1856
|
+
Rendered /Users/siong1987/Projects/facebook_js/app/views/facebook_js_helper/_facebook.html.erb (0.3ms)
|
1857
|
+
--------------------------
|
1858
|
+
FacebookJsTest: test_truth
|
1859
|
+
--------------------------
|
1860
|
+
-----------------------------------------------------------------
|
1861
|
+
NavigationTest: test_/channel.html_should_have_the_proper_content
|
1862
|
+
-----------------------------------------------------------------
|
1863
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:41:41 -0700
|
1864
|
+
-----------------------------------------------------------------
|
1865
|
+
NavigationTest: test_/channel.html_should_have_the_proper_headers
|
1866
|
+
-----------------------------------------------------------------
|
1867
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:41:41 -0700
|
1868
|
+
------------------------------------------------------------
|
1869
|
+
NavigationTest: test_/channel.html_should_show_proper_locale
|
1870
|
+
------------------------------------------------------------
|
1871
|
+
Started GET "/channel.html" for 127.0.0.1 at 2013-05-07 18:41:41 -0700
|
@@ -15,35 +15,35 @@ class FacebookJsHelperTest < ActionView::TestCase
|
|
15
15
|
end
|
16
16
|
|
17
17
|
test 'facebook_js should render the proper default content' do
|
18
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});};(function(d,
|
18
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/en_US/all.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", facebook_js.split(/\n/).join("").delete(" ")
|
19
19
|
end
|
20
20
|
|
21
21
|
test 'facebook_js should render the proper content with proper status' do
|
22
22
|
FacebookJs.status = false
|
23
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:false,cookie:true,xfbml:true});};(function(d,
|
23
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:false,cookie:true,xfbml:true});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/en_US/all.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", facebook_js.split(/\n/).join("").delete(" ")
|
24
24
|
end
|
25
25
|
|
26
26
|
test 'facebook_js should render the proper content with proper cookie' do
|
27
27
|
FacebookJs.cookie = false
|
28
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:false,xfbml:true});};(function(d,
|
28
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:false,xfbml:true});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/en_US/all.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", facebook_js.split(/\n/).join("").delete(" ")
|
29
29
|
end
|
30
30
|
|
31
31
|
test 'facebook_js should render the proper content with proper xfbml' do
|
32
32
|
FacebookJs.xfbml = false
|
33
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:false});};(function(d,
|
33
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:false});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/en_US/all.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", facebook_js.split(/\n/).join("").delete(" ")
|
34
34
|
end
|
35
35
|
|
36
36
|
test 'facebook_js should render the proper content with proper debug' do
|
37
37
|
FacebookJs.debug = true
|
38
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});};(function(d,
|
38
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/en_US/all/debug.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", facebook_js.split(/\n/).join("").delete(" ")
|
39
39
|
end
|
40
40
|
|
41
41
|
test 'facebook_js should render the proper content with proper locale' do
|
42
42
|
FacebookJs.locale = 'zh_CN'
|
43
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});};(function(d,
|
43
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/zh_CN/all.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", facebook_js.split(/\n/).join("").delete(" ")
|
44
44
|
end
|
45
45
|
|
46
46
|
test 'facebook_js should render the proper content with block' do
|
47
|
-
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});function(){}};(function(d,
|
47
|
+
assert_equal "<divid=\"fb-root\"></div><script>window.fbAsyncInit=function(){FB.init({appId:'12345',channelUrl:'//localhost:3000/channel.html',status:true,cookie:true,xfbml:true});function(){}};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.src=\"//connect.facebook.net/en_US/all.js\";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>", (facebook_js { 'function(){}' } ).split(/\n/).join("").delete(" ")
|
48
48
|
end
|
49
49
|
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facebook_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Teng Siong Ong
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-05-08 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rails
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -77,26 +80,33 @@ files:
|
|
77
80
|
- test/test_helper.rb
|
78
81
|
homepage: http://www.github.com/siong1987/facebook_js
|
79
82
|
licenses: []
|
80
|
-
metadata: {}
|
81
83
|
post_install_message:
|
82
84
|
rdoc_options: []
|
83
85
|
require_paths:
|
84
86
|
- lib
|
85
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
86
89
|
requirements:
|
87
90
|
- - ! '>='
|
88
91
|
- !ruby/object:Gem::Version
|
89
92
|
version: '0'
|
93
|
+
segments:
|
94
|
+
- 0
|
95
|
+
hash: -1658589087998175046
|
90
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
91
98
|
requirements:
|
92
99
|
- - ! '>='
|
93
100
|
- !ruby/object:Gem::Version
|
94
101
|
version: '0'
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
hash: -1658589087998175046
|
95
105
|
requirements: []
|
96
106
|
rubyforge_project:
|
97
|
-
rubygems_version:
|
107
|
+
rubygems_version: 1.8.23
|
98
108
|
signing_key:
|
99
|
-
specification_version:
|
109
|
+
specification_version: 3
|
100
110
|
summary: facebook_js helps to keep all the unnecessary editing from using Facebook
|
101
111
|
JS SDK.
|
102
112
|
test_files:
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NTkyMWFhYjkzZDVlYjMyMDc0N2NmNDk4Y2YyZmIwZGQ0YTcyZjAwYw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MThjMTExZmJlNDQxNTkyZGRiZTY2ZjA5NzIxY2I5YzE0ODRhZGU4Yw==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZDcwYmRlNmY0MTU4NWI4NzE5MjY3MjY3YTUxYjM1ZjM2NWIxOWJlNWFmN2M3
|
10
|
-
MDRhNGZmOTgxYjY2MzZjMjk4ZjhlNGE2NzQ3NjRmOTRmMWI0MTExNmJmOWJj
|
11
|
-
Y2YyMzViZDcxY2IyYjUwZTY1NjllMTk4MTY0YjRhYzJkMTZkNTE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MTY1NjMxYzJmMjMwNTZhYzEyNTY5Y2U4M2QyNWFiYWUwNmE0OWMyOTVlNWYw
|
14
|
-
NTRiYjQxZGE2NDNmNjIzMTRmMWM2OTlmMDc2MDI2NzkwYzdlZjNiZTUyZWI1
|
15
|
-
Yjk3ZWFlYWU1MWZlOGE1MGE3NDE3ZDgyOGI3MDc3YWY3MmM1ZGE=
|