zero-clipboard-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +120 -0
- data/LICENSE +19 -0
- data/README.md +5 -0
- data/Rakefile +2 -0
- data/lib/zero-clipboard-rails.rb +1 -0
- data/lib/zero_clipboard/rails/engine.rb +6 -0
- data/lib/zero_clipboard/rails/version.rb +6 -0
- data/lib/zero_clipboard/rails.rb +6 -0
- data/vendor/assets/images/zero_clipboard/ZeroClipboard.swf +0 -0
- data/vendor/assets/images/zero_clipboard/ZeroClipboard10.swf +0 -0
- data/vendor/assets/javascripts/zero-clipboard/zero-clipboard.js +311 -0
- data/vendor/assets/javascripts/zero-clipboard.js +3 -0
- data/zero-clipboard-rails.gemspec +24 -0
- metadata +107 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
source :gemcutter
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in jquery-rails.gemspec
|
4
|
+
gemspec
|
5
|
+
# Rails is already being pulled in through gemspec
|
6
|
+
gem "rails", :git => "git://github.com/rails/rails.git", :branch => "3-1-stable"
|
7
|
+
gem "rack", :git => "git://github.com/rack/rack.git"
|
8
|
+
gem "sprockets", :git => "git://github.com/sstephenson/sprockets.git"
|
9
|
+
gem "i18n", "0.6.0beta1"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/rack/rack.git
|
3
|
+
revision: a9beb476b27914794743d0677b327d5bafb5e8a3
|
4
|
+
specs:
|
5
|
+
rack (1.2.1)
|
6
|
+
|
7
|
+
GIT
|
8
|
+
remote: git://github.com/rails/rails.git
|
9
|
+
revision: 2fbbd08616c25dc2931eca914349dd2161766f69
|
10
|
+
specs:
|
11
|
+
actionmailer (3.1.0.beta)
|
12
|
+
actionpack (= 3.1.0.beta)
|
13
|
+
mail (~> 2.3.0)
|
14
|
+
actionpack (3.1.0.beta)
|
15
|
+
activemodel (= 3.1.0.beta)
|
16
|
+
activesupport (= 3.1.0.beta)
|
17
|
+
builder (~> 3.0.0)
|
18
|
+
erubis (~> 2.7.0)
|
19
|
+
i18n (~> 0.6.0beta1)
|
20
|
+
rack (~> 1.2.1)
|
21
|
+
rack-cache (~> 1.0.0)
|
22
|
+
rack-mount (~> 0.7.2)
|
23
|
+
rack-test (~> 0.5.7)
|
24
|
+
sprockets (~> 2.0.0.beta.2)
|
25
|
+
tzinfo (~> 0.3.23)
|
26
|
+
activemodel (3.1.0.beta)
|
27
|
+
activesupport (= 3.1.0.beta)
|
28
|
+
bcrypt-ruby (~> 2.1.4)
|
29
|
+
builder (~> 3.0.0)
|
30
|
+
i18n (~> 0.6.0beta1)
|
31
|
+
activerecord (3.1.0.beta)
|
32
|
+
activemodel (= 3.1.0.beta)
|
33
|
+
activesupport (= 3.1.0.beta)
|
34
|
+
arel (~> 2.1.0)
|
35
|
+
tzinfo (~> 0.3.23)
|
36
|
+
activeresource (3.1.0.beta)
|
37
|
+
activemodel (= 3.1.0.beta)
|
38
|
+
activesupport (= 3.1.0.beta)
|
39
|
+
activesupport (3.1.0.beta)
|
40
|
+
multi_json (~> 1.0.0)
|
41
|
+
rails (3.1.0.beta)
|
42
|
+
actionmailer (= 3.1.0.beta)
|
43
|
+
actionpack (= 3.1.0.beta)
|
44
|
+
activerecord (= 3.1.0.beta)
|
45
|
+
activeresource (= 3.1.0.beta)
|
46
|
+
activesupport (= 3.1.0.beta)
|
47
|
+
bundler (~> 1.0)
|
48
|
+
railties (= 3.1.0.beta)
|
49
|
+
railties (3.1.0.beta)
|
50
|
+
actionpack (= 3.1.0.beta)
|
51
|
+
activesupport (= 3.1.0.beta)
|
52
|
+
rack-ssl (~> 1.3.2)
|
53
|
+
rake (>= 0.8.7)
|
54
|
+
thor (~> 0.14.4)
|
55
|
+
|
56
|
+
GIT
|
57
|
+
remote: git://github.com/sstephenson/sprockets.git
|
58
|
+
revision: c4800417792744c11eb1fb888bbe9a3a82859952
|
59
|
+
specs:
|
60
|
+
sprockets (2.0.0.beta.2)
|
61
|
+
hike (~> 1.0)
|
62
|
+
rack (~> 1.0)
|
63
|
+
tilt (~> 1.0)
|
64
|
+
|
65
|
+
PATH
|
66
|
+
remote: .
|
67
|
+
specs:
|
68
|
+
jquery-rails (0.3)
|
69
|
+
rails (~> 3.1)
|
70
|
+
thor (~> 0.14.4)
|
71
|
+
|
72
|
+
GEM
|
73
|
+
remote: http://rubygems.org/
|
74
|
+
specs:
|
75
|
+
addressable (2.2.4)
|
76
|
+
arel (2.1.0)
|
77
|
+
bcrypt-ruby (2.1.4)
|
78
|
+
builder (3.0.0)
|
79
|
+
crack (0.1.8)
|
80
|
+
erubis (2.7.0)
|
81
|
+
hike (1.0.0)
|
82
|
+
i18n (0.6.0beta1)
|
83
|
+
mail (2.3.0)
|
84
|
+
i18n (>= 0.4.0)
|
85
|
+
mime-types (~> 1.16)
|
86
|
+
treetop (~> 1.4.8)
|
87
|
+
mime-types (1.16)
|
88
|
+
multi_json (1.0.0)
|
89
|
+
polyglot (0.3.1)
|
90
|
+
rack-cache (1.0.1)
|
91
|
+
rack (>= 0.4)
|
92
|
+
rack-mount (0.7.2)
|
93
|
+
rack (>= 1.0.0)
|
94
|
+
rack-ssl (1.3.2)
|
95
|
+
rack
|
96
|
+
rack-test (0.5.7)
|
97
|
+
rack (>= 1.0)
|
98
|
+
rake (0.8.7)
|
99
|
+
rspec (1.3.1)
|
100
|
+
thor (0.14.6)
|
101
|
+
tilt (1.3)
|
102
|
+
treetop (1.4.9)
|
103
|
+
polyglot (>= 0.3.1)
|
104
|
+
tzinfo (0.3.27)
|
105
|
+
webmock (1.6.2)
|
106
|
+
addressable (>= 2.2.2)
|
107
|
+
crack (>= 0.1.7)
|
108
|
+
|
109
|
+
PLATFORMS
|
110
|
+
ruby
|
111
|
+
|
112
|
+
DEPENDENCIES
|
113
|
+
bundler (~> 1.0.0)
|
114
|
+
i18n (= 0.6.0beta1)
|
115
|
+
jquery-rails!
|
116
|
+
rack!
|
117
|
+
rails!
|
118
|
+
rspec (~> 1.3)
|
119
|
+
sprockets!
|
120
|
+
webmock (~> 1.6.2)
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2011 Nick Ragaz
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'zero_clipboard/rails'
|
Binary file
|
Binary file
|
@@ -0,0 +1,311 @@
|
|
1
|
+
// Simple Set Clipboard System
|
2
|
+
// Author: Joseph Huckaby
|
3
|
+
|
4
|
+
var ZeroClipboard = {
|
5
|
+
|
6
|
+
version: "1.0.7",
|
7
|
+
clients: {}, // registered upload clients on page, indexed by id
|
8
|
+
moviePath: 'ZeroClipboard.swf', // URL to movie
|
9
|
+
nextId: 1, // ID of next movie
|
10
|
+
|
11
|
+
$: function(thingy) {
|
12
|
+
// simple DOM lookup utility function
|
13
|
+
if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
|
14
|
+
if (!thingy.addClass) {
|
15
|
+
// extend element with a few useful methods
|
16
|
+
thingy.hide = function() { this.style.display = 'none'; };
|
17
|
+
thingy.show = function() { this.style.display = ''; };
|
18
|
+
thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
|
19
|
+
thingy.removeClass = function(name) {
|
20
|
+
var classes = this.className.split(/\s+/);
|
21
|
+
var idx = -1;
|
22
|
+
for (var k = 0; k < classes.length; k++) {
|
23
|
+
if (classes[k] == name) { idx = k; k = classes.length; }
|
24
|
+
}
|
25
|
+
if (idx > -1) {
|
26
|
+
classes.splice( idx, 1 );
|
27
|
+
this.className = classes.join(' ');
|
28
|
+
}
|
29
|
+
return this;
|
30
|
+
};
|
31
|
+
thingy.hasClass = function(name) {
|
32
|
+
return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
|
33
|
+
};
|
34
|
+
}
|
35
|
+
return thingy;
|
36
|
+
},
|
37
|
+
|
38
|
+
setMoviePath: function(path) {
|
39
|
+
// set path to ZeroClipboard.swf
|
40
|
+
this.moviePath = path;
|
41
|
+
},
|
42
|
+
|
43
|
+
dispatch: function(id, eventName, args) {
|
44
|
+
// receive event from flash movie, send to client
|
45
|
+
var client = this.clients[id];
|
46
|
+
if (client) {
|
47
|
+
client.receiveEvent(eventName, args);
|
48
|
+
}
|
49
|
+
},
|
50
|
+
|
51
|
+
register: function(id, client) {
|
52
|
+
// register new client to receive events
|
53
|
+
this.clients[id] = client;
|
54
|
+
},
|
55
|
+
|
56
|
+
getDOMObjectPosition: function(obj, stopObj) {
|
57
|
+
// get absolute coordinates for dom element
|
58
|
+
var info = {
|
59
|
+
left: 0,
|
60
|
+
top: 0,
|
61
|
+
width: obj.width ? obj.width : obj.offsetWidth,
|
62
|
+
height: obj.height ? obj.height : obj.offsetHeight
|
63
|
+
};
|
64
|
+
|
65
|
+
while (obj && (obj != stopObj)) {
|
66
|
+
info.left += obj.offsetLeft;
|
67
|
+
info.top += obj.offsetTop;
|
68
|
+
obj = obj.offsetParent;
|
69
|
+
}
|
70
|
+
|
71
|
+
return info;
|
72
|
+
},
|
73
|
+
|
74
|
+
Client: function(elem) {
|
75
|
+
// constructor for new simple upload client
|
76
|
+
this.handlers = {};
|
77
|
+
|
78
|
+
// unique ID
|
79
|
+
this.id = ZeroClipboard.nextId++;
|
80
|
+
this.movieId = 'ZeroClipboardMovie_' + this.id;
|
81
|
+
|
82
|
+
// register client with singleton to receive flash events
|
83
|
+
ZeroClipboard.register(this.id, this);
|
84
|
+
|
85
|
+
// create movie
|
86
|
+
if (elem) this.glue(elem);
|
87
|
+
}
|
88
|
+
};
|
89
|
+
|
90
|
+
ZeroClipboard.Client.prototype = {
|
91
|
+
|
92
|
+
id: 0, // unique ID for us
|
93
|
+
ready: false, // whether movie is ready to receive events or not
|
94
|
+
movie: null, // reference to movie object
|
95
|
+
clipText: '', // text to copy to clipboard
|
96
|
+
handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
|
97
|
+
cssEffects: true, // enable CSS mouse effects on dom container
|
98
|
+
handlers: null, // user event handlers
|
99
|
+
|
100
|
+
glue: function(elem, appendElem, stylesToAdd) {
|
101
|
+
// glue to DOM element
|
102
|
+
// elem can be ID or actual DOM element object
|
103
|
+
this.domElement = ZeroClipboard.$(elem);
|
104
|
+
|
105
|
+
// float just above object, or zIndex 99 if dom element isn't set
|
106
|
+
var zIndex = 99;
|
107
|
+
if (this.domElement.style.zIndex) {
|
108
|
+
zIndex = parseInt(this.domElement.style.zIndex, 10) + 1;
|
109
|
+
}
|
110
|
+
|
111
|
+
if (typeof(appendElem) == 'string') {
|
112
|
+
appendElem = ZeroClipboard.$(appendElem);
|
113
|
+
}
|
114
|
+
else if (typeof(appendElem) == 'undefined') {
|
115
|
+
appendElem = document.getElementsByTagName('body')[0];
|
116
|
+
}
|
117
|
+
|
118
|
+
// find X/Y position of domElement
|
119
|
+
var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem);
|
120
|
+
|
121
|
+
// create floating DIV above element
|
122
|
+
this.div = document.createElement('div');
|
123
|
+
var style = this.div.style;
|
124
|
+
style.position = 'absolute';
|
125
|
+
style.left = '' + box.left + 'px';
|
126
|
+
style.top = '' + box.top + 'px';
|
127
|
+
style.width = '' + box.width + 'px';
|
128
|
+
style.height = '' + box.height + 'px';
|
129
|
+
style.zIndex = zIndex;
|
130
|
+
|
131
|
+
if (typeof(stylesToAdd) == 'object') {
|
132
|
+
for (addedStyle in stylesToAdd) {
|
133
|
+
style[addedStyle] = stylesToAdd[addedStyle];
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
// style.backgroundColor = '#f00'; // debug
|
138
|
+
|
139
|
+
appendElem.appendChild(this.div);
|
140
|
+
|
141
|
+
this.div.innerHTML = this.getHTML( box.width, box.height );
|
142
|
+
},
|
143
|
+
|
144
|
+
getHTML: function(width, height) {
|
145
|
+
// return HTML for movie
|
146
|
+
var html = '';
|
147
|
+
var flashvars = 'id=' + this.id +
|
148
|
+
'&width=' + width +
|
149
|
+
'&height=' + height;
|
150
|
+
|
151
|
+
if (navigator.userAgent.match(/MSIE/)) {
|
152
|
+
// IE gets an OBJECT tag
|
153
|
+
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
|
154
|
+
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
|
155
|
+
}
|
156
|
+
else {
|
157
|
+
// all other browsers get an EMBED tag
|
158
|
+
html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
|
159
|
+
}
|
160
|
+
return html;
|
161
|
+
},
|
162
|
+
|
163
|
+
hide: function() {
|
164
|
+
// temporarily hide floater offscreen
|
165
|
+
if (this.div) {
|
166
|
+
this.div.style.left = '-2000px';
|
167
|
+
}
|
168
|
+
},
|
169
|
+
|
170
|
+
show: function() {
|
171
|
+
// show ourselves after a call to hide()
|
172
|
+
this.reposition();
|
173
|
+
},
|
174
|
+
|
175
|
+
destroy: function() {
|
176
|
+
// destroy control and floater
|
177
|
+
if (this.domElement && this.div) {
|
178
|
+
this.hide();
|
179
|
+
this.div.innerHTML = '';
|
180
|
+
|
181
|
+
var body = document.getElementsByTagName('body')[0];
|
182
|
+
try { body.removeChild( this.div ); } catch(e) {;}
|
183
|
+
|
184
|
+
this.domElement = null;
|
185
|
+
this.div = null;
|
186
|
+
}
|
187
|
+
},
|
188
|
+
|
189
|
+
reposition: function(elem) {
|
190
|
+
// reposition our floating div, optionally to new container
|
191
|
+
// warning: container CANNOT change size, only position
|
192
|
+
if (elem) {
|
193
|
+
this.domElement = ZeroClipboard.$(elem);
|
194
|
+
if (!this.domElement) this.hide();
|
195
|
+
}
|
196
|
+
|
197
|
+
if (this.domElement && this.div) {
|
198
|
+
var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
|
199
|
+
var style = this.div.style;
|
200
|
+
style.left = '' + box.left + 'px';
|
201
|
+
style.top = '' + box.top + 'px';
|
202
|
+
}
|
203
|
+
},
|
204
|
+
|
205
|
+
setText: function(newText) {
|
206
|
+
// set text to be copied to clipboard
|
207
|
+
this.clipText = newText;
|
208
|
+
if (this.ready) this.movie.setText(newText);
|
209
|
+
},
|
210
|
+
|
211
|
+
addEventListener: function(eventName, func) {
|
212
|
+
// add user event listener for event
|
213
|
+
// event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
|
214
|
+
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
|
215
|
+
if (!this.handlers[eventName]) this.handlers[eventName] = [];
|
216
|
+
this.handlers[eventName].push(func);
|
217
|
+
},
|
218
|
+
|
219
|
+
setHandCursor: function(enabled) {
|
220
|
+
// enable hand cursor (true), or default arrow cursor (false)
|
221
|
+
this.handCursorEnabled = enabled;
|
222
|
+
if (this.ready) this.movie.setHandCursor(enabled);
|
223
|
+
},
|
224
|
+
|
225
|
+
setCSSEffects: function(enabled) {
|
226
|
+
// enable or disable CSS effects on DOM container
|
227
|
+
this.cssEffects = !!enabled;
|
228
|
+
},
|
229
|
+
|
230
|
+
receiveEvent: function(eventName, args) {
|
231
|
+
// receive event from flash
|
232
|
+
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
|
233
|
+
|
234
|
+
// special behavior for certain events
|
235
|
+
switch (eventName) {
|
236
|
+
case 'load':
|
237
|
+
// movie claims it is ready, but in IE this isn't always the case...
|
238
|
+
// bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
|
239
|
+
this.movie = document.getElementById(this.movieId);
|
240
|
+
if (!this.movie) {
|
241
|
+
var self = this;
|
242
|
+
setTimeout( function() { self.receiveEvent('load', null); }, 1 );
|
243
|
+
return;
|
244
|
+
}
|
245
|
+
|
246
|
+
// firefox on pc needs a "kick" in order to set these in certain cases
|
247
|
+
if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
|
248
|
+
var self = this;
|
249
|
+
setTimeout( function() { self.receiveEvent('load', null); }, 100 );
|
250
|
+
this.ready = true;
|
251
|
+
return;
|
252
|
+
}
|
253
|
+
|
254
|
+
this.ready = true;
|
255
|
+
this.movie.setText( this.clipText );
|
256
|
+
this.movie.setHandCursor( this.handCursorEnabled );
|
257
|
+
break;
|
258
|
+
|
259
|
+
case 'mouseover':
|
260
|
+
if (this.domElement && this.cssEffects) {
|
261
|
+
this.domElement.addClass('hover');
|
262
|
+
if (this.recoverActive) this.domElement.addClass('active');
|
263
|
+
}
|
264
|
+
break;
|
265
|
+
|
266
|
+
case 'mouseout':
|
267
|
+
if (this.domElement && this.cssEffects) {
|
268
|
+
this.recoverActive = false;
|
269
|
+
if (this.domElement.hasClass('active')) {
|
270
|
+
this.domElement.removeClass('active');
|
271
|
+
this.recoverActive = true;
|
272
|
+
}
|
273
|
+
this.domElement.removeClass('hover');
|
274
|
+
}
|
275
|
+
break;
|
276
|
+
|
277
|
+
case 'mousedown':
|
278
|
+
if (this.domElement && this.cssEffects) {
|
279
|
+
this.domElement.addClass('active');
|
280
|
+
}
|
281
|
+
break;
|
282
|
+
|
283
|
+
case 'mouseup':
|
284
|
+
if (this.domElement && this.cssEffects) {
|
285
|
+
this.domElement.removeClass('active');
|
286
|
+
this.recoverActive = false;
|
287
|
+
}
|
288
|
+
break;
|
289
|
+
} // switch eventName
|
290
|
+
|
291
|
+
if (this.handlers[eventName]) {
|
292
|
+
for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
|
293
|
+
var func = this.handlers[eventName][idx];
|
294
|
+
|
295
|
+
if (typeof(func) == 'function') {
|
296
|
+
// actual function reference
|
297
|
+
func(this, args);
|
298
|
+
}
|
299
|
+
else if ((typeof(func) == 'object') && (func.length == 2)) {
|
300
|
+
// PHP style object + method, i.e. [myObject, 'myMethod']
|
301
|
+
func[0][ func[1] ](this, args);
|
302
|
+
}
|
303
|
+
else if (typeof(func) == 'string') {
|
304
|
+
// name of function
|
305
|
+
window[func](this, args);
|
306
|
+
}
|
307
|
+
} // foreach event handler defined
|
308
|
+
} // user defined handler for event
|
309
|
+
}
|
310
|
+
|
311
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/zero_clipboard/rails/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "zero-clipboard-rails"
|
6
|
+
s.version = ZeroClipboard::Rails::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Nick Ragaz"]
|
9
|
+
s.email = ["nick.ragaz@gmail.com"]
|
10
|
+
s.homepage = "http://rubygems.org/gems/zero-clipboard-rails"
|
11
|
+
s.summary = "Use the Zero Clipboard Javascript/Flash library with Rails 3.1"
|
12
|
+
s.description = "This gem provides the Zero Clipboard Javascript/Flash library for your Rails 3.1 application."
|
13
|
+
|
14
|
+
s.required_rubygems_version = ">= 1.3.6"
|
15
|
+
|
16
|
+
s.add_dependency "railties", "~> 3.0"
|
17
|
+
s.add_dependency "thor", "~> 0.14"
|
18
|
+
s.add_development_dependency "bundler", "~> 1.0.0"
|
19
|
+
s.add_development_dependency "rails", "~> 3.0"
|
20
|
+
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.executables = `git ls-files`.split("\n").select{|f| f =~ /^bin/}
|
23
|
+
s.require_path = 'lib'
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: zero-clipboard-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Nick Ragaz
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-06-30 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: railties
|
17
|
+
requirement: &2160891560 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *2160891560
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: thor
|
28
|
+
requirement: &2160891100 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.14'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *2160891100
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bundler
|
39
|
+
requirement: &2160890640 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 1.0.0
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *2160890640
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rails
|
50
|
+
requirement: &2160890180 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *2160890180
|
59
|
+
description: This gem provides the Zero Clipboard Javascript/Flash library for your
|
60
|
+
Rails 3.1 application.
|
61
|
+
email:
|
62
|
+
- nick.ragaz@gmail.com
|
63
|
+
executables: []
|
64
|
+
extensions: []
|
65
|
+
extra_rdoc_files: []
|
66
|
+
files:
|
67
|
+
- .gitignore
|
68
|
+
- Gemfile
|
69
|
+
- Gemfile.lock
|
70
|
+
- LICENSE
|
71
|
+
- README.md
|
72
|
+
- Rakefile
|
73
|
+
- lib/zero-clipboard-rails.rb
|
74
|
+
- lib/zero_clipboard/rails.rb
|
75
|
+
- lib/zero_clipboard/rails/engine.rb
|
76
|
+
- lib/zero_clipboard/rails/version.rb
|
77
|
+
- vendor/assets/images/zero_clipboard/ZeroClipboard.swf
|
78
|
+
- vendor/assets/images/zero_clipboard/ZeroClipboard10.swf
|
79
|
+
- vendor/assets/javascripts/zero-clipboard.js
|
80
|
+
- vendor/assets/javascripts/zero-clipboard/zero-clipboard.js
|
81
|
+
- zero-clipboard-rails.gemspec
|
82
|
+
has_rdoc: true
|
83
|
+
homepage: http://rubygems.org/gems/zero-clipboard-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: 1.3.6
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project:
|
103
|
+
rubygems_version: 1.6.2
|
104
|
+
signing_key:
|
105
|
+
specification_version: 3
|
106
|
+
summary: Use the Zero Clipboard Javascript/Flash library with Rails 3.1
|
107
|
+
test_files: []
|