imagizer_engine 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f232591d95762a8f90eb723df028f516c2600731
4
- data.tar.gz: 4ab835f05a91d5a61831ac0b5adb5c79318ae4e9
3
+ metadata.gz: 0bea81d75eb55f1c6c8d4630b21f3e4733b7e2e0
4
+ data.tar.gz: a9f6c8707c77f6508ff6ddd41edf1146b379bd00
5
5
  SHA512:
6
- metadata.gz: da4d926b0566f232676ae0623f94dd272bd5e6e01d6f679c5581cb9b0bd27f31fe40c633566cd4efc54ae8640f18f53e9e0889af8f71f54b969fcf437d513946
7
- data.tar.gz: 1a9ccbbfe1bb62f4943bf90e9179d6790abe671fb66e48d9f620255eb1b3dde84fb99f1924d0ce2427cfa23adbe716612452803d2f13f155586f3d098ad00372
6
+ metadata.gz: 199b68b5155afc24bccedf6946dbb633087e712f558816aded39c518dde6754f026e43e9472dfb4c07c2dbc1053c610baca7985085d1788232f86ad553c94775
7
+ data.tar.gz: ac348eaae2b2ff17f1ed064226052e81cbcd71bf88c1c8906a27a54758ca7a2eaa7ad65dbc94a5507cc6c640526e52019e7eb8c3dfaf3a481d51a4734dd6a95e
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ImagizerEngine
2
2
 
3
- TODO: Write a gem description
3
+ This gem adds a thin wrapper around the Imagizer Media Engine service by Nventify.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,9 +18,71 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install imagizer_engine
20
20
 
21
+ ## Configure
22
+
23
+ Rails
24
+
25
+ 1. Create a config file like config/imagizer_engine.rb
26
+ 2. Define the public ip found in your EC2 instance.
27
+ 3. Define all of the different versions available to use.
28
+ 4. Use the Imagizer API to configure each of the different versions. All of the Image API parameters are supported. http://demo.imagizercdn.com/doc/
29
+ ```ruby
30
+ ImagizerEngine.public_ip = "141.123.12.9"
31
+ ImagizerEngine.configure do
32
+ version :thumb,
33
+ :processes => {
34
+ width: 250,
35
+ height: 100,
36
+ scale: 1
37
+ }
38
+
39
+ version :cover,
40
+ :parent => :thumb,
41
+ :processes => {
42
+ scale: 2,
43
+ crop: [1,2,3,4]
44
+ }
45
+
46
+ version :preview,
47
+ :processes => {
48
+ quality: 80
49
+ }
50
+ end
51
+ ```
52
+
21
53
  ## Usage
22
54
 
23
- TODO: Write usage instructions here
55
+ 1. In the class associated with the image invoke `mount_engine' method
56
+
57
+ This method takes a single parameter that defines an image prefix
58
+
59
+ ```
60
+ class User
61
+
62
+ mount_engine :profile_image
63
+
64
+ end
65
+ ```
66
+
67
+ 2. With the `profile_image` prefix you will need to define a `profile_image_original_url` method in your class. This method should define the original url of the image.
68
+ ```
69
+ class User
70
+
71
+ def profile_image_original_url
72
+ "path/to/file"
73
+ end
74
+ ```
75
+
76
+ 3. To use the Imagizer Engine use the `profile_image_url()` method. This also takes an optional parameter that could be one of the versions defined in the config file
77
+
78
+ ```
79
+ user = User.new
80
+ user.profile_image_url() => "http://143.123.12.9/c/path/to/file"
81
+ user.profile_image_url(:cover) => "http://143.123.12.9/c/path/to/file?scale=2&crop1,2,3,4"
82
+
83
+ ```
84
+
85
+ 4.Profit
24
86
 
25
87
  ## Contributing
26
88
 
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "activesupport", ">= 4.0.0"
23
22
  spec.add_development_dependency "bundler", "~> 1.7"
24
23
  spec.add_development_dependency "rake", "~> 10.0"
25
24
  spec.add_development_dependency "rspec"
@@ -1,3 +1,3 @@
1
1
  module ImagizerEngine
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: imagizer_engine
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
  - sfkaos
@@ -10,20 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 4.0.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 4.0.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement