facebook-stub 0.0.1.4 → 0.0.1.6
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.
- data/.gitignore +1 -0
- data/.rspec +2 -0
- data/Rakefile +23 -0
- data/facebook-stub.gemspec +12 -4
- data/lib/facebook-stub.js +5 -0
- data/lib/facebook-stub.rb +1 -54
- data/lib/facebook_stub.rb +55 -0
- data/{src/libs → lib/facebook_stub}/base64_encode.js +0 -0
- data/{src/libs → lib/facebook_stub}/cookie.js +0 -0
- data/{src/facebook.js → lib/facebook_stub/core.js} +100 -62
- data/lib/facebook_stub/rails/action_view_helper.rb +10 -0
- data/{src/libs → lib/facebook_stub}/sha256.js +0 -0
- data/{src/libs → lib/facebook_stub}/utf8_encode.js +0 -0
- data/lib/facebook_stub/version.rb +3 -0
- data/spec/acceptance/facebook-stub_spec.rb +301 -0
- data/spec/spec_helper.rb +41 -0
- data/test/config.ru +3 -0
- data/test/server.rb +20 -0
- data/test/views/test.haml +20 -0
- metadata +173 -62
- data/builder/concat +0 -8
- data/facebook-stub.js +0 -707
- data/lib/facebook-stub/rails/action_view_helper.rb +0 -20
- data/lib/facebook-stub/version.rb +0 -5
- data/test/test.html +0 -19
@@ -1,20 +0,0 @@
|
|
1
|
-
module Facebook
|
2
|
-
module Stub
|
3
|
-
module Rails
|
4
|
-
module ActionViewHelper
|
5
|
-
@@facebook_javascript_stub = nil
|
6
|
-
def include_facebook_stub
|
7
|
-
@@facebook_javascript_stub ||= begin
|
8
|
-
data = ''
|
9
|
-
f = File.open(File.join(*([File.dirname(__FILE__)] + ['..'] * 3 + ['facebook-stub.js'])))
|
10
|
-
f.each_line do |line|
|
11
|
-
data << line
|
12
|
-
end
|
13
|
-
f.close
|
14
|
-
javascript_tag data
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
data/test/test.html
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<script src="../facebook-stub.js" type="text/javascript" charset="utf-8"></script>
|
4
|
-
<script type="text/javascript" charset="utf-8">
|
5
|
-
FB.init({appId: 12345});
|
6
|
-
FBWorld.setSecret('awesome');
|
7
|
-
FBWorld.loggedIn();
|
8
|
-
FBWorld.connected();
|
9
|
-
</script>
|
10
|
-
</head>
|
11
|
-
<body>
|
12
|
-
<h1>Facebook Test</h1>
|
13
|
-
|
14
|
-
<p>
|
15
|
-
Warning: If you are accessing this from a file:// url, it <span style="color: #f00">will <span style="font-size: 150%">FAIL</span></span>!
|
16
|
-
</p>
|
17
|
-
|
18
|
-
</body>
|
19
|
-
</html>
|