middleman-cli 4.6.1 → 5.0.0.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.simplecov +5 -2
- data/.yardopts +6 -2
- data/Rakefile +1 -1
- data/bin/middleman +8 -11
- data/lib/middleman-cli/build.rb +45 -10
- data/lib/middleman-cli/extension.rb +0 -1
- data/lib/middleman-cli/init.rb +54 -35
- data/lib/middleman-cli/templates/extension/Gemfile +1 -1
- data/lib/middleman-cli/templates/extension/Rakefile +1 -1
- data/lib/middleman-cli/templates/extension/gemspec +2 -2
- data/lib/middleman-cli/templates/extension/lib/lib/extension.rb +1 -1
- data/lib/middleman-cli/templates/extension/lib/lib.rb +1 -1
- data/lib/middleman-cli.rb +1 -1
- data/middleman-cli.gemspec +7 -7
- metadata +13 -48
- data/features/cli_extension.feature +0 -14
- data/features/cli_init.feature +0 -92
- data/features/preview_server-hook.feature +0 -17
- data/features/preview_server.feature +0 -535
- data/features/support/env.rb +0 -12
- data/fixtures/preview-server-app/bin/dns_server.rb +0 -33
- data/fixtures/preview-server-app/source/index.html.erb +0 -1
- data/fixtures/preview-server-app/source/layout.erb +0 -9
- data/fixtures/preview-server-app/source/layouts/custom.erb +0 -8
- data/fixtures/preview-server-app/source/real/index.html.erb +0 -5
- data/fixtures/preview-server-app/source/real.html +0 -1
- data/fixtures/preview-server-app/source/should_be_ignored.html +0 -1
- data/fixtures/preview-server-app/source/should_be_ignored2.html +0 -1
- data/fixtures/preview-server-app/source/should_be_ignored3.html +0 -1
- data/fixtures/preview-server-app/source/static.html +0 -1
- data/fixtures/preview-server-hook-app/config.rb +0 -19
- data/fixtures/preview-server-hook-app/source/index.html.erb +0 -9
- /data/{fixtures/preview-server-app/config.rb → .gemtest} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19953457367b99c42c2eabb63a759d447fd652b18baef40c0b1f85b37bca20ca
|
4
|
+
data.tar.gz: 62e4b6c8ab48aa2e560f43441cbd9cfc7c82d020d017628f6f7ecd1a8fd73457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77c8d219e000a0239f8af2ae6447c11e8636e0907116a563a82a36c301a18f7f140e1fa55e494c44a6f004208c3ff300c6feb0e1e01293ff6a9fa5a8cec0a5ec
|
7
|
+
data.tar.gz: d88dcf0a57b1ddb76d5af0735f18b951b52926d61f8d875770b6b4f785deef449ab64eb014eb58c17f85f0b76dd781c4cca85153b50e97c66b956c2548560dc9
|
data/.simplecov
CHANGED
data/.yardopts
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
lib/**/*.rb
|
2
|
-
--exclude lib/middleman-cli/templates/
|
2
|
+
--exclude lib/middleman-cli/templates/default/
|
3
|
+
--exclude lib/middleman-cli/templates/html5/
|
4
|
+
--exclude lib/middleman-cli/templates/mobile/
|
5
|
+
--exclude lib/middleman-cli/templates/shared/
|
6
|
+
--exclude lib/middleman-cli/templates/extension/
|
3
7
|
--no-private
|
4
8
|
--hide-void-return
|
5
|
-
--markup=markdown
|
9
|
+
--markup=markdown
|
data/Rakefile
CHANGED
data/bin/middleman
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'middleman-core/profiling'
|
4
|
-
if ARGV.include? '--profile'
|
5
|
-
Middleman::Profiling.profiler = Middleman::Profiling::RubyProfProfiler.new
|
6
|
-
end
|
7
|
-
# Middleman::Profiling.start
|
4
|
+
Middleman::Profiling.profiler = Middleman::Profiling::RubyProfProfiler.new if ARGV.include? '--profile'
|
8
5
|
|
9
|
-
require
|
6
|
+
require 'middleman-core/load_paths'
|
10
7
|
Middleman.setup_load_paths
|
11
8
|
|
12
9
|
require 'dotenv'
|
@@ -35,19 +32,16 @@ module Middleman::Cli
|
|
35
32
|
end
|
36
33
|
end
|
37
34
|
|
38
|
-
require
|
35
|
+
require 'middleman-cli'
|
39
36
|
|
40
37
|
# Change directory to the root
|
41
|
-
Dir.chdir(ENV[
|
38
|
+
Dir.chdir(ENV['MM_ROOT']) if ENV['MM_ROOT']
|
42
39
|
|
43
40
|
# Default command is server
|
44
|
-
if ARGV[0] != 'help' && (ARGV.
|
45
|
-
ARGV.unshift('server')
|
46
|
-
end
|
41
|
+
ARGV.unshift('server') if ARGV[0] != 'help' && (ARGV.empty? || ARGV.first.include?('-'))
|
47
42
|
|
48
43
|
::Middleman::Logger.singleton(3)
|
49
44
|
::Middleman::Cli.config = ::Middleman::Application.new do
|
50
|
-
#
|
51
45
|
config[:environment] = (ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development').to_sym
|
52
46
|
config[:mode] = :config
|
53
47
|
config[:exit_before_ready] = true
|
@@ -66,5 +60,8 @@ require 'middleman-cli/build'
|
|
66
60
|
require 'middleman-cli/console'
|
67
61
|
require 'middleman-cli/config'
|
68
62
|
|
63
|
+
# Support NO_COLOR: https://no-color.org
|
64
|
+
ENV['THOR_SHELL'] = 'Basic' if ENV['NO_COLOR']
|
65
|
+
|
69
66
|
# Start the CLI
|
70
67
|
Middleman::Cli::Base.start(ARGV)
|
data/lib/middleman-cli/build.rb
CHANGED
@@ -40,15 +40,39 @@ module Middleman::Cli
|
|
40
40
|
type: :boolean,
|
41
41
|
default: false,
|
42
42
|
desc: 'Generate profiling report for the build'
|
43
|
+
class_option :dry_run,
|
44
|
+
type: :boolean,
|
45
|
+
default: false,
|
46
|
+
desc: 'Skip writing output files'
|
47
|
+
class_option :track_dependencies,
|
48
|
+
type: :boolean,
|
49
|
+
default: false,
|
50
|
+
desc: 'Track file dependencies'
|
51
|
+
class_option :data_collection_depth,
|
52
|
+
type: :numeric,
|
53
|
+
default: ::Float::INFINITY,
|
54
|
+
desc: 'How deep to recurse into data structures when tracking changes.'
|
55
|
+
class_option :visualize_graph,
|
56
|
+
type: :boolean,
|
57
|
+
default: false,
|
58
|
+
desc: 'Generate a visual of the dependency graph'
|
59
|
+
class_option :only_changed,
|
60
|
+
type: :boolean,
|
61
|
+
default: false,
|
62
|
+
desc: 'Only build changed files'
|
63
|
+
class_option :missing_and_changed,
|
64
|
+
type: :boolean,
|
65
|
+
default: false,
|
66
|
+
desc: 'Only build changed files or files missing from build folder'
|
43
67
|
|
44
68
|
Middleman::Cli.import_config(self)
|
45
69
|
|
46
70
|
# Core build Thor command
|
47
71
|
# @return [void]
|
48
72
|
def build
|
49
|
-
|
50
|
-
|
51
|
-
|
73
|
+
root = ENV['MM_ROOT'] || Dir.pwd
|
74
|
+
|
75
|
+
raise Thor::Error, 'Error: Could not find a Middleman project config, perhaps you are in the wrong folder?' unless File.exist?(File.join(root, 'config.rb'))
|
52
76
|
|
53
77
|
require 'middleman-core'
|
54
78
|
require 'middleman-core/logger'
|
@@ -64,18 +88,29 @@ module Middleman::Cli
|
|
64
88
|
::Middleman::Logger.singleton(verbose, instrument)
|
65
89
|
|
66
90
|
::Middleman::Util.instrument 'builder.setup' do
|
91
|
+
missing_and_changed = !options['only_changed'] && options['missing_and_changed']
|
92
|
+
should_track_dependencies = options['only_changed'] || missing_and_changed || options['track_dependencies']
|
93
|
+
data_collection_depth = options['data_collection_depth']
|
94
|
+
|
67
95
|
@app = ::Middleman::Application.new do
|
68
96
|
config[:mode] = :build
|
69
97
|
config[:show_exceptions] = false
|
70
98
|
config[:cli_options] = cli_options.each_with_object({}) do |(k, v), sum|
|
71
99
|
sum[k] = v
|
72
100
|
end
|
101
|
+
config[:track_data_access] = should_track_dependencies
|
102
|
+
config[:data_collection_depth] = data_collection_depth
|
73
103
|
end
|
74
104
|
|
75
105
|
builder = Middleman::Builder.new(@app,
|
76
106
|
glob: options['glob'],
|
107
|
+
dry_run: options['dry_run'],
|
77
108
|
clean: options['clean'],
|
78
|
-
parallel: options['parallel']
|
109
|
+
parallel: options['parallel'],
|
110
|
+
only_changed: options['only_changed'],
|
111
|
+
missing_and_changed: missing_and_changed,
|
112
|
+
track_dependencies: should_track_dependencies,
|
113
|
+
visualize_graph: options['visualize_graph'])
|
79
114
|
builder.thor = self
|
80
115
|
builder.on_build_event(&method(:on_event))
|
81
116
|
end
|
@@ -83,12 +118,10 @@ module Middleman::Cli
|
|
83
118
|
::Middleman::Util.instrument 'builder.run' do
|
84
119
|
if builder.run!
|
85
120
|
clean_directories! if options['clean']
|
86
|
-
|
121
|
+
puts 'Project built successfully.'
|
87
122
|
else
|
88
123
|
msg = 'There were errors during this build'
|
89
|
-
unless options['verbose']
|
90
|
-
msg << ', re-run with `middleman build --verbose` to see the full exception.'
|
91
|
-
end
|
124
|
+
msg << ', re-run with `middleman build --verbose` to see the full exception.' unless options['verbose']
|
92
125
|
shell.say msg, :red
|
93
126
|
|
94
127
|
exit(1)
|
@@ -100,10 +133,10 @@ module Middleman::Cli
|
|
100
133
|
|
101
134
|
# Handles incoming events from the builder.
|
102
135
|
# @param [Symbol] event_type The type of event.
|
103
|
-
# @param [String]
|
136
|
+
# @param [String] target The event contents.
|
104
137
|
# @param [String] extra The extra information.
|
105
138
|
# @return [void]
|
106
|
-
def on_event(event_type, target, extra=nil)
|
139
|
+
def on_event(event_type, target, extra = nil)
|
107
140
|
case event_type
|
108
141
|
when :error
|
109
142
|
say_status :error, target, :red
|
@@ -116,6 +149,8 @@ module Middleman::Cli
|
|
116
149
|
say_status :create, target, :green
|
117
150
|
when :identical
|
118
151
|
say_status :identical, target, :blue
|
152
|
+
when :skipped
|
153
|
+
say_status :skipped, target, :blue
|
119
154
|
when :updated
|
120
155
|
say_status :updated, target, :yellow
|
121
156
|
else
|
@@ -24,7 +24,6 @@ module Middleman::Cli
|
|
24
24
|
class_option :git, type: :boolean, default: true
|
25
25
|
|
26
26
|
# The extension task
|
27
|
-
# @param [String] name
|
28
27
|
def extension
|
29
28
|
copy_file 'extension/gitignore', File.join(name, '.gitignore') unless options[:'skip-git']
|
30
29
|
template 'extension/Rakefile', File.join(name, 'Rakefile')
|
data/lib/middleman-cli/init.rb
CHANGED
@@ -22,6 +22,10 @@ module Middleman::Cli
|
|
22
22
|
default: false,
|
23
23
|
desc: 'Skip bundle install'
|
24
24
|
|
25
|
+
class_option 'bundle-path',
|
26
|
+
type: :string,
|
27
|
+
desc: 'Use specified bundle path'
|
28
|
+
|
25
29
|
# The init task
|
26
30
|
def init
|
27
31
|
require 'fileutils'
|
@@ -35,38 +39,29 @@ module Middleman::Cli
|
|
35
39
|
end
|
36
40
|
|
37
41
|
repo_path, repo_branch = if shortname?(options[:template])
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
dir = Dir.mktmpdir
|
42
|
+
require 'open-uri'
|
43
|
+
require 'json'
|
44
|
+
|
45
|
+
api = 'https://directory.middlemanapp.com/api'
|
46
|
+
uri = ::URI.parse("#{api}/#{options[:template]}.json")
|
47
|
+
|
48
|
+
begin
|
49
|
+
data = ::JSON.parse(uri.read)
|
50
|
+
is_local_dir = false
|
51
|
+
data['links']['github'].split('#')
|
52
|
+
rescue ::OpenURI::HTTPError
|
53
|
+
say "Template `#{options[:template]}` not found in Middleman Directory."
|
54
|
+
say 'Did you mean to use a full `user/repo` path?'
|
55
|
+
exit 1
|
56
|
+
end
|
57
|
+
else
|
58
|
+
repo_name, repo_branch = options[:template].split('#')
|
59
|
+
repo_path, is_local_dir = repository_path(repo_name)
|
60
|
+
[repo_path, repo_branch]
|
61
|
+
end
|
59
62
|
|
60
63
|
begin
|
61
|
-
|
62
|
-
|
63
|
-
git_path = "#{branch_cmd}#{repo_path}"
|
64
|
-
run("#{GIT_CMD} clone --depth 1 #{branch_cmd}#{repo_path} #{dir}")
|
65
|
-
|
66
|
-
unless $?.success?
|
67
|
-
say "Git clone command failed. Make sure git repository exists: #{git_path}", :red
|
68
|
-
exit 1
|
69
|
-
end
|
64
|
+
dir = is_local_dir ? repo_path : clone_repository(repo_path, repo_branch)
|
70
65
|
|
71
66
|
inside(target) do
|
72
67
|
thorfile = File.join(dir, 'Thorfile')
|
@@ -74,16 +69,17 @@ module Middleman::Cli
|
|
74
69
|
if File.exist?(thorfile)
|
75
70
|
::Thor::Util.load_thorfile(thorfile)
|
76
71
|
|
77
|
-
invoke 'middleman:generator
|
72
|
+
invoke 'middleman:generator'
|
78
73
|
else
|
79
74
|
source_paths << dir
|
80
75
|
directory dir, '.', exclude_pattern: /\.git\/|\.gitignore$/
|
81
76
|
end
|
82
77
|
|
83
|
-
|
78
|
+
bundle_args = options[:'bundle-path'] ? " --path=#{options[:'bundle-path']}" : ''
|
79
|
+
run("bundle install#{bundle_args}") unless ENV['TEST'] || options[:'skip-bundle']
|
84
80
|
end
|
85
81
|
ensure
|
86
|
-
FileUtils.remove_entry(dir) if File.directory?(dir)
|
82
|
+
FileUtils.remove_entry(dir) if !is_local_dir && File.directory?(dir)
|
87
83
|
end
|
88
84
|
end
|
89
85
|
|
@@ -92,6 +88,7 @@ module Middleman::Cli
|
|
92
88
|
# Copied from Bundler
|
93
89
|
def git_present?
|
94
90
|
return @git_present if defined?(@git_present)
|
91
|
+
|
95
92
|
@git_present = which(GIT_CMD) || which('git.exe')
|
96
93
|
end
|
97
94
|
|
@@ -112,8 +109,30 @@ module Middleman::Cli
|
|
112
109
|
repo.split('/').length == 1
|
113
110
|
end
|
114
111
|
|
115
|
-
def repository_path(
|
116
|
-
|
112
|
+
def repository_path(repo_name)
|
113
|
+
if repo_name.include?('://') || /^[^@]+@[^:]+:.+/ =~ repo_name
|
114
|
+
repo_name
|
115
|
+
elsif (repo_path = Pathname(repo_name)).directory? && repo_path.absolute?
|
116
|
+
[repo_name, true]
|
117
|
+
else
|
118
|
+
"https://github.com/#{repo_name}.git"
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
def clone_repository(repo_path, repo_branch)
|
123
|
+
dir = Dir.mktmpdir
|
124
|
+
|
125
|
+
branch_cmd = repo_branch ? "-b #{repo_branch} " : ''
|
126
|
+
|
127
|
+
git_path = "#{branch_cmd}#{repo_path}"
|
128
|
+
run("#{GIT_CMD} clone --depth 1 #{branch_cmd}#{repo_path} #{dir}")
|
129
|
+
|
130
|
+
unless $CHILD_STATUS.success?
|
131
|
+
say "Git clone command failed. Make sure git repository exists: #{git_path}", :red
|
132
|
+
exit 1
|
133
|
+
end
|
134
|
+
|
135
|
+
dir
|
117
136
|
end
|
118
137
|
|
119
138
|
# Add to CLI
|
@@ -4,7 +4,7 @@ Bundler::GemHelper.install_tasks
|
|
4
4
|
require 'cucumber/rake/task'
|
5
5
|
|
6
6
|
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
7
|
-
t.cucumber_opts =
|
7
|
+
t.cucumber_opts = '--fail-fast --color --tags "not @wip" --strict'
|
8
8
|
end
|
9
9
|
|
10
10
|
require 'rake/clean'
|
@@ -11,9 +11,9 @@ Gem::Specification.new do |s|
|
|
11
11
|
# s.summary = %q{A short summary of your extension}
|
12
12
|
# s.description = %q{A longer description of your extension}
|
13
13
|
|
14
|
-
s.files
|
15
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(fixtures|features|spec)/}) }
|
16
15
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
16
|
+
s.require_paths = ["lib"]
|
17
17
|
|
18
18
|
# The version of middleman-core your extension depends on
|
19
19
|
s.add_runtime_dependency("middleman-core", [">= <%= ::Middleman::VERSION %>"])
|
@@ -5,7 +5,7 @@ require 'middleman-core'
|
|
5
5
|
class MyExtension < ::Middleman::Extension
|
6
6
|
option :my_option, 'default', 'An example option'
|
7
7
|
|
8
|
-
def initialize(app,
|
8
|
+
def initialize(app, _options_hash = ::Middleman::EMPTY_HASH, &block)
|
9
9
|
# Call super to build options from the options_hash
|
10
10
|
super
|
11
11
|
|
data/lib/middleman-cli.rb
CHANGED
data/middleman-cli.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
3
|
+
require File.expand_path('../../middleman-core/lib/middleman-core/version', __FILE__)
|
2
4
|
|
3
5
|
Gem::Specification.new do |s|
|
4
6
|
s.name = 'middleman-cli'
|
@@ -11,13 +13,11 @@ Gem::Specification.new do |s|
|
|
11
13
|
s.summary = 'Hand-crafted frontend development'
|
12
14
|
s.description = 'A static site generator. Provides dozens of templating languages (Haml, Sass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle.'
|
13
15
|
|
14
|
-
s.files
|
15
|
-
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
16
|
-
|
16
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(fixtures|features|spec)/}) }
|
17
17
|
s.executable = 'middleman'
|
18
|
-
|
19
|
-
s.required_ruby_version = '>= 2.
|
18
|
+
s.require_path = 'lib'
|
19
|
+
s.required_ruby_version = '>= 2.3.0'
|
20
20
|
|
21
21
|
# CLI
|
22
|
-
s.add_dependency('thor', ['>= 0.17.0', '< 2'])
|
22
|
+
s.add_dependency('thor', ['>= 0.17.0', '< 2.0'])
|
23
23
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Reynolds
|
8
8
|
- Ben Hollis
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: 0.17.0
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '2'
|
23
|
+
version: '2.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: 0.17.0
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2'
|
33
|
+
version: '2.0'
|
34
34
|
description: A static site generator. Provides dozens of templating languages (Haml,
|
35
35
|
Sass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting,
|
36
36
|
Yaml data (and more) an easy part of your development cycle.
|
@@ -42,28 +42,11 @@ executables:
|
|
42
42
|
extensions: []
|
43
43
|
extra_rdoc_files: []
|
44
44
|
files:
|
45
|
+
- ".gemtest"
|
45
46
|
- ".simplecov"
|
46
47
|
- ".yardopts"
|
47
48
|
- Rakefile
|
48
49
|
- bin/middleman
|
49
|
-
- features/cli_extension.feature
|
50
|
-
- features/cli_init.feature
|
51
|
-
- features/preview_server-hook.feature
|
52
|
-
- features/preview_server.feature
|
53
|
-
- features/support/env.rb
|
54
|
-
- fixtures/preview-server-app/bin/dns_server.rb
|
55
|
-
- fixtures/preview-server-app/config.rb
|
56
|
-
- fixtures/preview-server-app/source/index.html.erb
|
57
|
-
- fixtures/preview-server-app/source/layout.erb
|
58
|
-
- fixtures/preview-server-app/source/layouts/custom.erb
|
59
|
-
- fixtures/preview-server-app/source/real.html
|
60
|
-
- fixtures/preview-server-app/source/real/index.html.erb
|
61
|
-
- fixtures/preview-server-app/source/should_be_ignored.html
|
62
|
-
- fixtures/preview-server-app/source/should_be_ignored2.html
|
63
|
-
- fixtures/preview-server-app/source/should_be_ignored3.html
|
64
|
-
- fixtures/preview-server-app/source/static.html
|
65
|
-
- fixtures/preview-server-hook-app/config.rb
|
66
|
-
- fixtures/preview-server-hook-app/source/index.html.erb
|
67
50
|
- lib/middleman-cli.rb
|
68
51
|
- lib/middleman-cli/build.rb
|
69
52
|
- lib/middleman-cli/config.rb
|
@@ -84,7 +67,7 @@ homepage: http://middlemanapp.com
|
|
84
67
|
licenses:
|
85
68
|
- MIT
|
86
69
|
metadata: {}
|
87
|
-
post_install_message:
|
70
|
+
post_install_message:
|
88
71
|
rdoc_options: []
|
89
72
|
require_paths:
|
90
73
|
- lib
|
@@ -92,33 +75,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
75
|
requirements:
|
93
76
|
- - ">="
|
94
77
|
- !ruby/object:Gem::Version
|
95
|
-
version: 2.
|
78
|
+
version: 2.3.0
|
96
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
80
|
requirements:
|
98
|
-
- - "
|
81
|
+
- - ">"
|
99
82
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
83
|
+
version: 1.3.1
|
101
84
|
requirements: []
|
102
|
-
rubygems_version: 3.
|
103
|
-
signing_key:
|
85
|
+
rubygems_version: 3.0.2
|
86
|
+
signing_key:
|
104
87
|
specification_version: 4
|
105
88
|
summary: Hand-crafted frontend development
|
106
|
-
test_files:
|
107
|
-
- features/cli_extension.feature
|
108
|
-
- features/cli_init.feature
|
109
|
-
- features/preview_server-hook.feature
|
110
|
-
- features/preview_server.feature
|
111
|
-
- features/support/env.rb
|
112
|
-
- fixtures/preview-server-app/bin/dns_server.rb
|
113
|
-
- fixtures/preview-server-app/config.rb
|
114
|
-
- fixtures/preview-server-app/source/index.html.erb
|
115
|
-
- fixtures/preview-server-app/source/layout.erb
|
116
|
-
- fixtures/preview-server-app/source/layouts/custom.erb
|
117
|
-
- fixtures/preview-server-app/source/real.html
|
118
|
-
- fixtures/preview-server-app/source/real/index.html.erb
|
119
|
-
- fixtures/preview-server-app/source/should_be_ignored.html
|
120
|
-
- fixtures/preview-server-app/source/should_be_ignored2.html
|
121
|
-
- fixtures/preview-server-app/source/should_be_ignored3.html
|
122
|
-
- fixtures/preview-server-app/source/static.html
|
123
|
-
- fixtures/preview-server-hook-app/config.rb
|
124
|
-
- fixtures/preview-server-hook-app/source/index.html.erb
|
89
|
+
test_files: []
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: Middleman New Extension CLI
|
2
|
-
|
3
|
-
Scenario: Create a new extension scaffold
|
4
|
-
Given I run `middleman extension my-extension-library`
|
5
|
-
Then the exit status should be 0
|
6
|
-
When I cd to "my-extension-library"
|
7
|
-
Then the following files should exist:
|
8
|
-
| Gemfile |
|
9
|
-
| Rakefile |
|
10
|
-
| my-extension-library.gemspec |
|
11
|
-
| features/support/env.rb |
|
12
|
-
| lib/my-extension-library/extension.rb |
|
13
|
-
| lib/my-extension-library.rb |
|
14
|
-
| .gitignore |
|
data/features/cli_init.feature
DELETED
@@ -1,92 +0,0 @@
|
|
1
|
-
Feature: Middleman CLI
|
2
|
-
|
3
|
-
Scenario: Create a new project
|
4
|
-
When I run `middleman init MY_PROJECT` interactively
|
5
|
-
And I type "y"
|
6
|
-
And I type "y"
|
7
|
-
And I type "y"
|
8
|
-
And I type "y"
|
9
|
-
Then the exit status should be 0
|
10
|
-
When I cd to "MY_PROJECT"
|
11
|
-
Then the following files should exist:
|
12
|
-
| Gemfile |
|
13
|
-
| .gitignore |
|
14
|
-
| config.rb |
|
15
|
-
| source/index.html.erb |
|
16
|
-
| source/layouts/layout.erb |
|
17
|
-
| source/javascripts/site.js |
|
18
|
-
| source/stylesheets/site.css.scss |
|
19
|
-
|
20
|
-
Scenario: Create a new project in the current directory
|
21
|
-
Given a directory named "MY_PROJECT"
|
22
|
-
When I cd to "MY_PROJECT"
|
23
|
-
And I run `middleman init` interactively
|
24
|
-
And I type "y"
|
25
|
-
And I type "y"
|
26
|
-
And I type "y"
|
27
|
-
And I type "y"
|
28
|
-
Then the exit status should be 0
|
29
|
-
And the following files should exist:
|
30
|
-
| Gemfile |
|
31
|
-
| config.rb |
|
32
|
-
| source/index.html.erb |
|
33
|
-
|
34
|
-
Scenario: Create a new project (alias i)
|
35
|
-
When I run `middleman i MY_PROJECT` interactively
|
36
|
-
And I type "y"
|
37
|
-
And I type "y"
|
38
|
-
And I type "y"
|
39
|
-
And I type "y"
|
40
|
-
Then a directory named "MY_PROJECT" should exist
|
41
|
-
|
42
|
-
Scenario: Create a new project (alias new)
|
43
|
-
When I run `middleman new MY_PROJECT` interactively
|
44
|
-
And I type "y"
|
45
|
-
And I type "y"
|
46
|
-
And I type "y"
|
47
|
-
And I type "y"
|
48
|
-
Then a directory named "MY_PROJECT" should exist
|
49
|
-
|
50
|
-
Scenario: Create a new project (alias n)
|
51
|
-
When I run `middleman n MY_PROJECT` interactively
|
52
|
-
And I type "y"
|
53
|
-
And I type "y"
|
54
|
-
And I type "y"
|
55
|
-
And I type "y"
|
56
|
-
Then a directory named "MY_PROJECT" should exist
|
57
|
-
|
58
|
-
Scenario: Create a new project using Middleman directory
|
59
|
-
When I run `middleman init MY_PROJECT -T blog`
|
60
|
-
Then a directory named "MY_PROJECT" should exist
|
61
|
-
When I cd to "MY_PROJECT"
|
62
|
-
And the file "Gemfile" should contain "middleman-blog"
|
63
|
-
And the file ".gitignore" should exist
|
64
|
-
|
65
|
-
Scenario: Create an invalid project using Middleman directory
|
66
|
-
When I run `middleman init MY_PROJECT -T does-not-exist-for-reals`
|
67
|
-
Then the exit status should be 1
|
68
|
-
|
69
|
-
Scenario: Create a new project using github(user/repository)
|
70
|
-
When I run `middleman init MY_PROJECT -T middleman/middleman-templates-default` interactively
|
71
|
-
And I type "y"
|
72
|
-
And I type "y"
|
73
|
-
And I type "y"
|
74
|
-
And I type "y"
|
75
|
-
Then a directory named "MY_PROJECT" should exist
|
76
|
-
|
77
|
-
Scenario: Create a new project using github(user/repository#branch)
|
78
|
-
When I run `middleman init MY_PROJECT -T middleman/middleman-templates-default#master` interactively
|
79
|
-
And I type "y"
|
80
|
-
And I type "y"
|
81
|
-
And I type "y"
|
82
|
-
And I type "y"
|
83
|
-
Then a directory named "MY_PROJECT" should exist
|
84
|
-
And the output should contain "-b master"
|
85
|
-
|
86
|
-
Scenario: Create a new project using full path(://)
|
87
|
-
When I run `middleman init MY_PROJECT -T https://github.com/middleman/middleman-templates-default.git` interactively
|
88
|
-
And I type "y"
|
89
|
-
And I type "y"
|
90
|
-
And I type "y"
|
91
|
-
And I type "y"
|
92
|
-
Then a directory named "MY_PROJECT" should exist
|