tengine_rails_plugin 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MjQxZDI4ZTkxODg1YmNmOTcyNDFiMjdmZDc1ZTY0MjBhMTQ3ZDI2Ng==
5
+ data.tar.gz: !binary |-
6
+ MmMyODVjYzgyNzlmYWI5MWY3NWYzMGM4ZTA3MjE5NDZhNTI2MDFmZg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NjYxMzM3MDE1NDUxMzliNDVlYTUzZTBmMjc0NzcyZDlmYWQyNGI5YzE5ZjNk
10
+ YTUyMWViZDQ3N2YyZjg2YTM4MmY4MTBjZDA5NDQ0ODdjYzM2Y2FlN2YyMjkz
11
+ MTY5N2NhODE4OTZjMGI2NGMwM2EyNTY0ZjViNzllNTkxZmVmOTE=
12
+ data.tar.gz: !binary |-
13
+ YzdjMDNhMjc5Y2RkMDY3ODNlOTI1MTU4ZmFiZmZhODg0NTQzMzNlODZiMzc1
14
+ MTI1YzJjZmFhODI2Zjc1YmU2ZWUwODJiNzMzZTM4MDg5NTNlZDk2ODBhMTQz
15
+ ZjY2NjUxN2RkYjczOWI1NjM5NTA0YzUzYmViNGFiYjFlYzkxMTE=
data/Gemfile.lock CHANGED
@@ -1,98 +1,116 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tengine_rails_plugin (1.1.0)
4
+ tengine_rails_plugin (1.2.0)
5
5
  rails (~> 3.2.8)
6
- tengine_event (~> 1.1.0)
7
- tengine_support (~> 1.1.0)
6
+ tengine_event (~> 1.2.0)
7
+ tengine_support (~> 1.2.0)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- ZenTest (4.8.2)
13
- actionmailer (3.2.8)
14
- actionpack (= 3.2.8)
15
- mail (~> 2.4.4)
16
- actionpack (3.2.8)
17
- activemodel (= 3.2.8)
18
- activesupport (= 3.2.8)
12
+ ZenTest (4.9.1)
13
+ actionmailer (3.2.13)
14
+ actionpack (= 3.2.13)
15
+ mail (~> 2.5.3)
16
+ actionpack (3.2.13)
17
+ activemodel (= 3.2.13)
18
+ activesupport (= 3.2.13)
19
19
  builder (~> 3.0.0)
20
20
  erubis (~> 2.7.0)
21
21
  journey (~> 1.0.4)
22
- rack (~> 1.4.0)
22
+ rack (~> 1.4.5)
23
23
  rack-cache (~> 1.2)
24
24
  rack-test (~> 0.6.1)
25
- sprockets (~> 2.1.3)
26
- activemodel (3.2.8)
27
- activesupport (= 3.2.8)
25
+ sprockets (~> 2.2.1)
26
+ activemodel (3.2.13)
27
+ activesupport (= 3.2.13)
28
28
  builder (~> 3.0.0)
29
- activerecord (3.2.8)
30
- activemodel (= 3.2.8)
31
- activesupport (= 3.2.8)
29
+ activerecord (3.2.13)
30
+ activemodel (= 3.2.13)
31
+ activesupport (= 3.2.13)
32
32
  arel (~> 3.0.2)
33
33
  tzinfo (~> 0.3.29)
34
- activeresource (3.2.8)
35
- activemodel (= 3.2.8)
36
- activesupport (= 3.2.8)
37
- activesupport (3.2.8)
38
- i18n (~> 0.6)
34
+ activeresource (3.2.13)
35
+ activemodel (= 3.2.13)
36
+ activesupport (= 3.2.13)
37
+ activesupport (3.2.13)
38
+ i18n (= 0.6.1)
39
39
  multi_json (~> 1.0)
40
- amq-client (0.8.7)
41
- amq-protocol (>= 0.8.4)
40
+ amq-client (0.9.12)
41
+ amq-protocol (>= 1.2.0)
42
42
  eventmachine
43
- amq-protocol (0.8.4)
44
- amqp (0.8.4)
45
- amq-client (~> 0.8.7)
46
- amq-protocol (~> 0.8.4)
43
+ amq-protocol (1.2.0)
44
+ amqp (0.9.10)
45
+ amq-client (~> 0.9.12)
46
+ amq-protocol (~> 1.2.0)
47
47
  eventmachine
48
48
  arel (3.0.2)
49
49
  autotest (4.4.6)
