magickly 1.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0b16125227434d660dae173a1fc420cd068e538d
4
+ data.tar.gz: 6a9db22f4ac854b81f95ce2dc6dfd5b8a166226a
5
+ SHA512:
6
+ metadata.gz: 5c0e297e1d815622a3a65319891156aba93deb42c9bc8c70cd1c4e31a48a052a083928191c60f3f2ef400b39e3265bf8cf77d7c759a6f90ea12dc6a75c3d5d36
7
+ data.tar.gz: c6b78280e4fb7a621e481883e98c2aa7ffc409fc5dd204a27aaae266610d041af1a15927e85aece72d72eb449ae760bcfa8821be31331fe1e02cac6075a51ab2
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,8 @@
1
+ Add tests for any new feature, and ensure that they pass.
2
+
3
+ ## To run specs
4
+
5
+ ```bash
6
+ bundle install
7
+ rspec spec
8
+ ```
data/Gemfile CHANGED
@@ -1,21 +1,16 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'sinatra', '~> 1.2', :require => 'sinatra/base'
4
- gem 'dragonfly', '~> 0.9.5'
5
- gem 'addressable', '~> 2.2', :require => 'addressable/uri'
3
+ ruby '2.1.0' unless ENV['CI']
6
4
 
7
- gem 'httparty', '~> 0.8.1'
8
- gem 'activesupport', '>= 2.0.0', :require => false
5
+ gemspec
9
6
 
10
- group :development do
11
- gem 'jeweler', '~> 1.5'
12
- end
7
+ gem 'rack-cache', :require => 'rack/cache'
13
8
 
14
9
  group :development, :test do
15
10
  gem 'rack-test'
16
- gem 'rspec', '~> 2.4'
17
- gem 'webmock', '~> 1.6'
18
- gem 'imagesize', '~> 0.1'
11
+ gem 'rspec'
12
+ gem 'webmock'
13
+ gem 'fastimage'
19
14
  end
20
15
 
21
16
  group :production do
data/Gemfile.lock CHANGED
@@ -1,66 +1,77 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ magickly (1.4.0)
5
+ activesupport (>= 2.0.0)
6
+ addressable (~> 2.2)
7
+ dragonfly (~> 0.9.14)
8
+ httparty (~> 0.13)
9
+ sinatra (~> 1.2)
10
+
1
11
  GEM
2
- remote: http://rubygems.org/
12
+ remote: https://rubygems.org/
3
13
  specs:
4
- activesupport (3.2.0)
5
- i18n (~> 0.6)
14
+ activesupport (4.0.3)
15
+ i18n (~> 0.6, >= 0.6.4)
16
+ minitest (~> 4.2)
17
+ multi_json (~> 1.3)
18
+ thread_safe (~> 0.1)
19
+ tzinfo (~> 0.3.37)
20
+ addressable (2.3.5)
21
+ atomic (1.1.14)
22
+ crack (0.4.2)
23
+ safe_yaml (~> 1.0.0)
24
+ diff-lcs (1.2.5)
25
+ dragonfly (0.9.15)
6
26
  multi_json (~> 1.0)
7
- addressable (2.2.6)
8
- crack (0.3.1)
9
- diff-lcs (1.1.3)
10
- dragonfly (0.9.10)
11
27
  rack
12
- git (1.2.5)
13
- httparty (0.8.1)
14
- multi_json
15
- multi_xml
16
- i18n (0.6.0)
17
- imagesize (0.1.1)
18
- jeweler (1.8.3)
19
- bundler (~> 1.0)
20
- git (>= 1.2.5)
21
- rake
22
- rdoc
23
- json (1.6.5)
24
- multi_json (1.0.4)
25
- multi_xml (0.4.1)
26
- newrelic_rpm (3.3.1)
27
- rack (1.4.1)
28
- rack-protection (1.2.0)
28
+ fastimage (1.6.0)
29
+ addressable (~> 2.3, >= 2.3.5)
30
+ httparty (0.13.0)
31
+ json (~> 1.8)
32
+ multi_xml (>= 0.5.2)
33
+ i18n (0.6.9)
34
+ json (1.8.1)
35
+ minitest (4.7.5)
36
+ multi_json (1.8.4)
37
+ multi_xml (0.5.5)
38
+ newrelic_rpm (3.7.2.195)
39
+ rack (1.5.2)
40
+ rack-cache (1.2)
41
+ rack (>= 0.4)
42
+ rack-protection (1.5.2)
29
43
  rack
