deify 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Gemfile.lock +91 -0
  2. data/README.md +8 -46
  3. data/deify.gemspec +1 -1
  4. metadata +4 -3
@@ -0,0 +1,91 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ deify (0.0.1)
5
+ rails (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actionmailer (3.2.1)
11
+ actionpack (= 3.2.1)
12
+ mail (~> 2.4.0)
13
+ actionpack (3.2.1)
14
+ activemodel (= 3.2.1)
15
+ activesupport (= 3.2.1)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.1)
19
+ rack (~> 1.4.0)
20
+ rack-cache (~> 1.1)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.1.2)
23
+ activemodel (3.2.1)
24
+ activesupport (= 3.2.1)
25
+ builder (~> 3.0.0)
26
+ activerecord (3.2.1)
27
+ activemodel (= 3.2.1)
28
+ activesupport (= 3.2.1)
29
+ arel (~> 3.0.0)
30
+ tzinfo (~> 0.3.29)
31
+ activeresource (3.2.1)
32
+ activemodel (= 3.2.1)
33
+ activesupport (= 3.2.1)
34
+ activesupport (3.2.1)
35
+ i18n (~> 0.6)
36
+ multi_json (~> 1.0)
37
+ arel (3.0.0)
38
+ builder (3.0.0)
39
+ erubis (2.7.0)
40
+ hike (1.2.1)
41
+ i18n (0.6.0)
42
+ journey (1.0.1)
43
+ json (1.6.5)
44
+ mail (2.4.1)
45
+ i18n (>= 0.4.0)
46
+ mime-types (~> 1.16)
47
+ treetop (~> 1.4.8)
48
+ mime-types (1.17.2)
49
+ multi_json (1.0.4)
50
+ polyglot (0.3.3)
51
+ rack (1.4.1)
52
+ rack-cache (1.1)
53
+ rack (>= 0.4)
54
+ rack-ssl (1.3.2)
55
+ rack
56
+ rack-test (0.6.1)
57
+ rack (>= 1.0)
58
+ rails (3.2.1)
59
+ actionmailer (= 3.2.1)
60
+ actionpack (= 3.2.1)
61
+ activerecord (= 3.2.1)
62
+ activeresource (= 3.2.1)
63
+ activesupport (= 3.2.1)
64
+ bundler (~> 1.0)
65
+ railties (= 3.2.1)
66
+ railties (3.2.1)
67
+ actionpack (= 3.2.1)
68
+ activesupport (= 3.2.1)
69
+ rack-ssl (~> 1.3.2)
70
+ rake (>= 0.8.7)
71
+ rdoc (~> 3.4)
72
+ thor (~> 0.14.6)
73
+ rake (0.9.2.2)
74
+ rdoc (3.12)
75
+ json (~> 1.4)
76
+ sprockets (2.1.2)
77
+ hike (~> 1.2)
78
+ rack (~> 1.0)
79
+ tilt (~> 1.1, != 1.3.0)
80
+ thor (0.14.6)
81
+ tilt (1.3.3)
82
+ treetop (1.4.10)
83
+ polyglot
84
+ polyglot (>= 0.3.1)
85
+ tzinfo (0.3.31)
86
+
87
+ PLATFORMS
88
+ ruby
89
+
90
+ DEPENDENCIES
91
+ deify!
data/README.md CHANGED
@@ -1,65 +1,27 @@
1
- Surety
1
+ Deify
2
2
  ============
3
3
 
4
- A lightweight guaranteed-delivery messaging system.
4
+ A gem that provides a generator to set up god/resque/redis configuration for any Rails app using resque-based gems at Revolution Prep.
5
5
 
6
6
 
7
- Dependency Notes
8
- ================
9
-
10
- * Surety uses ActiveRecord to persist the message requests in order to provide transactional, guaranteed-delivery requests. Requires ActiveRecord 3.0.0 or higher.
11
- * Surety uses Resque to underpin the message processing/retry loop. Requires Resque 1.19.0 or higher.
12
-
13
7
 
14
8
  Usage / Examples
15
9
  ================
16
10
 
17
- A simple class that can send a message for guaranteed delivery:
18
-
19
- class TestGenerator
20
- include Surety::Generator
21
-
22
- def some_method
23
- self.send_message(message_content)
24
- end
25
- end
26
-
27
-
28
- On the server side, to start up the loop to process messages:
29
-
30
- Surety::Processor.request_next
11
+ After installing, just type
31
12
 
13
+ rails generate deify:install
32
14
 
33
- Configuration
34
- =============
35
-
36
- Both the prefix for the ActiveRecord database connection name (as specified in database.yml) and the class to which Surety delegates messages for processing after pulling them off the queue are configurable.
37
-
38
- Also configurable are three parameters related to failure retries:
39
- * retry interval: base amount of time to wait before a retry, in minutes. Defaults to 10.
40
- * backoff factor: factor to divide the failure count by before calculating an exponential backoff. The backoff factor is (2^floor(failure count/backoff interval)). Defaults to 2.
41
- * max backoff: maximum number of powers of 2 to backoff. Defaults to 7 (which gives a backoff factor of 128; together with the default retry interval of 10, this produces a default max backoff amount of 1280 minutes ~ 1 day).
42
-
43
- Example configuration (from a sample config/initializers/surety.rb file)
44
15
 
45
- Surety::Configuration.database_prefix = 'surety_'
46
- Surety::Configuration.message_processing_delegate = MessageDistributor
47
- Surety::Configuration.retry_interval = 20
48
- Surety::Configuration.backoff_factor = 4
49
- Surety::Configuration.max_backoff = 5
16
+ This will create three files in your Rails app: config/redis.yml, config/initializers/resque.rb, and config/god/resque.god.
50
17
 
18
+ * Make sure to set the correct app name in resque.god and namespace in resque.rb.
19
+ * The app name in resque.god MUST match the app name in deploy.rb in order for capistrano-git-plugins to work.
20
+ * resque.rb can set any namespace that makes sense but they typically defaults to "resque:#{app_name}" and "resque:test_#{app_name}".
51
21
 
52
- Install
53
- =======
54
-
55
- ### As a gem
56
-
57
- $ gem install surety
58
22
 
59
23
 
60
24
  Acknowledgements
61
25
  ================
62
26
 
63
27
  Copyright (c) 2012 Monica McArthur, released under the MIT license.
64
-
65
- Thanks to Ryan and Steve for arguing that this gem was necessary... it is.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'deify'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
  s.summary = 'Sets up god/resque/redis configuration for any app using resque-based gems at Revolution Prep.'
6
6
  s.homepage = ''
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Monica McArthur
@@ -43,6 +43,7 @@ extra_rdoc_files: []
43
43
 
44
44
  files:
45
45
  - Gemfile
46
+ - Gemfile.lock
46
47
  - LICENSE
47
48
  - README.md
48
49
  - Rakefile