50
50
  ZenTest (>= 4.4.1)
51
- builder (3.0.0)
51
+ builder (3.0.4)
52
+ coderay (1.0.9)
53
+ columnize (0.3.6)
54
+ debugger (1.5.0)
55
+ columnize (>= 0.3.1)
56
+ debugger-linecache (~> 1.2.0)
57
+ debugger-ruby_core_source (~> 1.2.0)
58
+ debugger-linecache (1.2.0)
59
+ debugger-ruby_core_source (1.2.0)
52
60
  diff-lcs (1.1.3)
53
61
  erubis (2.7.0)
54
- eventmachine (1.0.0)
55
- hike (1.2.1)
56
- i18n (0.6.0)
62
+ eventmachine (1.0.3)
63
+ hike (1.2.2)
64
+ i18n (0.6.1)
57
65
  journey (1.0.4)
58
- jquery-rails (2.1.1)
59
- railties (>= 3.1.0, < 5.0)
60
- thor (~> 0.14)
61
- json (1.7.5)
66
+ jquery-rails (2.2.1)
67
+ railties (>= 3.0, < 5.0)
68
+ thor (>= 0.14, < 2.0)
69
+ json (1.7.7)
62
70
  macaddr (1.6.1)
63
71
  systemu (~> 2.5.0)
64
- mail (2.4.4)
72
+ mail (2.5.3)
65
73
  i18n (>= 0.4.0)
66
74
  mime-types (~> 1.16)
67
75
  treetop (~> 1.4.8)
68
- mime-types (1.19)
69
- multi_json (1.3.6)
76
+ method_source (0.8.1)
77
+ mime-types (1.23)
78
+ multi_json (1.7.2)
70
79
  polyglot (0.3.3)
71
- rack (1.4.1)
80
+ pry (0.9.12.1)
81
+ coderay (~> 1.0.5)
82
+ method_source (~> 0.8)
83
+ slop (~> 3.4)
84
+ pry-debugger (0.2.2)
85
+ debugger (~> 1.3)
86
+ pry (~> 0.9.10)
87
+ pry-doc (0.4.5)
88
+ pry (>= 0.9)
89
+ yard (>= 0.8)
90
+ rack (1.4.5)
72
91
  rack-cache (1.2)
73
92
  rack (>= 0.4)
74
- rack-ssl (1.3.2)
93
+ rack-ssl (1.3.3)
75
94
  rack
76
- rack-test (0.6.1)
95
+ rack-test (0.6.2)
77
96
  rack (>= 1.0)
78
- rails (3.2.8)
79
- actionmailer (= 3.2.8)
80
- actionpack (= 3.2.8)
81
- activerecord (= 3.2.8)
82
- activeresource (= 3.2.8)
83
- activesupport (= 3.2.8)
97
+ rails (3.2.13)
98
+ actionmailer (= 3.2.13)
99
+ actionpack (= 3.2.13)
100
+ activerecord (= 3.2.13)
101
+ activeresource (= 3.2.13)
102
+ activesupport (= 3.2.13)
84
103
  bundler (~> 1.0)
85
- railties (= 3.2.8)
86
- railties (3.2.8)
87
- actionpack (= 3.2.8)
88
- activesupport (= 3.2.8)
104
+ railties (= 3.2.13)
105
+ railties (3.2.13)
106
+ actionpack (= 3.2.13)
107
+ activesupport (= 3.2.13)
89
108
  rack-ssl (~> 1.3.2)
90
109
  rake (>= 0.8.7)
91
110
  rdoc (~> 3.4)
92
111
  thor (>= 0.14.6, < 2.0)
93
- rake (0.9.2.2)
94
- rdiscount (1.6.8)
95
- rdoc (3.12)
112
+ rake (10.0.4)
113
+ rdoc (3.12.2)
96
114
  json (~> 1.4)
97
115
  rspec (2.10.0)
98
116
  rspec-core (~> 2.10.0)
@@ -102,44 +120,49 @@ GEM
102
120
  rspec-expectations (2.10.0)
103
121
  diff-lcs (~> 1.1.3)
104
122
  rspec-mocks (2.10.1)
105
- simplecov (0.6.4)
123
+ simplecov (0.7.1)
106
124
  multi_json (~> 1.0)
107
- simplecov-html (~> 0.5.3)
108
- simplecov-html (0.5.3)
109
- sprockets (2.1.3)
125
+ simplecov-html (~> 0.7.1)
126
+ simplecov-html (0.7.1)
127
+ slop (3.4.4)
128
+ sprockets (2.2.2)
110
129
  hike (~> 1.2)
