boards 0.1.1 → 0.1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/console +1 -1
- data/lib/boards/cli.rb +16 -1
- data/lib/boards/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c1e3052980eadc07b0c57f10980437497ca7d7fb20fd8ee1c4712c64a02c64b
|
4
|
+
data.tar.gz: 7de3d12ef66241952c7bf5a2979a2d353e53b926b330b8ab52afd6f37f7f4ae2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d4e340c7d270137b389db8d96c143c2ea17b3ca27157f2151f0cedd8f10fe1b3ac06045e4085a430d2b1dc1e6651e550851447745218ad5b23123bf993964e
|
7
|
+
data.tar.gz: ac5115753a7e39b6bdba0cb0e3a742dec8b6f248c05a213c1bcec46728658f78f8bf02726c0a51b14f60f7a6517614d702150f58114a330474db24d58239ce7b
|
data/Gemfile.lock
CHANGED
data/bin/console
CHANGED
data/lib/boards/cli.rb
CHANGED
@@ -1,10 +1,25 @@
|
|
1
1
|
require "thor"
|
2
2
|
module Boards
|
3
3
|
class Cli < Thor
|
4
|
+
include Thor::Actions
|
4
5
|
|
5
6
|
desc 'new NAME', 'generates a new directory named NAME for a new boards project, including stub files and boilerplate code.'
|
6
7
|
def new(name)
|
7
|
-
puts "Ahoy! You would like to generate a new project called #{name}!"
|
8
|
+
puts "Ahoy! You would like to generate a new project called #{name.capitalize}!"
|
9
|
+
dir_name = name.downcase
|
10
|
+
unless Dir.exists?(dir_name)
|
11
|
+
Dir.mkdir(dir_name)
|
12
|
+
say "create \t#{dir_name}/", :green
|
13
|
+
else
|
14
|
+
say "dir \t#{dir_name}/ already exists", :blue
|
15
|
+
end
|
16
|
+
file_name = 'setup.rb'
|
17
|
+
unless File.exists?("#{dir_name}/#{file_name}")
|
18
|
+
File.open("#{dir_name}/#{file_name}", "w") {|f| f.write "# I am a setup file."}
|
19
|
+
say "create \t#{dir_name}/#{file_name}", :green
|
20
|
+
else
|
21
|
+
say "file \t#{dir_name}/#{file_name} already exists", :blue
|
22
|
+
end
|
8
23
|
end
|
9
24
|
end
|
10
25
|
end
|
data/lib/boards/version.rb
CHANGED