30
- rack-test (0.6.1)
44
+ rack-test (0.6.2)
31
45
  rack (>= 1.0)
32
- rake (0.9.2.2)
33
- rdoc (3.12)
34
- json (~> 1.4)
35
- rspec (2.8.0)
36
- rspec-core (~> 2.8.0)
37
- rspec-expectations (~> 2.8.0)
38
- rspec-mocks (~> 2.8.0)
39
- rspec-core (2.8.0)
40
- rspec-expectations (2.8.0)
41
- diff-lcs (~> 1.1.2)
42
- rspec-mocks (2.8.0)
43
- sinatra (1.3.2)
44
- rack (~> 1.3, >= 1.3.6)
45
- rack-protection (~> 1.2)
46
- tilt (~> 1.3, >= 1.3.3)
47
- tilt (1.3.3)
48
- webmock (1.7.10)
49
- addressable (~> 2.2, > 2.2.5)
50
- crack (>= 0.1.7)
46
+ rspec (2.14.1)
47
+ rspec-core (~> 2.14.0)
48
+ rspec-expectations (~> 2.14.0)
49
+ rspec-mocks (~> 2.14.0)
50
+ rspec-core (2.14.7)
51
+ rspec-expectations (2.14.5)
52
+ diff-lcs (>= 1.1.3, < 2.0)
53
+ rspec-mocks (2.14.5)
54
+ safe_yaml (1.0.1)
55
+ sinatra (1.4.4)
56
+ rack (~> 1.4)
57
+ rack-protection (~> 1.4)
58
+ tilt (~> 1.3, >= 1.3.4)
59
+ thread_safe (0.1.3)
60
+ atomic
61
+ tilt (1.4.1)
62
+ tzinfo (0.3.38)
63
+ webmock (1.17.3)
64
+ addressable (>= 2.2.7)
65
+ crack (>= 0.3.2)
51
66
 
52
67
  PLATFORMS
53
68
  ruby
54
69
 
55
70
  DEPENDENCIES
56
- activesupport (>= 2.0.0)
57
- addressable (~> 2.2)
58
- dragonfly (~> 0.9.5)
59
- httparty (~> 0.8.1)
60
- imagesize (~> 0.1)
61
- jeweler (~> 1.5)
71
+ fastimage
72
+ magickly!
62
73
  newrelic_rpm
74
+ rack-cache
63
75
  rack-test
64
- rspec (~> 2.4)
65
- sinatra (~> 1.2)
66
- webmock (~> 1.6)
76
+ rspec
77
+ webmock
data/Procfile ADDED
@@ -0,0 +1 @@
1
+ web: bundle exec rackup config.ru -p $PORT
data/README.md CHANGED
@@ -1,22 +1,26 @@
1
- # magickly [![Build Status](http://travis-ci.org/afeld/magickly.png)](http://travis-ci.org/afeld/magickly)
1
+ # ![Magickly - image manipulation as a (plugin-able) service](http://magickly.afeld.me/images/logo.jpg)
2
2
 
