assetable 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/asset.rb +1 -0
- data/db/migrate/20140121173312_add_ratio_to_assets.rb +5 -0
- data/lib/assetable/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzI1MmU4NTY3MGVhOWIxNDJiNTllMGE0NDQ3Mzc3YTNkM2QwMmQ0Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDZjZTliMGY5NDdjMjUyZjdjYTY3ZmQ4NjMxNzQzYTIzMjBkODdlMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjIwMmU1NWQzNTExM2RiMjUzZjg0Mjc4N2FkN2QwMDJiY2NhNjE5ZjE1ZTY3
|
10
|
+
ZTc0OTc3YjhhMjE5ZjY4ZmU2NzVlYzUwYmVkZmU1MjY3YmIxMWJkN2I5ZWVi
|
11
|
+
N2Q0MjEzNmJhYWZkNDIwYmUzNDQyZTdkMGYxYmM3OTg3Y2EyM2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjQwNWVmOTQ2MjkxZmEzZTZjYzkzZGYxNzc3MGMzZjAyN2QwYWIwYzU2NDRl
|
14
|
+
MmI1MjQ4MmZjODQxNjgyZjRjMzIzNTUwZjYxMTYxNTRmYWIwMzJkMjFjODZk
|
15
|
+
YzkxMzc0YmQwZjc4ZjExZmUxNTEzMTgxYjU1ZGY1MDM3ZDhkYzk=
|
data/app/models/asset.rb
CHANGED
@@ -62,6 +62,7 @@ class Asset < ActiveRecord::Base
|
|
62
62
|
self.content_type = self.filename.file.content_type
|
63
63
|
self.file_size = self.filename.file.size
|
64
64
|
self.width, self.height = `identify -format "%wx%h" #{self.filename.file.path}`.split(/x/) unless self.document? or self.width? or self.height?
|
65
|
+
self.ratio = self.width.to_f / self.height.to_f if self.width.present? and self.height.present?
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
data/lib/assetable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assetable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Koht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec-rails
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -323,6 +337,7 @@ files:
|
|
323
337
|
- db/migrate/20131122232735_create_assets.rb
|
324
338
|
- db/migrate/20131123172825_create_asset_attachments.rb
|
325
339
|
- db/migrate/20131125200943_create_galleries.rb
|
340
|
+
- db/migrate/20140121173312_add_ratio_to_assets.rb
|
326
341
|
- lib/assetable/config.rb
|
327
342
|
- lib/assetable/core.rb
|
328
343
|
- lib/assetable/engine.rb
|