center_image_tag 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjYyOTdmZGU4NDRkNjhkYmExNzBlZDNjNGI3YzYzYzE2NjBlNjExMQ==
4
+ OGE3N2VjNmM0ZWJlMDg2OTQyNTY0YTk3ZDZiYjM2MDQ3YjdjNDY4YQ==
5
5
  data.tar.gz: !binary |-
6
- NGI4OGNjZWQzZWZlNjlhYzEwYzk0MDYxODVkYjk1M2Q2NzNiOTA4ZA==
6
+ ODYwNmZkOTRhMWU2YjE2ZTcwOTdmZGM2MmI2MjE3ZWY1N2M3ZGE5Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjQ2MmY3NDkyODFmMWE2YzhkOGU4N2YzN2Q1N2FhM2FjODI5NDdjNDFhYjBm
10
- ZDM0ZWE1YTlkZjUwMDI5NGFmYjZlMTZjY2Y1NzVkZTVjOTVlNTAyOWEwYjhh
11
- YzE1MWI2MTk5ZWRlNDlmOTU0OWFiNWFlYmY2YzRkMGZkMDQyMTI=
9
+ NjY2M2E5ZmVhNzJjMGEzYWFmMDM2MmZhOTU0MDkzNjc5ZjUyMjA5NWIxM2Iy
10
+ MmM4MWRiZTIyOWRlNjk3M2QxNGI5NWIyMzI3NmViY2M5MmEzNTQ4MjQwNTMy
11
+ Mzk3Y2RmZWY5YjI2MmY2OGNlNmY5ZDMxY2EzMzM2YzkzMjMzYzM=
12
12
  data.tar.gz: !binary |-
13
- ZjA2MjZmZThmOWNjM2JkZDQwMDhhOGI2NDQ3MzdkNDA0NGU2MGI2NDQ3OWRk
14
- N2FkODlkNTM4YWI1ZDFiMjg1Y2Q0ZDg0YWNlMDZlYmIzOWNiM2VhZGY2NDNi
15
- YzIzMWI3ZWQ0ZGZlMmMwZWY1OTc2MzFjNDZjNzMzN2RmOTZkM2U=
13
+ N2RhNmY5MmQ4ODY4OGU3NDdkNDQ1YTIwOTRlYzMxZWQzMTM5OWIyM2QzZGFj
14
+ MDkwYTM1YmEwZTUwZjA5YWRjMTMxZWY5ODU5MTExYjM1ZjA0M2M1ZDhiY2Qw
15
+ YjZmMGE4NGE1NDJjOGIzNmY1NGUwNDM3Zjk5ODc3NmYzZjhhYzA=
@@ -1,3 +1,3 @@
1
1
  module CenterImageTag
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -31,20 +31,20 @@ module CenterImageTag
31
31
 
32
32
  private
33
33
  def container_fluid(fluid_percentage, &block)
34
- div class: "standard-thumb thumb-fluid" do
35
- div class: "thumb-default", style: "padding-bottom: #{fluid_percentage}", &block
34
+ div class: "cit-standard-thumb cit-thumb-fluid" do
35
+ div class: "cit-thumb-default", style: "padding-bottom: #{fluid_percentage}", &block
36
36
  end
37
37
  end
38
38
 
39
39
  def container_fixed(width, height, &block)
40
- div class: "standard-thumb", style: "width: #{width}px" do
41
- div class: "thumb-default", style: "padding-bottom: #{height}px", &block
40
+ div class: "cit-standard-thumb", style: "width: #{width}px" do
41
+ div class: "cit-thumb-default", style: "padding-bottom: #{height}px", &block
42
42
  end
43
43
  end
44
44
 
45
45
  def clip(&block)
46
- div class: "thumb-clip" do
47
- div class: "thumb-clip-inner", &block
46
+ div class: "cit-thumb-clip" do
47
+ div class: "cit-thumb-clip-inner", &block
48
48
  end
49
49
  end
50
50
 
@@ -13,10 +13,10 @@ module CenterImageTag
13
13
  describe 'fluid' do
14
14
  it 'renders the fluid image correctly' do
15
15
  output = View.new.center_image_tag 'image.png', fluid: "56.25%"
16
- expected = "<div class=\"standard-thumb thumb-fluid\">" +
17
- "<div class=\"thumb-default\" style=\"padding-bottom: 56.25%\">" +
18
- "<div class=\"thumb-clip\">" +
19
- "<div class=\"thumb-clip-inner\">" +
16
+ expected = "<div class=\"cit-standard-thumb cit-thumb-fluid\">" +
17
+ "<div class=\"cit-thumb-default\" style=\"padding-bottom: 56.25%\">" +
18
+ "<div class=\"cit-thumb-clip\">" +
19
+ "<div class=\"cit-thumb-clip-inner\">" +
20
20
  "<img alt=\"Image\" src=\"/images/image.png\" />" +
