middleman-automatic-clowncar 0.0.2 → 0.0.3

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: 838adb189a7fc7d8dd53334d94746229e9a370cd
4
- data.tar.gz: 607ed693f77cdcaace13469d6f82c870cc30ce6c
3
+ metadata.gz: 1db98172ad4981d3e25b47af2bb7965303a9fea2
4
+ data.tar.gz: 927c278f26c6ec397d5c2e7d98817e4707953d86
5
5
  SHA512:
6
- metadata.gz: 84ff8fc5a6c8cb5404554bada79f72ac5c71de99f5f6faff37d2dc97f6f667d8938f2497914a6e3a03cd6ff3a74105c210a6c22784576bf04828b127a4015c32
7
- data.tar.gz: 5c828e443c5f26e4feef4d34872866377844e26bd5ab2c9baccf1db04c3b85a444b5481a4f13e5d0897c3f15d48f7cd1a3ecfa83414a1f6735676def5a8cf324
6
+ metadata.gz: 69b6c8f1547011bd61f9d82348dbe001655c6ba1ad87fb71b34f5246ba0d29d61ac207f18bcfae4bf27417db0ca3298ecdb9f82dcd304aa06deb9ea5b48be86d
7
+ data.tar.gz: 61a32cf7d0528c64590e8c3159d94f87420cf94b909f9cabf45890f74e0534cdb43826564d4b1ab90224c64a4a1fc985bf111ce6f7e9cc813ba5288dad87f608
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - 1.9.3
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in middleman-automatic-clowncar.gemspec
4
4
  gemspec
