glebtv-paperclip-meta 1.2.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: 0e933c878530c4405e4d21a4cbb1816539a18fcb
4
+ data.tar.gz: 52c6504e74d44134fb5c1d36e870494a324d7def
5
+ SHA512:
6
+ metadata.gz: 08fa42b9fc2725705c7320ba6554ccdeb658788377275c9fa6114299c108a39cd8f68d4f1b025c6d21b856eafd5f6d15eb9f54bd0cdc91051e499d3b606e268a
7
+ data.tar.gz: e53c53955fb89f844b66a6e7e7b1d8a294c1f1c4b5960225154b26be3fd692645a50139e8582b7eea238731c315509f2f43cf7887af74ae2accf7119c35b537a
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .bundle
2
+ .ruby-version
3
+ Gemfile.lock
4
+ pkg/*
5
+ spec/gemfiles/*.lock
6
+ spec/tmp/*/**
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ rvm:
2
+ - 2.1.4
3
+ - 2.0.0
4
+ - 1.9.3
5
+ - rbx-2
6
+ gemfile:
7
+ - spec/gemfiles/Gemfile.paperclip-4
8
+ - spec/gemfiles/Gemfile.paperclip-3
9
+ install:
10
+ - bundle install --retry=3
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ platforms :jruby do
4
+ gem 'activerecord-jdbcsqlite3-adapter'
5
+ end
6
+
7
+ # See paperclip-meta.gemspec
8
+ gemspec
9
+
10
+ gem 'paperclip'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Tee Parham, Alexey Bondar
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # Paperclip Meta
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/paperclip-meta.svg)](http://rubygems.org/gems/paperclip-meta)
4
+ [![Build Status](https://travis-ci.org/teeparham/paperclip-meta.svg?branch=master)](https://travis-ci.org/teeparham/paperclip-meta)
5
+
6
+ Add width, height, and size to paperclip images.
7
+
8
+ Paperclip Meta gets image dimensions after `post_process_styles` using paperclip's `Geometry.from_file`.
9
+
10
+ Paperclip Meta works with paperclip versions 3.x and 4.x.
11
+
12
+ ### Setup
13
+
14
+ Add paperclip-meta to Gemfile:
15
+
16
+ ```ruby
17
+ gem 'paperclip-meta'
18
+ ```
19
+
20
+ Create migration to add a *_meta column:
21
+
22
+ ```ruby
23
+ class AddAvatarMetaToUsers < ActiveRecord::Migration
24
+ def change
25
+ add_column :users, :avatar_meta, :text
26
+ end
27
+ end
28
+ ```
29
+
30
+ Rebuild all thumbnails to populate the meta column if you already have some attachments.
31
+
32
+ Now you can grab the size from the paperclip attachment:
33
+
34
+ ```ruby
35
+ image_tag user.avatar.url, size: user.avatar.image_size
36
+ image_tag user.avatar.url(:medium), size: user.avatar.image_size(:medium)
37
+ image_tag user.avatar.url(:thumb), size: user.avatar.image_size(:thumb)
38
+ ```
39
+
40
+ ### Internals
41
+
42
+ The meta column is simple hash:
43
+
44
+ ```ruby
45
+ style: {
46
+ width: 100,
47
+ height: 100,
48
+ size: 42000
49
+ }
50
+ ```
51
+
52
+ This hash will be marshaled and base64 encoded before writing to model attribute.
53
+
54
+ `height`, `width`, and `image_size` methods are provided:
55
+
56
+ ```ruby
57
+ user.avatar.width(:thumb)
58
+ => 100
59
+ user.avatar.height(:medium)
60
+ => 200
61
+ user.avatar.image_size
62
+ => '60x70'
63
+ ```
64
+
65
+ You can pass the image style to these methods. If a style is not passed, the default style will be used.
66
+
67
+ ### Alternatives
68
+
69
+ https://github.com/thoughtbot/paperclip/wiki/Extracting-image-dimensions
70
+
71
+ ### Development
72
+
73
+ Test:
74
+
75
+ ```sh
76
+ bundle
77
+ rake
78
+ ```
79
+
80
+ Test paperclip 3.x:
81
+
82
+ ```sh
83
+ BUNDLE_GEMFILE=./spec/gemfiles/Gemfile.paperclip-3 bundle
84
+ BUNDLE_GEMFILE=./spec/gemfiles/Gemfile.paperclip-3 rake
85
+ ```
86
+
87
+ Test paperclip 4.x:
88
+
89
+ ```sh
90
+ BUNDLE_GEMFILE=./spec/gemfiles/Gemfile.paperclip-4 bundle
91
+ BUNDLE_GEMFILE=./spec/gemfiles/Gemfile.paperclip-4 rake
92
+ ```
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new(:spec) do |t|
5
+ t.libs << 'spec'
6
+ t.test_files = %w(spec/**/*_spec.rb)
7
+ t.verbose = false
8
+ end
9
+
10
+ task default: :spec
@@ -0,0 +1,2 @@
1
+ require 'paperclip-meta'
2
+
@@ -0,0 +1,3 @@
1
+ require 'paperclip-meta/version'
2
+ require 'paperclip-meta/railtie'
3
+ require 'paperclip-meta/attachment'
@@ -0,0 +1,96 @@
1
+ module Paperclip
2
+ module Meta
3
+ module Attachment
4
+ def self.included(base)
5
+ base.send :include, InstanceMethods
6
+ base.alias_method_chain :save, :meta_data
7
+ base.alias_method_chain :post_process_styles, :meta_data
8
+ base.alias_method_chain :size, :meta_data
9
+ end
10
+
11
+ module InstanceMethods
12
+ def save_with_meta_data
13
+ if @queued_for_delete.any? && @queued_for_write.empty?
14
+ instance_write(:meta, meta_encode({}))
15
+ end
16
+ save_without_meta_data
17
+ end
18
+
19
+ def post_process_styles_with_meta_data(*styles)
20
+ post_process_styles_without_meta_data(*styles)
21
+ return unless instance.respond_to?(:"#{name}_meta=")
22
+
23
+ meta = populate_meta(@queued_for_write)
24
+ return if meta == {}
25
+
26
+ write_meta(meta)
27
+ end
28
+
29
+ # Use meta info for style if required
30
+ def size_with_meta_data(style = nil)
31
+ style ? read_meta(style, :size) : size_without_meta_data
32
+ end
33
+
34
+ def height(style = default_style)
35
+ read_meta style, :height
36
+ end
37
+
38
+ def width(style = default_style)
39
+ read_meta style, :width
40
+ end
41
+
42
+ # Return image dimesions ("WxH") for given style name. If style name not given,
43
+ # return dimesions for default_style.
44
+ def image_size(style = default_style)
45
+ "#{width(style)}x#{height(style)}"
46
+ end
47
+
48
+ private
49
+
50
+ def populate_meta(queue)
51
+ meta = {}
52
+ queue.each do |style, file|
53
+ begin
54
+ geo = Geometry.from_file file
55
+ meta[style] = { width: geo.width.to_i, height: geo.height.to_i, size: file.size }
56
+ rescue Paperclip::Errors::NotIdentifiedByImageMagickError
57
+ meta[style] = {}
58
+ end
59
+ end
60
+ meta
61
+ end
62
+
63
+ def write_meta(meta)
64
+ merge_existing_meta_hash meta
65
+ instance.send("#{name}_meta=", meta_encode(meta))
66
+ end
67
+
68
+ # Return meta data for given style
69
+ def read_meta(style, item)
70
+ if instance.respond_to?(:"#{name}_meta") && instance_read(:meta)
71
+ if (meta = meta_decode(instance_read(:meta)))
72
+ meta[style] && meta[style][item]
73
+ end
74
+ end
75
+ end
76
+
77
+ # Return encoded metadata as String
78
+ def meta_encode(meta)
79
+ Base64.encode64(Marshal.dump(meta))
80
+ end
81
+
82
+ # Return decoded metadata as Object
83
+ def meta_decode(meta)
84
+ Marshal.load(Base64.decode64(meta))
85
+ end
86
+
87
+ # Retain existing meta values that will not be recalculated when
88
+ # reprocessing a subset of styles
89
+ def merge_existing_meta_hash(meta)
90
+ return unless (original_meta = instance.send("#{name}_meta"))
91
+ meta.reverse_merge! meta_decode(original_meta)
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,23 @@
1
+ require 'paperclip-meta'
2
+
3
+ module Paperclip
4
+ module Meta
5
+
6
+ if defined? ::Rails::Railtie
7
+ class Railtie < ::Rails::Railtie
8
+ initializer :paperclip_meta do
9
+ ActiveSupport.on_load :active_record do
10
+ Paperclip::Meta::Railtie.insert
11
+ end
12
+ end
13
+ end
14
+ end
15
+
16
+ class Railtie
17
+ def self.insert
18
+ Paperclip::Attachment.send(:include, Paperclip::Meta::Attachment)
19
+ end
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ module Paperclip
2
+ module Meta
3
+ VERSION = "1.2.0"
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "paperclip-meta/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "glebtv-paperclip-meta"
7
+ s.version = Paperclip::Meta::VERSION
8
+ s.authors = ["Alexey Bondar", "Tee Parham"]
9
+ s.email = ["y8@ya.ru", "tee@neighborland.com"]
10
+ s.homepage = "http://github.com/teeparham/paperclip-meta"
11
+ s.summary = %q{Add width, height, and size to paperclip images}
12
+ s.description = %q{Add width, height and size methods to paperclip images}
13
+ s.license = "MIT"
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec}/*`.split("\n")
17
+ s.executables = []
18
+ s.require_paths = ["lib"]
19
+
20
+ s.required_ruby_version = ">= 1.9.3"
21
+
22
+ s.add_dependency "paperclip", ">= 3.0.2", "< 5.0"
23
+
24
+ s.add_development_dependency "bundler", "~> 1.5"
25
+ s.add_development_dependency "rake", "~> 10.1"
26
+ s.add_development_dependency "mocha", "~> 1.0"
27
+ s.add_development_dependency "activerecord", ">= 4.0"
28
+
29
+ # sqlite3 1.3.9 does not work with rubinius 2.2.5:
30
+ # https://github.com/sparklemotion/sqlite3-ruby/issues/122
31
+ s.add_development_dependency "sqlite3", "1.3.8"
32
+ end
@@ -0,0 +1,144 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Attachment" do
4
+ it "saves image geometry for original image" do
5
+ img = Image.create(small_image: small_image)
6
+ img.reload
7
+ geometry = geometry_for(small_path)
8
+ assert_equal geometry.width, img.small_image.width
9
+ assert_equal geometry.height, img.small_image.height
10
+ assert_equal "50x64", img.small_image.image_size
11
+ end
12
+
13
+ it "saves geometry for styles" do
14
+ img = Image.create(small_image: small_image, big_image: big_image)
15
+ assert_equal 100, img.big_image.width(:thumb)
16
+ assert_equal 100, img.big_image.height(:thumb)
17
+ end
18
+
19
+ it "saves original style geometry" do
20
+ img = Image.create(small_image: small_image)
21
+ assert_equal 50, img.small_image.width(:original)
22
+ assert_equal 64, img.small_image.height(:original)
23
+ end
24
+
25
+ it "sets geometry on update" do
26
+ img = Image.create!
27
+ img.small_image = small_image
28
+ img.save
29
+ geometry = geometry_for(small_path)
30
+ assert_equal geometry.width, img.small_image.width
31
+ assert_equal geometry.height, img.small_image.height
32
+ end
33
+
34
+ describe '#size' do
35
+ before do
36
+ @image = Image.create(big_image: big_image)
37
+ end
38
+
39
+ it 'should save file size with meta data ' do
40
+ path = File.join(File.dirname(__FILE__), "tmp/fixtures/tmp/thumb/#{@image.id}.jpg")
41
+ size = File.stat(path).size
42
+ assert_equal size, @image.big_image.size(:thumb)
43
+ end
44
+
45
+ it 'should access normal paperclip method when no style passed' do
46
+ @image.big_image.expects size_without_meta_data: 1234
47
+ assert_equal 1234, @image.big_image.size
48
+ end
49
+
50
+ it 'should have access to original file size' do
51
+ assert_equal 37042, @image.big_image.size
52
+ end
53
+ end
54
+
55
+ it "clears geometry fields when image is destroyed" do
56
+ img = Image.create(small_image: small_image, big_image: big_image)
57
+ assert_equal 100, img.big_image.width(:thumb)
58
+ img.big_image = nil
59
+ img.save!
60
+ assert_nil img.big_image.width(:thumb)
61
+ end
62
+
63
+ it "does not save when file is not an image" do
64
+ img = Image.new
65
+ img.small_image = not_image
66
+ refute img.save
67
+ assert_nil img.small_image.width
68
+ end
69
+
70
+ it "returns nil attributes when file is not an image" do
71
+ img = ImageWithNoValidation.new
72
+ img.small_image = not_image
73
+ img.save!
74
+ assert_nil img.small_image.width
75
+ assert_nil img.small_image.height
76
+ end
77
+
78
+ it "preserves metadata when reprocessing a specific style" do
79
+ img = Image.new
80
+ img.big_image = big_image
81
+ img.save!
82
+ assert_equal 500, img.big_image.width(:large)
83
+ img.big_image.reprocess!(:thumb)
84
+ assert_equal 500, img.big_image.width(:large)
85
+ end
86
+
87
+ it "preserves metadata for unprocessed styles" do
88
+ img = Image.new
89
+ img.big_image = big_image
90
+ img.save!
91
+
92
+ # set big image meta to fake values for :large & missing :thumb
93
+ hash = { large: { height: 1, width: 2, size: 3 } }
94
+ img.update_column(:big_image_meta, img.big_image.send(:meta_encode, hash))
95
+
96
+ assert_equal 1, img.big_image.height(:large)
97
+ assert_equal 2, img.big_image.width(:large)
98
+ assert_equal 3, img.big_image.size(:large)
99
+ assert_nil img.big_image.height(:thumb)
100
+ assert_nil img.big_image.height(:original)
101
+ img.big_image.reprocess!(:thumb)
102
+ assert_equal 1, img.big_image.height(:large)
103
+ assert_equal 2, img.big_image.width(:large)
104
+ assert_equal 3, img.big_image.size(:large)
105
+ assert_equal 100, img.big_image.height(:thumb)
106
+ assert_equal 100, img.big_image.width(:thumb)
107
+ assert_equal 277, img.big_image.height(:original) # original is always reprocessed
108
+ end
109
+
110
+ it "replaces metadata when attachment changes" do
111
+ img = Image.new
112
+ img.big_image = big_image
113
+ img.save!
114
+ img.big_image = small_image
115
+ img.save!
116
+ assert_equal "50x64", img.big_image.image_size
117
+ assert_equal "100x100", img.big_image.image_size(:thumb)
118
+ assert_equal "500x500", img.big_image.image_size(:large)
119
+ end
120
+
121
+ private
122
+
123
+ def small_path
124
+ File.join(File.dirname(__FILE__), 'fixtures', 'small.png')
125
+ end
126
+
127
+ # 50x64
128
+ def small_image
129
+ File.open(small_path)
130
+ end
131
+
132
+ def geometry_for(path)
133
+ Paperclip::Geometry.from_file(path)
134
+ end
135
+
136
+ # 600x277
137
+ def big_image
138
+ File.open(File.join(File.dirname(__FILE__), 'fixtures', 'big.jpg'))
139
+ end
140
+
141
+ def not_image
142
+ File.open(File.join(File.dirname(__FILE__), 'fixtures', 'big.zip'))
143
+ end
144
+ end
Binary file
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ platforms :jruby do
4
+ gem 'activerecord-jdbcsqlite3-adapter'
5
+ end
6
+
7
+ platforms :rbx do
8
+ gem 'json'
9
+ gem 'rubysl', '~> 2.0'
10
+ end
11
+
12
+ # See paperclip-meta.gemspec
13
+ gemspec path: '../..'
14
+
15
+ gem 'activerecord', '~> 4.0.0'
16
+ gem 'minitest', '~> 4.7'
17
+ gem 'paperclip', '~> 3.5'
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ platforms :jruby do
4
+ gem 'activerecord-jdbcsqlite3-adapter'
5
+ end
6
+
7
+ platforms :rbx do
8
+ gem 'json'
9
+ gem 'rubysl', '~> 2.0'
10
+ end
11
+
12
+ # See paperclip-meta.gemspec
13
+ gemspec path: '../..'
14
+
15
+ gem 'activerecord', '~> 4.1'
16
+ gem 'minitest', '~> 5.3'
17
+ gem 'paperclip', '~> 4.0'
data/spec/schema.rb ADDED
@@ -0,0 +1,15 @@
1
+ ActiveRecord::Schema.define do
2
+ create_table :images do |t|
3
+ t.string :small_image_file_name
4
+ t.string :small_image_content_type
5
+ t.integer :small_image_updated_at
6
+ t.integer :small_image_file_size
7
+ t.string :small_image_meta
8
+
9
+ t.string :big_image_file_name
10
+ t.string :big_image_content_type
11
+ t.integer :big_image_updated_at
12
+ t.integer :big_image_file_size
13
+ t.string :big_image_meta
14
+ end
15
+ end
@@ -0,0 +1,53 @@
1
+ require 'bundler/setup'
2
+ Bundler.require(:default)
3
+ require 'active_record'
4
+ require 'minitest/autorun'
5
+ require 'mocha/setup'
6
+
7
+ ActiveRecord::Base.establish_connection(
8
+ adapter: "sqlite3",
9
+ database: ":memory:"
10
+ )
11
+
12
+ if ENV["VERBOSE"]
13
+ ActiveRecord::Base.logger = Logger.new(STDERR)
14
+ else
15
+ Paperclip.options[:log] = false
16
+ end
17
+
18
+ load(File.join(File.dirname(__FILE__), 'schema.rb'))
19
+
20
+ ActiveRecord::Base.send(:include, Paperclip::Glue)
21
+ Paperclip::Meta::Railtie.insert
22
+
23
+ I18n.enforce_available_locales = true
24
+
25
+ class Image < ActiveRecord::Base
26
+ has_attached_file :small_image,
27
+ storage: :filesystem,
28
+ path: "./spec/tmp/:style/:id.:extension",
29
+ url: "./spec/tmp/:style/:id.extension"
30
+
31
+ has_attached_file :big_image,
32
+ storage: :filesystem,
33
+ path: "./spec/tmp/fixtures/tmp/:style/:id.:extension",
34
+ url: "./spec/tmp/fixtures/tmp/:style/:id.extension",
35
+ styles: { thumb: "100x100#", large: "500x500#" }
36
+
37
+ # paperclip 4.0 requires a validator
38
+ validates_attachment_content_type :small_image, content_type: /\Aimage/
39
+ validates_attachment_content_type :big_image, content_type: /\Aimage/
40
+ end
41
+
42
+ class ImageWithNoValidation < ActiveRecord::Base
43
+ self.table_name = :images
44
+
45
+ has_attached_file :small_image,
46
+ storage: :filesystem,
47
+ path: "./spec/tmp/:style/:id.:extension",
48
+ url: "./spec/tmp/:style/:id.extension"
49
+
50
+ if Paperclip::VERSION >= "4.0"
51
+ do_not_validate_attachment_file_type :small_image
52
+ end
53
+ end
metadata ADDED
@@ -0,0 +1,164 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: glebtv-paperclip-meta
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexey Bondar
8
+ - Tee Parham
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-12-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: paperclip
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 3.0.2
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '5.0'
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: 3.0.2
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ - !ruby/object:Gem::Dependency
35
+ name: bundler
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.5'
41
+ type: :development
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.5'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.1'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.1'
62
+ - !ruby/object:Gem::Dependency
63
+ name: mocha
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
69
+ type: :development
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.0'
76
+ - !ruby/object:Gem::Dependency
77
+ name: activerecord
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '4.0'
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '4.0'
90
+ - !ruby/object:Gem::Dependency
91
+ name: sqlite3
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 1.3.8
97
+ type: :development
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 1.3.8
104
+ description: Add width, height and size methods to paperclip images
105
+ email:
106
+ - y8@ya.ru
107
+ - tee@neighborland.com
108
+ executables: []
109
+ extensions: []
110
+ extra_rdoc_files: []
111
+ files:
112
+ - ".gitignore"
113
+ - ".travis.yml"
114
+ - Gemfile
115
+ - LICENSE.txt
116
+ - README.md
117
+ - Rakefile
118
+ - lib/glebtv-paperclip-meta.rb
119
+ - lib/paperclip-meta.rb
120
+ - lib/paperclip-meta/attachment.rb
121
+ - lib/paperclip-meta/railtie.rb
122
+ - lib/paperclip-meta/version.rb
123
+ - paperclip-meta.gemspec
124
+ - spec/attachment_spec.rb
125
+ - spec/fixtures/big.jpg
126
+ - spec/fixtures/big.zip
127
+ - spec/fixtures/small.png
128
+ - spec/gemfiles/Gemfile.paperclip-3
129
+ - spec/gemfiles/Gemfile.paperclip-4
130
+ - spec/schema.rb
131
+ - spec/spec_helper.rb
132
+ homepage: http://github.com/teeparham/paperclip-meta
133
+ licenses:
134
+ - MIT
135
+ metadata: {}
136
+ post_install_message:
137
+ rdoc_options: []
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: 1.9.3
145
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ requirements: []
151
+ rubyforge_project:
152
+ rubygems_version: 2.4.4
153
+ signing_key:
154
+ specification_version: 4
155
+ summary: Add width, height, and size to paperclip images
156
+ test_files:
157
+ - spec/attachment_spec.rb
158
+ - spec/fixtures/big.jpg
159
+ - spec/fixtures/big.zip
160
+ - spec/fixtures/small.png
161
+ - spec/gemfiles/Gemfile.paperclip-3
162
+ - spec/gemfiles/Gemfile.paperclip-4
163
+ - spec/schema.rb
164
+ - spec/spec_helper.rb