oke 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/oke/cli.rb +37 -4
- data/lib/oke/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 385d6174d32308d71350db4faf0591d2254519b4a4a57722bc8432f31ce5c45b
|
4
|
+
data.tar.gz: 4f76c3588b00cc1f7d9dbe15625920e8bebc87cdaa8187eb1b687acecca863c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be5fd4d8de15a1385dc3b7e7f5260048c5f352b841d5b7384ce9a1bc54b3dde4c735d99f912918a6be7f27410df568856fbf54b3893a56a262602d88fa7e753f
|
7
|
+
data.tar.gz: a2e8425bdf7d4f2ad666eae950edf6843e11e9c1baa7bac141ebf0a68850f7e5216f773daf49fcf2a0edb16e32dd3c35985735e5d17fb35282977980a717e699
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -22,9 +22,9 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
$ gem install oke
|
24
24
|
|
25
|
-
To get started with oke, you can run
|
25
|
+
To get started with oke, you can run init to setup the config files that the tool uses.
|
26
26
|
|
27
|
-
$ oke init
|
27
|
+
$ bundle exec oke init
|
28
28
|
|
29
29
|
## Development
|
30
30
|
|
data/lib/oke/cli.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "thor"
|
2
2
|
require "colorize"
|
3
|
+
require "fileutils"
|
3
4
|
|
4
5
|
module Oke
|
5
6
|
class CLI < Thor
|
@@ -8,14 +9,46 @@ module Oke
|
|
8
9
|
puts "Detected Rails Application 🛤️"
|
9
10
|
puts ""
|
10
11
|
puts "Preparing config files 📝"
|
11
|
-
|
12
|
-
create "config/oke/processes.rb"
|
13
|
-
|
12
|
+
|
13
|
+
create "config/oke/processes.rb", <<~HEREDOC
|
14
|
+
# This file contains information about every process your application needs to run
|
15
|
+
|
16
|
+
puma "app" do
|
17
|
+
workers 5
|
18
|
+
threads 5
|
19
|
+
end
|
20
|
+
|
21
|
+
# You can define cron jobs like this:
|
22
|
+
#
|
23
|
+
# cron "cleanup" do
|
24
|
+
# schedule "@daily"
|
25
|
+
# command "bundle exec rake cleanup"
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# cron "update counts" do
|
29
|
+
# schedule "*/30 * * * *"
|
30
|
+
# command "bundle exec rake counts:update"
|
31
|
+
# end
|
32
|
+
#
|
33
|
+
# You can manage resque workers like this :
|
34
|
+
#
|
35
|
+
# resque "wokers" do
|
36
|
+
# queues %w(normal_priority low_priority default)
|
37
|
+
# wokers 6
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# resque "high_priority" do
|
41
|
+
# queues %w(high_priority)
|
42
|
+
# wokers 2
|
43
|
+
# end
|
44
|
+
HEREDOC
|
14
45
|
end
|
15
46
|
|
16
47
|
no_commands do
|
17
|
-
def create(filename)
|
48
|
+
def create(filename, content)
|
18
49
|
puts " create ".colorize(:green) + filename
|
50
|
+
FileUtils.mkdir_p File.dirname(filename)
|
51
|
+
File.write(filename,content)
|
19
52
|
end
|
20
53
|
end
|
21
54
|
end
|
data/lib/oke/version.rb
CHANGED