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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NGVlNDc0ZmZjOWYzNDljMTdhMGViMTZmNWM4ZWRkMmZiOTIyOTBiNQ==
5
- data.tar.gz: !binary |-
6
- NzlmZGUwMDQ1MzM0NWNmNGU5NzUyYTU3ODAyNGNmOTZkMDAyMDRlMA==
2
+ SHA1:
3
+ metadata.gz: f8833bbf616ef0395fd5e89b3911aacb5af0418e
4
+ data.tar.gz: 9a23e1181998a64e1bfc3aa43fa71f136f253967
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NzdjYzI4OTNiZTZiMDIxMmQ3OWRlN2JhNGIwZTlkNmI3YTE0YzNkYTBmMWMy
10
- ODZkMjJlNjlmOGIxYjQ2ZjQ4ODYzMDg2YzYwY2ZkYjM4NDc5NDdkY2QxMjAx
11
- N2UyMGJiYTg5Nzg5MDBjZGY5Y2Y1YzQ4NDM1OGYyYmU1YjU2OGM=
12
- data.tar.gz: !binary |-
13
- Yzk3NmI5ZWY2MTM3NjNkODIzOTNhYWMyYWU5MGMzM2QzNjY4MDc0ZTcxNzFk
14
- Nzk0OGM0OWFhZWMxY2UzZTlhMGIxNmU4MjQyMzVmZDMyOGFmNGQ3MDVkMDBm
15
- NWRmZGZlNGI3NDY1ZGZmOGIyYzYwZDNkZmRjMWJmNmVjNmMwZjI=
6
+ metadata.gz: dc17619c526974f5e6d762e6d55756b55d39b234c02edc95c4b7b8ef6365e2ca0109514e921bd4d89887849d2cd725bf5eaac2bb304914cb2b026a6d8a6c5638
7
+ data.tar.gz: 1948810ce93bb7c160833cc7b2a10ab38386afd41735f59f72df185a050db990fbf5acc2c3bdeab598bf2b1d8884290b8d71c377a2919ec95dd41458adb318a7
@@ -0,0 +1 @@
1
+ massive
@@ -0,0 +1 @@
1
+ 2.1.1
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- massive (0.1.1)
4
+ massive (0.2.0)
5
5
  active_model_serializers
6
6
  file_processor (= 0.2.0)
7
- mongoid (~> 3.1.x)
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 (3.2.17)
16
- activesupport (= 3.2.17)
17
- builder (~> 3.0.0)
18
- activesupport (3.2.17)
19
- i18n (~> 0.6, >= 0.6.4)
20
- multi_json (~> 1.0)
21
- builder (3.0.4)
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.3.6)
29
+ columnize (0.8.9)
30
+ connection_pool (2.0.0)
29
31
  database_cleaner (1.2.0)
30
- debugger (1.6.2)
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.3)
35
+ debugger-ruby_core_source (~> 1.3.2)
34
36
  debugger-linecache (1.2.0)
35
- debugger-ruby_core_source (1.2.3)
36
- diff-lcs (1.2.4)
37
- excon (0.31.0)
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.20.0)
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.31.0)
43
- formatador (~> 0.2.0)
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
- nokogiri (>= 1.5.11)
58
+ fog-json (1.0.0)
59
+ multi_json (~> 1.0)
49
60
  formatador (0.2.4)
50
- guard (2.5.1)
61
+ guard (2.6.1)
51
62
  formatador (>= 0.2.4)
52
- listen (~> 2.6)
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.8)
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
- listen (2.7.0)
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.4)
76
+ lumberjack (1.0.5)
66
77
  method_source (0.8.2)
67
- mime-types (2.1)
68
- mini_portile (0.5.2)
69
- mongoid (3.1.6)
70
- activemodel (~> 3.2)
71
- moped (~> 1.4)
72
- origin (~> 1.0)
73
- tzinfo (~> 0.3.29)
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 (1.5.2)
76
- multi_json (1.8.2)
77
- net-scp (1.1.2)
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.8.0)
80
- nio4r (1.0.0)
81
- nokogiri (1.6.1)
82
- mini_portile (~> 0.5.0)
83
- origin (1.1.0)
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.2)
104
+ rack-protection (1.5.3)
90
105
  rack
91
- rake (10.1.0)
106
+ rake (10.3.1)
92
107
  rb-fsevent (0.9.4)
93
- rb-inotify (0.9.3)
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.7)
109
- rspec-expectations (2.14.3)
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.4)
112
- simplecov (0.7.1)
113
- multi_json (~> 1.0)
114
- simplecov-html (~> 0.7.1)
115
- simplecov-html (0.7.1)
116
- sinatra (1.4.4)
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.4.7)
136
+ slop (3.5.0)
121
137
  terminal-notifier-guard (1.5.3)
122
- thor (0.18.1)
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 (0.3.39)
142
+ tzinfo (1.1.0)
143
+ thread_safe (~> 0.1)
126
144
  vegas (0.1.11)
127
145
  rack (>= 1.0.0)
128
146
 
@@ -105,7 +105,7 @@ module Massive
105
105
  end
106
106
 
107
107
  def increment_processed
108
- inc(:processed, 1)
108
+ inc(processed: 1)
109
109
  end
110
110
 
111
111
  def args_for_resque
@@ -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!
@@ -1,3 +1,3 @@
1
1
  module Massive
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -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", "~> 3.1.x"
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
@@ -1,4 +1,6 @@
1
1
  class CustomJob < Massive::Job
2
+ include Mongoid::Attributes::Dynamic
3
+
2
4
  retry_interval 5
3
5
  maximum_retries 20
4
6
  end
@@ -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
- consistency: :strong
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.1.1
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: 3.1.x
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: 3.1.x
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
- - .rvmrc
80
- - .travis.yml
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