middleman-cli 4.0.0.beta.2 → 4.0.0.rc.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba499948656c85e505ff8b61ad72be6e15ef79d0
|
4
|
+
data.tar.gz: a9b9e75b64e6cd94ee47a8d9792e510431854180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33e3fd9362e23e85fdcb1f4933671b439a5a1ed0aef56d14087e289c89a22b63b6cc809f949722c436ffea2ed9c5e241b76e1dd5d4f0f5433f551c21e2713550
|
7
|
+
data.tar.gz: f7592cc9a187aead27e3a8c5cb455cd21d524a5b61f99063efbb66c5801af4556187c351f4242e75f43e673595beceea12790b548db053acbb92909e215d25e7
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# CLI Module
|
2
|
+
module Middleman::Cli
|
3
|
+
# The CLI Config class
|
4
|
+
class Config < Thor::Group
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
check_unknown_options!
|
8
|
+
|
9
|
+
class_option :environment,
|
10
|
+
aliases: '-e',
|
11
|
+
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development',
|
12
|
+
desc: 'The environment Middleman will run under'
|
13
|
+
def console
|
14
|
+
require 'json'
|
15
|
+
require 'middleman-core'
|
16
|
+
require 'middleman-core/logger'
|
17
|
+
|
18
|
+
opts = {
|
19
|
+
environment: options['environment']
|
20
|
+
}
|
21
|
+
|
22
|
+
# Don't output info messages
|
23
|
+
::Middleman::Logger.singleton(2, false)
|
24
|
+
|
25
|
+
app = ::Middleman::Application.new do
|
26
|
+
config[:exit_before_ready] = true
|
27
|
+
config[:environment] = opts[:environment].to_sym if opts[:environment]
|
28
|
+
end
|
29
|
+
|
30
|
+
puts JSON.pretty_generate(app.config.to_h)
|
31
|
+
|
32
|
+
app.shutdown!
|
33
|
+
end
|
34
|
+
|
35
|
+
# Add to CLI
|
36
|
+
Base.register(self, 'config', 'config [options]', 'Output a Middleman configuration in JSON format')
|
37
|
+
end
|
38
|
+
end
|
@@ -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 = "--color --tags ~@wip --strict
|
7
|
+
t.cucumber_opts = "--color --tags ~@wip --strict"
|
8
8
|
end
|
9
9
|
|
10
10
|
require 'rake/clean'
|
data/lib/middleman-cli.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Reynolds
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- fixtures/.gitkeep
|
52
52
|
- lib/middleman-cli.rb
|
53
53
|
- lib/middleman-cli/build.rb
|
54
|
+
- lib/middleman-cli/config.rb
|
54
55
|
- lib/middleman-cli/console.rb
|
55
56
|
- lib/middleman-cli/extension.rb
|
56
57
|
- lib/middleman-cli/init.rb
|