sanctuary 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 917cd899f721d8f6c1c80b6e2f1561af667a73371f505b1c74a38fed68045efa
4
- data.tar.gz: 1dd357656657da66d0875b0cdc6335b357e9c61405e1e0a585cd58b6200ea55f
3
+ metadata.gz: 1bccd8bbcd5cecc81e639c6c4883b6f033eb10bf0ba56a480e9dab19a121204b
4
+ data.tar.gz: d968bfec65d14740f90d54791587128079b31130d816678ae554ffeacd86464a
5
5
  SHA512:
6
- metadata.gz: 3f607f67c14e1783f3aba977c19eed7f910b8a2f3c7eeb92075b994420d7e776a4c3e5a33395acd07bbc89da06b734481d27e827c8b27cb36b94f9df567856fd
7
- data.tar.gz: 5de605f137b4fe01dce34230d35eb5c9ab4551ccb482fd43e852f0d31de0c9b8807330d81a9729dec3b0ea7efc6f090e7875abfbcb31af8e8f4767131d498b08
6
+ metadata.gz: 518fbfb9a3a1c47723f5ea883105a15732bb048844561a6e86f2f81f050e183ab6cdcf8f284bf8d56c1e0e18fa10ad6e56e90838c1817b7ddcd8ad25a0a5a6dc
7
+ data.tar.gz: 71380caa1149c6696b890221b0b0d15c1db9ebcc26753f17bf7fea2bee9a4a6016d28720fb537a2023200268005650ac1c3a0bb7d653f8f444c28d6516ac3905
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sanctuary (0.1.6)
4
+ sanctuary (0.1.7)
5
5
  thor (~> 0.2)
6
6
  tty-prompt (~> 0.0)
7
7
 
data/lib/sanctuary/cli.rb CHANGED
@@ -6,7 +6,11 @@ module Sanctuary
6
6
  class CLI
7
7
  def self.start
8
8
  result = present_choices
9
- Generator.start([result[1..-1]])
9
+ if ARGV.include?("-p")
10
+ Generator.start([result[1..-1], ARGV.last])
11
+ else
12
+ Generator.start([result[1..-1]])
13
+ end
10
14
  end
11
15
 
12
16
  private
@@ -5,14 +5,20 @@ module Sanctuary
5
5
  class Generator < Thor::Group
6
6
  include Thor::Actions
7
7
  argument :template
8
+ argument :name
8
9
 
9
10
  def self.source_root
10
11
  Sanctuary::HOME_DIR
11
12
  end
12
13
 
13
14
  def create_lib_file
14
- # only copy the file and not the directory the file resides in
15
- copy_file "#{template}", "#{template.split("/").last}"
15
+ if name.empty?
16
+ # only copy the file and not the directory the file resides in
17
+ copy_file "#{template}", "#{template.split("/").last}"
18
+ else
19
+ copy_file "#{template}", "#{name + "." + template.split("/").last.split(".").last}"
20
+ gsub_file "#{name + "." + template.split("/").last.split(".").last}", "#name", name
21
+ end
16
22
  end
17
23
  end
18
24
  end
@@ -1,3 +1,3 @@
1
1
  module Sanctuary
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanctuary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin-Kawai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-21 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-prompt