massive 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +76 -58
- data/lib/massive/job.rb +1 -1
- data/lib/massive/status.rb +6 -6
- data/lib/massive/version.rb +1 -1
- data/massive.gemspec +1 -1
- data/spec/fixtures/custom_job.rb +2 -0
- data/spec/support/mongoid.yml +1 -46
- metadata +16 -15
- data/.rvmrc +0 -1
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NzlmZGUwMDQ1MzM0NWNmNGU5NzUyYTU3ODAyNGNmOTZkMDAyMDRlMA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f8833bbf616ef0395fd5e89b3911aacb5af0418e
|
4
|
+
data.tar.gz: 9a23e1181998a64e1bfc3aa43fa71f136f253967
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ODZkMjJlNjlmOGIxYjQ2ZjQ4ODYzMDg2YzYwY2ZkYjM4NDc5NDdkY2QxMjAx
|
11
|
-
N2UyMGJiYTg5Nzg5MDBjZGY5Y2Y1YzQ4NDM1OGYyYmU1YjU2OGM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Yzk3NmI5ZWY2MTM3NjNkODIzOTNhYWMyYWU5MGMzM2QzNjY4MDc0ZTcxNzFk
|
14
|
-
Nzk0OGM0OWFhZWMxY2UzZTlhMGIxNmU4MjQyMzVmZDMyOGFmNGQ3MDVkMDBm
|
15
|
-
NWRmZGZlNGI3NDY1ZGZmOGIyYzYwZDNkZmRjMWJmNmVjNmMwZjI=
|
6
|
+
metadata.gz: dc17619c526974f5e6d762e6d55756b55d39b234c02edc95c4b7b8ef6365e2ca0109514e921bd4d89887849d2cd725bf5eaac2bb304914cb2b026a6d8a6c5638
|
7
|
+
data.tar.gz: 1948810ce93bb7c160833cc7b2a10ab38386afd41735f59f72df185a050db990fbf5acc2c3bdeab598bf2b1d8884290b8d71c377a2919ec95dd41458adb318a7
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
massive
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.1
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
massive (0.
|
4
|
+
massive (0.2.0)
|
5
5
|
active_model_serializers
|
6
6
|
file_processor (= 0.2.0)
|
7
|
-
mongoid (~>
|
7
|
+
mongoid (~> 4.0.0.beta)
|
8
8
|
resque
|
9
9
|
|
10
10
|
GEM
|
@@ -12,85 +12,100 @@ GEM
|
|
12
12
|
specs:
|
13
13
|
active_model_serializers (0.8.1)
|
14
14
|
activemodel (>= 3.0)
|
15
|
-
activemodel (
|
16
|
-
activesupport (=
|
17
|
-
builder (~> 3.
|
18
|
-
activesupport (
|
19
|
-
i18n (~> 0.6, >= 0.6.
|
20
|
-
|
21
|
-
|
15
|
+
activemodel (4.1.1)
|
16
|
+
activesupport (= 4.1.1)
|
17
|
+
builder (~> 3.1)
|
18
|
+
activesupport (4.1.1)
|
19
|
+
i18n (~> 0.6, >= 0.6.9)
|
20
|
+
json (~> 1.7, >= 1.7.7)
|
21
|
+
minitest (~> 5.1)
|
22
|
+
thread_safe (~> 0.1)
|
23
|
+
tzinfo (~> 1.1)
|
24
|
+
bson (2.2.3)
|
25
|
+
builder (3.2.2)
|
22
26
|
celluloid (0.15.2)
|
23
27
|
timers (~> 1.1.0)
|
24
|
-
celluloid-io (0.15.0)
|
25
|
-
celluloid (>= 0.15.0)
|
26
|
-
nio4r (>= 0.5.0)
|
27
28
|
coderay (1.1.0)
|
28
|
-
columnize (0.
|
29
|
+
columnize (0.8.9)
|
30
|
+
connection_pool (2.0.0)
|
29
31
|
database_cleaner (1.2.0)
|
30
|
-
debugger (1.6.
|
32
|
+
debugger (1.6.6)
|
31
33
|
columnize (>= 0.3.1)
|
32
34
|
debugger-linecache (~> 1.2.0)
|
33
|
-
debugger-ruby_core_source (~> 1.2
|
35
|
+
debugger-ruby_core_source (~> 1.3.2)
|
34
36
|
debugger-linecache (1.2.0)
|
35
|
-
debugger-ruby_core_source (1.
|
36
|
-
diff-lcs (1.2.
|
37
|
-
|
37
|
+
debugger-ruby_core_source (1.3.4)
|
38
|
+
diff-lcs (1.2.5)
|
39
|
+
docile (1.1.3)
|
40
|
+
excon (0.33.0)
|
38
41
|
ffi (1.9.3)
|
39
42
|
file_processor (0.2.0)
|
40
|
-
fog (1.
|
43
|
+
fog (1.22.0)
|
44
|
+
fog-brightbox
|
45
|
+
fog-core (~> 1.21, >= 1.21.1)
|
46
|
+
fog-json
|
47
|
+
nokogiri (~> 1.5, >= 1.5.11)
|
48
|
+
fog-brightbox (0.0.2)
|
49
|
+
fog-core
|
50
|
+
fog-json
|
51
|
+
fog-core (1.22.0)
|
41
52
|
builder
|
42
|
-
excon (~> 0.
|
43
|
-
formatador (~> 0.2
|
53
|
+
excon (~> 0.33)
|
54
|
+
formatador (~> 0.2)
|
44
55
|
mime-types
|
45
|
-
multi_json (~> 1.0)
|
46
56
|
net-scp (~> 1.1)
|
47
57
|
net-ssh (>= 2.1.3)
|
48
|
-
|
58
|
+
fog-json (1.0.0)
|
59
|
+
multi_json (~> 1.0)
|
49
60
|
formatador (0.2.4)
|
50
|
-
guard (2.
|
61
|
+
guard (2.6.1)
|
51
62
|
formatador (>= 0.2.4)
|
52
|
-
listen (~> 2.
|
63
|
+
listen (~> 2.7)
|
53
64
|
lumberjack (~> 1.0)
|
54
65
|
pry (>= 0.9.12)
|
55
66
|
thor (>= 0.18.1)
|
56
|
-
guard-rspec (4.2.
|
67
|
+
guard-rspec (4.2.9)
|
57
68
|
guard (~> 2.1)
|
58
69
|
rspec (>= 2.14, < 4.0)
|
59
70
|
i18n (0.6.9)
|
60
|
-
|
71
|
+
json (1.8.1)
|
72
|
+
listen (2.7.5)
|
61
73
|
celluloid (>= 0.15.2)
|
62
|
-
celluloid-io (>= 0.15.0)
|
63
74
|
rb-fsevent (>= 0.9.3)
|
64
75
|
rb-inotify (>= 0.9)
|
65
|
-
lumberjack (1.0.
|
76
|
+
lumberjack (1.0.5)
|
66
77
|
method_source (0.8.2)
|
67
|
-
mime-types (2.
|
68
|
-
mini_portile (0.
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
78
|
+
mime-types (2.2)
|
79
|
+
mini_portile (0.6.0)
|
80
|
+
minitest (5.3.3)
|
81
|
+
mongoid (4.0.0.beta1)
|
82
|
+
activemodel (>= 4.0.0)
|
83
|
+
moped (~> 2.0.beta6)
|
84
|
+
origin (~> 2.1)
|
85
|
+
tzinfo (>= 0.3.37)
|
74
86
|
mono_logger (1.1.0)
|
75
|
-
moped (
|
76
|
-
|
77
|
-
|
87
|
+
moped (2.0.0.rc1)
|
88
|
+
bson (~> 2.2)
|
89
|
+
connection_pool (~> 2.0)
|
90
|
+
optionable (~> 0.2.0)
|
91
|
+
multi_json (1.10.0)
|
92
|
+
net-scp (1.2.1)
|
78
93
|
net-ssh (>= 2.6.5)
|
79
|
-
net-ssh (2.
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
origin (1.1
|
94
|
+
net-ssh (2.9.1)
|
95
|
+
nokogiri (1.6.2.1)
|
96
|
+
mini_portile (= 0.6.0)
|
97
|
+
optionable (0.2.0)
|
98
|
+
origin (2.1.1)
|
84
99
|
pry (0.9.12.6)
|
85
100
|
coderay (~> 1.0)
|
86
101
|
method_source (~> 0.8)
|
87
102
|
slop (~> 3.4)
|
88
103
|
rack (1.5.2)
|
89
|
-
rack-protection (1.5.
|
104
|
+
rack-protection (1.5.3)
|
90
105
|
rack
|
91
|
-
rake (10.1
|
106
|
+
rake (10.3.1)
|
92
107
|
rb-fsevent (0.9.4)
|
93
|
-
rb-inotify (0.9.
|
108
|
+
rb-inotify (0.9.4)
|
94
109
|
ffi (>= 0.5.0)
|
95
110
|
redis (3.0.7)
|
96
111
|
redis-namespace (1.4.1)
|
@@ -105,24 +120,27 @@ GEM
|
|
105
120
|
rspec-core (~> 2.14.0)
|
106
121
|
rspec-expectations (~> 2.14.0)
|
107
122
|
rspec-mocks (~> 2.14.0)
|
108
|
-
rspec-core (2.14.
|
109
|
-
rspec-expectations (2.14.
|
123
|
+
rspec-core (2.14.8)
|
124
|
+
rspec-expectations (2.14.5)
|
110
125
|
diff-lcs (>= 1.1.3, < 2.0)
|
111
|
-
rspec-mocks (2.14.
|
112
|
-
simplecov (0.
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
126
|
+
rspec-mocks (2.14.6)
|
127
|
+
simplecov (0.8.2)
|
128
|
+
docile (~> 1.1.0)
|
129
|
+
multi_json
|
130
|
+
simplecov-html (~> 0.8.0)
|
131
|
+
simplecov-html (0.8.0)
|
132
|
+
sinatra (1.4.5)
|
117
133
|
rack (~> 1.4)
|
118
134
|
rack-protection (~> 1.4)
|
119
135
|
tilt (~> 1.3, >= 1.3.4)
|
120
|
-
slop (3.
|
136
|
+
slop (3.5.0)
|
121
137
|
terminal-notifier-guard (1.5.3)
|
122
|
-
thor (0.
|
138
|
+
thor (0.19.1)
|
139
|
+
thread_safe (0.3.3)
|
123
140
|
tilt (1.4.1)
|
124
141
|
timers (1.1.0)
|
125
|
-
tzinfo (
|
142
|
+
tzinfo (1.1.0)
|
143
|
+
thread_safe (~> 0.1)
|
126
144
|
vegas (0.1.11)
|
127
145
|
rack (>= 1.0.0)
|
128
146
|
|
data/lib/massive/job.rb
CHANGED
data/lib/massive/status.rb
CHANGED
@@ -11,12 +11,12 @@ module Massive
|
|
11
11
|
field :last_error, type: String
|
12
12
|
field :retries, type: Integer, default: 0
|
13
13
|
|
14
|
-
scope :started, ne(started_at: nil)
|
15
|
-
scope :not_started, where(started_at: nil)
|
16
|
-
scope :completed, ne(finished_at: nil)
|
17
|
-
scope :not_completed, where(finished_at: nil)
|
18
|
-
scope :failed, ne(failed_at: nil)
|
19
|
-
scope :cancelled, ne(cancelled_at: nil)
|
14
|
+
scope :started, -> { ne(started_at: nil) }
|
15
|
+
scope :not_started, -> { where(started_at: nil) }
|
16
|
+
scope :completed, -> { ne(finished_at: nil) }
|
17
|
+
scope :not_completed, -> { where(finished_at: nil) }
|
18
|
+
scope :failed, -> { ne(failed_at: nil) }
|
19
|
+
scope :cancelled, -> { ne(cancelled_at: nil) }
|
20
20
|
end
|
21
21
|
|
22
22
|
def start!
|
data/lib/massive/version.rb
CHANGED
data/massive.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.require_paths = ["lib"]
|
18
18
|
|
19
19
|
gem.add_dependency "resque"
|
20
|
-
gem.add_dependency "mongoid", "~>
|
20
|
+
gem.add_dependency "mongoid", "~> 4.0.0.beta"
|
21
21
|
gem.add_dependency "file_processor", "0.2.0"
|
22
22
|
gem.add_dependency "active_model_serializers"
|
23
23
|
end
|
data/spec/fixtures/custom_job.rb
CHANGED
data/spec/support/mongoid.yml
CHANGED
@@ -2,8 +2,7 @@ default_options: &default_options
|
|
2
2
|
raise_not_found_error: false
|
3
3
|
|
4
4
|
session_default_options: &session_default_options
|
5
|
-
|
6
|
-
safe: true
|
5
|
+
read: primary
|
7
6
|
|
8
7
|
development:
|
9
8
|
# Configure available database sessions. (required)
|
@@ -18,54 +17,10 @@ development:
|
|
18
17
|
hosts:
|
19
18
|
- localhost:27017
|
20
19
|
options:
|
21
|
-
# Change whether the session persists in safe mode by default.
|
22
|
-
# (default: false)
|
23
|
-
# safe: false
|
24
|
-
|
25
|
-
# Change the default consistency model to :eventual or :strong.
|
26
|
-
# :eventual will send reads to secondaries, :strong sends everything
|
27
|
-
# to master. (default: :eventual)
|
28
20
|
<<: *session_default_options
|
29
21
|
# Configure Mongoid specific options. (optional)
|
30
22
|
options:
|
31
23
|
<<: *default_options
|
32
|
-
# Configuration for whether or not to allow access to fields that do
|
33
|
-
# not have a field definition on the model. (default: true)
|
34
|
-
# allow_dynamic_fields: true
|
35
|
-
|
36
|
-
# Enable the identity map, needed for eager loading. (default: false)
|
37
|
-
# identity_map_enabled: false
|
38
|
-
|
39
|
-
# Includes the root model name in json serialization. (default: false)
|
40
|
-
# include_root_in_json: false
|
41
|
-
|
42
|
-
# Include the _type field in serializaion. (default: false)
|
43
|
-
# include_type_for_serialization: false
|
44
|
-
|
45
|
-
# Preload all models in development, needed when models use
|
46
|
-
# inheritance. (default: false)
|
47
|
-
# preload_models: false
|
48
|
-
|
49
|
-
# Protect id and type from mass assignment. (default: true)
|
50
|
-
# protect_sensitive_fields: true
|
51
|
-
|
52
|
-
# Raise an error when performing a #find and the document is not found.
|
53
|
-
# (default: true)
|
54
|
-
# raise_not_found_error: false
|
55
|
-
|
56
|
-
# Raise an error when defining a scope with the same name as an
|
57
|
-
# existing method. (default: false)
|
58
|
-
# scope_overwrite_exception: false
|
59
|
-
|
60
|
-
# Skip the database version check, used when connecting to a db without
|
61
|
-
# admin access. (default: false)
|
62
|
-
# skip_version_check: false
|
63
|
-
|
64
|
-
# User Active Support's time zone in conversions. (default: true)
|
65
|
-
# use_activesupport_time_zone: true
|
66
|
-
|
67
|
-
# Ensure all times are UTC in the app side. (default: false)
|
68
|
-
# use_utc: false
|
69
24
|
test:
|
70
25
|
sessions:
|
71
26
|
default:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: massive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vicente Mundim
|
@@ -14,30 +14,30 @@ dependencies:
|
|
14
14
|
name: resque
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.0.0.beta
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 4.0.0.beta
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: file_processor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: active_model_serializers
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Parallelize processing of large files and/or data using Resque, Redis
|
@@ -74,10 +74,11 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
78
|
-
- .rspec
|
79
|
-
- .
|
80
|
-
- .
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".ruby-gemset"
|
80
|
+
- ".ruby-version"
|
81
|
+
- ".travis.yml"
|
81
82
|
- Gemfile
|
82
83
|
- Gemfile.lock
|
83
84
|
- Guardfile
|
@@ -136,12 +137,12 @@ require_paths:
|
|
136
137
|
- lib
|
137
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
138
139
|
requirements:
|
139
|
-
- -
|
140
|
+
- - ">="
|
140
141
|
- !ruby/object:Gem::Version
|
141
142
|
version: '0'
|
142
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
144
|
requirements:
|
144
|
-
- -
|
145
|
+
- - ">="
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: '0'
|
147
148
|
requirements: []
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use 1.9.3@massive --create
|