createproj 0.0.2 → 0.0.3
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/lib/createproj/cli.rb +9 -9
- data/lib/createproj/creator/creator.rb +2 -1
- data/lib/createproj/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c9228a877a978162221e3c34f944d4db0d1e4df
|
4
|
+
data.tar.gz: 46429dd2581bef0319229623cc46cde3dd62b10a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ea2424624ba46e5c43dc898081bb376c14d981d674f8d542a25c7ec37a70a473035df4a5fbba7535801ac7e3c8a827e6c530fb81afd90222e677bc0a06c073c
|
7
|
+
data.tar.gz: a2eef94423242269e1cc38ca2c1deeda540989951cf4b515bb0c34129fcb4f82d4f153d91665cddff1ae2a01779c994f65964cb2596ed53f04bbeb9d85713ffa
|
data/lib/createproj/cli.rb
CHANGED
@@ -5,44 +5,44 @@ module CreateProj
|
|
5
5
|
class CLI < Thor
|
6
6
|
# @todo use metaprogramming to simplify this?
|
7
7
|
|
8
|
+
desc 'haskell NAME', 'create a haskell project called NAME'
|
8
9
|
# Command line input option for creating haskell project.
|
9
10
|
#
|
10
|
-
# @param [String]
|
11
|
+
# @param [String] name the project
|
11
12
|
#
|
12
13
|
# @example Call from command line
|
13
14
|
# $ ./createproj haskell newproj #=> creates haskell proj called new proj
|
14
15
|
#
|
15
16
|
# @return Nothing
|
16
|
-
desc 'haskell NAME', 'create a haskell project called NAME'
|
17
17
|
def haskell(name)
|
18
18
|
CreateProj::Creator::HaskellCreator.new(name, options).run
|
19
19
|
end
|
20
20
|
|
21
|
+
desc 'rails NAME', 'create a rails project called NAME'
|
22
|
+
method_option :database, aliases: '-d', desc: 'database to use'
|
23
|
+
method_option :javascript, aliases: '-j', desc: 'javascript library'
|
24
|
+
method_option :skip_test_unit, aliases: '-T', desc: 'skip test unit'
|
21
25
|
# Command line input option for creating rails project.
|
22
26
|
#
|
23
|
-
# @param [String]
|
27
|
+
# @param [String] name the project
|
24
28
|
#
|
25
29
|
# @example Call from command line
|
26
30
|
# $ ./createproj haskell newproj #=> creates rails proj called new proj
|
27
31
|
#
|
28
32
|
# @return Nothing
|
29
|
-
desc 'rails NAME', 'create a rails project called NAME'
|
30
|
-
method_option :database, aliases: '-d', desc: 'database to use'
|
31
|
-
method_option :javascript, aliases: '-j', desc: 'javascript library'
|
32
|
-
method_option :skip_test_unit, aliases: '-T', desc: 'skip test unit'
|
33
33
|
def rails(name)
|
34
34
|
CreateProj::Creator::RailsCreator.new(name, options).run
|
35
35
|
end
|
36
36
|
|
37
|
+
desc 'ruby NAME', 'create a ruby project called NAME'
|
37
38
|
# Command line input option for creating ruby project.
|
38
39
|
#
|
39
|
-
# @param [String]
|
40
|
+
# @param [String] name the project
|
40
41
|
#
|
41
42
|
# @example Call from command line
|
42
43
|
# $ ./createproj ruby newproj #=> creates ruby proj called new proj
|
43
44
|
#
|
44
45
|
# @return Nothing
|
45
|
-
desc 'ruby NAME', 'create a ruby project called NAME'
|
46
46
|
def ruby(name)
|
47
47
|
CreateProj::Creator::RubyCreator.new(name, options).run
|
48
48
|
end
|
@@ -74,7 +74,8 @@ module CreateProj
|
|
74
74
|
#
|
75
75
|
# @return nothing.
|
76
76
|
def add_pre_commit_hook(template, options)
|
77
|
-
|
77
|
+
base_path = File.expand_path('../../../../templates', __FILE__)
|
78
|
+
template_path = File.join(base_path, template)
|
78
79
|
hook = Mustache.render(File.read(template_path), options)
|
79
80
|
path_to_git = '.git/hooks/pre-commit'
|
80
81
|
|
data/lib/createproj/version.rb
CHANGED