aspen 0.1.2 → 0.1.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 +8 -8
- data/lib/aspen.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWY1ZmVjZjBlNTEyNDZhYjgzZjBiMDk0MjYzNmQyODRmZGUzZDdmMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjdlZTk3ZmQ1NzI2NDhhNzE3MTdhZmVmYTcxZTA5YWU4YjIzZTUyMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2NiMmY4ZmE4MDE5ZDM2YTNjODQ5MDJhZGI0NTg2ZDQzYTljNjY2OTAxMzY0
|
10
|
+
OTQ5OTFjOWRkYWU2MTNkNTYxMjU1NjY0YTZkYzA1MTBiZDJmZGU4YzFiNzU1
|
11
|
+
MTNhM2I5MGFkOWQwODFkZmViNmNjMWZhMzcwYTUyNmVkZGE4NzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmNjOTZmNmY2ZGRiYTEzNjMwNGVmZmMxMDRhMGNmNTBhNzUyOTNmZWQ0ZjBl
|
14
|
+
Y2Y0NDA0MGI3ZWU4OTkwMDg4MGJjMWQyOGNjM2EyNWUyMDQ4NzYzZjc3OTU4
|
15
|
+
OTE1ZThiMmI2MWE3YTViY2MyOGM5NjEyNjNjOTQ0NmEyZmZhMDQ=
|
data/lib/aspen.rb
CHANGED
@@ -10,7 +10,17 @@ class Aspen
|
|
10
10
|
puts "Invalid command - try again."
|
11
11
|
end
|
12
12
|
|
13
|
+
def self.help
|
14
|
+
File.open("help/help.txt").each_line do |line|
|
15
|
+
puts line
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
13
19
|
def self.run(args)
|
20
|
+
if args[0].strip.downcase == '--help'
|
21
|
+
return help
|
22
|
+
end
|
23
|
+
puts args.inspect
|
14
24
|
return method_missing(:run, args) if args == nil
|
15
25
|
@@root_name = sterilize_project_name(args.join(" "))
|
16
26
|
return if @@root_name == nil
|
@@ -44,6 +54,12 @@ class Aspen
|
|
44
54
|
def self.make_files
|
45
55
|
FileUtils.touch("#{@@root_name}/README.md") #README
|
46
56
|
FileUtils.touch("#{@@root_name}/config/environment.rb") #environment
|
57
|
+
File.open("#{@@root_name}/config/environment.rb", "w+") do |f|
|
58
|
+
f << "Dir.foreach('lib') do |file|
|
59
|
+
next if file.start_with?('.')
|
60
|
+
require_relative '../lib/\"#{file}\"' if file.end_with?('.rb')
|
61
|
+
end"
|
62
|
+
end
|
47
63
|
end
|
48
64
|
|
49
65
|
def self.sterilize_project_name(string)
|