placeholdit 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d995bc0cd38db56cc02393131754c7a15f5811de
4
- data.tar.gz: ae8ae72ec82d8dae9a1312fb7c68bdb9b174f9f2
3
+ metadata.gz: d3b8f2b508699eabb713806b141a99e2a2a17a0a
4
+ data.tar.gz: 6267cca22bd0bcce185062574af09e919462b0cc
5
5
  SHA512:
6
- metadata.gz: 4c823b5f785c48901c3c0e3b76cc56580ea84036a38815b05acd2a18200a1e942696fd48de86793806009accace475fcbbc7f06c2cc655817eb009e7dbada109
7
- data.tar.gz: 60c055c4d74a0d547e425940c032c3dd61fdb8b8473325b4107f74fb92ecef1b2d9cd8f3bb07e16530b2587c66afa2732639f095c1c870a4cd2c63f025315e70
6
+ metadata.gz: ff30bb8d4f4b0f5c1d23af9a427ec9d78c57fc135ff7991b20aa0ab2199f23737e30d4cff153d3d6813bc2b2dde1ade6e46fa1a64402bab438039c901c222044
7
+ data.tar.gz: 0a9fb474036253cd7027a185cafe5096cc79f77a463d294259649d88e83892bb69d282b9c08367469218b17337aa675d5e023c812486be06811fef2dea74bd1d
@@ -5,7 +5,7 @@ module Placeholdit
5
5
  def placeholdit_image_tag(size, opts={})
6
6
 
7
7
  size = "#{size}" unless size.is_a?(String)
8
- src = "http://placehold.it/#{size}"
8
+ src = "https://placehold.it/#{size}"
9
9
 
10
10
  config = {
11
11
  :alt => (opts[:text] || "A placeholder image"),
@@ -1,3 +1,3 @@
1
1
  module Placeholdit
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -8,42 +8,42 @@ describe Placeholdit::ViewHelpers do
8
8
  let(:view) { MyView.new }
9
9
 
10
10
  it "should accept integers as params" do
11
- view.placeholdit_image_tag(500).should == "<img src='http://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' />"
11
+ expect(view.placeholdit_image_tag(500)).to eq "<img src='https://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' />"
12
12
  end
13
13
 
14
14
  it "should accept a string" do
15
- view.placeholdit_image_tag("500").should == "<img src='http://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' />"
15
+ expect(view.placeholdit_image_tag("500")).to eq "<img src='https://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' />"
16
16
  end
17
17
 
18
18
  it "should accept a componded WxH" do
19
- view.placeholdit_image_tag("500x500").should == "<img src='http://placehold.it/500x500' alt='A placeholder image' class='placeholder' height='500' width='500' />"
19
+ expect(view.placeholdit_image_tag("500x500")).to eq "<img src='https://placehold.it/500x500' alt='A placeholder image' class='placeholder' height='500' width='500' />"
20
20
  end
21
21
 
22
22
  it "should accept custom text" do
23
- view.placeholdit_image_tag("500x500", text: 'Buy me!').should == "<img src='http://placehold.it/500x500&text=Buy me!' alt='Buy me!' class='placeholder' height='500' width='500' />"
23
+ expect(view.placeholdit_image_tag("500x500", text: 'Buy me!')).to eq "<img src='https://placehold.it/500x500&text=Buy me!' alt='Buy me!' class='placeholder' height='500' width='500' />"
24
24
  end
25
25
 
26
26
  it "should accept custom colors" do
27
- view.placeholdit_image_tag("500", text_color: 'fff', background_color: '000').should == "<img src='http://placehold.it/500/000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
27
+ expect(view.placeholdit_image_tag("500", text_color: 'fff', background_color: '000')).to eq "<img src='https://placehold.it/500/000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
28
28
  end
29
29
 
30
30
  it "should strip the pound from hex colors" do
31
- view.placeholdit_image_tag("500", text_color: '#fff', background_color: '000').should == "<img src='http://placehold.it/500/000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
32
- view.placeholdit_image_tag("500", text_color: '#fff', background_color: '#000000').should == "<img src='http://placehold.it/500/000000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
33
- view.placeholdit_image_tag("500", text_color: 'fff', background_color: '#000000').should == "<img src='http://placehold.it/500/000000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
34
- view.placeholdit_image_tag("500", text_color: 'ffffff', background_color: '#000000').should == "<img src='http://placehold.it/500/000000/ffffff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
31
+ expect(view.placeholdit_image_tag("500", text_color: '#fff', background_color: '000')).to eq "<img src='https://placehold.it/500/000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
32
+ expect(view.placeholdit_image_tag("500", text_color: '#fff', background_color: '#000000')).to eq "<img src='https://placehold.it/500/000000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
33
+ expect(view.placeholdit_image_tag("500", text_color: 'fff', background_color: '#000000')).to eq "<img src='https://placehold.it/500/000000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
34
+ expect(view.placeholdit_image_tag("500", text_color: 'ffffff', background_color: '#000000')).to eq "<img src='https://placehold.it/500/000000/ffffff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
35
35
  end
36
36
 
37
37
  it "should accept title" do
38
- view.placeholdit_image_tag("500", title: "Lorem ipsum").should == "<img src='http://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' title='Lorem ipsum' />"
38
+ expect(view.placeholdit_image_tag("500", title: "Lorem ipsum")).to eq "<img src='https://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' title='Lorem ipsum' />"
39
39
  end
40
40
 
41
41
  it "should alias to placeholdit" do
42
- view.placeholdit("500", text_color: 'fff', background_color: '000').should == "<img src='http://placehold.it/500/000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
42
+ expect(view.placeholdit("500", text_color: 'fff', background_color: '000')).to eq "<img src='https://placehold.it/500/000/fff' alt='A placeholder image' class='placeholder' height='500' width='500' />"
43
43
  end
44
44
 
45
45
  it "should accept style" do
46
- view.placeholdit_image_tag("500", style: "float:right;").should == "<img src='http://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' style='float:right;' />"
46
+ expect(view.placeholdit_image_tag("500", style: "float:right;")).to eq "<img src='https://placehold.it/500' alt='A placeholder image' class='placeholder' height='500' width='500' style='float:right;' />"
47
47
  end
48
48
 
49
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: placeholdit
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
  - Jeff Mehlhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec