picturefill 0.1.1 → 0.1.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: b026ad5b538c54def5367f3154eb0052c99b80a2
4
- data.tar.gz: 6709f7b2f4c94d56197ecb1d97c10f4d7632c97b
3
+ metadata.gz: f358326a54756fd9ae56464c2fe1503747082312
4
+ data.tar.gz: 822ccf1d5e60b5bf3488cf3495958a8b5b97e59c
5
5
  SHA512:
6
- metadata.gz: 397cf74eee66231364fcbe455d9d3163d68c169bfe12be0b55e4cd27e57bee189d8e3dc49f39642654565a2fe124bbedf56120911b8870e097d05290b0559599
7
- data.tar.gz: 236e5cf88571f01a7248fa7ca3106acc1d11a9f3475e38f4780b3436e49b5c3ee7c211828e45f06f6e8bd247e3d4432b1267a61e832b669f6254db2cb75881c9
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
- - jruby-18mode # JRuby in 1.8 mode
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
@@ -35,7 +35,7 @@ module Picturefill
35
35
  ratio = options.delete :ratio
36
36
  media = options.delete :media
37
37
 
38
- min = "(min-width: #{400}px)" if min
38
+ min = "(min-width: #{min}px)" if min
39
39
  ratio = case ratio
40
40
  when Float
41
41
  "(min-device-pixel-ratio: #{ratio})"
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Picturefill
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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 => 400, :media => 'custom') }
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: 400px) and (min-device-pixel-ratio: 2.0) and (custom)')
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.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-18 00:00:00.000000000 Z
11
+ date: 2013-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails