scriptcam-rails 0.0.1
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 +7 -0
- data/.travis.yml +11 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +26 -0
- data/Rakefile +2 -0
- data/lib/scriptcam-rails.rb +2 -0
- data/lib/scriptcam-rails/engine.rb +7 -0
- data/lib/scriptcam-rails/version.rb +5 -0
- data/scriptcam-rails.gemspec +21 -0
- data/vendor/assets/javascripts/scriptcam.js +174 -0
- data/vendor/assets/javascripts/scriptcam.min.js +1 -0
- data/vendor/assets/javascripts/swfobject.js +4 -0
- data/vendor/assets/swfs/scriptcam.swf +0 -0
- metadata +108 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- "1.8.7"
|
4
|
+
- "1.9.2"
|
5
|
+
- "1.9.3"
|
6
|
+
- jruby-18mode # JRuby in 1.8 mode
|
7
|
+
- jruby-19mode # JRuby in 1.9 mode
|
8
|
+
- rbx-18mode
|
9
|
+
- rbx-19mode
|
10
|
+
# uncomment this line if your project needs to run something other than `rake`:
|
11
|
+
# # script: bundle exec rspec spec
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Eduardo Maia
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Scriptcam::Rails
|
2
|
+
|
3
|
+
[ScriptCam](http://www.scriptcam.com/) is a popular JQuery plugin to manipulate webcams. Take snapshots, detect movement, faces, colors, QR and barcodes, record videoclips, show Augmented Reality 3D objects and organize videochats.
|
4
|
+
|
5
|
+
By the way, it's free for non-commercial use!
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
This gem vendors ScriptCam 1.2.2 for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use.
|
10
|
+
|
11
|
+
To enable, add the following line to the file app/assets/javascripts/application.js (or other sprockets manifest):
|
12
|
+
|
13
|
+
//= require swfobject
|
14
|
+
//= require scriptcam
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
Add scriptcam-rails to your Gemfile, run bundle and enjoy!
|
19
|
+
|
20
|
+
## Contributing
|
21
|
+
|
22
|
+
1. Fork it
|
23
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
24
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
25
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
26
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/scriptcam-rails/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Eduardo Maia"]
|
6
|
+
gem.email = ["eduvimaia@gmail.com"]
|
7
|
+
gem.description = %q{ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!}
|
8
|
+
gem.summary = %q{ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!}
|
9
|
+
gem.homepage = "https://github.com/emaiax/scriptcam-rails"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "scriptcam-rails"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Scriptcam::Rails::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency "railties", "> 3.1.0"
|
19
|
+
gem.add_development_dependency "bundler", "~> 1.1.rc"
|
20
|
+
gem.add_development_dependency "rake", "~> 0.9.2"
|
21
|
+
end
|
@@ -0,0 +1,174 @@
|
|
1
|
+
// _____ _ _ _____
|
2
|
+
// / ___| (_) | | / __ \
|
3
|
+
// \ `--. ___ _ __ _ _ __ | |_| / \/ __ _ _ __ ___
|
4
|
+
// `--. \/ __| '__| | '_ \| __| | / _` | '_ ` _ \
|
5
|
+
// /\__/ / (__| | | | |_) | |_| \__/\ (_| | | | | | |
|
6
|
+
// \____/ \___|_| |_| .__/ \__|\____/\__,_|_| |_| |_|
|
7
|
+
// | |
|
8
|
+
// Version 1.1.7 |_| (c) Tele-Line Videotex Services
|
9
|
+
|
10
|
+
// Use jscompress.com to compress this file
|
11
|
+
|
12
|
+
;(function($) {
|
13
|
+
$.fn.scriptcam=function(options) {
|
14
|
+
// merge passed options with default values
|
15
|
+
var opts=$.extend({}, $.fn.scriptcam.defaults, options);
|
16
|
+
// off we go
|
17
|
+
return this.each(function() {
|
18
|
+
// add flash to div
|
19
|
+
opts.id=this.id; // add id of plugin to the options structure
|
20
|
+
data=opts; // pass options to jquery internal data field to make them available to the outside world
|
21
|
+
$('#'+opts.id).html(opts.noFlashFound); // inject no flash found message
|
22
|
+
// forward incoming flash movie calls to outgoing functions
|
23
|
+
$.scriptcam.SC_promptWillShow=data.promptWillShow;
|
24
|
+
$.scriptcam.SC_onMotion=data.onMotion;
|
25
|
+
$.scriptcam.SC_onError=data.onError;
|
26
|
+
$.scriptcam.SC_onWebcamReady=data.onWebcamReady;
|
27
|
+
$.scriptcam.SC_connected=data.connected;
|
28
|
+
$.scriptcam.SC_onPictureAsBase64=data.onPictureAsBase64;
|
29
|
+
$.scriptcam.SC_disconnected=data.disconnected;
|
30
|
+
$.scriptcam.SC_setVolume=data.setVolume;
|
31
|
+
$.scriptcam.SC_timeLeft=data.timeLeft;
|
32
|
+
$.scriptcam.SC_addChatText=function(value) {
|
33
|
+
value = value.replace(":{", '<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');
|
34
|
+
value = value.replace(":-{", '<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');
|
35
|
+
value = value.replace(":)", '<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');
|
36
|
+
value = value.replace(":-)", '<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');
|
37
|
+
value = value.replace(":D", '<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');
|
38
|
+
value = value.replace(":-D", '<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');
|
39
|
+
value = value.replace(":O", '<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');
|
40
|
+
value = value.replace(":-O", '<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');
|
41
|
+
value = value.replace(":(", '<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');
|
42
|
+
value = value.replace(":-(", '<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');
|
43
|
+
value = value.replace(":p", '<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');
|
44
|
+
value = value.replace(":-p", '<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');
|
45
|
+
value = value.replace(";)", '<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');
|
46
|
+
value = value.replace(";-)", '<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');
|
47
|
+
$('#'+data.chatWindow).append(value+'<br/>');
|
48
|
+
$('#'+data.chatWindow).animate({ scrollTop: $('#'+data.chatWindow).prop("scrollHeight") - $('#'+data.chatWindow).height() }, 100);
|
49
|
+
}
|
50
|
+
var newWidth=opts.width;
|
51
|
+
if (opts.chatRoom) {
|
52
|
+
newWidth=(newWidth*2)+5; // make room for two video windows with a margin of 5 when chatting
|
53
|
+
}
|
54
|
+
if (opts.chatRoom || opts.fileName || opts.daeFilename) {
|
55
|
+
// use GPU acceleration when recording, chatting or AR
|
56
|
+
var params = {
|
57
|
+
menu: 'false',
|
58
|
+
wmode: 'direct'
|
59
|
+
};
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
// enable HTML overlay when in snapshot mode
|
63
|
+
var params = {
|
64
|
+
menu: 'false',
|
65
|
+
wmode: 'transparent'
|
66
|
+
};
|
67
|
+
}
|
68
|
+
// Escape all values contained in the flashVars (IE needs this)
|
69
|
+
for (var key in opts) {
|
70
|
+
opts[key] = encodeURIComponent(opts[key]);
|
71
|
+
};
|
72
|
+
swfobject.embedSWF('/assets/scriptcam.swf', opts.id, newWidth, opts.height, '11.4', false, opts, params);
|
73
|
+
});
|
74
|
+
};
|
75
|
+
|
76
|
+
$.scriptcam={};
|
77
|
+
|
78
|
+
// outgoing functions (calling the flash movie)
|
79
|
+
|
80
|
+
$.scriptcam.getFrameAsBase64=function() {
|
81
|
+
return $('#'+data.id).get(0).SC_getFrameAsBase64();
|
82
|
+
}
|
83
|
+
|
84
|
+
$.scriptcam.version=function() {
|
85
|
+
return $('#'+data.id).get(0).SC_version();
|
86
|
+
}
|
87
|
+
|
88
|
+
$.scriptcam.getMotionParameters=function() {
|
89
|
+
$('#'+data.id).get(0).SC_getMotionParameters();
|
90
|
+
}
|
91
|
+
|
92
|
+
$.scriptcam.getBarCode=function() {
|
93
|
+
return $('#'+data.id).get(0).SC_getBarCode();
|
94
|
+
}
|
95
|
+
|
96
|
+
$.scriptcam.startRecording=function() {
|
97
|
+
$('#'+data.id).get(0).SC_startRecording();
|
98
|
+
}
|
99
|
+
|
100
|
+
$.scriptcam.closeCamera=function() {
|
101
|
+
$('#'+data.id).get(0).SC_closeCamera();
|
102
|
+
}
|
103
|
+
|
104
|
+
$.scriptcam.changeVolume=function(value) {
|
105
|
+
$('#'+data.id).get(0).SC_changeVolume(value);
|
106
|
+
}
|
107
|
+
|
108
|
+
$.scriptcam.sendMessage=function(value) {
|
109
|
+
$('#'+data.id).get(0).SC_sendMessage(value);
|
110
|
+
}
|
111
|
+
|
112
|
+
$.scriptcam.changeCamera=function(value) {
|
113
|
+
$('#'+data.id).get(0).SC_changeCamera(value);
|
114
|
+
}
|
115
|
+
|
116
|
+
$.scriptcam.changeMicrophone=function(value) {
|
117
|
+
$('#'+data.id).get(0).SC_changeMicrophone(value);
|
118
|
+
}
|
119
|
+
|
120
|
+
// set javascript default values (flash default values are managed in the swf file)
|
121
|
+
$.fn.scriptcam.defaults={
|
122
|
+
width:320,
|
123
|
+
height:240,
|
124
|
+
chatWindow:'chatWindow',
|
125
|
+
path:'',
|
126
|
+
noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software. Please click on the link to download the installer.</p>'
|
127
|
+
};
|
128
|
+
})(jQuery);
|
129
|
+
|
130
|
+
// incoming functions (calls coming from flash) - must be public and forward calls to the scriptcam plugin
|
131
|
+
|
132
|
+
function SC_onError(errorId,errorMsg) {
|
133
|
+
$.scriptcam.SC_onError(errorId,errorMsg);
|
134
|
+
}
|
135
|
+
|
136
|
+
function SC_onMotion(decodedString) {
|
137
|
+
$.scriptcam.SC_onMotion(decodedString);
|
138
|
+
}
|
139
|
+
|
140
|
+
function SC_promptWillShow() {
|
141
|
+
$.scriptcam.SC_promptWillShow();
|
142
|
+
}
|
143
|
+
|
144
|
+
function SC_onWebcamReady(cameraNames,camera,microphoneNames,microphone) {
|
145
|
+
$.scriptcam.SC_onWebcamReady(cameraNames,camera,microphoneNames,microphone);
|
146
|
+
}
|
147
|
+
|
148
|
+
function SC_onPictureAsBase64(value) {
|
149
|
+
$.scriptcam.SC_onPictureAsBase64(value);
|
150
|
+
}
|
151
|
+
|
152
|
+
function SC_connected() {
|
153
|
+
$.scriptcam.SC_connected();
|
154
|
+
}
|
155
|
+
|
156
|
+
function SC_disconnected() {
|
157
|
+
$.scriptcam.SC_disconnected();
|
158
|
+
}
|
159
|
+
|
160
|
+
function SC_setVolume(value) {
|
161
|
+
$.scriptcam.SC_setVolume(value);
|
162
|
+
}
|
163
|
+
|
164
|
+
function SC_onMotion(motion,brightness,color,facearea) {
|
165
|
+
$.scriptcam.SC_onMotion(motion,brightness,color,facearea);
|
166
|
+
}
|
167
|
+
|
168
|
+
function SC_timeLeft(value) {
|
169
|
+
$.scriptcam.SC_timeLeft(value);
|
170
|
+
}
|
171
|
+
|
172
|
+
function SC_addChatText(value) {
|
173
|
+
$.scriptcam.SC_addChatText(value);
|
174
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
function SC_onError(e,t){$.scriptcam.SC_onError(e,t)}function SC_onMotion(e){$.scriptcam.SC_onMotion(e)}function SC_promptWillShow(){$.scriptcam.SC_promptWillShow()}function SC_onWebcamReady(e,t,n,r){$.scriptcam.SC_onWebcamReady(e,t,n,r)}function SC_onPictureAsBase64(e){$.scriptcam.SC_onPictureAsBase64(e)}function SC_connected(){$.scriptcam.SC_connected()}function SC_disconnected(){$.scriptcam.SC_disconnected()}function SC_setVolume(e){$.scriptcam.SC_setVolume(e)}function SC_onMotion(e,t,n,r){$.scriptcam.SC_onMotion(e,t,n,r)}function SC_timeLeft(e){$.scriptcam.SC_timeLeft(e)}function SC_addChatText(e){$.scriptcam.SC_addChatText(e)}(function(e){e.fn.scriptcam=function(t){var n=e.extend({},e.fn.scriptcam.defaults,t);return this.each(function(){n.id=this.id;data=n;e("#"+n.id).html(n.noFlashFound);e.scriptcam.SC_promptWillShow=data.promptWillShow;e.scriptcam.SC_onMotion=data.onMotion;e.scriptcam.SC_onError=data.onError;e.scriptcam.SC_onWebcamReady=data.onWebcamReady;e.scriptcam.SC_connected=data.connected;e.scriptcam.SC_onPictureAsBase64=data.onPictureAsBase64;e.scriptcam.SC_disconnected=data.disconnected;e.scriptcam.SC_setVolume=data.setVolume;e.scriptcam.SC_timeLeft=data.timeLeft;e.scriptcam.SC_addChatText=function(t){t=t.replace(":{",'<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-{",'<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');t=t.replace(":)",'<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-)",'<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');t=t.replace(":D",'<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-D",'<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');t=t.replace(":O",'<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-O",'<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');t=t.replace(":(",'<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-(",'<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');t=t.replace(":p",'<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-p",'<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');t=t.replace(";)",'<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');t=t.replace(";-)",'<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');e("#"+data.chatWindow).append(t+"<br/>");e("#"+data.chatWindow).animate({scrollTop:e("#"+data.chatWindow).prop("scrollHeight")-e("#"+data.chatWindow).height()},100)};var t=n.width;if(n.chatRoom){t=t*2+5}if(n.chatRoom||n.fileName||n.daeFilename){var r={menu:"false",wmode:"direct"}}else{var r={menu:"false",wmode:"transparent"}}for(var i in n){n[i]=encodeURIComponent(n[i])}swfobject.embedSWF("/assets/scriptcam.swf",n.id,t,n.height,"11.4",false,n,r)})};e.scriptcam={};e.scriptcam.getFrameAsBase64=function(){return e("#"+data.id).get(0).SC_getFrameAsBase64()};e.scriptcam.version=function(){return e("#"+data.id).get(0).SC_version()};e.scriptcam.getMotionParameters=function(){e("#"+data.id).get(0).SC_getMotionParameters()};e.scriptcam.getBarCode=function(){return e("#"+data.id).get(0).SC_getBarCode()};e.scriptcam.startRecording=function(){e("#"+data.id).get(0).SC_startRecording()};e.scriptcam.closeCamera=function(){e("#"+data.id).get(0).SC_closeCamera()};e.scriptcam.changeVolume=function(t){e("#"+data.id).get(0).SC_changeVolume(t)};e.scriptcam.sendMessage=function(t){e("#"+data.id).get(0).SC_sendMessage(t)};e.scriptcam.changeCamera=function(t){e("#"+data.id).get(0).SC_changeCamera(t)};e.scriptcam.changeMicrophone=function(t){e("#"+data.id).get(0).SC_changeMicrophone(t)};e.fn.scriptcam.defaults={width:320,height:240,chatWindow:"chatWindow",path:"",noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.4</a> to use this software. Please click on the link to download the installer.</p>'}})(jQuery)
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
|
2
|
+
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
3
|
+
*/
|
4
|
+
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scriptcam-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Eduardo Maia
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: railties
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>'
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.1.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>'
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.1.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.1.rc
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.1.rc
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.9.2
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.2
|
62
|
+
description: ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!
|
63
|
+
email:
|
64
|
+
- eduvimaia@gmail.com
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .gitignore
|
70
|
+
- .travis.yml
|
71
|
+
- Gemfile
|
72
|
+
- LICENSE
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- lib/scriptcam-rails.rb
|
76
|
+
- lib/scriptcam-rails/engine.rb
|
77
|
+
- lib/scriptcam-rails/version.rb
|
78
|
+
- scriptcam-rails.gemspec
|
79
|
+
- vendor/assets/javascripts/scriptcam.js
|
80
|
+
- vendor/assets/javascripts/scriptcam.min.js
|
81
|
+
- vendor/assets/javascripts/swfobject.js
|
82
|
+
- vendor/assets/swfs/scriptcam.swf
|
83
|
+
homepage: https://github.com/emaiax/scriptcam-rails
|
84
|
+
licenses: []
|
85
|
+
post_install_message:
|
86
|
+
rdoc_options: []
|
87
|
+
require_paths:
|
88
|
+
- lib
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ! '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project:
|
103
|
+
rubygems_version: 1.8.24
|
104
|
+
signing_key:
|
105
|
+
specification_version: 3
|
106
|
+
summary: ScriptCam, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!
|
107
|
+
test_files: []
|
108
|
+
has_rdoc:
|