3
- A service for image manipulation - built as a simple wrapper of Imagemagick which handles caching, c/o the [Dragonfly](http://markevans.github.com/dragonfly/) gem.
3
+ Built as a practical wrapper of Imagemagick which handles caching, c/o the [Dragonfly](http://markevans.github.com/dragonfly/) gem.
4
4
 
5
- Say the base URL is the hosted version of this app, [magickly.jux.com](http://magickly.jux.com). The image URL is appended to the query string as a `src=`, followed by any of the supported operations below. Multiple operations can be combined, and will be applied in order.
5
+ Say the base URL is the hosted version of this app, [magickly.afeld.me](http://magickly.afeld.me). The image URL is appended to the query string as a `src=`, followed by any of the supported operations below. Multiple operations can be combined, and will be applied in order.
6
6
 
7
7
  If no query params are provided, a simple sandbox page is displayed. Try it here:
8
8
 
9
- [magickly.jux.com](http://magickly.jux.com)
9
+ [magickly.afeld.me](http://magickly.afeld.me)
10
+
11
+ Blog post about how it's used at <a href="https://jux.com">Jux</a>:
12
+
13
+ [aidan.jux.com/nerdery/310516](https://aidan.jux.com/nerdery/310516)
10
14
 
11
15
  ## Installation
12
16
 
13
- Requires Ruby 1.8.7 or 1.9.2, and Imagemagick >= v6.2.4.
17
+ [Compatible](http://travis-ci.org/#!/afeld/magickly) with Ruby 1.9.3, 2.0 and 2.1, and jRuby (in 1.9 mode). Requires Imagemagick >= v6.2.4.
14
18
 
15
19
  $ gem install magickly
16
20
 
17
21
  ## Running the App
18
22
 
19
- For Ruby 1.9.2, you will need to use an Eventmachine-compatible server, i.e. [Thin](http://code.macournoyer.com/thin/) or [Rainbows](http://rainbows.rubyforge.org/). A few options:
23
+ A few options:
20
24
 
21
25
  ### A. Run the app directly
22
26
 
@@ -24,7 +28,9 @@ For Ruby 1.9.2, you will need to use an Eventmachine-compatible server, i.e. [Th
24
28
  $ gem install thin
25
29
  $ thin start
26
30
 
27
- The app can be accessed at [http://localhost:3000](http://localhost:3000). To deploy to Heroku's Cedar stack (or another server using Foreman), see the [cedar](https://github.com/afeld/magickly/tree/cedar) branch.
31
+ The app can be accessed at [http://localhost:3000](http://localhost:3000).
32
+
33
+ When running as an app, Rack::Cache is used to cache generated versions of images. These cached files and metadata are stored in the tmp/ directory and will get regenerated as necessary.
28
34
 
29
35
  ### B. Use as an endpoint in another Rack app
30
36
 
@@ -46,93 +52,93 @@ For more info, see [Rails Routing from the Outside In](http://guides.rubyonrails
46
52
 
47
53
  The URL of the original image.
48
54
 
49
- ### brightness_contrast=*brightness* x *contrast*
55
+ ### brightness_contrast=*br.* x *con.*
50
56
 
51
57
  *brightness* and *contrast* are percentage change, between -100 and 100. For example, to increase contrast by 20% but leave brightness unchanged, use `brightness_contrast=0x20`.
52
58
 
53
- ![tanned imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&brightness_contrast=-10x50)
59
+ ![tanned imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&brightness_contrast=-10x50)
54
60
 
55
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&brightness_contrast=-10x50](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&brightness_contrast=-10x50)
61
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&brightness_contrast=-10x50](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&brightness_contrast=-10x50)
56
62
 
57
63
  ### flip=true
58
64
 
59
- ![flipped imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flip=true)
65
+ ![flipped imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flip=true)
60
66
 
61
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flip=true](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flip=true)
67
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flip=true](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flip=true)
62
68
 
63
69
  ### flop=true
64
70
 
65
- ![flopped imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flop=true)
71
+ ![flopped imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flop=true)
66
72
 
67
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flop=true](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flop=true)
73
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flop=true](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&flop=true)
68
74
 
69
75
  ### glow=*amount*,*softness*
70
76
 
71
77
  where `amount` is a float >= 1.0, and `softness` is an int >= 0.
72
78
 
73
- ![glowing imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&glow=1.2,20)
79
+ ![glowing imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&glow=1.2,20)
74
80
 
75
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&glow=1.2,20](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&glow=1.2,20)
81
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&glow=1.2,20](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&glow=1.2,20)
76
82
 
77
83
  ### greyscale=true
78
84
 
79
- ![flopped imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&greyscale=true)
85
+ ![flopped imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&greyscale=true)
80
86
 
81
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&greyscale=true](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&greyscale=true)
87
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&greyscale=true](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&greyscale=true)
82
88
 
83
89
  ### halftone=*threshold*
84
90
 
85
91
  where *threshold* is a value between 0 and 100.
86
92
 
87
- ![halftone imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&halftone=60)
93
+ ![halftone imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&halftone=60)
88
94
 
89
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&halftone=60](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&halftone=60)
95
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&halftone=60](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&halftone=60)
90
96
 
91
97
  ### jcn=true
92
98
 
93
- ![JCN imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&jcn=true)
99
+ ![JCN imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&jcn=true)
94
100
 
95
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&jcn=true](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&jcn=true)
101
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&jcn=true](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&jcn=true)
96
102
 
