rai 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +58 -1
  3. data/lib/rai/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7535f625055b6e362e4d80005c52b8e7052a5249
4
- data.tar.gz: ba478f0a4db98ab3bae31376c50f4ce75b7a6fea
3
+ metadata.gz: 8e3e45323e085e138807ed68cb37d8c59d02b7d0
4
+ data.tar.gz: 8a23e4f8448d84c90cabb0f5e1eb501977c1a0d1
5
5
  SHA512:
6
- metadata.gz: 4fe859a9caaeaeee7e74d30237a0683693e7ff96e98bbc26daad5747a3c93f40be9badd2ec11309a6e21128e348c4b7c27d894f6c8fe6034b6f2a6d76b958df1
7
- data.tar.gz: 5886575aeec57e804270c67628b9daa0531a4bcabe5a3be74b34e68839f97fbd89a37cb3c74bee36cbeadc3d2ec7b8b0eb7ed6e1fea2bce02822f2fd5149beb2
6
+ metadata.gz: 11b1deacc4d2fff0b5fedd45fabff32391df3759a5216ddd716aeebff6da7ba77c7375218cd529142fde08d0d0230edc5246e1578d0a7c6802e19b841154b4c7
7
+ data.tar.gz: f430662073ad9123d3b5b9c47ad25b106b44e0431c54a7289d43950279a465bfb4841fe6ade4e0cee1ede3292d0531de7682e0d82e5db356e0f0620b87c383bd
data/README.md CHANGED
@@ -1,7 +1,64 @@
1
1
  # Ruby Adaptive-Images
2
- This is a ruby port of Adaptive-Images (http://adaptive-images.com/, originally by Matt Wilcox).
2
+ This is a ruby port of Adaptive-Images (http://adaptive-images.com/, originally by Matt Wilcox). It does not contain all features, but it does more or less the same in the same way. It uses ImageMagick (via mini_magick) in stead of GD.
3
3
 
4
4
  It runs as a sinatra application that can be mounted using Rack.
5
5
 
6
+ # Installation
7
+
8
+ To install, run: `gem install rai`
9
+
10
+ # Configuration
11
+
12
+ Put something like this in your config.ru:
13
+
14
+ ```
15
+ require 'rai'
16
+
17
+ map '/gallery' do
18
+ Rai::App.set :img_path, '/path/to/your/images'
19
+ Rai::App.set :cache_path, '/path/to/your/cache'
20
+ run Rai::App
21
+ end
22
+
23
+ ```
24
+
25
+ ## Settings
26
+
27
+ ### :watch_cache
28
+ Keep an eye on the cache to see if it needs updating.
29
+ Values: true/false
30
+ Default: true
31
+
32
+ ### :resolutions
33
+ Resolution break-points (screen widths).
34
+ Value: array
35
+ Default: [1382, 992, 768, 480, 320]
36
+
37
+ ### :jpg_quality
38
+ JPG compression ratio, 0-100.
39
+ Value: integer, 0-100
40
+ Default: 75
41
+
42
+ ### :sharpen
43
+ Wether image should be sharpened or not.
44
+ Value: true/false
45
+ Default: true
46
+
47
+ ### :cache_max_age
48
+ Browser cache TTL
49
+ Value: integer, seconds
50
+ Default: 60*60*24*7 (7 days)
51
+
52
+ ### :img_path
53
+ Where images are placed.
54
+ Value: string, path
55
+ Default:File.join(File.dirname(__FILE__), 'images')
56
+
57
+ ### :cache_path
58
+ Where cached versions are placed.
59
+ Value: string, path
60
+ Default: File.join(File.dirname(__FILE__), 'images', 'cache')
61
+
6
62
  # Author
7
63
  Kim Nørgaard <jasen@jasen.dk>
64
+
data/lib/rai/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rai
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Nørgaard