130
+ multi_json (~> 1.0)
111
131
  rack (~> 1.0)
112
132
  tilt (~> 1.1, != 1.3.0)
113
- sqlite3 (1.3.6)
133
+ sqlite3 (1.3.7)
114
134
  systemu (2.5.2)
115
- tengine_event (1.1.0)
135
+ tengine_event (1.2.0)
116
136
  activesupport (>= 3.0.0)
117
- amqp (~> 0.8.0)
118
- tengine_support (~> 1.1.0)
137
+ amqp (~> 0.9.10)
138
+ tengine_support (~> 1.2.0)
119
139
  uuid (~> 2.3.4)
120
- tengine_support (1.1.0)
140
+ tengine_support (1.2.0)
121
141
  activesupport (>= 3.0.0)
122
- thor (0.16.0)
123
- tilt (1.3.3)
142
+ thor (0.18.1)
143
+ tilt (1.3.7)
124
144
  treetop (1.4.12)
125
145
  polyglot
126
146
  polyglot (>= 0.3.1)
127
- tzinfo (0.3.35)
128
- uuid (2.3.5)
147
+ tzinfo (0.3.37)
148
+ uuid (2.3.7)
129
149
  macaddr (~> 1.0)
130
- yard (0.8.2.1)
150
+ yard (0.8.6.1)
131
151
 
132
152
  PLATFORMS
133
153
  ruby
134
154
 
135
155
  DEPENDENCIES
156
+ ZenTest (~> 4.9.0)
136
157
  autotest
137
158
  bundler
138
159
  jquery-rails
139
- rake (~> 0.9.2.2)
140
- rdiscount
160
+ pry
161
+ pry-debugger
162
+ pry-doc
163
+ rake
141
164
  rspec (~> 2.10.0)
142
- simplecov (~> 0.6.4)
165
+ simplecov
143
166
  sqlite3
144
167
  tengine_rails_plugin!
145
- yard (~> 0.8.1)
168
+ yard
@@ -36,7 +36,7 @@ module TengineRailsPlugin
36
36
 
37
37
  def fire(batch_name, options={}, &block)
38
38
  add_logs("#{Time.zone.now.rfc2822} sending the event to start")
39
- set_status(1)
39
+ set_status(STATUS_TYPES.id_by_key(:sended))
40
40
  begin
41
41
  properties = { batch_id: self.id, batch_name: batch_name }.update(options || {})
42
42
  EventMachine.run do
@@ -44,7 +44,7 @@ module TengineRailsPlugin
44
44
  end
45
45
  rescue Exception
46
46
  add_logs("#{Time.zone.now.rfc2822} #{$!.class.name} #{$!.message}\n " + $!.backtrace.join("\n "))
47
- set_status(2)
47
+ set_status(STATUS_TYPES.id_by_key(:send_failure))
48
48
  self.save!
49
49
  raise
50
50
  end
@@ -54,18 +54,18 @@ module TengineRailsPlugin
54
54
  progress = model.find(event[:batch_id])
55
55
  progress.extend(self)
56
56
  progress.add_logs("#{Time.zone.now.rfc2822} Starting")
57
- progress.set_status(3)
57
+ progress.set_status(STATUS_TYPES.id_by_key(:starting))
58
58
  progress.save!
59
59
  begin
60
60
  yield(progress) if block_given?
61
61
  rescue
62
62
  progress.add_logs("#{Time.zone.now.rfc2822} [#{$!.class.name}] #{$!.message}\n " + $!.backtrace.join("\n "))
63
- progress.set_status(5)
63
+ progress.set_status(STATUS_TYPES.id_by_key(:error))
64
64
  progress.save!
65
65
  raise
66
66
  else
67
67
  progress.add_logs("#{Time.zone.now.rfc2822} SUCCESS")
68
- progress.set_status(6)
68
+ progress.set_status(STATUS_TYPES.id_by_key(:success))
69
69
  progress.save!
70
70
  end
71
71
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tengine_rails_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - taigou
@@ -13,12 +12,11 @@ authors:
13
12
  autorequire:
14
13
  bindir: bin
15
14
  cert_chain: []
16
- date: 2012-12-19 00:00:00.000000000 Z
15
+ date: 2013-04-30 00:00:00.000000000 Z
17
16
  dependencies:
18
17
  - !ruby/object:Gem::Dependency
19
18
  name: rails
20
19
  requirement: !ruby/object:Gem::Requirement
21
- none: false
22
20
  requirements:
23
21
  - - ~>
24
22
  - !ruby/object:Gem::Version
@@ -26,7 +24,6 @@ dependencies:
26
24
  type: :runtime
27
25
  prerelease: false
28
26
  version_requirements: !ruby/object:Gem::Requirement
29
- none: false
30
27
  requirements:
31
28
  - - ~>
32
29
  - !ruby/object:Gem::Version
@@ -34,39 +31,34 @@ dependencies:
34
31
  - !ruby/object:Gem::Dependency
35
32
  name: tengine_event
36
33
  requirement: !ruby/object:Gem::Requirement
37
- none: false
38
34
  requirements:
39
35
  - - ~>
40
36
  - !ruby/object:Gem::Version
41
- version: 1.1.0
37
+ version: 1.2.0
42
38
  type: :runtime
43
39
  prerelease: false
44
40
  version_requirements: !ruby/object:Gem::Requirement
45
- none: false
46
41
  requirements:
47
42
  - - ~>
48
43
  - !ruby/object:Gem::Version
49
- version: 1.1.0
44
+ version: 1.2.0
50
45
  - !ruby/object:Gem::Dependency
51
46
  name: tengine_support
52
47
  requirement: !ruby/object:Gem::Requirement
53
- none: false
54
48
  requirements:
55
49
  - - ~>
56
50
  - !ruby/object:Gem::Version
57
- version: 1.1.0
51
+ version: 1.2.0
58
52
  type: :runtime
59
53
  prerelease: false
60
54
  version_requirements: !ruby/object:Gem::Requirement
61
- none: false
62
55
  requirements:
63
56
  - - ~>
64
57
  - !ruby/object:Gem::Version
65
- version: 1.1.0
58
+ version: 1.2.0
66
59
  - !ruby/object:Gem::Dependency
67
60
  name: bundler
68
61
  requirement: !ruby/object:Gem::Requirement
69
- none: false
70
62
  requirements:
71
63
  - - ! '>='
72
64
  - !ruby/object:Gem::Version
@@ -74,7 +66,6 @@ dependencies:
74
66
  type: :development
75
67
  prerelease: false
76
68
  version_requirements: !ruby/object:Gem::Requirement
77
- none: false
78
69
  requirements:
79
70
  - - ! '>='
80
71
  - !ruby/object:Gem::Version
@@ -82,23 +73,20 @@ dependencies:
82
73
  - !ruby/object:Gem::Dependency
83
74
  name: rake
84
75
  requirement: !ruby/object:Gem::Requirement
85
- none: false
86
76
  requirements:
87
- - - ~>
77
+ - - ! '>='
88
78
  - !ruby/object:Gem::Version
89
- version: 0.9.2.2
79
+ version: '0'
90
80
  type: :development
91
81
  prerelease: false
92
82
  version_requirements: !ruby/object:Gem::Requirement
93
- none: false
94
83
  requirements:
95
- - - ~>
84
+ - - ! '>='
96
85
  - !ruby/object:Gem::Version
97
- version: 0.9.2.2
86
+ version: '0'
98
87
  - !ruby/object:Gem::Dependency
99
88
  name: rspec
100
89
  requirement: !ruby/object:Gem::Requirement
101
- none: false
102
90
  requirements:
103
91
  - - ~>
104
92
  - !ruby/object:Gem::Version
@@ -106,7 +94,6 @@ dependencies:
106
94
  type: :development
107
95
  prerelease: false
108
96
  version_requirements: !ruby/object:Gem::Requirement
109
- none: false
110
97
  requirements:
111
98
  - - ~>
112
99
  - !ruby/object:Gem::Version
@@ -114,39 +101,34 @@ dependencies:
114
101
  - !ruby/object:Gem::Dependency
115
102
  name: yard
116
103
  requirement: !ruby/object:Gem::Requirement
117
- none: false
118
104
  requirements:
119
- - - ~>
105
+ - - ! '>='
120
106
  - !ruby/object:Gem::Version
121
- version: 0.8.1
107
+ version: '0'
122
108
  type: :development
123
109
  prerelease: false
124
110
  version_requirements: !ruby/object:Gem::Requirement
125
- none: false
126
111
  requirements:
127
- - - ~>
112
+ - - ! '>='
128
113
  - !ruby/object:Gem::Version
