middleman 2.0.0.rc98 → 2.0.0.rc99

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ script: "bundle exec rake test"
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The Middleman is ever-vigilant against tag-soup, unreadable CSS and repetition. He stands-watch over your Haml, Sass, and CoffeeScript producing only the cleanest and most efficient markup.
4
4
 
5
+ [![Build Status](http://travis-ci.org/tdreyno/middleman.png)](http://travis-ci.org/tdreyno/middleman)
6
+
5
7
  ## Getting Started
6
8
 
7
9
  Everything you need to know is on the official site:
@@ -18,6 +18,6 @@ Feature: Builder
18
18
  And cleanup built app at "test-app"
19
19
 
20
20
  Scenario: Force relative assets
21
- Given a built test app with flags "--relative"
22
- Then "stylesheets/relative_assets.css" should exist at "test-app" and include "../"
23
- And cleanup built app at "test-app"
21
+ Given a built app at "relative-app" with flags "--relative"
22
+ Then "stylesheets/relative_assets.css" should exist at "relative-app" and include "../"
23
+ And cleanup built app at "relative-app"
@@ -13,9 +13,10 @@ Then /^cleanup built app at "([^"]*)"$/ do |path|
13
13
  FileUtils.rm_rf(target)
14
14
  end
15
15
 
16
- Given /^a built test app with flags "([^"]*)"$/ do |flags|
17
- target = File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "fixtures", "test-app")
18
- build_cmd = File.expand_path(File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "bin", "middleman build"))
16
+ Given /^a built app at "([^"]*)" with flags "([^"]*)"$/ do |path, flags|
17
+ root = File.dirname(File.dirname(File.dirname(__FILE__)))
18
+ target = File.join(root, "fixtures", path)
19
+ build_cmd = File.expand_path(File.join(root, "bin", "middleman build"))
19
20
  `cd #{target} && #{build_cmd} #{flags}`
20
21
  end
21
22
 
File without changes
@@ -0,0 +1,3 @@
1
+ @import "compass"
2
+ h1
3
+ background: image-url("blank.gif")
@@ -102,7 +102,7 @@ module Middleman
102
102
  end
103
103
 
104
104
  protected
105
- def handle_directory(lookup)
105
+ def handle_directory(lookup, &block)
106
106
  lookup = File.join(lookup, '*')
107
107
 
108
108
  results = Dir[lookup].sort do |a, b|
@@ -121,14 +121,14 @@ module Middleman
121
121
  end
122
122
  end
123
123
 
124
+ results = results.select(&block) if block_given?
125
+
124
126
  results.each do |file_source|
125
127
  if File.directory?(file_source)
126
128
  handle_directory(file_source)
127
129
  next
128
130
  end
129
131
 
130
- next if file_source.include?('layout') && !file_source.include?('.css')
131
-
132
132
  # Skip partials prefixed with an underscore
133
133
  next unless file_source.gsub(SHARED_SERVER.root, '').split('/').select { |p| p[0,1] == '_' }.empty?
134
134
 
@@ -146,7 +146,16 @@ module Middleman
146
146
  end
147
147
 
148
148
  def execute!
149
- handle_directory(source)
149
+ handle_directory(source) do |path|
150
+ file_name = path.gsub(SHARED_SERVER.views + "/", "")
151
+ if file_name == "layouts"
152
+ false
153
+ elsif file_name.include?("layout.") && file_name.split(".").length == 2
154
+ false
155
+ else
156
+ true
157
+ end
158
+ end
150
159
  end
151
160
  end
152
161
  end
@@ -1,3 +1,3 @@
1
1
  module Middleman
2
- VERSION = "2.0.0.rc98"
2
+ VERSION = "2.0.0.rc99"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424145
4
+ hash: 15424147
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 0
10
10
  - rc
11
- - 98
12
- version: 2.0.0.rc98
11
+ - 99
12
+ version: 2.0.0.rc99
13
13
  platform: ruby
14
14
  authors:
15
15
  - Thomas Reynolds
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-08-05 00:00:00 Z
20
+ date: 2011-08-06 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rack
@@ -412,6 +412,7 @@ extra_rdoc_files: []
412
412
  files:
413
413
  - .gemtest
414
414
  - .gitignore
415
+ - .travis.yml
415
416
  - CHANGELOG
416
417
  - Gemfile
417
418
  - LICENSE
@@ -456,6 +457,9 @@ files:
456
457
  - fixtures/indexable-app/source/leave_me_alone.html
457
458
  - fixtures/indexable-app/source/needs_index.html
458
459
  - fixtures/indexable-app/source/regular/index.html
460
+ - fixtures/relative-app/config.rb
461
+ - fixtures/relative-app/source/images/blank.gif
462
+ - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
459
463
  - fixtures/test-app/config.rb
460
464
  - fixtures/test-app/data/test.yml
461
465
  - fixtures/test-app/source/_partial.haml
@@ -669,6 +673,9 @@ test_files:
669
673
  - fixtures/indexable-app/source/leave_me_alone.html
670
674
  - fixtures/indexable-app/source/needs_index.html
671
675
  - fixtures/indexable-app/source/regular/index.html
676
+ - fixtures/relative-app/config.rb
677
+ - fixtures/relative-app/source/images/blank.gif
678
+ - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
672
679
  - fixtures/test-app/config.rb
673
680
  - fixtures/test-app/data/test.yml
674
681
  - fixtures/test-app/source/_partial.haml