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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a33d6e67d327ef357f8b99f11d19157efa18f3ab
4
- data.tar.gz: a1eb3c793f936be3c3ad5a40ecaa312d2b4a0c67
3
+ metadata.gz: ff0eda4f4fd8636e4ec38766b03079b63898f01b
4
+ data.tar.gz: f4da25cc34eee8f28b5f6119074b82920fba12f1
5
5
  SHA512:
6
- metadata.gz: 338bc394389de1cfb5936710fb9cd1092a2df8e563b6b3d9836f3260ec4ad9e3ecda3b01aa3cdc0993bf36b558998d9c2887aa68b378dcd642b54272c7f3b95f
7
- data.tar.gz: 29e8228b39542ee0f2773f0f51c091c5ae23a4d9cdc4548ddbf16a66bf3e0b2841ffec638b80aa81ee53561690604e5c34d8c5ce1a65dad950816d00dbc3348f
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.new(options.template_path).evaluate
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
+
@@ -1,7 +1,7 @@
1
1
  module Crafti
2
2
  MAJOR = 0
3
3
  MINOR = 0
4
- PATCH = 14
4
+ PATCH = 15
5
5
 
6
6
  def self.version
7
7
  [
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.read(file)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crafti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Evans