fanforce-app-factory 0.8.1 → 0.10.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 +8 -8
- data/README.md +13 -0
- data/fanforce-app-factory.gemspec +1 -0
- data/lib/fanforce/app_factory.rb +5 -0
- data/lib/fanforce/app_factory/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTYxZGI5ODQ5NzhlYmI5N2QxZmM5YjZhODQ4MTJiMjBjZmI5NDcwOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDU5NGRmOTJhMzNkNDlmODgzYjZmYzYyOTBjMDNjYTk1NGE5OWY5Mw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTQyNDk5ODU0ZDcyNDc1NjA5YmYyNGZmOTJmOGIwZjc2NTQwMmZkOWE3ZmJh
|
10
|
+
YTEyMjhlYjQ4MDVmNTAxODM2MmU2YTFlM2QyNWM3MjRkMjlhYjg2NzUxNzNi
|
11
|
+
M2FmMzQ1YjJkMDBhYmE0YjlkNjcyMjQ3NTA3NDQ3ZmZhNzM4NzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzU3NDIzNTg5ZThmZjJjOTdkODI1YTM3YTM1OTk0MmIyM2QxNWNmYTY4Yjcy
|
14
|
+
ZWRmNWNmYzdjNzQ0N2MwZGM3NjhiYTRhN2UwMzI4OWI0NDNlN2ZkMmE0ZTNm
|
15
|
+
NTI2NzEzYzIzZjY0ODg3YTE2Yzg5MzNhZmYxNDY4MjJiOGExZjY=
|
data/README.md
CHANGED
@@ -180,3 +180,16 @@ load 'fanforce/app.rake'
|
|
180
180
|
```
|
181
181
|
|
182
182
|
|
183
|
+
# Using Fanforce::Workers
|
184
|
+
|
185
|
+
FanforceApp includes the fanforce-workers gem by default and includes a convenience helper method. FanforceApp.enqueue
|
186
|
+
will prefix the name of your worker with the name of your plugin to ensure there are no conflicts across multiple plugins
|
187
|
+
or apps. This is the naming convention used by Fanforce Factory when creating and uploading Iron.io workers.
|
188
|
+
|
189
|
+
As an example, if you have a testing.worker file, you would use the following command:
|
190
|
+
|
191
|
+
```
|
192
|
+
FanforceApp.enqueue 'testing', {params_to_send: 'whatever'}
|
193
|
+
```
|
194
|
+
|
195
|
+
|
data/lib/fanforce/app_factory.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
ENV['RACK_ENV'] ||= 'development'
|
2
2
|
####################################################################################
|
3
3
|
require 'fanforce/api'
|
4
|
+
require 'fanforce/workers'
|
4
5
|
require 'active_support/all'
|
5
6
|
require 'sinatra/base'
|
6
7
|
require 'fileutils'
|
@@ -15,6 +16,10 @@ caller[0].split(':')[0] =~ /^(.+(config\.ru|Rakefile))$/ ? ROOT_DIR = File.dirna
|
|
15
16
|
|
16
17
|
module FanforceApp
|
17
18
|
|
19
|
+
def self.enqueue(queue_name, payload)
|
20
|
+
Fanforce::Workers.enqueue "#{config._id}-#{queue_name}", payload
|
21
|
+
end
|
22
|
+
|
18
23
|
def self.config(&block)
|
19
24
|
config = @@config ||= FanforceApp::SinatraConfig.new(ROOT_DIR)
|
20
25
|
if block.present?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fanforce-app-factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Clark
|
@@ -276,6 +276,20 @@ dependencies:
|
|
276
276
|
- - ~>
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0.2'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: fanforce-workers
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ~>
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0.5'
|
286
|
+
type: :runtime
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ~>
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0.5'
|
279
293
|
description:
|
280
294
|
email:
|
281
295
|
- cclark@fanforce.com
|