oneshot_task_generator 0.1.0 → 0.1.1

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
- SHA1:
3
- metadata.gz: acbff35d1496ac10162cbd82c93167bab47f07b3
4
- data.tar.gz: 4fc4c0346f8a4a84b325ef193eb0dd5790ea62e5
2
+ SHA256:
3
+ metadata.gz: 7b5647e3e28a4c5dd000eb09c53e36f3f0c17e5f003e7df5198300da319b6e2f
4
+ data.tar.gz: c4f5f66e379426a019acbfe49adb7bd45d68e9de4fc5a2f83ee24cfabae55a0b
5
5
  SHA512:
6
- metadata.gz: b943d81ac188cfd3c66036f6c403a042c3773864768aedcfccd5a3aab7fa9ac7ef381dfe47335dedeae31d10d9b584394af866e751eee0ebabbbd6511f2109b2
7
- data.tar.gz: a79c5ad7f9349af14a3456eba9bc69d6cafb51d28138767d774f6c8c7d073fd4e4a12757028fcd45d6a8b4b128b8fc4dc16ef0686a2c71a513c20531290861ec
6
+ metadata.gz: 017572bb3fa8cc58d67cff63bb10c6e8fcab05e3962addb0b9f7aee25d3395317397cdaff41efd3590612788fde7b00c184262ca0462b7d41930fdd970a01fbe
7
+ data.tar.gz: bbd064b8c05cef1141af5aa052ae90762aa3149ef75d1cd31d6605576b0d00518edb432952db8da78911496ace51910b07d8dcaa90428869fa4889123f8d795b
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  [![Build Status](https://travis-ci.org/s-osa/oneshot_task_generator.svg?branch=master)](https://travis-ci.org/s-osa/oneshot_task_generator)
2
+ [![Gem Version](https://badge.fury.io/rb/oneshot_task_generator.svg)](https://badge.fury.io/rb/oneshot_task_generator)
2
3
 
3
4
  # OneshotTaskGenerator
4
5
 
5
6
  Simple rake task generator for oneshot tasks.
6
7
 
7
8
  ```sh
8
- $ bin/rake generate oneshot FooBar
9
+ $ bin/rails generate oneshot FooBar
9
10
  create lib/tasks/oneshot/20180205_foo_bar.rake
10
11
  ```
11
12
 
@@ -35,6 +36,34 @@ And then execute:
35
36
  $ bundle
36
37
  ```
37
38
 
39
+ ## Customization
40
+
41
+ ### Task Body
42
+
43
+ ```ruby
44
+ # config/initializers/ohesnot_task_generator.rb
45
+ OneshotGenerator.configure do |config|
46
+ config.body = <<-BODY
47
+ ActiveRecord::Base.transaction do
48
+ # Write transactional code here
49
+ end
50
+ BODY
51
+ end
52
+ ```
53
+
54
+ ```ruby
55
+ # Skeleton for this file was generated by `bin/rails generate oneshot FooBar`
56
+ # For copy and paste: `bin/rake oneshot:foo_bar_20180208`
57
+ namespace :oneshot do
58
+ desc ''
59
+ task foo_bar_20180208: :environment do
60
+ ActiveRecord::Base.transaction do
61
+ # Write transactional code here
62
+ end
63
+ end
64
+ end
65
+ ```
66
+
38
67
  ## Contributing
39
68
 
40
69
  Bug reports and pull requests are welcome on GitHub at https://github.com/s-osa/oneshot_task_generator.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  <%= "# Skeleton for this file was generated by `bin/rails generate oneshot #{name}`" %>
2
4
  <%= "# For copy and paste: `bin/rake oneshot:#{task_name}`" %>
3
5
  namespace :oneshot do
@@ -1,3 +1,3 @@
1
1
  module OneshotTaskGenerator
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneshot_task_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OSA Shunsuke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.6.14
139
+ rubygems_version: 2.7.6
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Generator for oneshot rake task