retina_tag 1.1.9 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/retina_tag/engine.rb +5 -2
- data/lib/retina_tag/version.rb +1 -1
- data/retina_tag.gemspec +1 -1
- metadata +6 -6
data/lib/retina_tag/engine.rb
CHANGED
@@ -7,6 +7,8 @@ module RetinaTag
|
|
7
7
|
|
8
8
|
def image_tag_with_retina(source,options={})
|
9
9
|
hidpi_asset_path = nil
|
10
|
+
src = options[:src] = path_to_image(source)
|
11
|
+
|
10
12
|
begin
|
11
13
|
retina_els = source.split('.')
|
12
14
|
extension = retina_els.last
|
@@ -14,9 +16,10 @@ module RetinaTag
|
|
14
16
|
retina_path = "#{retina_els.join('.')}@2x.#{extension}"
|
15
17
|
|
16
18
|
if !Rails.application.assets.find_asset(retina_path).nil?
|
19
|
+
puts "Found HIDPI Asset"
|
17
20
|
hidpi_asset_path = asset_path(retina_path)
|
18
21
|
end
|
19
|
-
|
22
|
+
rescue
|
20
23
|
end
|
21
24
|
options_default = { :hidpi_src => hidpi_asset_path }
|
22
25
|
|
@@ -25,7 +28,7 @@ module RetinaTag
|
|
25
28
|
end
|
26
29
|
|
27
30
|
options_default.merge!(options)
|
28
|
-
|
31
|
+
puts "Checking for #{source} #{options_default}"
|
29
32
|
image_tag_without_retina(source,options_default)
|
30
33
|
|
31
34
|
if options_default[:"data-lazy-load"]
|
data/lib/retina_tag/version.rb
CHANGED
data/retina_tag.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: retina_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '4.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '4.0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: jquery-rails
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: '0'
|
76
76
|
segments:
|
77
77
|
- 0
|
78
|
-
hash: -
|
78
|
+
hash: -1060106995392824534
|
79
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
80
|
none: false
|
81
81
|
requirements:
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
segments:
|
86
86
|
- 0
|
87
|
-
hash: -
|
87
|
+
hash: -1060106995392824534
|
88
88
|
requirements: []
|
89
89
|
rubyforge_project:
|
90
90
|
rubygems_version: 1.8.25
|