createproj 0.0.2 → 0.0.3

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: 045cb71760b3a2dce81a177942026b9cea4b5e39
4
- data.tar.gz: d66ea03637d889ea2ba2572c9a13ec4cab4de875
3
+ metadata.gz: 2c9228a877a978162221e3c34f944d4db0d1e4df
4
+ data.tar.gz: 46429dd2581bef0319229623cc46cde3dd62b10a
5
5
  SHA512:
6
- metadata.gz: ec84be874c255c02bdd44cdf03b33362e505a034b74eabb65a1bdb54d6f6e6f015269b2743d96cbb88a6aa317be8b41f18e112c63992b75116f8244e88b71c41
7
- data.tar.gz: cae892efe39e517d58013fe9854b8ea657ff7ac71e7da6a9ebc4b437084bc3816dd38c4ee8a38ff1c285640148e62e5d46919458752d38f2cd782eaf157bb664
6
+ metadata.gz: 6ea2424624ba46e5c43dc898081bb376c14d981d674f8d542a25c7ec37a70a473035df4a5fbba7535801ac7e3c8a827e6c530fb81afd90222e677bc0a06c073c
7
+ data.tar.gz: a2eef94423242269e1cc38ca2c1deeda540989951cf4b515bb0c34129fcb4f82d4f153d91665cddff1ae2a01779c994f65964cb2596ed53f04bbeb9d85713ffa
@@ -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] names the project
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] names the project
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] names the project
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
- template_path = File.join('../../templates', template)
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
 
@@ -1,5 +1,5 @@
1
1
  # Namespace for CreateProj
2
2
  module CreateProj
3
3
  # Version number for the gem - make it only load once
4
- VERSION ||= '0.0.2'
4
+ VERSION ||= '0.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: createproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt McNaughton