97
103
  ### resize=*geometry*
98
104
 
99
- ![resized imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&resize=100x100)
105
+ ![resized imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&resize=100x100)
100
106
 
101
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&resize=100x100](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&resize=100x100)
107
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&resize=100x100](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&resize=100x100)
102
108
 
103
109
  ### rotate=*degrees*
104
110
 
105
- ![rotated imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&rotate=45)
111
+ ![rotated imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&rotate=45)
106
112
 
107
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&rotate=45](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&rotate=45)
113
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&rotate=45](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&rotate=45)
108
114
 
109
115
  ### saturation=*percentage*
110
116
 
111
117
  *percentage* is the percentage of variation: a positive integer. 100 means no change. For example, to increase saturation by 50%, use `saturation=150`.
112
118
 
113
- ![saturated imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&saturation=150)
119
+ ![saturated imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&saturation=150)
114
120
 
115
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&saturation=150](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&saturation=150)
121
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&saturation=150](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&saturation=150)
116
122
 
117
123
  ### tilt_shift=true
118
124
 
119
- ![tilt-shifted imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&tilt_shift=true)
125
+ ![tilt-shifted imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&tilt_shift=true)
120
126
 
121
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&tilt_shift=true](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&tilt_shift=true)
127
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&tilt_shift=true](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&tilt_shift=true)
122
128
 
123
129
  ### thumb=*geometry*
124
130
 
125
- ![thumbnail of imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100%23)
131
+ ![thumbnail of imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100%23)
126
132
 
127
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100%23](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100%23)
133
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100%23](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100%23)
128
134
 
129
135
  (note: the `%23` in the geometry string above is an encoded '`#`', which tells Dragonfly to fill the dimensions and crop)
130
136
 
131
137
  ### two_color=true
132
138
 
133
- ![two color imagemagick logo](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&two_color=true)
139
+ ![two color imagemagick logo](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&two_color=true)
134
140
 
135
- [http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&two_color=true](http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&two_color=true)
141
+ [http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&two_color=true](http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&two_color=true)
136
142
 
137
143
  ## Alternate Syntax
138
144
 
@@ -144,19 +150,31 @@ Some CDNs are jerks and don't respect query params on resources (_ahem_ CLOUDFRO
144
150
 
145
151
  Therefore, instead of
146
152
 
147
- http://magickly.jux.com/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100
153
+ http://magickly.afeld.me/?src=http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Imagemagick-logo.png/200px-Imagemagick-logo.png&thumb=200x100
148
154
 
149
155
  the new URL would be
150
156
 
151
- http://magickly.jux.com/q/src/http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F0%2F0d%2FImagemagick-logo.png%2F200px-Imagemagick-logo.png/thumb/200x100
157
+ http://magickly.afeld.me/q/src/http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F0%2F0d%2FImagemagick-logo.png%2F200px-Imagemagick-logo.png/thumb/200x100
158
+
159
+ ## Encoded Syntax
160
+
161
+ Sometimes, you just can't handle escaped entities in your URLs (Facebook's handling of OpenGraph tags, for example). In those cases, we provide a Base64 encoded syntax which is an extension of the path-based Alternate Syntax above. Once your path-based url is constructed (see "Alternate Syntax" above), simply pass everything after the `q/` through Base64.urlsafe_encode or the javascript btoa() function and send it to the `qe/` endpoint instead.
162
+
163
+ Therefore, instead of
164
+
165
+ http://magickly.afeld.me/q/src/http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F0%2F0d%2FImagemagick-logo.png%2F200px-Imagemagick-logo.png/thumb/200x100
166
+
167
+ the new URL would be
168
+
169
+ http://magickly.afeld.me/qe/c3JjL2h0dHAlM0ElMkYlMkZ1cGxvYWQud2lraW1lZGlhLm9yZyUyRndpa2lwZWRpYSUyRmNvbW1vbnMlMkZ0aHVtYiUyRjAlMkYwZCUyRkltYWdlbWFnaWNrLWxvZ28ucG5nJTJGMjAwcHgtSW1hZ2VtYWdpY2stbG9nby5wbmcvdGh1bWIvMjAweDEwMA==
152
170
 
