restash 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.travis.yml +10 -1
- data/README.md +1 -1
- data/lib/restash/resque_server.rb +16 -4
- data/lib/restash/version.rb +1 -1
- data/restash.gemspec +1 -1
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YjFiNDA4NjA4MzFiMTQ2ZWRlM2NkMDVkNmI0OWZlN2FiNDlkMjk1ZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZGIyOGZlNWFiNzJmOTQ1ZmQ4NzQ5ZDI2YTY5NWE0ZWE2YmNmMTdkYg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MGE1NTUwYzkxNWMwNGZkNDUwYTVlNzI2NmRlYjJkMTU1NWM0NTM3ODdhNDRk
|
10
|
+
N2FmNDJiODgyNDAzYWIyZjJkZGM5YmYwMjljNGJmMjJkZWE2MmUwOWQ4NjU2
|
11
|
+
ZTYwMTRkNGZmZDMyYzg0YzkyYTdjZDkzYzM5NGNlNWNkNTk5Nzk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MDNiYjI1NDE4ZDhlMWUxYTI2M2RiMTY4MWQ5MTEwMzIyYjdhOGM5N2U1MjY0
|
14
|
+
NDhlNzI5NDI5YjA4Yjk2MDBhYThiYWE1YjMzY2QxNjE5OGMwNWFmNTcwN2Q3
|
15
|
+
NTEzMGZiMjg4ODFhZGQ4MGUxMjM3OTAzYzgzMmVkYjJlZWJlZGM=
|
data/.travis.yml
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
|
4
|
+
- 2.2
|
5
|
+
- 2.3
|
6
|
+
- 2.4
|
5
7
|
before_install: gem install bundler -v 1.12.5
|
8
|
+
deploy:
|
9
|
+
api_key:
|
10
|
+
secure: T9pD2t0FZhaAZul13wXUH3Df8AF4/vP9UzO9GmJNxS5S/zk3PG6KnVyIVoXRcyG37uzHwUu91NZgKaze2xTvQl9lWzTNPOTvRwa/kLS2AmbydHCb884LkpItQytmMPtc/SUKoy7hY14JhQfvPFfNiVpO0JtHy592tQp8Z4JokD4WI65945blN4ddk7J2FTYP3YDyuXqq+Fs6bqYsLgl6xfDPfz3dflX9Rc827KhyUS9TpzUqs5jQ2cmOhaI6gZiEmMwMa89VPG/IK9lcMmh8GlzmjYFRWyFnLsgerz5kGDObDThmgru4h9UVPFTcxBxgo5gkcVGU7DnHqkKPKHGcfC677sUFWr4QWQlBJtue+V1kLqYU4PEr+iOkxmZWawjkXwv+7HfH9gitHN34CChVXJiAIQ82VyBPFDfbpr7zsgspyw91gF0GfDYe2ZFBG3rZreefxnGAzFsZGklhigLeceYr08nxryOWd96Ykww7UOIQbRqEyPJox4o05wHPnW8+2VqRDpjST4xOLJGrCBsTm9aTxRFybq3+Xk41VbfT5wKwJeq5rwd0VSd3ErLIxFJ4/7g3zXz017dclXm5UasQcWnsPWURkGaJ/80yCMZsfWips0rm5rh3CEjvbF89Vy21HDWv+hR//u9S1+dY2MyiH0rPaX7wEYlo8tGYjuKsTpc=
|
11
|
+
provider: rubygems
|
12
|
+
on:
|
13
|
+
rvm: 2.2
|
14
|
+
all_branches: true
|
data/README.md
CHANGED
@@ -6,14 +6,26 @@ module Restash
|
|
6
6
|
def self.included(base)
|
7
7
|
base.class_eval do
|
8
8
|
|
9
|
-
get
|
9
|
+
get '/restash/ping' do
|
10
10
|
{ status: :ok }.to_json
|
11
11
|
end
|
12
12
|
|
13
|
-
post
|
13
|
+
post '/restash/retry' do
|
14
14
|
p = JSON.parse(request.body.read)
|
15
|
-
|
16
|
-
|
15
|
+
queue = p['queue']
|
16
|
+
klass = p['payload']['class']
|
17
|
+
args = p['payload']['args']
|
18
|
+
success = false
|
19
|
+
enqueue = :not_enqueued
|
20
|
+
begin
|
21
|
+
success = Resque.enqueue_to(queue, klass.constantize, *args)
|
22
|
+
enqueue = :with_resque_enqueue_to
|
23
|
+
rescue NoMethodError => e
|
24
|
+
Resque.push(queue, :class => klass.to_s, :args => args)
|
25
|
+
success = true
|
26
|
+
enqueue = :with_resque_push
|
27
|
+
end
|
28
|
+
{ success: success, enqueue: enqueue }.to_json
|
17
29
|
end
|
18
30
|
end
|
19
31
|
end
|
data/lib/restash/version.rb
CHANGED
data/restash.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = 'https://github.com/YotpoLtd/restash'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|chrome-extension)/}) }
|
18
18
|
spec.bindir = 'exe'
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ['lib']
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ariel Cabib
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.12'
|
20
20
|
type: :development
|
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.12'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
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: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
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: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: logstash-logger
|
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
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: resque
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
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: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: json
|
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: :runtime
|
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
|
description: Logs Resque failures to Logstash
|
@@ -101,9 +101,9 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
104
|
+
- .gitignore
|
105
|
+
- .rspec
|
106
|
+
- .travis.yml
|
107
107
|
- Gemfile
|
108
108
|
- LICENSE.txt
|
109
109
|
- README.md
|
@@ -125,17 +125,17 @@ require_paths:
|
|
125
125
|
- lib
|
126
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - ! '>='
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
requirements:
|
133
|
-
- -
|
133
|
+
- - ! '>='
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.4.
|
138
|
+
rubygems_version: 2.4.5
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Logs Resque failures to Logstash
|