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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf5806a31cc34b808b94ecc38469e02e96f68eb7
4
- data.tar.gz: 24eaa12ccf4ffda80c377eaecec98916d4acbb80
3
+ metadata.gz: bd2bccd1c0360aaef89421d97a2b06deefd1d679
4
+ data.tar.gz: e474d62191f068be5abae16f6845e44dbf432b45
5
5
  SHA512:
6
- metadata.gz: 8fb196afaeb45247823f9e8596a30c25d0208aa9a17f254b600fbdd308fd5b88c94e016a627be145f02979f84a6c8495ccf11aa51c9b594bc301b29f6fb8c479
7
- data.tar.gz: 2473f0be51197b15db467956ae0f98d15845e2a90f9d4e31a0385d3eb8529a45560141da7934c1b1c952a62c61c4e68df3cce65e862299b375dbae4283a7eae1
6
+ metadata.gz: 31699328e590203e556cbb77a43cdbcd87c7b46ee0793a2ebaaea4f752ca361a386ede804513ffc4258b8182ab1930389b97fb0c1f8bc6718e83fed0228d8924
7
+ data.tar.gz: d7901c319f2f3af043379fd0644563d00e70e0fec41217add29fee12769ee3646c588e86c995b57b80d9d6506a7d9d3fb860a8d786fcd036aee0cf6f9fa340f2
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  placeimg-*.gem
3
3
  vendor
4
4
  .bundle
5
+ Gemfile.lock
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new
5
+
6
+ task :default => :spec
7
+ task :test => :spec
@@ -1,3 +1,3 @@
1
1
  module Placeimg
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -19,5 +19,6 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.add_dependency "rails", ">= 3.0"
21
21
  s.add_dependency "rmagick"
22
+ s.add_development_dependency "rspec"
22
23
 
23
24
  end
data/readme.md CHANGED
@@ -67,8 +67,3 @@ You can pass some, all, or no options to the helper. Below are the defaults:
67
67
  * w = 250
68
68
  * class = *empty string*
69
69
  * id = *empty string*
70
-
71
- ToDo
72
- ----
73
-
74
- * Tests - PlaceImg should be pretty fool-proof, but it could use a test or two.
@@ -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
@@ -0,0 +1,3 @@
1
+ require 'placeimg'
2
+ require "rails/all"
3
+ include ActionView::Helpers::OutputSafetyHelper
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.1
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