crafti 0.0.16 → 0.0.17

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: fcfd788057538060a82edf6c0e5f3f30ddfd4c1b
4
- data.tar.gz: 92857272a5dadcc3ad4be05c5c5bc523ede00634
3
+ metadata.gz: d22f93d08ccbd5c809862d7d53e3d29fa47279ab
4
+ data.tar.gz: e9ed8eb6aa507c2c73ecb8cb76a4b3e31fc39319
5
5
  SHA512:
6
- metadata.gz: 2fed4deb18bb7032bdc8e390520cb1a9ca98bdb6b15c9de8b78d6e21a8f10c3471735f0bee31cb57df4be226bc1c1a1c6c848c5c88b22de5d78415d79bdd1e01
7
- data.tar.gz: b83a950a1faa53111a3df39b8429a791a9085ab44c846b8f202cb38632e144002c7086649f1cfa5fe88c3bebf0b06ab09eb530e4e8e96ffa297a1ab0c613c7fc
6
+ metadata.gz: 47962f267a96b7ddeeb66670af811ca118615fcb0532a654bd19161d36b97af591a015154fa8d2ebb3e5a8fd2be38ecd97816fa98c715d8c73f595c19dbfea15
7
+ data.tar.gz: 7403ff5d6582a71d5c9950c678af1b581faef9d15bf1e59c77a8a81f3328e233b95669359ffa00baaa40aa032489e66d82fffe9f7e31ac4b419899b2cbcc44f1
data/bin/crafti CHANGED
@@ -7,7 +7,7 @@ require 'crafti'
7
7
  options = Crafti::CLI.parse(ARGV)
8
8
 
9
9
  if options.event == "generate"
10
- Crafti::FileReader.generate(options.template_path, options.name)
10
+ Crafti::FileReader.generate(options.template_path)
11
11
  else
12
12
  puts "That command is not supported."
13
13
  exit
@@ -19,6 +19,5 @@ end
19
19
  # puts options.inspect
20
20
  # puts "Values:\n"
21
21
  # puts "path: #{path.to_s}"
22
- # puts "Name: #{options.name}"
23
22
  # puts "\nContent:\n#{path.read}"
24
23
 
data/lib/crafti.rb CHANGED
@@ -86,28 +86,20 @@ module Crafti
86
86
  end
87
87
  end
88
88
 
89
- module AppName
90
- def self.name(appname = nil)
91
- @name ||= appname
92
- end
93
- end
94
-
95
89
  class FileReader
96
- def self.generate(file, app_name = nil)
97
- app = new(file, app_name)
90
+ def self.generate(file)
91
+ app = new(file)
98
92
  app.evaluate
99
93
  end
100
94
 
101
95
  attr_reader :content
102
- def initialize(file, app_name = nil)
103
- ::Crafti::AppName.name(app_name)
96
+ def initialize(file)
104
97
  @content = ::Pathname.new(file.to_s).expand_path.read
105
98
  end
106
99
 
107
100
  def evaluate
108
101
  klass = Class.new do
109
102
  Kernel.extend(Crafti::KernelExtension)
110
- Kernel.extend(Crafti::AppName)
111
103
  def self.execute(string)
112
104
  eval string
113
105
  end
@@ -121,7 +113,7 @@ module Crafti
121
113
  include FileUtilsExtension
122
114
 
123
115
  def self.root(appname, &block)
124
- app = new((::Crafti::AppName.name || appname))
116
+ app = new(appname)
125
117
  app.create_root_directory
126
118
  app.evaluate(&block) if block_given?
127
119
  end
data/lib/crafti/cli.rb CHANGED
@@ -17,11 +17,6 @@ module Crafti
17
17
  TEXT
18
18
  opts.separator ""
19
19
 
20
- opts.on("-n", "--name NAME", "Name of the application you're creating. This overrides the name in the app template.") do |name|
21
- name = nil if name.nil? || name == ''
22
- options.name = name
23
- end
24
-
25
20
  opts.on("-t", "--template PATH", "Path to the application template") do |path|
26
21
  options.template_path = path
27
22
  end
@@ -1,7 +1,7 @@
1
1
  module Crafti
2
2
  MAJOR = 0
3
3
  MINOR = 0
4
- PATCH = 16
4
+ PATCH = 17
5
5
 
6
6
  def self.version
7
7
  [
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.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Evans