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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 595727f43e19d16fb380f54368b005de5e63a62e03e53b0922ff9992768c504d
4
- data.tar.gz: 898876c48540ebc87f02557341f3c32c70d8aae5bc83c734334530bfe3584419
3
+ metadata.gz: 385d6174d32308d71350db4faf0591d2254519b4a4a57722bc8432f31ce5c45b
4
+ data.tar.gz: 4f76c3588b00cc1f7d9dbe15625920e8bebc87cdaa8187eb1b687acecca863c3
5
5
  SHA512:
6
- metadata.gz: 347a82e67361fdb6a434f10dae7b0a4692a1b319cad582751a8d8078b0144ddcf0741a3e08041026b3cb0385aaf8e6b7117979158062a56f29131d9f42a9e607
7
- data.tar.gz: 3a59a27e74896d9d3af3c99725af1dee2874130d2f142aee1cc75ca3eb3c5ba1e3ee963152697189043c2559c45a8a0a5885f6cf72d52070c7b0294888353f27
6
+ metadata.gz: be5fd4d8de15a1385dc3b7e7f5260048c5f352b841d5b7384ce9a1bc54b3dde4c735d99f912918a6be7f27410df568856fbf54b3893a56a262602d88fa7e753f
7
+ data.tar.gz: a2e8425bdf7d4f2ad666eae950edf6843e11e9c1baa7bac141ebf0a68850f7e5216f773daf49fcf2a0edb16e32dd3c35985735e5d17fb35282977980a717e699
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oke (0.1.1)
4
+ oke (0.1.2)
5
5
  colorize (~> 0.8)
6
6
  thor (~> 0.20)
7
7
 
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 in order to create the config files that the tool uses.
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
 
@@ -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
- create "config/oke"
12
- create "config/oke/processes.rb"
13
- create "config/oke/environments.rb"
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
@@ -1,3 +1,3 @@
1
1
  module Oke
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Robinson