placeholdit 0.0.1 → 0.0.2
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.
- data/README.md +4 -0
- data/lib/placeholdit.rb +2 -0
- data/lib/placeholdit/version.rb +1 -1
- data/spec/placeholdit_spec.rb +4 -0
- metadata +3 -3
data/README.md
CHANGED
@@ -34,6 +34,10 @@ The same placeholder image with a blue background and red text (not recommended)
|
|
34
34
|
|
35
35
|
$ <%= placeholdit_image_tag "500", text: "Buy me!", background_color: '#004eff', text_color: '#ff0000' %>
|
36
36
|
|
37
|
+
Alternatively, calling placeholdit will work as well:
|
38
|
+
|
39
|
+
$ <%= placeholdit "500" %>
|
40
|
+
|
37
41
|
|
38
42
|
## Contributing
|
39
43
|
|
data/lib/placeholdit.rb
CHANGED
data/lib/placeholdit/version.rb
CHANGED
data/spec/placeholdit_spec.rb
CHANGED
@@ -34,4 +34,8 @@ describe Placeholdit::ViewHelpers do
|
|
34
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' />"
|
35
35
|
end
|
36
36
|
|
37
|
+
it "should alias to placeholdit" do
|
38
|
+
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' />"
|
39
|
+
end
|
40
|
+
|
37
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: placeholdit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
|
-
requirement: &
|
17
|
+
requirement: &70319125584760 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70319125584760
|
26
26
|
description: A Rails view helper for placeholder images via http://placehold.it
|
27
27
|
email:
|
28
28
|
- jeffmehlhoff@mac.com
|