crafti 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/crafti +9 -1
- data/lib/crafti/version.rb +1 -1
- data/lib/crafti.rb +6 -2
- 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: ff0eda4f4fd8636e4ec38766b03079b63898f01b
|
4
|
+
data.tar.gz: f4da25cc34eee8f28b5f6119074b82920fba12f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bf2c21f73e289ee09df142f88e3208ee3f77e9ec30cf4a036594b0381a8b0d59ee8a869237f8236b45bc5d84738bf35a97727e9e2e29421c4f7e4abb0831234
|
7
|
+
data.tar.gz: 9e71237a6195fd474687adb151935e115ffc5a3420caa292f6ff0a3ddf6c4cb8678113d05407e7474b257566ba5b13f03efbab9068bbd842f7e69ec34ed7c467
|
data/bin/crafti
CHANGED
@@ -2,12 +2,20 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'crafti'
|
5
|
+
# require_relative '../lib/crafti'
|
5
6
|
|
6
7
|
options = Crafti::CLI.parse(ARGV)
|
7
8
|
|
8
9
|
if options.event == "generate"
|
9
|
-
Crafti::FileReader.
|
10
|
+
Crafti::FileReader.generate(options.template_path)
|
10
11
|
else
|
11
12
|
puts "That command is not supported."
|
12
13
|
exit
|
13
14
|
end
|
15
|
+
|
16
|
+
# require 'pathname'
|
17
|
+
# path = Pathname.new(options.template_path).expand_path
|
18
|
+
# puts "Values:\n"
|
19
|
+
# puts "path: #{path.to_s}"
|
20
|
+
# puts "\nContent:\n#{path.read}"
|
21
|
+
|
data/lib/crafti/version.rb
CHANGED
data/lib/crafti.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require "crafti/version"
|
2
2
|
require "crafti/cli"
|
3
3
|
|
4
|
+
# require_relative "crafti/version"
|
5
|
+
# require_relative "crafti/cli"
|
6
|
+
|
4
7
|
require 'fileutils'
|
5
8
|
require 'pathname'
|
6
9
|
require 'erb'
|
@@ -84,13 +87,14 @@ module Crafti
|
|
84
87
|
end
|
85
88
|
|
86
89
|
class FileReader
|
87
|
-
def self.
|
90
|
+
def self.generate(file)
|
88
91
|
app = new(file)
|
92
|
+
app.evaluate
|
89
93
|
end
|
90
94
|
|
91
95
|
attr_reader :content
|
92
96
|
def initialize(file)
|
93
|
-
@content = ::Pathname.new(file).expand_path.read
|
97
|
+
@content = ::Pathname.new(file.to_s).expand_path.read
|
94
98
|
end
|
95
99
|
|
96
100
|
def evaluate
|