Commit graph

78 commits

Author SHA1 Message Date
Thomas Reynolds bea2515a41 Move CLI into middleman-cli 2014-01-02 16:39:06 -08:00
Thomas Reynolds c95c924d53 build a config file jail 2013-12-31 18:21:30 -08:00
Thomas Reynolds 2e2415612a spring cleaning util and discovery of nasty variable mutating in url_for 2013-12-31 14:41:17 -08:00
Karl Freeman 03d6e6c990 Implemented Rubocop
- just took a stab at running the StringLiterals cop to get a taste.
2013-12-28 00:47:39 +00:00
Thomas Reynolds a1090f912c fix issue with UTF-8-MAC paths not matching UTF-8 paths in build clean 2013-12-18 14:54:07 -08:00
Ben Hollis f9728108cc Fix Mac filenames patch 2013-12-15 16:06:55 -08:00
Ben Hollis 39a9331232 Commit 8e99d39570 introduced a serious regression by encoding filenames within a "delete_if" block, meaning that every path in the list of all previously built files was re-encoded every time a file was built. For large projects this causes serious slowdowns - for a 4000 file test, it went from 14s to build to around 8 minutes to build. This change fixes the builder to only encode files when the file list is initially build, removing the bottleneck. 2013-12-10 22:11:59 -08:00
fukayatsu 8e99d39570 Handle UTF-8-MAC filename on MacOS 2013-11-24 02:10:46 +09:00
Ben Hollis d3e4882b93 Refactor the Build CLI code to be easier to read and use Pathname throughout.
This also throws an error if :build_dir is set to a parent directory of :source_dir, which resolves #991.
2013-10-19 18:11:29 -07:00
Ben Hollis 8a928863f2 Normalize paths in the cleaning queue using realpath in order to avoid complicated symlink problems. 2013-09-16 22:13:39 -07:00
Ben Hollis 268538f926 Make an effort to handle spaces in filenames in a way that url_for can handle. 2013-09-16 21:07:57 -07:00
Thomas Reynolds 913d2b7049 Implement generic which is a simple way to build a file from Rack 2013-06-13 09:05:13 -07:00
Thomas Reynolds 149f6ffa5b fix builder not cleaning empty directories 2013-05-31 21:20:15 -04:00
Ben Hollis b4d75351a2 Make errors more obvious during build (with color) and run after_build hooks even if there's an error. 2013-05-04 10:57:17 -07:00
Ben Hollis a2822ce7f5 Fix --clean option to not be an error if it is passed (for backwards compatibility) 2013-04-13 18:58:54 -07:00
Thomas Reynolds 2679b7c506 Default build to cleaning 2013-04-13 13:52:22 -07:00
Ben Hollis b9b17e3ac5 In general, no need for bundle exec since we call bundle/setup 2013-04-12 23:32:17 -07:00
Ben Hollis 6672c1c324 Merge branch '3.0-stable' 2013-03-10 16:32:55 -07:00
Kevin McCarthy 7608275089 Fix dynamic multi-byte utf-8 files rebuilding.
Thor compares the new contents with the existing file by using
File.binread(destination) == new_content.
File.binread returns a string with ASCII_8BIT encoding, which will not
match the new_content if new_content contains multi-byte utf-8.

This patch simply encodes the new_content to ASCII_8BIT before passing
it to Thor.
2013-03-03 18:13:41 -08:00
Ben Hollis 52c4677391 Merge remote-tracking branch 'origin/3.0-stable'
Conflicts:
	middleman-core/lib/middleman-core/core_extensions/data.rb
	middleman-core/lib/middleman-core/core_extensions/front_matter.rb
	middleman-core/lib/middleman-core/util.rb
	middleman-core/middleman-core-x86-mingw32.gemspec
	middleman-more/lib/middleman-more/core_extensions/default_helpers.rb
	middleman-more/lib/middleman-more/core_extensions/i18n.rb
2013-02-10 15:41:36 -08:00
Ben Hollis 923697b517 Micro-optimizations around string comparisons 2013-02-09 15:21:52 -08:00
Ben Hollis c0c14f4eab Merge remote-tracking branch 'origin/3.0-stable'
Conflicts:
	CHANGELOG.md
	middleman-core/lib/middleman-core/cli/build.rb
	middleman-core/lib/middleman-core/core_extensions/rendering.rb
	middleman-core/lib/middleman-core/preview_server.rb
	middleman-core/lib/middleman-core/renderers/sass.rb
	middleman-core/lib/middleman-core/sitemap/store.rb
	middleman-core/lib/middleman-core/util.rb
	middleman-core/lib/middleman-core/version.rb
	middleman-more/lib/middleman-more/core_extensions/compass.rb
	middleman-more/lib/middleman-more/core_extensions/default_helpers.rb
	middleman-more/lib/middleman-more/extensions/asset_hash.rb