129
- version: 0.8.1
114
+ version: '0'
130
115
  - !ruby/object:Gem::Dependency
131
116
  name: simplecov
132
117
  requirement: !ruby/object:Gem::Requirement
133
- none: false
134
118
  requirements:
135
- - - ~>
119
+ - - ! '>='
136
120
  - !ruby/object:Gem::Version
137
- version: 0.6.4
121
+ version: '0'
138
122
  type: :development
139
123
  prerelease: false
140
124
  version_requirements: !ruby/object:Gem::Requirement
141
- none: false
142
125
  requirements:
143
- - - ~>
126
+ - - ! '>='
144
127
  - !ruby/object:Gem::Version
145
- version: 0.6.4
128
+ version: '0'
146
129
  - !ruby/object:Gem::Dependency
147
130
  name: autotest
148
131
  requirement: !ruby/object:Gem::Requirement
149
- none: false
150
132
  requirements:
151
133
  - - ! '>='
152
134
  - !ruby/object:Gem::Version
@@ -154,15 +136,13 @@ dependencies:
154
136
  type: :development
155
137
  prerelease: false
156
138
  version_requirements: !ruby/object:Gem::Requirement
157
- none: false
158
139
  requirements:
159
140
  - - ! '>='
160
141
  - !ruby/object:Gem::Version
161
142
  version: '0'
162
143
  - !ruby/object:Gem::Dependency
163
- name: rdiscount
144
+ name: pry
164
145
  requirement: !ruby/object:Gem::Requirement
165
- none: false
166
146
  requirements:
167
147
  - - ! '>='
168
148
  - !ruby/object:Gem::Version
@@ -170,15 +150,55 @@ dependencies:
170
150
  type: :development
171
151
  prerelease: false
172
152
  version_requirements: !ruby/object:Gem::Requirement
173
- none: false
174
153
  requirements:
175
154
  - - ! '>='
176
155
  - !ruby/object:Gem::Version
177
156
  version: '0'
157
+ - !ruby/object:Gem::Dependency
158
+ name: pry-doc
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ! '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - ! '>='
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
171
+ - !ruby/object:Gem::Dependency
172
+ name: pry-debugger
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ! '>='
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ! '>='
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ - !ruby/object:Gem::Dependency
186
+ name: ZenTest
187
+ requirement: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ~>
190
+ - !ruby/object:Gem::Version
191
+ version: 4.9.0
192
+ type: :development
193
+ prerelease: false
194
+ version_requirements: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ~>
197
+ - !ruby/object:Gem::Version
198
+ version: 4.9.0
178
199
  - !ruby/object:Gem::Dependency
179
200
  name: sqlite3
180
201
  requirement: !ruby/object:Gem::Requirement
181
- none: false
182
202
  requirements:
183
203
  - - ! '>='
184
204
  - !ruby/object:Gem::Version
@@ -186,7 +206,6 @@ dependencies:
186
206
  type: :development
187
207
  prerelease: false
188
208
  version_requirements: !ruby/object:Gem::Requirement
189
- none: false
190
209
  requirements:
191
210
  - - ! '>='
192
211
  - !ruby/object:Gem::Version
@@ -207,32 +226,25 @@ files:
207
226
  homepage: https://github.com/tengine/tengine/tree/develop/tengine_rails_plugin
208
227
  licenses:
209
228
  - MPL2.0/LGPLv3
229
+ metadata: {}
210
230
  post_install_message:
211
231
  rdoc_options: []
212
232
  require_paths:
213
233
  - lib
214
234
  required_ruby_version: !ruby/object:Gem::Requirement
215
- none: false
216
235
  requirements:
217
236
  - - ! '>='
218
237
  - !ruby/object:Gem::Version
219
238
  version: '0'
220
- segments:
221
- - 0
222
- hash: -338025004054856420
223
239
  required_rubygems_version: !ruby/object:Gem::Requirement
224
- none: false
225
240
  requirements:
226
241
  - - ! '>='
227
242
  - !ruby/object:Gem::Version
228
243
  version: '0'
229
- segments:
230
- - 0
231
- hash: -338025004054856420
232
244
  requirements: []
233
245
  rubyforge_project:
234
- rubygems_version: 1.8.23
246
+ rubygems_version: 2.0.3
235
247
  signing_key:
236
- specification_version: 3
248
+ specification_version: 4
237
249
  summary: tengine_rails_plugin supports the use of tengine in Rails application.
238
250
  test_files: []