21
21
  "<span class=\"vertical-align\" />" +
22
22
  "</div>" +
@@ -30,10 +30,10 @@ module CenterImageTag
30
30
  describe 'fixed' do
31
31
  it 'renders the fixed image correctly from size options (size = widthxheight)' do
32
32
  output = View.new.center_image_tag 'image.png', size: "200x100"
33
- expected = "<div class=\"standard-thumb\" style=\"width: 200px\">" +
34
- "<div class=\"thumb-default\" style=\"padding-bottom: 100px\">" +
35
- "<div class=\"thumb-clip\">" +
36
- "<div class=\"thumb-clip-inner\">" +
33
+ expected = "<div class=\"cit-standard-thumb\" style=\"width: 200px\">" +
34
+ "<div class=\"cit-thumb-default\" style=\"padding-bottom: 100px\">" +
35
+ "<div class=\"cit-thumb-clip\">" +
36
+ "<div class=\"cit-thumb-clip-inner\">" +
37
37
  "<img alt=\"Image\" src=\"/images/image.png\" width=\"200\" />" +
38
38
  "<span class=\"vertical-align\" />" +
39
39
  "</div>" +
@@ -45,10 +45,10 @@ module CenterImageTag
45
45
 
46
46
  it 'renders the fixed image correctly from size options (single size value)' do
47
47
  output = View.new.center_image_tag 'image.png', size: "200"
48
- expected = "<div class=\"standard-thumb\" style=\"width: 200px\">" +
49
- "<div class=\"thumb-default\" style=\"padding-bottom: 200px\">" +
50
- "<div class=\"thumb-clip\">" +
51
- "<div class=\"thumb-clip-inner\">" +
48
+ expected = "<div class=\"cit-standard-thumb\" style=\"width: 200px\">" +
49
+ "<div class=\"cit-thumb-default\" style=\"padding-bottom: 200px\">" +
50
+ "<div class=\"cit-thumb-clip\">" +
51
+ "<div class=\"cit-thumb-clip-inner\">" +
52
52
  "<img alt=\"Image\" src=\"/images/image.png\" width=\"200\" />" +
53
53
  "<span class=\"vertical-align\" />" +
54
54
  "</div>" +
@@ -60,10 +60,10 @@ module CenterImageTag
60
60
 
61
61
  it 'renders the fixed image correctly from width and height options' do
62
62
  output = View.new.center_image_tag 'image.png', width: "200", height: 100
63
- expected = "<div class=\"standard-thumb\" style=\"width: 200px\">" +
64
- "<div class=\"thumb-default\" style=\"padding-bottom: 100px\">" +
65
- "<div class=\"thumb-clip\">" +
66
- "<div class=\"thumb-clip-inner\">" +
63
+ expected = "<div class=\"cit-standard-thumb\" style=\"width: 200px\">" +
64
+ "<div class=\"cit-thumb-default\" style=\"padding-bottom: 100px\">" +
65
+ "<div class=\"cit-thumb-clip\">" +
66
+ "<div class=\"cit-thumb-clip-inner\">" +
67
67
  "<img alt=\"Image\" src=\"/images/image.png\" width=\"200\" />" +
68
68
  "<span class=\"vertical-align\" />" +
69
69
  "</div>" +
@@ -1,4 +1,4 @@
1
- .standard-thumb {
1
+ .cit-standard-thumb {
2
2
  display: inline-block;
3
3
  vertical-align: middle;
4
4
  overflow: hidden;
@@ -12,7 +12,7 @@
12
12
  }
13
13
  }
14
14
 
15
- .thumb-fluid {
15
+ .cit-thumb-fluid {
16
16
  width: 100%;
17
17
 
18
18
  .thumb-clip {
@@ -25,12 +25,12 @@
25
25
  }
26
26
  }
27
27
 
28
- .thumb-default {
28
+ .cit-thumb-default {
29
29
  display: block;
30
30
  height: auto;
31
31
  }
32
32
 
33
- .thumb-clip {
33
+ .cit-thumb-clip {
34
34
  position: absolute;
35
35
  top: -100px;
36
36
  bottom: -100px;
@@ -46,7 +46,7 @@
46
46
  }
47
47
  }
48
48
 
49
- .thumb-clip-inner {
49
+ .cit-thumb-clip-inner {
50
50
  position: absolute;
51
51
  width: 100%;
52
52
  height: 100%;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: center_image_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Nguyen