jeanine 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/jeanine +5 -0
- data/lib/jeanine/cli.rb +32 -0
- data/lib/jeanine/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3df31123e22ecf9f1dd465af168aa34b3199e75
|
4
|
+
data.tar.gz: 9fb4883db99cbf0a30b4895064bcb10f00896c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e871411c10b283ab9ad26c5b568870e651dc25110cb1e5ea842e607dfe1d3d28dfac640bb574cfe19ee0bb01575668e1906fdbd2c9d5304e0c85a75977d3bfd4
|
7
|
+
data.tar.gz: 214f87e732bbfa864f5b64574c27b4a284c260c7447dc867af01a94da52edac49308d427da84c19846b8c540a2309ab3d81117b99b6f4330df04b194b3b5c65a
|
data/exe/jeanine
ADDED
data/lib/jeanine/cli.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Jeanine
|
4
|
+
class CLI
|
5
|
+
def initialize(args)
|
6
|
+
@args = args
|
7
|
+
end
|
8
|
+
|
9
|
+
def execute
|
10
|
+
if @args[0] == 'new'
|
11
|
+
command_new!
|
12
|
+
else
|
13
|
+
$stdout.puts "I don't know how to `#{@args[0]}`. Maybe you meant `new`?"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def command_new!
|
18
|
+
FileUtils.mkdir("#{@args[1]}") unless Dir.exists?("#{@args[1]}")
|
19
|
+
FileUtils.mkdir("#{@args[1]}/config") unless Dir.exists?("#{@args[1]}/config")
|
20
|
+
relative_dir = "lib/jeanine/generator/new"
|
21
|
+
Dir.glob("lib/jeanine/generator/new/**/*.*").each do |file|
|
22
|
+
new_dir = file.gsub(relative_dir, "#{@args[1]}")[0...-3]
|
23
|
+
FileUtils.copy_file(file, new_dir)
|
24
|
+
end
|
25
|
+
relative_dir = "lib/jeanine/generator/new/config"
|
26
|
+
Dir.glob("lib/jeanine/generator/new/config/**/*.*").each do |file|
|
27
|
+
new_dir = file.gsub(relative_dir, "#{@args[1]}/config")[0...-3]
|
28
|
+
FileUtils.copy_file(file, new_dir)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/jeanine/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeanine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Brody
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
@@ -108,16 +108,18 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: A framework.
|
111
|
+
description: A lightning-fast, batteries-included Ruby web micro-framework.
|
112
112
|
email:
|
113
113
|
- git@josh.mn
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- exe/jeanine
|
118
119
|
- lib/jeanine.rb
|
119
120
|
- lib/jeanine/app.rb
|
120
121
|
- lib/jeanine/callbacks.rb
|
122
|
+
- lib/jeanine/cli.rb
|
121
123
|
- lib/jeanine/core_ext.rb
|
122
124
|
- lib/jeanine/core_ext/array.rb
|
123
125
|
- lib/jeanine/core_ext/hash.rb
|
@@ -165,5 +167,5 @@ rubyforge_project:
|
|
165
167
|
rubygems_version: 2.6.14.3
|
166
168
|
signing_key:
|
167
169
|
specification_version: 4
|
168
|
-
summary: A framework.
|
170
|
+
summary: A lightning-fast, batteries-included Ruby web micro-framework.
|
169
171
|
test_files: []
|