153
171
  ## Analyzers
154
172
 
155
173
  Magickly v1.2.0 introduces the ability to retrieve image properties via a REST API. For example, to retrieve the number of colors in the photo, visit:
156
174
 
157
- [magickly.jux.com/analyze/number_of_colors?src=http://upload.wikimedia.org/wikipedia/commons/0/0d/Imagemagick-logo.png](http://magickly.jux.com/analyze/number_of_colors?src=http://upload.wikimedia.org/wikipedia/commons/0/0d/Imagemagick-logo.png)
175
+ [magickly.afeld.me/analyze/number_of_colors?src=...](http://magickly.afeld.me/analyze/number_of_colors?src=http://upload.wikimedia.org/wikipedia/commons/0/0d/Imagemagick-logo.png)
158
176
 
159
- To get the list of available analyzers, visit [magickly.jux.com/analyze](http://magickly.jux.com/analyze)
177
+ To get the list of available analyzers, visit [magickly.afeld.me/analyze](http://magickly.afeld.me/analyze)
160
178
 
161
179
  ## Customization
162
180
 
@@ -175,17 +193,7 @@ See the [Dragonfly documentation](http://markevans.github.com/dragonfly/file.Gen
175
193
 
176
194
  ## Disclaimer
177
195
 
178
- The hosted version of the app ([magickly.jux.com](http://magickly.jux.com)) is a single app instance intended for demonstration purposes - if you are going to be making a large number of API calls to it or would like to use it in production, please let us know :-)
179
-
180
- ## Contributing to magickly
181
-
182
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
183
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
184
- * Fork the project
185
- * Start a feature/bugfix branch
186
- * Commit and push until you are happy with your contribution
187
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
188
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
196
+ The hosted version of the app ([magickly.afeld.me](http://magickly.afeld.me)) is a single app instance intended for demonstration purposes - if you are going to be making a large number of API calls to it or would like to use it in production, please let us know :-)
189
197
 
190
198
  ## Credits
191
199
 
data/Rakefile CHANGED
@@ -1,56 +1,3 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'rake'
11
-
12
- require 'jeweler'
13
- Jeweler::Tasks.new do |gem|
14
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
- gem.name = "magickly"
16
- gem.homepage = "http://github.com/afeld/magickly"
17
- gem.license = "MIT"
18
- gem.summary = %Q{image manipulation as a (plugin-able) service}
19
- gem.description = %Q{A service for image manipulation - built as an extensible wrapper of Imagemagick which handles caching, c/o the Dragonfly gem.}
20
- gem.email = "aidan.feldman@gmail.com"
21
- gem.authors = ["Aidan Feldman"]
22
- gem.files.include '.gemtest'
23
- # Include your dependencies below. Runtime dependencies are required when using your gem,
24
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
25
- # gem.add_runtime_dependency 'jabber4r', '> 0.1'
26
- # gem.add_development_dependency 'rspec', '> 1.2.3'
27
- end
28
- Jeweler::RubygemsDotOrgTasks.new
29
-
30
- require 'rspec/core'
31
- require 'rspec/core/rake_task'
32
- RSpec::Core::RakeTask.new(:spec) do |spec|
33
- spec.pattern = FileList['spec/**/*_spec.rb']
34
- end
35
-
36
- RSpec::Core::RakeTask.new(:rcov) do |spec|
37
- spec.pattern = 'spec/**/*_spec.rb'
38
- spec.rcov = true
39
- end
40
-
41
- task :default => :spec
42
- task :test => :spec
43
-
44
- require 'rdoc/task'
45
- RDoc::Task.new do |rdoc|
46
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
47
-
48
- rdoc.rdoc_dir = 'rdoc'
49
- rdoc.title = "magickly #{version}"
50
- rdoc.rdoc_files.include('README*')
51
- rdoc.rdoc_files.include('lib/**/*.rb')
52
- end
53
-
54
1
  desc "Runs a performance test of different sigma values to tilt_shift"
55
2
  task :blur_test do
56
3
  file = File.join(File.dirname(__FILE__), 'spec', 'support', 'imagemagick.png')