skeletor 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -12,6 +12,37 @@ Installation
12
12
  Usage
13
13
  -----
14
14
 
15
+ Skeletor has 3 actions it can perform for you. You can also call `skeletor -h|--help` to list the available functions.
16
+
17
+ ###Build###
18
+
19
+ skeletor build TEMPLATE [options]
20
+
21
+ This will build the project skeleton for you based on TEMPLATE. It takes the following options
22
+
23
+ * `-d --directory DIRECTORY` Specifies the directory to build the skeleton in. If it doesn't exist Skeletor will create it for you. Defaults to the current directory.
24
+ * `-p --project PROJECT` Specifies the name of the project to use in output. I also intend to add in the functionality to add include parsing so you can dynamically insert the project name. Defaults to the directory name.
25
+
26
+ ###Clean###
27
+
28
+ skeletor clean [options]
29
+
30
+ Cleans the entire project directory. A helper method to let you start again. Useful when creating you templates. Takes the following options
31
+
32
+ * `-d --directory` Specifies the directory to clean. Defaults to the current directory.
33
+
34
+ ###Validate###
35
+
36
+ skeletor validate TEMPLATE
37
+
38
+ Validates that TEMPLATE is a valid YAML file and that it matches the expected schema (see below).
39
+
40
+ ###Help###
41
+
42
+ skeletor -h|--help TASK
43
+
44
+ Shows help information for TASK.
45
+
15
46
  Contributing to Skeletor
16
47
  ------------------------
17
48
 
data/lib/skeletor/cli.rb CHANGED
@@ -24,8 +24,15 @@ module Skeletor
24
24
  :aliases => "-d",
25
25
  :desc => "Sets the target directory. Defaults to current directory"
26
26
  def clean
27
- path = options[:directory] || Dir.pwd
28
- Builder.clean path
27
+ print 'Are you sure you want to clean this project directory? (Y|n): '
28
+ confirm = gets.chomp
29
+ if confirm != 'Y' && confirm != 'n'
30
+ puts 'Please enter Y or n'
31
+ elsif confirm == 'Y'
32
+ path = options[:directory] || Dir.pwd
33
+ Builder.clean path
34
+ end
35
+
29
36
  end
30
37
 
31
38
  desc "validate TEMPLATE" ,"Checks TEMPLATE is a valid YAML file and matches the required schema."
@@ -1,3 +1,3 @@
1
1
  module Skeletor
2
- VERSION="0.6.2"
2
+ VERSION="0.6.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 2
9
- version: 0.6.2
8
+ - 3
9
+ version: 0.6.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Will McKenzie
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-09-25 00:00:00 +01:00
17
+ date: 2011-09-26 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency