middleman-imageoptim 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.cane DELETED
@@ -1,4 +0,0 @@
1
- --abc-max 10
2
- --gte coverage/covered_percent,74
3
- --no-style
4
- --color
@@ -1,58 +0,0 @@
1
- require_relative "../../lib/middleman-imageoptim/optimizer"
2
-
3
- describe Middleman::Imageoptim::Optimizer do
4
- subject(:optimizer) { Middleman::Imageoptim::Optimizer.new(app, builder, options) }
5
- let(:options) { Middleman::Imageoptim::Options.new() }
6
- let(:app) { double }
7
- let(:builder) { double }
8
- let(:size_src) { 1000 }
9
- let(:size_dst) { 1000 }
10
-
11
- describe "#size_change_word" do
12
- subject { optimizer.size_change_word(size_src, size_dst) }
13
-
14
- context "the destination file is the same size as the source file" do
15
- it "should be the same size" do
16
- subject.should == 'no change'
17
- end
18
- end
19
-
20
- context "the destination file is smaller" do
21
- let(:size_dst) { 500 }
22
- it "should be smaller" do
23
- subject.should == 'smaller'
24
- end
25
- end
26
-
27
- context "the destination file is larger" do
28
- let(:size_dst) { 1500 }
29
- it "should be larger" do
30
- subject.should == 'larger'
31
- end
32
- end
33
- end
34
-
35
- describe "#percentage_change" do
36
- subject { optimizer.percentage_change(size_src, size_dst) }
37
-
38
- context "the destination file is the same size as the source file" do
39
- it "should be the same size" do
40
- subject.should == "0.00%"
41
- end
42
- end
43
-
44
- context "the destination file is smaller" do
45
- let(:size_dst) { 500 }
46
- it "should be smaller" do
47
- subject.should == "50.00%"
48
- end
49
- end
50
-
51
- context "the destination file is larger" do
52
- let(:size_dst) { 1500 }
53
- it "should be larger" do
54
- subject.should == '-50.00%'
55
- end
56
- end
57
- end
58
- end
@@ -1,2 +0,0 @@
1
- require 'coveralls'
2
- Coveralls.wear!
@@ -1,15 +0,0 @@
1
- puts "[Simplecov] enabled"
2
- require 'simplecov'
3
-
4
- class SimpleCov::Formatter::QualityFormatter
5
- def format(result)
6
- SimpleCov::Formatter::HTMLFormatter.new.format(result)
7
- File.open("coverage/covered_percent", "w") do |f|
8
- f.puts result.source_files.covered_percent.to_f
9
- end
10
- end
11
- end
12
-
13
- SimpleCov.formatter = SimpleCov::Formatter::QualityFormatter
14
-
15
- SimpleCov.start 'rails'