middleman-cli 4.0.0 → 4.1.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: 99e71178ce0ec5d15b35a52f9f9851d2486dabfa
4
- data.tar.gz: cde6799121d554655f04794571033177a5990299
3
+ metadata.gz: a55a47e652b3501db52cdd026f821833d4911ca0
4
+ data.tar.gz: 6844c00c8a36b5d6dfce34e8e136a7d38207a1f6
5
5
  SHA512:
6
- metadata.gz: 0c0b29f5bd4f9317051110a4e60fd55890eea3c54576a227ef4d460081d1bf869eee02b6d39913d4a02c8c9b8b354bf77037a2b19f4330291fdb4f3a6bd1a2fc
7
- data.tar.gz: 2a772bfcb9b5df9047ee64181c1d555c6b7b38e014493a6f1f92a722e76f2ac828c3c4ff637d77d9bd1226ec6663f40e25ae7f96db97cc14f5b0c8f278c2d592
6
+ metadata.gz: 261e3cfce78e9fbab83d7bf81e157fb3767897fdbbeb11e817f751c8fecbdd7e28bbad52c7b6ea3dbe4a460ec097e9d8f5ff220398e82266c6c7518d00ba8e21
7
+ data.tar.gz: bd7734c89384ce59d9457a2e0e9b6bb00ac9eed428849416490f5668c69258205e952051ef6b9a7f0aa2f131297c492b274c9177e7ca04808fbb7698e453478e
@@ -30,8 +30,8 @@ module Middleman::Cli
30
30
  template 'extension/Rakefile', File.join(name, 'Rakefile')
31
31
  template 'extension/gemspec', File.join(name, "#{name}.gemspec")
32
32
  template 'extension/Gemfile', File.join(name, 'Gemfile')
33
- template 'extension/lib/middleman_extension.rb', File.join(name, 'lib', 'middleman_extension.rb')
34
33
  template 'extension/lib/lib.rb', File.join(name, 'lib', "#{name}.rb")
34
+ template 'extension/lib/lib/extension.rb', File.join(name, 'lib', name, 'extension.rb')
35
35
  template 'extension/features/support/env.rb', File.join(name, 'features', 'support', 'env.rb')
36
36
  empty_directory File.join(name, 'fixtures')
37
37
  end
@@ -39,7 +39,7 @@ module Middleman::Cli
39
39
  rescue ::OpenURI::HTTPError
40
40
  say "Template `#{options[:template]}` not found in Middleman Directory."
41
41
  say 'Did you mean to use a full `user/repo` path?'
42
- exit
42
+ exit 1
43
43
  end
44
44
  else
45
45
  repo_name, repo_branch = options[:template].split('#')
@@ -55,7 +55,7 @@ module Middleman::Cli
55
55
 
56
56
  unless File.directory?(dir)
57
57
  say 'Git clone failed, maybe the url is invalid or you don\'t have the permissions?', :red
58
- exit
58
+ exit 1
59
59
  end
60
60
 
61
61
  inside(target) do
@@ -1,38 +1,6 @@
1
- # Require core library
2
- require 'middleman-core'
1
+ require "middleman-core"
3
2
 
4
- # Extension namespace
5
- class MyExtension < ::Middleman::Extension
6
- option :my_option, 'default', 'An example option'
7
-
8
- def initialize(app, options_hash={}, &block)
9
- # Call super to build options from the options_hash
10
- super
11
-
12
- # Require libraries only when activated
13
- # require 'necessary/library'
14
-
15
- # set up your extension
16
- # puts options.my_option
17
- end
18
-
19
- def after_configuration
20
- # Do something
21
- end
22
-
23
- # A Sitemap Manipulator
24
- # def manipulate_resource_list(resources)
25
- # end
26
-
27
- # helpers do
28
- # def a_helper
29
- # end
30
- # end
3
+ Middleman::Extensions.register :<%= name %> do
4
+ require "my-extension/extension"
5
+ MyExtension
31
6
  end
32
-
33
- # Register extensions which can be activated
34
- # Make sure we have the version of Middleman we expect
35
- # Name param may be omited, it will default to underscored
36
- # version of class name
37
-
38
- # MyExtension.register(:my_extension)
@@ -0,0 +1,31 @@
1
+ # Require core library
2
+ require 'middleman-core'
3
+
4
+ # Extension namespace
5
+ class MyExtension < ::Middleman::Extension
6
+ option :my_option, 'default', 'An example option'
7
+
8
+ def initialize(app, options_hash={}, &block)
9
+ # Call super to build options from the options_hash
10
+ super
11
+
12
+ # Require libraries only when activated
13
+ # require 'necessary/library'
14
+
15
+ # set up your extension
16
+ # puts options.my_option
17
+ end
18
+
19
+ def after_configuration
20
+ # Do something
21
+ end
22
+
23
+ # A Sitemap Manipulator
24
+ # def manipulate_resource_list(resources)
25
+ # end
26
+
27
+ # helpers do
28
+ # def a_helper
29
+ # end
30
+ # end
31
+ end
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
18
18
  s.executable = 'middleman'
19
19
  s.require_path = 'lib'
20
- s.required_ruby_version = '>= 1.9.3'
20
+ s.required_ruby_version = '>= 2.0.0'
21
21
 
22
22
  # CLI
23
23
  s.add_dependency('thor', ['>= 0.17.0', '< 2.0'])
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.1.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-16 00:00:00.000000000 Z
12
+ date: 2016-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -62,7 +62,7 @@ files:
62
62
  - lib/middleman-cli/templates/extension/gemspec
63
63
  - lib/middleman-cli/templates/extension/gitignore
64
64
  - lib/middleman-cli/templates/extension/lib/lib.rb
65
- - lib/middleman-cli/templates/extension/lib/middleman_extension.rb
65
+ - lib/middleman-cli/templates/extension/lib/lib/extension.rb
66
66
  - lib/middleman-core/cli.rb
67
67
  - middleman-cli.gemspec
68
68
  - spec/middleman/.gitkeep
@@ -79,12 +79,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 1.9.3
82
+ version: 2.0.0
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ">="
85
+ - - ">"
86
86
  - !ruby/object:Gem::Version
87
- version: '0'
87
+ version: 1.3.1
88
88
  requirements: []
89
89
  rubyforge_project:
90
90
  rubygems_version: 2.4.8