picturefill 0.1.0 → 0.1.1

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: 9116e4b72c4b66e17ad230abb0bad52a8b3b76f7
4
- data.tar.gz: bc5c42ab83124ae7a36af6efc534fdc977ae654d
3
+ metadata.gz: b026ad5b538c54def5367f3154eb0052c99b80a2
4
+ data.tar.gz: 6709f7b2f4c94d56197ecb1d97c10f4d7632c97b
5
5
  SHA512:
6
- metadata.gz: aa1cfb90cef6fd88511c06822a90a2796890653a0f0fdfe1ae03f429c57e28ce813cbd5119386ec73fbcaa3f48d2283e7fee763d8e98066e709df3f1a2982587
7
- data.tar.gz: f8a42cd8ddbadc2fe3d9b8cae1b0cf8b26f18f884206b290ae6851baef1fc9b4d5dd451cb7e3a34dcc4ed9c6f9777a9c6088081f84ee4c9457d76e82ab2cd9b1
6
+ metadata.gz: 397cf74eee66231364fcbe455d9d3163d68c169bfe12be0b55e4cd27e57bee189d8e3dc49f39642654565a2fe124bbedf56120911b8870e097d05290b0559599
7
+ data.tar.gz: 236e5cf88571f01a7248fa7ca3106acc1d11a9f3475e38f4780b3436e49b5c3ee7c211828e45f06f6e8bd247e3d4432b1267a61e832b669f6254db2cb75881c9
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.sqlite3
3
4
  .bundle
4
5
  .config
5
6
  .ruby-gemset
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.8.7"
4
+ - "1.9.2"
5
+ - "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
10
+ # uncomment this line if your project needs to run something other than `rake`:
11
+ # script: bundle exec rspec spec
@@ -43,13 +43,13 @@ module Picturefill
43
43
  "(min-device-pixel-ratio: %.1f)" % ratio
44
44
  when nil
45
45
  else
46
- ArgumentError
46
+ raise ArgumentError.new("Only Float && Integer allowed")
47
47
  end
48
48
  media = "(#{media})" if media
49
49
 
50
50
  [min, ratio, media].select { |e| !e.nil? }.join(" and ")
51
51
  else
52
- ArgumentError("Only hash && string allowed")
52
+ raise ArgumentError.new("Only hash && string allowed")
53
53
  end
54
54
  end
55
55
 
@@ -1,3 +1,3 @@
1
1
  module Picturefill
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/picturefill.gemspec CHANGED
@@ -20,4 +20,5 @@ Gem::Specification.new do |gem|
20
20
  gem.add_development_dependency "rspec-rails"
21
21
  gem.add_development_dependency "rails"
22
22
  gem.add_development_dependency "sqlite3"
23
+ gem.add_development_dependency "simplecov"
23
24
  end
@@ -115,6 +115,24 @@ describe Picturefill::Rails::ViewHelper do
115
115
  end
116
116
 
117
117
 
118
+ context "when given invalid :ratio" do
119
+ it "raises an ArgumentError" do
120
+ expect {
121
+ setup_image("small.jpg", :ratio => ["evil"])
122
+ }.to raise_error(ArgumentError)
123
+ end
124
+ end
125
+
126
+
127
+ context "when given invalid params" do
128
+ it "raises an ArgumentError" do
129
+ expect {
130
+ setup_image("small.jpg", ["evil"])
131
+ }.to raise_error(ArgumentError)
132
+ end
133
+ end
134
+
135
+
118
136
  private
119
137
 
120
138
  def setup_image(*args)
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,14 @@
1
1
  # Configure Rails Environment
2
2
  ENV["RAILS_ENV"] = "test"
3
3
 
4
+ require 'simplecov'
5
+ SimpleCov.start do
6
+ add_filter "spec/dummy"
7
+ end
8
+
4
9
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
10
  require 'rspec/rails'
11
+
6
12
  require 'picturefill'
7
13
  # require 'capybara/rspec'
8
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picturefill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Helm
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: Rails-Wrapper for picturefill.js
56
70
  email:
57
71
  - deradon87@gmail.com
@@ -61,6 +75,7 @@ extra_rdoc_files: []
61
75
  files:
62
76
  - .gitignore
63
77
  - .rspec
78
+ - .travis.yml
64
79
  - CHANGELOG.md
65
80
  - Gemfile
66
81
  - LICENSE.txt
@@ -117,7 +132,6 @@ files:
117
132
  - spec/dummy/db/migrate/20120819164528_add_association_with_class_name.rb
118
133
  - spec/dummy/db/migrate/20130203095901_create_company.rb
119
134
  - spec/dummy/db/schema.rb
120
- - spec/dummy/db/test.sqlite3
121
135
  - spec/dummy/public/404.html
122
136
  - spec/dummy/public/422.html
123
137
  - spec/dummy/public/500.html
@@ -199,7 +213,6 @@ test_files:
199
213
  - spec/dummy/db/migrate/20120819164528_add_association_with_class_name.rb
200
214
  - spec/dummy/db/migrate/20130203095901_create_company.rb
201
215
  - spec/dummy/db/schema.rb
202
- - spec/dummy/db/test.sqlite3
203
216
  - spec/dummy/public/404.html
204
217
  - spec/dummy/public/422.html
205
218
  - spec/dummy/public/500.html
File without changes