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 +5 -5
- data/README.md +30 -1
- data/lib/generators/oneshot/templates/oneshot.rake.erb +2 -0
- data/lib/oneshot_task_generator/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7b5647e3e28a4c5dd000eb09c53e36f3f0c17e5f003e7df5198300da319b6e2f
|
4
|
+
data.tar.gz: c4f5f66e379426a019acbfe49adb7bd45d68e9de4fc5a2f83ee24cfabae55a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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.
|
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.
|
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-
|
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
|
139
|
+
rubygems_version: 2.7.6
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Generator for oneshot rake task
|