runner_helper 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: fdbb3207599aeb2067052e62131316a5f1647174
4
- data.tar.gz: ceb760411137efd6826b097b3e51cc484d8200d5
3
+ metadata.gz: b9b96944d44df47bde90973a8415342a3c816509
4
+ data.tar.gz: 48be5a0988fe7e377a1d425c83a4632b9dfd4baf
5
5
  SHA512:
6
- metadata.gz: fb648577b55bf8f511e4cecbe2663c325de2531dfa78d5e6d247cd2c75cdd96b61c78d4c802cf84d1cdc43ed5eb7167839c3d92c26b3826f9a4e785e16501d68
7
- data.tar.gz: febcab8584c2d3948314436619dcf999eb09c8d337d360974d48d97e7a666b7fe7b7361644f3f27c3ed8f82327686433ef075045c0c4c776fd388d9614597a03
6
+ metadata.gz: 33589eb73a9246215f284901cd446eaee8401bf1464d347e165373fae11d1665317aa867f4057b107bd96abb619fa3e7f0a6accb6ab83ccc20c7008991c2e2f0
7
+ data.tar.gz: b98f10d1481444bd6b624fa9447a788ae2a1a35f1a55bc35f8243b08b6bebe2f4a12f8fe3f1db772ff10fc255f8a26585606e511a169aa9ba1773f291e1cce72
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  $ rails g runner billing
24
24
 
25
- creates `Billing` class file `app/runners/billing.rb` with systemd unit file `vendor/systemd/billing.service`. Implement your business logic in `run_once` method.
25
+ creates `BillingRunner` class file `app/runners/billing_runner.rb` with systemd unit file `vendor/systemd/billing_runner.service`. Implement your business logic in `run_once` method.
26
26
 
27
27
  ## Contributing
28
28
 
@@ -15,10 +15,10 @@ class RunnerHelperGenerator < Rails::Generators::NamedBase
15
15
  end
16
16
 
17
17
  def gen_runner_class
18
- template('runner_helper.rb.erb', "app/runners/#{file_name}.rb")
18
+ template('runner_helper.rb.erb', "app/runners/#{file_name}_runner.rb")
19
19
  end
20
20
 
21
21
  def gen_unit_file
22
- template('unit.service.erb', "vendor/systemd/#{file_name}.service")
22
+ template('unit.service.erb', "vendor/systemd/#{file_name}_runner.service")
23
23
  end
24
24
  end
@@ -1,4 +1,4 @@
1
- class <%= class_name %>
1
+ class <%= class_name %>Runner
2
2
  # default value of repetition time is 5 seconds
3
3
  # TIMEOUT = 5
4
4
  include RunnerHelper
@@ -5,7 +5,7 @@ After=syslog.target network.target
5
5
  [Service]
6
6
  Type=simple
7
7
  WorkingDirectory=/home/deploy/<%= application_name %>/current
8
- ExecStart=/bin/bash -lc 'rails runner -e production "<%= class_name %>.new.service"'
8
+ ExecStart=/bin/bash -lc 'rails runner -e production "<%= class_name %>Runner.new.service"'
9
9
  User=<%= username %>
10
10
  Group=<%= username %>
11
11
  UMask=0002
@@ -16,7 +16,7 @@ Restart=on-failure
16
16
  StandardOutput=syslog
17
17
  StandardError=syslog
18
18
 
19
- SyslogIdentifier=<%= file_name %>
19
+ SyslogIdentifier=<%= file_name %>_runner
20
20
 
21
21
  [Install]
22
22
  WantedBy=multi-user.target
@@ -1,3 +1,3 @@
1
1
  module RunnerHelper
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runner_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rinat Garifullin