2013-01-25 21:43:30 -08:00
Ben Hollis 7c9c4d03db Make build error message code a bit more compact 2013-01-25 20:22:45 -08:00
Seth Vargo 95fa217cec Say middleman build instead of just middleman 2013-01-25 21:23:24 -05:00
Seth Vargo 12753c5759 add quotes and bundle exec to error message 2013-01-24 12:40:24 -05:00
Steven Sloan 17ad2caf11 also "build" .htpasswd files 2013-01-21 11:21:48 -08:00
Steven Sloan c121c407df also "build" .htpasswd files 2013-01-18 20:13:49 -05:00
Thomas Reynolds 7cd6cd233e Manually copy the file instead of asking Thor to do it 2013-01-02 16:40:42 -08:00
Thomas Reynolds fbb2a355d7 Copy binary files instead of rendering through MM. Closes #643. Closes #699 2012-12-30 20:44:29 -08:00
Thomas Reynolds 4eca29866b Copy binary files instead of rendering through MM. Closes #643. Closes #699 2012-12-30 20:37:40 -08:00
Ben Hollis 4fe22e3fb5 Move more things over to new configs. Don't let root be configured 2012-10-13 22:37:24 -07:00
Ben Hollis a50ca56fbc Switch over to new config methods 2012-10-13 21:37:02 -07:00
Thomas Reynolds 2aec04db69 Merge pull request #558 from bhollis/asset-hash-rack
Asset_hash doesn't play nice with Sprockets
2012-09-23 18:41:11 -07:00
Ben Hollis 6c241603ac Delay recalculating sitemap until absolutely necessary, avoiding redundant recalculations. 2012-09-16 19:36:47 -07:00
Ben Hollis 09ba0049d4 Fix asset_hashing assets affected by Rack middleware or mounted apps (like sprockets). Fixes #558 2012-09-11 00:08:58 -07:00
Thomas Reynolds f7fc041034 Check whether a Pathname exists before calling realpath in build. Closes #569 2012-08-20 19:28:43 -07:00
Thomas Reynolds 446aa6a4ba Clean up whitespace, play with cane for testing style quality and code complexity 2012-08-13 15:41:07 -07:00
Ben Hollis 00b590eedb Support profiling server startup and build via a --profile flag 2012-07-19 21:05:33 -07:00
Ben Hollis 62fa17cf1a Reduce work converting paths from relative to absolute and back again 2012-07-19 01:18:55 -07:00
Ben Hollis 1f22184fc7 Don't request __middleman__ 2012-07-19 01:18:55 -07:00
Thomas Reynolds de6d7980ac Use centralized Logger and add instrument methods 2012-07-18 09:30:39 -07:00
Thomas Reynolds 4b03c5e2df Add Middleman::Util.all_files_under to get a recursive listing of files beneath a path, follows symlinks. Fixes #515 2012-07-06 19:32:05 -07:00
Daniel Zuberbühler e9b996516b Fix option in build failure help message 2012-06-28 14:57:35 +02:00
Thomas Reynolds 8912d3627d Update Padrino to 0.10.7 and Thor to 0.15.3. Closes #495 2012-06-20 17:53:14 -07:00
Thomas Reynolds ddc0712c1b Say :update, not :create on automatic conflict resolution 2012-06-19 19:40:57 -07:00
Thomas Reynolds 5da63cb84f Emit identical message on build as before, removing confusion reported in #475 2012-06-17 12:11:07 -07:00
Thomas Reynolds 286c7352b6 Fix Less load paths, simplify builder error output. Fixes #461 2012-06-05 10:24:00 -07:00
Thomas Reynolds 2e5b0d75a9 Use pathname consistently in file watcher 2012-05-26 17:48:58 -07:00
Thomas Reynolds d79acc7a78 Make i18n a normal extension with options 2012-05-24 16:51:36 -07:00
Thomas Reynolds 94c5f32853 Re-arrange CLI loads for hopefully faster startup time 2012-05-24 11:18:49 -07:00