resque-reports 0.5.0 → 0.5.1

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
- ODMyYmYxYjk1NDJmZjkxOGMzZTI1Y2YwMGZkM2M3MWM0YjRkNDRiMw==
5
- data.tar.gz: !binary |-
6
- NDI0MTk3YjVmYjkwNGE2NzFjOWVlNTAxNTA2NmFlYTJjNjEwMDdmNw==
2
+ SHA1:
3
+ metadata.gz: 1dec46db12351c776c4e10f0dfd988626d6aabb1
4
+ data.tar.gz: 5ae5d1b91f141671ee10b729acc06d4c4c3e0af4
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MDA5YjYxNTI3ODgwZmVkNDM5NjY1YmM3ZWJjYmFhMjAzYTg3OGRjZjZhNDMx
10
- Y2M1ZWUyOTViZTQyYWVkMThiODJiOWRlZDYxMzE0NDBmYWI1NGI4MTBiZGE1
11
- MTU2MzcwM2E4Y2ViNDZjMjliMmI1ZjgxZmY3OGNhZjJiY2UxNjI=
12
- data.tar.gz: !binary |-
13
- NDhiZGUxNDFjOTg2NzZlNGJlODI2MDA5OTI3ODBiMTQ5YjlkNGQwNzgwZjM0
14
- OTZmY2MyMGU2ZjY4Mjk4MDg4Nzk3YTcyMzcxNzBkYzRmYzZhMDFhZjNkNjYz
15
- ZDc1YTdmYjAzN2M3MTYwOTMxNGE5YWQyMjIxYmIxYmRjMjE3NjM=
6
+ metadata.gz: dae4527c7b7651753cf0316d26b6e7e899038b4064f6c1d2943e209b855163c5133792867a887ccbb9bfea7a127ba9e5c36775c01785d0550ceb5d649edf5fac
7
+ data.tar.gz: cfdae4e1cb552a4de90de92f87bc8e185110cb7b91e6e3867479c328b2a19315cc21eddc8ce9fd2ee51a34124d73da60fb4601c35e311d028f939d1539c87900
@@ -94,10 +94,9 @@ module Resque
94
94
  # Internal: Порядок строк отчета
95
95
  #
96
96
  # Returns String (SQL)
97
- def order
97
+ def order_by
98
98
  nil
99
99
  end
100
- alias_method :order_by, :order
101
100
 
102
101
  # Internal: Фильтры отчета
103
102
  #
@@ -122,7 +121,7 @@ module Resque
122
121
  query.project(Arel.sql(select))
123
122
  .take(batch_size)
124
123
  .skip(offset)
125
- .order(order)
124
+ .order(order_by)
126
125
  .to_sql
127
126
  end
128
127
  end
@@ -23,7 +23,25 @@ module Resque
23
23
  end
24
24
 
25
25
  def hash(*args)
26
- Digest::SHA1.hexdigest(args.to_json)
26
+ Digest::SHA1.hexdigest(obj_to_string(args))
27
+ end
28
+
29
+ def obj_to_string(obj)
30
+ case obj
31
+ when Hash
32
+ s = []
33
+ obj.keys.sort.each do |k|
34
+ s << obj_to_string(k)
35
+ s << obj_to_string(obj[k])
36
+ end
37
+ s.to_s
38
+ when Array
39
+ s = []
40
+ obj.each { |a| s << obj_to_string(a) }
41
+ s.to_s
42
+ else
43
+ obj.to_s
44
+ end
27
45
  end
28
46
  end
29
47
  end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  module Resque
3
3
  module Reports
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
6
6
  end
7
7
 
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey D.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque-integration
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.1.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: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
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
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
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: :development
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
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.14.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.14.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: timecop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.7.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.7.1
111
111
  description: Make your custom reports to CSV in background using Resque with simple
@@ -116,9 +116,9 @@ executables: []
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - .gitignore
120
- - .rspec
121
- - .rubocop.yml
119
+ - ".gitignore"
120
+ - ".rspec"
121
+ - ".rubocop.yml"
122
122
  - Gemfile
123
123
  - MIT-LICENSE
124
124
  - README
@@ -155,17 +155,17 @@ require_paths:
155
155
  - lib
156
156
  required_ruby_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ! '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ! '>='
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.4.3
168
+ rubygems_version: 2.2.2
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: resque-reports