placeimg 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +7 -0
- data/lib/placeimg/version.rb +1 -1
- data/placeimg.gemspec +1 -0
- data/readme.md +0 -5
- data/spec/placeholder_spec.rb +31 -0
- data/spec/spec_helper.rb +3 -0
- metadata +18 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd2bccd1c0360aaef89421d97a2b06deefd1d679
|
4
|
+
data.tar.gz: e474d62191f068be5abae16f6845e44dbf432b45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31699328e590203e556cbb77a43cdbcd87c7b46ee0793a2ebaaea4f752ca361a386ede804513ffc4258b8182ab1930389b97fb0c1f8bc6718e83fed0228d8924
|
7
|
+
data.tar.gz: d7901c319f2f3af043379fd0644563d00e70e0fec41217add29fee12769ee3646c588e86c995b57b80d9d6506a7d9d3fb860a8d786fcd036aee0cf6f9fa340f2
|
data/.gitignore
CHANGED
data/Rakefile
ADDED
data/lib/placeimg/version.rb
CHANGED
data/placeimg.gemspec
CHANGED
data/readme.md
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Placeimg::ViewHelpers do
|
4
|
+
before(:each) do
|
5
|
+
class DummyClass
|
6
|
+
include Placeimg::ViewHelpers
|
7
|
+
end
|
8
|
+
@dummy = DummyClass.new
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should create the default placeholder" do
|
12
|
+
image_tag = @dummy.placeholder
|
13
|
+
height = image_tag.include? 'height="250"'
|
14
|
+
width = image_tag.include? 'width="250"'
|
15
|
+
expect(height).to eq true
|
16
|
+
expect(width).to eq true
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should create a custom placeholder" do
|
20
|
+
image_tag = @dummy.placeholder({ w: 100, h: 100, class: "test", id: "test-id" })
|
21
|
+
height = image_tag.include? 'height="100"'
|
22
|
+
width = image_tag.include? 'width="100"'
|
23
|
+
classattr = image_tag.include? 'class="test"'
|
24
|
+
idattr = image_tag.include? 'id="test-id"'
|
25
|
+
|
26
|
+
expect(height).to eq true
|
27
|
+
expect(width).to eq true
|
28
|
+
expect(classattr).to eq true
|
29
|
+
expect(idattr).to eq true
|
30
|
+
end
|
31
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: placeimg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelli Shaver
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: PlaceImg lets you easily add placeholder images to your HTML by generating
|
42
56
|
images with RMagick and serving them as data URLs via an easy to use helper method.
|
43
57
|
email:
|
@@ -48,12 +62,15 @@ extra_rdoc_files: []
|
|
48
62
|
files:
|
49
63
|
- .gitignore
|
50
64
|
- Gemfile
|
65
|
+
- Rakefile
|
51
66
|
- lib/placeimg.rb
|
52
67
|
- lib/placeimg/rails/railtie.rb
|
53
68
|
- lib/placeimg/version.rb
|
54
69
|
- lib/placeimg/view_helpers.rb
|
55
70
|
- placeimg.gemspec
|
56
71
|
- readme.md
|
72
|
+
- spec/placeholder_spec.rb
|
73
|
+
- spec/spec_helper.rb
|
57
74
|
homepage: https://github.com/kellishaver/placeimg
|
58
75
|
licenses:
|
59
76
|
- MIT
|