awesome_print-carrierwave 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/awesome_print-carrierwave.rb +1 -0
- data/lib/awesome_print/carrierwave.rb +32 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 35f40f926edbb701ec35e14f67e743ba0c2cd280
|
4
|
+
data.tar.gz: be1998f43f5e82378bbcd44fd1cbe7351f3282a9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bb7a01bd93364fe0447747449a1d01ec9613949db09ed7ad676637172264787d44455cdf9f381200135da29bd7db721901d3d0762e0cac135f3faf3837a6bea7
|
7
|
+
data.tar.gz: 54e627a800286b6bc6b7d741b81b7fffcc0a527dd31a70004695225bc8e27c5cc0f7e92e14dfa37c6bfdf37d811f42a2d2e554fe4794be345ff77f220b7ce9c0
|
@@ -0,0 +1 @@
|
|
1
|
+
require "awesome_print/carrierwave"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module AwesomePrint
|
2
|
+
module Carrierwave
|
3
|
+
def self.included(base)
|
4
|
+
base.send :alias_method, :cast_without_carrierwave, :cast
|
5
|
+
base.send :alias_method, :cast, :cast_with_carrierwave
|
6
|
+
end
|
7
|
+
|
8
|
+
def cast_with_carrierwave(object, type)
|
9
|
+
if defined?(::CarrierWave) && object.is_a?(::CarrierWave::Uploader::Base)
|
10
|
+
:carrierwave_uploader_instance
|
11
|
+
else
|
12
|
+
cast_without_carrierwave(object, type)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
def awesome_carrierwave_uploader_instance(o)
|
18
|
+
if defined? ::ActiveSupport::OrderedHash
|
19
|
+
if @options[:raw]
|
20
|
+
awesome_object(o)
|
21
|
+
else
|
22
|
+
storage_symbol = o.class.storage_engines.key(o._storage.name)
|
23
|
+
"#{o.class.name} with #{storage_symbol.inspect} " << awesome_hash(o.serializable_hash)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
object.inspect
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
AwesomePrint::Formatter.include(AwesomePrint::Carrierwave) if defined?(CarrierWave) && AwesomePrint.rails_console?
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: awesome_print-carrierwave
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tõnis Simo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
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'
|
41
|
+
description: Replace ugly inspection of mounted CarrierWave uploaders in Awesome Print
|
42
|
+
email:
|
43
|
+
- anton.estum@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/awesome_print-carrierwave.rb
|
49
|
+
- lib/awesome_print/carrierwave.rb
|
50
|
+
homepage: https://github.com/estum/awesome_print-carrierwave
|
51
|
+
licenses:
|
52
|
+
- MIT
|
53
|
+
metadata: {}
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 2.4.5
|
71
|
+
signing_key:
|
72
|
+
specification_version: 4
|
73
|
+
summary: AwesomePrint formatter for CarrierWave::Uploader instance objects
|
74
|
+
test_files: []
|
75
|
+
has_rdoc:
|