activeasync 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/README.md +13 -10
- data/lib/active_async.rb +0 -1
- data/lib/active_async/version.rb +1 -1
- data/spec/{dummy → sample}/.gitignore +0 -0
- data/spec/{dummy → sample}/Rakefile +1 -1
- data/spec/{dummy → sample}/app/controllers/application_controller.rb +0 -0
- data/spec/{dummy → sample}/app/helpers/application_helper.rb +0 -0
- data/spec/{dummy → sample}/app/models/blog.rb +0 -0
- data/spec/{dummy → sample}/app/models/post.rb +0 -0
- data/spec/{dummy → sample}/app/views/layouts/application.html.erb +1 -1
- data/spec/{dummy → sample}/config.ru +1 -1
- data/spec/{dummy → sample}/config/application.rb +1 -1
- data/spec/{dummy → sample}/config/boot.rb +0 -0
- data/spec/{dummy → sample}/config/database.yml +0 -0
- data/spec/{dummy → sample}/config/environment.rb +1 -1
- data/spec/{dummy → sample}/config/environments/development.rb +1 -5
- data/spec/{dummy → sample}/config/environments/production.rb +1 -5
- data/spec/{dummy → sample}/config/environments/test.rb +1 -1
- data/spec/{dummy → sample}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/{dummy → sample}/config/initializers/inflections.rb +0 -0
- data/spec/{dummy → sample}/config/initializers/mime_types.rb +0 -0
- data/spec/{dummy → sample}/config/initializers/secret_token.rb +1 -1
- data/spec/{dummy → sample}/config/initializers/session_store.rb +2 -2
- data/spec/{dummy → sample}/config/initializers/wrap_parameters.rb +0 -0
- data/spec/{dummy → sample}/config/locales/en.yml +0 -0
- data/spec/{dummy → sample}/config/routes.rb +1 -1
- data/spec/{dummy → sample}/db/migrate/20120126234735_create_posts.rb +0 -0
- data/spec/{dummy → sample}/db/migrate/20120127010859_create_blogs.rb +0 -0
- data/spec/{dummy → sample}/db/schema.rb +10 -10
- data/spec/{dummy → sample}/db/seeds.rb +0 -0
- data/spec/{dummy → sample}/log/.gitkeep +0 -0
- data/spec/{dummy → sample}/script/rails +0 -0
- data/spec/spec_helper.rb +1 -1
- metadata +32 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc8fe980596f76c145ade8133b3149133625821c
|
4
|
+
data.tar.gz: 550e7d47851975c692537d591d32e1ecb1324ab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7aa8d92df07e6c381d320cdbaa99b371f7d7ea68de80b541951d19b674a9b32732ee332eac70ca58abe5bed73fb724bda65cc0dad2720d29ea1da1b75c43ed9
|
7
|
+
data.tar.gz: 55b1780c47fc989132dc2033c1132e6fc59d3cb082845760c638ab3c91780a4630a01bb83c3ef7eae84db7289a28b7f3b13c3047a92b54708501b60adeeea3c0
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,11 +3,7 @@
|
|
3
3
|
ActiveAsync aims to provide an interface for easily setting up ActiveRecord objects
|
4
4
|
and ruby classes to run methods asynchronously.
|
5
5
|
|
6
|
-
ActiveAsync currently depends on
|
7
|
-
|
8
|
-
Ruby support:
|
9
|
-
- 1.9.3
|
10
|
-
- 2.1 (coming soon)
|
6
|
+
ActiveAsync currently depends on ActiveSupport.
|
11
7
|
|
12
8
|
[![Build Status](https://secure.travis-ci.org/challengepost/activeasync.png)](http://travis-ci.org/challengepost/activeasync)
|
13
9
|
|
@@ -25,11 +21,18 @@ Or via command line
|
|
25
21
|
|
26
22
|
## Usage
|
27
23
|
|
24
|
+
Configure one of the supported adapters: `:sidekiq`, `:resque`, or `:inline` (useful for testing synchronously).
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
# config/initializers/activeasync.rb
|
28
|
+
require "active_async"
|
29
|
+
|
30
|
+
ActiveAsync.queue_adapter = :sidekiq
|
31
|
+
```
|
32
|
+
|
28
33
|
Background class methods
|
29
34
|
|
30
35
|
``` ruby
|
31
|
-
require 'active_async'
|
32
|
-
|
33
36
|
class HeavyLifter
|
34
37
|
include ActiveAsync::Async
|
35
38
|
|
@@ -70,7 +73,7 @@ late_nite = LateNite.last
|
|
70
73
|
late_nite.save # runs late_night#drive_home asynchronously after save
|
71
74
|
```
|
72
75
|
|
73
|
-
##
|
76
|
+
## Testing
|
74
77
|
|
75
78
|
ActiveAsync comes with some helpers support for RSpec.
|
76
79
|
|
@@ -92,7 +95,7 @@ any similar module/class that responds to `#enqueue(*args)`:
|
|
92
95
|
|
93
96
|
``` ruby
|
94
97
|
before do
|
95
|
-
ActiveAsync.
|
98
|
+
ActiveAsync.queue_adapter = :inline
|
96
99
|
end
|
97
100
|
```
|
98
101
|
|
@@ -103,4 +106,4 @@ To contribute to activeasync, clone the project and submit pull requests in a br
|
|
103
106
|
To run tests, install the bundle and migrate the test database:
|
104
107
|
|
105
108
|
$ bundle
|
106
|
-
$ cd spec/
|
109
|
+
$ cd spec/sample && bundle exec rake db:migrate db:test:prepare
|
data/lib/active_async.rb
CHANGED
data/lib/active_async/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -17,7 +17,7 @@ if defined?(Bundler)
|
|
17
17
|
# Bundler.require(:default, :assets, Rails.env)
|
18
18
|
end
|
19
19
|
|
20
|
-
module
|
20
|
+
module Sample
|
21
21
|
class Application < Rails::Application
|
22
22
|
# Settings in config/environments/* take precedence over those specified here.
|
23
23
|
# Application configuration should go into files in config/initializers
|
File without changes
|
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Sample::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
@@ -25,8 +25,4 @@ Dummy::Application.configure do
|
|
25
25
|
# Raise exception on mass assignment protection for Active Record models
|
26
26
|
# config.active_record.mass_assignment_sanitizer = :strict
|
27
27
|
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
-
|
32
28
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Sample::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
4
|
# Code is not reloaded between requests
|
@@ -47,8 +47,4 @@ Dummy::Application.configure do
|
|
47
47
|
|
48
48
|
# Send deprecation notices to registered listeners
|
49
49
|
config.active_support.deprecation = :notify
|
50
|
-
|
51
|
-
# Log the query plan for queries taking more than this (works
|
52
|
-
# with SQLite, MySQL, and PostgreSQL)
|
53
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
54
50
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,4 +4,4 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
|
7
|
+
Sample::Application.config.secret_token = '9a86b43614a6c40a1f6b3a522847e22892e488a22be718466e13ab08723e47c6f5e33a80e7d0ed89464ab41c148bc54027dcea264ef1fd4aba994a76df4162a0'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
|
3
|
+
Sample::Application.config.session_store :cookie_store, :key => '_sample_session'
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
7
|
# (create the session table with "rails generate session_migration")
|
8
|
-
#
|
8
|
+
# Sample::Application.config.session_store :active_record_store
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -9,21 +9,21 @@
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
11
|
#
|
12
|
-
# It's strongly recommended
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:
|
14
|
+
ActiveRecord::Schema.define(version: 20120127010859) do
|
15
15
|
|
16
|
-
create_table "blogs", :
|
17
|
-
t.string "title"
|
18
|
-
t.datetime "created_at"
|
19
|
-
t.datetime "updated_at"
|
16
|
+
create_table "blogs", force: :cascade do |t|
|
17
|
+
t.string "title", limit: 255
|
18
|
+
t.datetime "created_at"
|
19
|
+
t.datetime "updated_at"
|
20
20
|
end
|
21
21
|
|
22
|
-
create_table "posts", :
|
23
|
-
t.string "title"
|
22
|
+
create_table "posts", force: :cascade do |t|
|
23
|
+
t.string "title", limit: 255
|
24
24
|
t.text "body"
|
25
|
-
t.datetime "created_at"
|
26
|
-
t.datetime "updated_at"
|
25
|
+
t.datetime "created_at"
|
26
|
+
t.datetime "updated_at"
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
File without changes
|
File without changes
|
File without changes
|
data/spec/spec_helper.rb
CHANGED
@@ -10,7 +10,7 @@ require 'resque'
|
|
10
10
|
require 'sidekiq'
|
11
11
|
require 'sidekiq/testing'
|
12
12
|
|
13
|
-
require File.expand_path("../
|
13
|
+
require File.expand_path("../sample/config/environment.rb", __FILE__)
|
14
14
|
|
15
15
|
# Load support files
|
16
16
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeasync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Kaffenberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -153,35 +153,35 @@ files:
|
|
153
153
|
- spec/active_async/async_spec.rb
|
154
154
|
- spec/active_async/callbacks_spec.rb
|
155
155
|
- spec/active_async_spec.rb
|
156
|
-
- spec/
|
157
|
-
- spec/
|
158
|
-
- spec/
|
159
|
-
- spec/
|
160
|
-
- spec/
|
161
|
-
- spec/
|
162
|
-
- spec/
|
163
|
-
- spec/
|
164
|
-
- spec/
|
165
|
-
- spec/
|
166
|
-
- spec/
|
167
|
-
- spec/
|
168
|
-
- spec/
|
169
|
-
- spec/
|
170
|
-
- spec/
|
171
|
-
- spec/
|
172
|
-
- spec/
|
173
|
-
- spec/
|
174
|
-
- spec/
|
175
|
-
- spec/
|
176
|
-
- spec/
|
177
|
-
- spec/
|
178
|
-
- spec/
|
179
|
-
- spec/
|
180
|
-
- spec/
|
181
|
-
- spec/
|
182
|
-
- spec/
|
183
|
-
- spec/
|
184
|
-
- spec/
|
156
|
+
- spec/sample/.gitignore
|
157
|
+
- spec/sample/Rakefile
|
158
|
+
- spec/sample/app/controllers/application_controller.rb
|
159
|
+
- spec/sample/app/helpers/application_helper.rb
|
160
|
+
- spec/sample/app/models/blog.rb
|
161
|
+
- spec/sample/app/models/post.rb
|
162
|
+
- spec/sample/app/views/layouts/application.html.erb
|
163
|
+
- spec/sample/config.ru
|
164
|
+
- spec/sample/config/application.rb
|
165
|
+
- spec/sample/config/boot.rb
|
166
|
+
- spec/sample/config/database.yml
|
167
|
+
- spec/sample/config/environment.rb
|
168
|
+
- spec/sample/config/environments/development.rb
|
169
|
+
- spec/sample/config/environments/production.rb
|
170
|
+
- spec/sample/config/environments/test.rb
|
171
|
+
- spec/sample/config/initializers/backtrace_silencers.rb
|
172
|
+
- spec/sample/config/initializers/inflections.rb
|
173
|
+
- spec/sample/config/initializers/mime_types.rb
|
174
|
+
- spec/sample/config/initializers/secret_token.rb
|
175
|
+
- spec/sample/config/initializers/session_store.rb
|
176
|
+
- spec/sample/config/initializers/wrap_parameters.rb
|
177
|
+
- spec/sample/config/locales/en.yml
|
178
|
+
- spec/sample/config/routes.rb
|
179
|
+
- spec/sample/db/migrate/20120126234735_create_posts.rb
|
180
|
+
- spec/sample/db/migrate/20120127010859_create_blogs.rb
|
181
|
+
- spec/sample/db/schema.rb
|
182
|
+
- spec/sample/db/seeds.rb
|
183
|
+
- spec/sample/log/.gitkeep
|
184
|
+
- spec/sample/script/rails
|
185
185
|
- spec/spec_helper.rb
|
186
186
|
homepage: ''
|
187
187
|
licenses: []
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
version: '0'
|
203
203
|
requirements: []
|
204
204
|
rubyforge_project: activeasync
|
205
|
-
rubygems_version: 2.
|
205
|
+
rubygems_version: 2.6.11
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Add async support to ruby objects
|