magickly 1.2.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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!
@@ -1,3 +0,0 @@
1
- - @analyzers.each do |analyzer|
2
- %a{:href => "/analyze/#{analyzer.to_s.chomp('?')}?src=#{Magickly::App::DEMO_IMAGE}"}= analyzer
3
- %br
@@ -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