fishplate 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/Gemfile.lock +3 -3
- data/Rakefile +5 -3
- data/lib/fishplate/sidekiq_middleware.rb +9 -0
- data/lib/fishplate/tasks.rake +1 -1
- data/lib/fishplate/version.rb +1 -1
- data/lib/fishplate.rb +13 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9157399e830abf212801ffe5aed9cb87fe36b433d7c92a066dc74b3068b0b49f
|
4
|
+
data.tar.gz: 3e99a882a4c91b66dce99462eca11ba156e26972bbf77b705650d14bdb5b409e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47f4ef7aceced1879eb3014faa227496d8d5b283830f7339630b3ab7a559f2d845a1429084ca050a71dcd0f42c42c13d6ccc65d03926bf281b6787bcd4007a79
|
7
|
+
data.tar.gz: 312baa8c60b1745bde06f41cc5a611a09d3807764ee193e50f225369efa217d891f7dc458610e28fa4401ba33a9c89cd814447d975bb140e78f8123e511cef78
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fishplate (0.
|
4
|
+
fishplate (0.3.0)
|
5
5
|
a9n (~> 0.10)
|
6
6
|
activemodel
|
7
7
|
activerecord
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
jaro_winkler (1.5.4)
|
34
34
|
method_source (0.9.2)
|
35
35
|
minitest (5.13.0)
|
36
|
-
parallel (1.
|
36
|
+
parallel (1.19.1)
|
37
37
|
parser (2.6.5.0)
|
38
38
|
ast (~> 2.4.0)
|
39
39
|
pry (0.12.2)
|
@@ -61,7 +61,7 @@ GEM
|
|
61
61
|
rainbow (>= 2.2.2, < 4.0)
|
62
62
|
ruby-progressbar (~> 1.7)
|
63
63
|
unicode-display_width (>= 1.4.0, < 1.7)
|
64
|
-
rubocop-performance (1.5.
|
64
|
+
rubocop-performance (1.5.1)
|
65
65
|
rubocop (>= 0.71.0)
|
66
66
|
ruby-progressbar (1.10.1)
|
67
67
|
thread_safe (0.3.6)
|
data/Rakefile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
3
4
|
|
4
5
|
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
RuboCop::RakeTask.new
|
5
7
|
|
6
|
-
task default:
|
8
|
+
task default: %i[rubocop spec]
|
data/lib/fishplate/tasks.rake
CHANGED
@@ -23,7 +23,7 @@ task "db:setup" => ["fail_if_prod", "db:create", "db:schema:load"]
|
|
23
23
|
desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
|
24
24
|
namespace :generate do
|
25
25
|
task :migration, [:name] do |name, args|
|
26
|
-
klass = args[:name].
|
26
|
+
klass = args[:name].tr('-', '_').camelize
|
27
27
|
number = ActiveRecord::Migration.next_migration_number(0)
|
28
28
|
file_name = "#{number}_#{klass.underscore}.rb"
|
29
29
|
file_path = A9n.root.join("db/migrate", file_name)
|
data/lib/fishplate/version.rb
CHANGED
data/lib/fishplate.rb
CHANGED
@@ -6,6 +6,7 @@ require 'logger'
|
|
6
6
|
|
7
7
|
require 'fishplate/version'
|
8
8
|
require 'fishplate/rack'
|
9
|
+
require 'fishplate/sidekiq_middleware'
|
9
10
|
|
10
11
|
module Fishplate
|
11
12
|
class << self
|
@@ -61,6 +62,18 @@ module Fishplate
|
|
61
62
|
ActiveRecord::Base.flush_idle_connections!
|
62
63
|
|
63
64
|
ActiveRecord::Base.establish_connection
|
65
|
+
|
66
|
+
add_sidekiq_middleware if defined?(Sidekiq)
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def add_sidekiq_middleware
|
72
|
+
Sidekiq.configure_server do |config|
|
73
|
+
config.server_middleware do |chain|
|
74
|
+
chain.add Fishplate::SidekiqMiddleware
|
75
|
+
end
|
76
|
+
end
|
64
77
|
end
|
65
78
|
end
|
66
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fishplate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: a9n
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- fishplate/.travis.yml
|
203
203
|
- lib/fishplate.rb
|
204
204
|
- lib/fishplate/rack.rb
|
205
|
+
- lib/fishplate/sidekiq_middleware.rb
|
205
206
|
- lib/fishplate/tasks.rake
|
206
207
|
- lib/fishplate/version.rb
|
207
208
|
homepage: https://github.com/RenoFi/fishplate
|