5
+
6
+ gem 'coveralls', require: false
data/README.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  Automatically generated responsive images for Middleman.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/middleman-automatic-clowncar.png)](http://badge.fury.io/rb/middleman-automatic-clowncar)
6
+ [![Build Status](https://travis-ci.org/Octo-Labs/middleman-automatic-clowncar.png?branch=master)](https://travis-ci.org/Octo-Labs/middleman-automatic-clowncar)
7
+ [![Code Climate](https://codeclimate.com/github/Octo-Labs/middleman-automatic-clowncar.png)](https://codeclimate.com/github/Octo-Labs/middleman-automatic-clowncar)
8
+ [![Coverage Status](https://coveralls.io/repos/Octo-Labs/middleman-automatic-clowncar/badge.png?branch=master)](https://coveralls.io/r/Octo-Labs/middleman-automatic-clowncar?branch=master)
9
+ [![Dependency Status](https://gemnasium.com/Octo-Labs/middleman-automatic-clowncar.png)](https://gemnasium.com/Octo-Labs/middleman-automatic-clowncar)
10
+
11
+
12
+
5
13
  ## Installation
6
14
 
7
15
  Add this line to your application's Gemfile:
@@ -27,7 +35,8 @@ activate :automatic_clowncar,
27
35
  :medium => 400,
28
36
  :large => 600
29
37
  },
30
- :namespace_directory => %w(photos)
38
+ :namespace_directory => %w(photos),
39
+ :filetypes => [:jpg, :jpeg, :png]
31
40
  ```
32
41
 
33
42
  At build time the extension will look in `source/photos` and will create
@@ -55,6 +64,12 @@ responsive image.
55
64
  <%= automatic_clowncar_tag 'photos/my-photo.jpg' %>
56
65
  ```
57
66
 
67
+ **Please note :** The directory for the images to be clowncar-ed
68
+ **must** be outside of (and different than) the `source/images`
69
+ directory. Middleman automatically does some things with `images`
70
+ that interfere with the operation of `middleman-automatic-clowncar`.
71
+
72
+
58
73
  ## Contributing
59
74
 
60
75
  1. Fork it ( http://github.com/<my-github-username>/middleman-automatic-clowncar/fork )
data/Rakefile CHANGED
@@ -1 +1,14 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ desc "Run tests for travis"
4
+ task :travis do
5
+ ["cucumber"].each do |cmd|
6
+ puts "Starting to run #{cmd}..."
7
+ system("export DISPLAY=:99.0 && bundle exec #{cmd}")
8
+ raise "#{cmd} failed!" unless $?.exitstatus == 0
9
+ end
10
+ end
11
+
12
+ desc 'Default: run tests.'
13
+ task :default => ['travis']
14
+
@@ -2,7 +2,7 @@ Feature: Generating SVG clowncars during preview mode
2
2
 
3
3
  Scenario: Basic command
4
4
  Given a fixture app "automatic-clowncar-app"
5
- And a file named "source/index.html.erb" with:
5
+ And a file named "source/testfile.html.erb" with:
6
6
  """
7
7
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/" %>
8
8
  """
@@ -11,14 +11,15 @@ Feature: Generating SVG clowncars during preview mode
11
11
  #Then the following files should not exist:
12
12
  # | photos/test-image.jpg |
13
13
  Then the following files should exist:
14
+ | testfile.html |
14
15
  | photos/test-image.jpg |
15
16
  | photos/test-image/test-image-small.jpg |
16
17
  | photos/test-image/test-image-medium.jpg |
17
18
  | photos/test-image/test-image-large.jpg |
18
- Then the file "index.html" should contain "<object"
19
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
20
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
21
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
19
+ Then the file "testfile.html" should contain "<object"
20
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
21
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
22
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
22
23
 
23
24
  Scenario: Basic command with asset_host
24
25
  Given a fixture app "automatic-clowncar-app"
@@ -33,7 +34,7 @@ Feature: Generating SVG clowncars during preview mode
33
34
  :namespace_directory => %w(photos)
34
35
  activate :asset_host, :host => "http://localhost:4567/"
35
36
  """
36
- And a file named "source/index.html.erb" with:
37
+ And a file named "source/testfile.html.erb" with:
37
38
  """
38
39
  <%= automatic_clowncar_tag "photos/test-image.jpg" %>
39
40
  """
@@ -45,14 +46,14 @@ Feature: Generating SVG clowncars during preview mode
45
46
  | photos/test-image/test-image-small.jpg |
46
47
  | photos/test-image/test-image-medium.jpg |
47
48
  | photos/test-image/test-image-large.jpg |
48
- Then the file "index.html" should contain "<object"
49
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
50
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
51
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
49
+ Then the file "testfile.html" should contain "<object"
50
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
51
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
52
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
52
53
 
53
54
  Scenario: With OldIE Fallback
54
55
  Given a fixture app "automatic-clowncar-app"
55
- And a file named "source/index.html.erb" with:
56
+ And a file named "source/testfile.html.erb" with:
56
57
  """
57
58
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/", :fallback => true %>
58
59
  """
@@ -64,18 +65,18 @@ Feature: Generating SVG clowncars during preview mode
64
65
  | photos/test-image/test-image-small.jpg |
65
66
  | photos/test-image/test-image-medium.jpg |
66
67
  | photos/test-image/test-image-large.jpg |
67
- Then the file "index.html" should contain "<object"
68
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
69
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
70
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
71
- And the file "index.html" should contain "<!--[if lte IE 8]>"
72
- And the file "index.html" should contain '<img src="/photos/test-image/test-image-small.jpg">'
73
- And the file "index.html" should contain "<![endif]-->"
68
+ Then the file "testfile.html" should contain "<object"
69
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
70
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
71
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
72
+ And the file "testfile.html" should contain "<!--[if lte IE 8]>"
73
+ And the file "testfile.html" should contain '<img src="/photos/test-image/test-image-small.jpg">'
74
+ And the file "testfile.html" should contain "<![endif]-->"
74
75
 
75
76
 
76
77
  Scenario: With prevent_upscaling
77
78
  Given a fixture app "automatic-clowncar-app"
78
- And a file named "source/index.html.erb" with:
79
+ And a file named "source/testfile.html.erb" with:
79
80
  """
80
81
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/", :prevent_upscaling => true %>
81
82
  """
@@ -87,15 +88,15 @@ Feature: Generating SVG clowncars during preview mode
87
88
  | photos/test-image/test-image-small.jpg |
88
89
  | photos/test-image/test-image-medium.jpg |
89
90
  | photos/test-image/test-image-large.jpg |
90
- Then the file "index.html" should contain "<object"
91
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
92
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
93
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
94
- And the file "index.html" should contain "max-width:1576px"
91
+ Then the file "testfile.html" should contain "<object"
92
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
93
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
94
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:401px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
95
+ And the file "testfile.html" should contain "max-width:1576px"
95
96
 
96
97
  Scenario: Including originals
97
98
  Given a fixture app "automatic-clowncar-app"
98
- And a file named "source/index.html.erb" with:
99
+ And a file named "source/testfile.html.erb" with:
99
100
  """
100
101
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/", :include_original => true %>
101
102
  """
@@ -108,11 +109,11 @@ Feature: Generating SVG clowncars during preview mode
108
109
  | photos/test-image/test-image-small.jpg |
109
110
  | photos/test-image/test-image-medium.jpg |
110
111
  | photos/test-image/test-image-large.jpg |
111
- Then the file "index.html" should contain "<object"
112
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
113
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
114
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:401px)%20and%20(max-width:600px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
115
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:601px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/../test-image.jpg);%7D%7D"
112
+ Then the file "testfile.html" should contain "<object"
113
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
114
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
115
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:401px)%20and%20(max-width:600px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
116
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:601px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/../test-image.jpg);%7D%7D"
116
117
 
117
118
  Scenario: Don't generate upscaled images
118
119
  Given a fixture app "automatic-clowncar-app"
@@ -127,7 +128,7 @@ Feature: Generating SVG clowncars during preview mode
127
128
  :namespace_directory => %w(photos)
128
129
  activate :asset_host, :host => "http://localhost:4567/"
129
130
  """
130
- And a file named "source/index.html.erb" with:
131
+ And a file named "source/testfile.html.erb" with:
131
132
  """
132
133
  <%= automatic_clowncar_tag "photos/test-image.jpg" %>
133
134
  """
@@ -138,10 +139,10 @@ Feature: Generating SVG clowncars during preview mode
138
139
  Then the following files should exist:
139
140
  | photos/test-image/test-image-small.jpg |
140
141
  | photos/test-image/test-image-medium.jpg |
141
- Then the file "index.html" should contain "<object"
142
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
143
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
144
- And the file "index.html" should not contain "test-image-huge.jpg"
142
+ Then the file "testfile.html" should contain "<object"
143
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
144
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
145
+ And the file "testfile.html" should not contain "test-image-huge.jpg"
145
146
 
146
147
  Scenario: Including originals at the top level
147
148
  Given a fixture app "automatic-clowncar-app"
@@ -157,7 +158,7 @@ Feature: Generating SVG clowncars during preview mode
157
158
  :include_originals => true
158
159
  activate :asset_host, :host => "http://localhost:4567/"
159
160
  """
160
- And a file named "source/index.html.erb" with:
161
+ And a file named "source/testfile.html.erb" with:
161
162
  """
162
163
  <%= automatic_clowncar_tag "photos/test-image.jpg" %>
163
164
  """
@@ -170,10 +171,10 @@ Feature: Generating SVG clowncars during preview mode
170
171
  | photos/test-image/test-image-small.jpg |
171
172
  | photos/test-image/test-image-medium.jpg |
172
173
  | photos/test-image/test-image-large.jpg |
173
- Then the file "index.html" should contain "<object"
174
- And the file "index.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
175
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
176
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:401px)%20and%20(max-width:600px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
177
- And the file "index.html" should contain "@media%20screen%20and%20(min-width:601px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/../test-image.jpg);%7D%7D"
174
+ Then the file "testfile.html" should contain "<object"
175
+ And the file "testfile.html" should contain "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
176
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
177
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:401px)%20and%20(max-width:600px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-large.jpg);%7D%7D"
178
+ And the file "testfile.html" should contain "@media%20screen%20and%20(min-width:601px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/../test-image.jpg);%7D%7D"
178
179
 
179
180
 
@@ -2,12 +2,12 @@ Feature: Generating SVG clowncars during preview mode
2
2
 
3
3
  Scenario: Basic command
4
4
  Given a fixture app "automatic-clowncar-app"
5
- And a file named "source/index.html.erb" with:
5
+ And a file named "source/not-index.html.erb" with:
6
6
  """
7
7
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/" %>
8
8
  """
9
9
  And the Server is running at "automatic-clowncar-app"
10
- When I go to "/index.html"
10
+ When I go to "/not-index.html"
11
11
  Then I should see "<object"
12
12
  And I should see "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
13
13
  And I should see "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
@@ -26,12 +26,12 @@ Feature: Generating SVG clowncars during preview mode
26
26
  :namespace_directory => %w(photos)
27
27
  activate :asset_host, :host => "http://localhost:4567/"
28
28
  """
29
- And a file named "source/index.html.erb" with:
29
+ And a file named "source/not-index.html.erb" with:
30
30
  """
31
31
  <%= automatic_clowncar_tag "photos/test-image.jpg" %>
32
32
  """
33
33
  And the Server is running at "automatic-clowncar-app"
34
- When I go to "/index.html"
34
+ When I go to "/not-index.html"
35
35
  Then I should see "<object"
36
36
  And I should see "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
37
37
  And I should see "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
@@ -39,12 +39,12 @@ Feature: Generating SVG clowncars during preview mode
39
39
 
40
40
  Scenario: With OldIE Fallback
41
41
  Given a fixture app "automatic-clowncar-app"
42
- And a file named "source/index.html.erb" with:
42
+ And a file named "source/not-index.html.erb" with:
43
43
  """
44
44
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/", :fallback => true %>
45
45
  """
46
46
  And the Server is running at "automatic-clowncar-app"
47
- When I go to "/index.html"
47
+ When I go to "/not-index.html"
48
48
  Then I should see "<object"
49
49
  And I should see "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
50
50
  And I should see "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
@@ -55,12 +55,12 @@ Feature: Generating SVG clowncars during preview mode
55
55
 
56
56
  Scenario: With prevent_upscaling
57
57
  Given a fixture app "automatic-clowncar-app"
58
- And a file named "source/index.html.erb" with:
58
+ And a file named "source/not-index.html.erb" with:
59
59
  """
60
60
  <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/", :prevent_upscaling => true %>
61
61
  """
62
62
  And the Server is running at "automatic-clowncar-app"
63
- When I go to "/index.html"
63
+ When I go to "/not-index.html"
64
64
  Then I should see "<object"
65
65
  And I should see "@media%20screen%20and%20(max-width:200px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-small.jpg);%7D%7D"
66
66
  And I should see "@media%20screen%20and%20(min-width:201px)%20and%20(max-width:400px)%7Bsvg%7Bbackground-image:url(http://localhost:4567/photos/test-image/test-image-medium.jpg);%7D%7D"
@@ -1,11 +1,19 @@
1
1
  ENV["TEST"] = "true"
2
2
  ENV["AUTOLOAD_SPROCKETS"] = "false"
3
3
 
4
- require 'simplecov'
5
- SimpleCov.start
4
+ #require 'coveralls'
5
+ #Coveralls.wear!
6
+
7
+ #require 'simplecov'
8
+ #SimpleCov.start
9
+
6
10
 
7
11
  PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
8
12
  require "middleman-core"
9
13
  require "middleman-core/step_definitions"
10
14
  require "middleman-sprockets"
11
15
  require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-automatic-clowncar')
16
+
17
+
18
+
19
+
@@ -1,3 +1,14 @@
1
1
  Given(/^the file "(.*?)" has been overwritten with "(.*?)"$/) do |file1,file2|
2
2
  FileUtils.cp File.join(current_dir,file2), File.join(current_dir,file1)
3
3
  end
4
+
5
+ Given(/^some time has passed$/) do
6
+ sleep 30
7
+ end
8
+
9
+ Then(/^we should write some stuff to the console$/) do
10
+ puts "here's index.html"
11
+ puts File.open(File.join(current_dir,"index.html")).read
12
+ puts "------"
13
+ puts File.open(File.join(current_dir,"photos/test-image/test-image-small.jpg"),'rb').read
14
+ end
@@ -0,0 +1 @@
1
+ <%= thumbnail_url "photos/test-image.jpg", :medium %>
@@ -19,6 +19,9 @@ module Middleman
19
19
  false
20
20
  end
21
21
 
22
+ def source_file
23
+ nil
24
+ end
22
25
  #def source_file
23
26
  #output_dir = File.join(@root_path,@build_dir)
24
27
  #dest_path = File.join(output_dir,@path)
@@ -18,6 +18,9 @@ module Middleman
18
18
  Utils.origin_mtime(@source_dir,@origin)
19
19
  end
20
20
 
21
+ def source_file
22
+ nil
23
+ end
21
24
  # def request_path
22
25
  # @request_path
23
26
  # end
@@ -1,3 +1,3 @@
1
1
  module MiddlemanAutomaticClowncar
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -18,18 +18,18 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "middleman-core", "~> 3.2.2"
22
-
21
+ spec.add_dependency "middleman-core", "> 3.2.2"
22
+
23
23
  spec.add_dependency("mini_magick", ["~> 3.7.0"])
24
- spec.add_dependency "fastimage", "~> 1.5.5"
24
+ spec.add_dependency "fastimage", "~> 1.6.0"
25
25
 
26
26
  # These are here to make sure that we don't have any collisions with sprockets
27
- spec.add_dependency "middleman-sprockets", "~> 3.2.0"
27
+ spec.add_dependency "middleman-sprockets", "> 3.2.0"
28
28
  spec.add_dependency "sass", "~> 3.2.14"
29
29
 
30
30
  spec.add_development_dependency "bundler", "~> 1.5"
31
31
  spec.add_development_dependency "rake"
32
32
  spec.add_development_dependency "cucumber", "~> 1.3.10"
33
33
  spec.add_development_dependency "aruba", "~> 0.5.1"
34
- spec.add_development_dependency "simplecov", "~> 0.8.2"
34
+ #spec.add_development_dependency "simplecov", "~> 0.8.2"
35
35
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-automatic-clowncar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-02 00:00:00.000000000 Z
11
+ date: 2014-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.2.2
27
27
  - !ruby/object:Gem::Dependency
@@ -44,26 +44,26 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.5
47
+ version: 1.6.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.5
54
+ version: 1.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: middleman-sprockets
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.2.0
69
69
  - !ruby/object:Gem::Dependency
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.5.1
139
- - !ruby/object:Gem::Dependency
140
- name: simplecov
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 0.8.2
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 0.8.2
153
139
  description: Automatically generated responsive images for middleman.
154
140
  email:
155
141
  - jeremy@octolabs.com
@@ -158,6 +144,7 @@ extensions: []
158
144
  extra_rdoc_files: []
159
145
  files:
160
146
  - ".gitignore"
147
+ - ".travis.yml"
161
148
  - Gemfile
162
149
  - LICENSE.txt
163
150
  - README.md
@@ -172,6 +159,7 @@ files:
172
159
  - fixtures/automatic-clowncar-app/source/index.html
173
160
  - fixtures/automatic-clowncar-app/source/photos/test-image.jpg
174
161
  - fixtures/automatic-clowncar-app/source/tag.html.erb
162
+ - fixtures/automatic-clowncar-app/source/thumbnail.html.erb
175
163
  - lib/middleman-automatic-clowncar.rb
176
164
  - lib/middleman-automatic-clowncar/extension.rb
177
165
  - lib/middleman-automatic-clowncar/sitemap-extension.rb
@@ -203,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
191
  version: '0'
204
192
  requirements: []
205
193
  rubyforge_project:
206
- rubygems_version: 2.2.0.rc.1
194
+ rubygems_version: 2.2.2
207
195
  signing_key:
208
196
  specification_version: 4
209
197
  summary: Automatically generated responsive images for middleman.