Commit graph

98 commits

Author SHA1 Message Date
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
a31aa5d8be TrailingWhitespace 'cop' fix 2013-12-28 18:14:15 +00: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
Takehiro SUGITA
19908ca81a Add -B option as an alias to --skip-bundle 2013-11-08 19:45:49 +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
Mark Simulacrum
7606dfd494 Change latency option to :numeric type. 2013-08-21 05:33:29 -06:00
Mark-Simulacrum
c12d98df4f add comma at end of line 74 2013-08-20 15:59:38 -06:00
Mark-Simulacrum
d37eca6a54 Add latency option.
Aliased to -l.
2013-08-20 06:32:49 -06: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
2a5513dcc9 Add an experimental "console" CLI command.
The "console" command drops you into an IRB session in the context of the
Middleman application instance. You can look at configuration, poke around
at the sitemap and data, try out handlers (after calling self.current_path = "foo"), etc.
2013-02-10 16:12:32 -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
1b1a5c086e Add --force-polling flag to server. Closes #730. Closes #644 2013-01-13 11:57:18 -08:00
Thomas Reynolds
d4f5e4db29 Add --force-polling flag to server. Closes #730. Closes #644 2013-01-13 11:56:53 -08: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
Thomas Reynolds
1c62dd68a7 Simplify bundler init. Closes #700 2012-12-30 19:58:37 -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
Thomas Reynolds
0327e2067f Merge pull request #596 from bhollis/cli
Please create a "--skip-bundle" flag for middleman init
2012-09-15 18:09:53 -07:00
Ben Hollis
e0b88d91be Add skip-gemfile, skip-bundle, and skip-git options to middleman init, aligning with rails options. 2012-09-14 23:32:46 -07:00
Thomas Reynolds
345e7787b5 reloading fixes 2012-09-13 10:13:57 -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
193f32b9fb Add test gems to extension and a gitignore. Closes #570 2012-08-20 19:37:10 -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