dalliance 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
|
|
1
|
+
en:
|
2
|
+
activerecord:
|
3
|
+
state_machines:
|
4
|
+
dalliance_status:
|
5
|
+
states:
|
6
|
+
pending: Pending
|
7
|
+
processing: Processing
|
8
|
+
processing_error: Processing Error
|
9
|
+
completed: Completed
|
10
|
+
attributes:
|
11
|
+
dalliance_status: Status
|
12
|
+
dalliance_error_hash: Errors
|
13
|
+
dalliance_duration: Processing Time
|
data/lib/dalliance.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
if defined?(Rails::Railtie)
|
4
|
-
require 'dalliance/railtie'
|
5
|
-
end
|
1
|
+
require 'state_machine'
|
2
|
+
require 'benchmark'
|
6
3
|
|
4
|
+
require 'dalliance/version'
|
7
5
|
require 'dalliance/workers'
|
8
6
|
require 'dalliance/progress_meter'
|
9
7
|
|
10
|
-
require '
|
11
|
-
require 'benchmark'
|
8
|
+
require 'dalliance/engine' if defined?(Rails)
|
12
9
|
|
13
10
|
module Dalliance
|
14
11
|
extend ActiveSupport::Concern
|
@@ -22,7 +19,7 @@ module Dalliance
|
|
22
19
|
:worker_class => detect_worker_class,
|
23
20
|
:queue => 'dalliance',
|
24
21
|
:logger => detect_logger,
|
25
|
-
:duration_column =>
|
22
|
+
:duration_column => 'dalliance_duration'
|
26
23
|
}
|
27
24
|
end
|
28
25
|
|
@@ -2,11 +2,11 @@ require 'dalliance'
|
|
2
2
|
require 'dalliance/schema'
|
3
3
|
|
4
4
|
module Dalliance
|
5
|
-
class
|
5
|
+
class Engine < ::Rails::Engine
|
6
6
|
initializer 'dalliance.active_record' do
|
7
7
|
ActiveSupport.on_load :active_record do
|
8
8
|
include Dalliance::Glue
|
9
|
-
|
9
|
+
|
10
10
|
ActiveRecord::ConnectionAdapters::TableDefinition.send(:include, Dalliance::Schema)
|
11
11
|
end
|
12
12
|
end
|
data/lib/dalliance/version.rb
CHANGED
@@ -2,10 +2,12 @@ class <%= migration_class_name %> < ActiveRecord::Migration
|
|
2
2
|
def self.up
|
3
3
|
add_column :<%= name.underscore.camelize.tableize %>, :dalliance_error_hash, :text
|
4
4
|
add_column :<%= name.underscore.camelize.tableize %>, :dalliance_status, :string, :null => false, :default => 'pending'
|
5
|
+
add_column :<%= name.underscore.camelize.tableize %>, :dalliance_duration, :integer
|
5
6
|
end
|
6
7
|
|
7
8
|
def self.down
|
8
9
|
remove_column :<%= name.underscore.camelize.tableize %>, :dalliance_error_hash
|
9
10
|
remove_column :<%= name.underscore.camelize.tableize %>, :dalliance_status
|
11
|
+
remove_column :<%= name.underscore.camelize.tableize %>, :dalliance_duration
|
10
12
|
end
|
11
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dalliance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -153,10 +153,11 @@ files:
|
|
153
153
|
- LICENSE
|
154
154
|
- README.rdoc
|
155
155
|
- Rakefile
|
156
|
+
- config/locales/en.yml
|
156
157
|
- dalliance.gemspec
|
157
158
|
- lib/dalliance.rb
|
159
|
+
- lib/dalliance/engine.rb
|
158
160
|
- lib/dalliance/progress_meter.rb
|
159
|
-
- lib/dalliance/railtie.rb
|
160
161
|
- lib/dalliance/schema.rb
|
161
162
|
- lib/dalliance/version.rb
|
162
163
|
- lib/dalliance/workers.rb
|