retina_image_tag 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module RetinaImageTag
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,7 +1,6 @@
1
1
  module RetinaImageTag
2
2
  module ViewHelpers
3
3
 
4
-
5
4
  def retina_image( pixel_ratio )
6
5
  @retina_image_path = image_path(@file_name+"@#{pixel_ratio}x"+@file_ext)
7
6
  image_tag(@retina_image_path, @options)
@@ -11,10 +10,11 @@ module RetinaImageTag
11
10
  def retina_image_tag(image, options = {})
12
11
  @devicePixelRatio = cookies[:devicePixelRatio]
13
12
  @options = options
13
+ @image = image # foo.jpg
14
14
 
15
- @file_path = image_path(image)
16
- @file_ext = File.extname(@file_path) # .jpg, .png
17
- @file_name = File.basename(@file_path, @file_ext) # pic1, foo
15
+ @file_path = image_path(@image)
16
+ @file_ext = File.extname(@file_path) # .jpg, .png
17
+ @file_name = File.basename(@image, @file_ext) # pic1, foo
18
18
  @file_dirname = File.dirname(@file_path)
19
19
 
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: retina_image_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: