fist_of_fury 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/lib/fist_of_fury/dispatcher.rb +1 -1
- data/lib/fist_of_fury/railtie.rb +0 -2
- data/lib/fist_of_fury/schedule.rb +1 -1
- data/lib/fist_of_fury/version.rb +1 -1
- data/lib/generators/fist_of_fury/install/install_generator.rb +15 -0
- data/lib/generators/fist_of_fury/install/templates/config/initializers/fist_of_fury.rb +7 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a87495360273789b52e5c9c5f1b0157e8944fb93
|
|
4
|
+
data.tar.gz: 50d8d0dc0029683dc4c85080e6075520c5c02795
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc8a70ba4038aa43a0c97966a9728d4b7ea876a6450d51476c06f59ca1580e77a81906c465175bd9b0df398cc176f0040b16452acfbcbff106f10e0dbef05b1c
|
|
7
|
+
data.tar.gz: 1f533955bb5b36148f0dd51bc025d0f0a3c4b8d14197b6bf0fce161d99bd2d8b057f5feae8273d81429b8799d01bc83c71b390ef73bc12f2b8120f0df133af3d
|
data/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Fist of Fury is heavily inspired by [Sidetiq](https://github.com/tobiassvn/sidet
|
|
|
20
20
|
|
|
21
21
|
Add this line to your application's Gemfile:
|
|
22
22
|
|
|
23
|
-
gem 'fist_of_fury', '~> 0.
|
|
23
|
+
gem 'fist_of_fury', '~> 0.2.0'
|
|
24
24
|
|
|
25
25
|
And then execute:
|
|
26
26
|
|
|
@@ -54,8 +54,8 @@ Then in the initializer:
|
|
|
54
54
|
```Ruby
|
|
55
55
|
# config/initializers/fist_of_fury.rb
|
|
56
56
|
|
|
57
|
-
# Ensures the jobs
|
|
58
|
-
|
|
57
|
+
# Ensures the jobs run only in a web server.
|
|
58
|
+
if defined?(Rails::Server)
|
|
59
59
|
FistOfFury.attack!
|
|
60
60
|
end
|
|
61
61
|
```
|
|
@@ -65,8 +65,8 @@ Or you can even specify the recurrence rules all within the initializer:
|
|
|
65
65
|
```Ruby
|
|
66
66
|
# config/initializers/fist_of_fury.rb
|
|
67
67
|
|
|
68
|
-
# Ensures the jobs
|
|
69
|
-
|
|
68
|
+
# Ensures the jobs run only in a web server.
|
|
69
|
+
if defined?(Rails::Server)
|
|
70
70
|
FistOfFury.attack! do
|
|
71
71
|
LogJob.recurs { secondly(3) }
|
|
72
72
|
end
|
|
@@ -90,3 +90,7 @@ end
|
|
|
90
90
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
91
91
|
4. Push to the branch (`git push origin my-new-feature`)
|
|
92
92
|
5. Create new Pull Request
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
|
96
|
+
|
data/lib/fist_of_fury/railtie.rb
CHANGED
data/lib/fist_of_fury/version.rb
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'rails/generators/base'
|
|
2
|
+
|
|
3
|
+
module FistOfFury
|
|
4
|
+
module Generators
|
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
|
6
|
+
desc "Description:\n Copy Fist of Fury files to your application."
|
|
7
|
+
|
|
8
|
+
source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
|
9
|
+
|
|
10
|
+
def copy_initializer
|
|
11
|
+
directory 'config'
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fist_of_fury
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Rieken
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|
|
@@ -181,6 +181,8 @@ files:
|
|
|
181
181
|
- lib/fist_of_fury/subclass_tracking.rb
|
|
182
182
|
- lib/fist_of_fury/supervisor.rb
|
|
183
183
|
- lib/fist_of_fury/version.rb
|
|
184
|
+
- lib/generators/fist_of_fury/install/install_generator.rb
|
|
185
|
+
- lib/generators/fist_of_fury/install/templates/config/initializers/fist_of_fury.rb
|
|
184
186
|
- spec/fist_of_fury/actor_sharedspec.rb
|
|
185
187
|
- spec/fist_of_fury/actors/clock_spec.rb
|
|
186
188
|
- spec/fist_of_fury/actors/dispatcher_spec.rb
|