picturefill 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -6
- data/lib/picturefill/context.rb +1 -1
- data/lib/picturefill/rails/view_helper.rb +7 -7
- data/lib/picturefill/version.rb +1 -1
- data/spec/picturefill/view_helper_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f358326a54756fd9ae56464c2fe1503747082312
|
4
|
+
data.tar.gz: 822ccf1d5e60b5bf3488cf3495958a8b5b97e59c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a34faf9ecac107a4bbbf06534ebe5c3b090e82538b0a450dbbee3de1bcfd83a83025b17b892c6111a491a7236eebc489220221c834255693a7afc98b72d986ab
|
7
|
+
data.tar.gz: bb5e642f3091493e4cd060a073491d18daa5836bdd1fa0716ff67b062e950df226aa4cec650491e82db3cf55de3ca569a43c79477cdb06430a36163dd3c49c2e
|
data/.travis.yml
CHANGED
@@ -1,11 +1,7 @@
|
|
1
|
+
script: "rspec spec"
|
1
2
|
language: ruby
|
2
3
|
rvm:
|
3
|
-
- "1.8.7"
|
4
|
-
- "1.9.2"
|
5
4
|
- "1.9.3"
|
6
|
-
-
|
7
|
-
- jruby-19mode # JRuby in 1.9 mode
|
8
|
-
- rbx-18mode
|
9
|
-
- rbx-19mode
|
5
|
+
- "2.0.0"
|
10
6
|
# uncomment this line if your project needs to run something other than `rake`:
|
11
7
|
# script: bundle exec rspec spec
|
data/lib/picturefill/context.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
# Usage: <%= picturefill(default_url, "AltText") do %>
|
2
|
-
# <%= image(small_url) %>
|
3
|
-
# <%= image(medium_url, :min => 400) %>
|
4
|
-
# <%= image(medium_high_dpi_url, :min => 400, :ratio => 1.5) %>
|
5
|
-
# <%= image(large_url, :min => 1000) %>
|
6
|
-
# <%= image(large_high_dpi_url, "(min-width: 1000px) and (min-device-pixel-ratio: 1.5)") %>
|
7
|
-
# <%= end %>
|
8
1
|
module Picturefill::Rails
|
9
2
|
module ViewHelper
|
10
3
|
|
4
|
+
# Usage: <%= picturefill(default_url, "AltText") do %>
|
5
|
+
# <%= image(small_url) %>
|
6
|
+
# <%= image(medium_url, :min => 400) %>
|
7
|
+
# <%= image(medium_high_dpi_url, :min => 400, :ratio => 1.5) %>
|
8
|
+
# <%= image(large_url, :min => 1000) %>
|
9
|
+
# <%= image(large_high_dpi_url, "(min-width: 1000px) and (min-device-pixel-ratio: 1.5)") %>
|
10
|
+
# <%= end %>
|
11
11
|
def picturefill(default_src, description, &block)
|
12
12
|
raise ArgumentError.new("No Block given") unless block_given?
|
13
13
|
|
data/lib/picturefill/version.rb
CHANGED
@@ -98,10 +98,10 @@ describe Picturefill::Rails::ViewHelper do
|
|
98
98
|
|
99
99
|
|
100
100
|
context "when given :min, :ratio && :media" do
|
101
|
-
subject { setup_image("small.jpg", :ratio => 2, :min =>
|
101
|
+
subject { setup_image("small.jpg", :ratio => 2, :min => 333, :media => 'custom') }
|
102
102
|
|
103
103
|
it "renders data-media with given options + custom media" do
|
104
|
-
subject.should include('data-media="(min-width:
|
104
|
+
subject.should include('data-media="(min-width: 333px) and (min-device-pixel-ratio: 2.0) and (custom)')
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: picturefill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Helm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-rails
|