magickly 1.2.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +6 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +22 -22
- data/HISTORY.md +22 -0
- data/README.md +60 -32
- data/Rakefile +2 -3
- data/VERSION +1 -1
- data/lib/dragonfly/data_storage/remote_data_store.rb +1 -3
- data/lib/magickly.rb +3 -0
- data/lib/magickly/app.rb +44 -20
- data/lib/public/images/logo.jpg +0 -0
- data/lib/public/jquery-ui.smoothness.css +568 -0
- data/lib/public/magickly_demo.js +85 -0
- data/lib/public/style.css +83 -0
- data/lib/shortcuts.rb +6 -0
- data/lib/views/analyzers.erb +6 -0
- data/lib/views/index.erb +38 -0
- data/magickly.gemspec +10 -16
- data/spec/requests/magickly_app_spec.rb +19 -3
- data/spec/unit/shortcut_spec.rb +22 -0
- metadata +32 -62
- data/bin/magickly +0 -12
- data/lib/views/analyzers.haml +0 -3
- data/lib/views/index.haml +0 -55
data/bin/magickly
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'magickly'
|
5
|
-
rescue LoadError => e
|
6
|
-
require 'rubygems'
|
7
|
-
path = File.expand_path '../../lib', __FILE__
|
8
|
-
$:.unshift(path) if File.directory?(path) && !$:.include?(path)
|
9
|
-
require 'magickly'
|
10
|
-
end
|
11
|
-
|
12
|
-
Magickly::App.run!
|
data/lib/views/analyzers.haml
DELETED
data/lib/views/index.haml
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
!!!
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%title Magickly Demo Page
|
5
|
-
%script{:type => 'text/javascript', :src => 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'}
|
6
|
-
:javascript
|
7
|
-
function updateResult(){
|
8
|
-
var query = [];
|
9
|
-
var params = $('#params').val();
|
10
|
-
if (params) {
|
11
|
-
query.push(params);
|
12
|
-
}
|
13
|
-
query.push('src=' + $('#src-img').val());
|
14
|
-
|
15
|
-
var resultUrl = '?' + query.join('&');
|
16
|
-
$('#result-url').val(location + resultUrl);
|
17
|
-
$('#result-image').attr('src', resultUrl);
|
18
|
-
}
|
19
|
-
|
20
|
-
$(function(){
|
21
|
-
updateResult();
|
22
|
-
$('#src-img').change(updateResult);
|
23
|
-
$('#params').change(updateResult);
|
24
|
-
});
|
25
|
-
|
26
|
-
var _gaq = _gaq || [];
|
27
|
-
_gaq.push(['_setAccount', 'UA-22837777-1']);
|
28
|
-
_gaq.push(['_trackPageview']);
|
29
|
-
|
30
|
-
(function() {
|
31
|
-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
32
|
-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
33
|
-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
34
|
-
})();
|
35
|
-
|
36
|
-
%body
|
37
|
-
%h1 Welcome to Magickly
|
38
|
-
More info on the
|
39
|
-
%a{:href => "https://github.com/afeld/magickly"} Github project page
|
40
|
-
%br
|
41
|
-
%br
|
42
|
-
%label Image URL:
|
43
|
-
%input#src-img{:size => 80, :value => Magickly::App::DEMO_IMAGE}
|
44
|
-
%br
|
45
|
-
%label Params:
|
46
|
-
%input#params{:size => 80, :value => "resize=200x"}
|
47
|
-
%br
|
48
|
-
%strong Available methods:
|
49
|
-
= @methods.join(', ')
|
50
|
-
%br
|
51
|
-
%br
|
52
|
-
%label Result URL:
|
53
|
-
%input#result-url{:size => 80}
|
54
|
-
%br
|
55
|
-
%img#result-image
|