jeanine 0.7.3.2 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/exe/jeanine +1 -1
- data/lib/jeanine/app.rb +1 -1
- data/lib/jeanine/cli.rb +9 -4
- data/lib/jeanine/generator/new/Gemfile.tt +0 -2
- data/lib/jeanine/generator/new/app.rb.tt +20 -1
- data/lib/jeanine/version.rb +1 -1
- 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: e5edf90467faa847958a30a1fc3b937cf3ed6480
|
4
|
+
data.tar.gz: 154de020a71084d5a7155a77a0f2635164775cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3639863abf7a3f23ba443313a1705324b46588b23de82ca5703b8a19863aa6d7c56618c2e0159bb3b77ef330d34a74bf8a983ae1f222f009b6e59cd033b2cf8
|
7
|
+
data.tar.gz: 02c17bcff9607506feb24d7a1079d4c292322c48d0a9aa07d842fbdcf055886fa2258347cf6bd9035d4ad927195d629958b1ba94e0b06ee3510c47439de58e28
|
data/README.md
CHANGED
data/exe/jeanine
CHANGED
data/lib/jeanine/app.rb
CHANGED
data/lib/jeanine/cli.rb
CHANGED
@@ -15,18 +15,23 @@ module Jeanine
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def command_new!
|
18
|
+
$stdout.puts("Creating new app #{@args[1]}")
|
18
19
|
FileUtils.mkdir("#{@args[1]}") unless Dir.exists?("#{@args[1]}")
|
19
20
|
FileUtils.mkdir("#{@args[1]}/config") unless Dir.exists?("#{@args[1]}/config")
|
20
|
-
|
21
|
-
|
21
|
+
FileUtils.mkdir("#{@args[1]}/tmp") unless Dir.exists?("#{@args[1]}/tmp")
|
22
|
+
FileUtils.mkdir("#{@args[1]}/tmp/pids") unless Dir.exists?("#{@args[1]}/tmp/pids")
|
23
|
+
FileUtils.touch("#{@args[1]}/tmp/pids/.keep") unless File.exists?("#{@args[1]}/tmp/pids/.keep")
|
24
|
+
relative_dir = "#{__dir__}/generator/new"
|
25
|
+
Dir.glob("#{__dir__}/generator/new/**/*.*").each do |file|
|
22
26
|
new_dir = file.gsub(relative_dir, "#{@args[1]}")[0...-3]
|
23
27
|
FileUtils.copy_file(file, new_dir)
|
24
28
|
end
|
25
|
-
relative_dir = "
|
26
|
-
Dir.glob("
|
29
|
+
relative_dir = "#{__dir__}/generator/new/config"
|
30
|
+
Dir.glob("#{__dir__}/generator/new/config/**/*.*").each do |file|
|
27
31
|
new_dir = file.gsub(relative_dir, "#{@args[1]}/config")[0...-3]
|
28
32
|
FileUtils.copy_file(file, new_dir)
|
29
33
|
end
|
34
|
+
$stdout.puts("Created #{@args[1]}!")
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative 'boot'
|
1
|
+
require_relative 'config/boot'
|
2
2
|
|
3
3
|
require 'jeanine'
|
4
4
|
|
@@ -7,4 +7,23 @@ require 'jeanine'
|
|
7
7
|
Bundler.require(*Jeanine.groups)
|
8
8
|
|
9
9
|
class App < ::Jeanine::App
|
10
|
+
# plugin :Callbacks
|
11
|
+
# plugin :Rescuable
|
12
|
+
# plugin :Rendering
|
13
|
+
# plugin :Session
|
14
|
+
|
15
|
+
root do
|
16
|
+
"Hello world!"
|
17
|
+
end
|
18
|
+
|
19
|
+
get "/health" do
|
20
|
+
if request.json?
|
21
|
+
# Get this for free with plugin :Rendering
|
22
|
+
# and `render json: { status: "Healthy" }`
|
23
|
+
response.content_type = ::Rack::Mime::MIME_TYPES[".json"]
|
24
|
+
{ status: "Healthy" }.to_json
|
25
|
+
else
|
26
|
+
"Healthy!"
|
27
|
+
end
|
28
|
+
end
|
10
29
|
end
|
data/lib/jeanine/version.rb
CHANGED