sidekiq-throttled 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: caf7b98eeb976c1114776cb1981a3bd6b7c218f8
4
- data.tar.gz: 1945f409e2048660611a1a7ede586bb573899d51
3
+ metadata.gz: 3802ab6e7e994bd8faa55662720249224b8e6c6b
4
+ data.tar.gz: b1a33d3471eec53203d4f5e652e750fb88587f19
5
5
  SHA512:
6
- metadata.gz: 6b6640758e9fea0d59f715d87071da32300dc54e3397b2e9c90f16bbcfb90e9bfd22153e607cdfbbe7cd04359ef0e920f9a59b37c8870bfd467c71b239951e1e
7
- data.tar.gz: e6ea732bdbb2818828203823a7620fd681eacae992eff09422bc57f9a659ecb1fa992a08e1191c50df0cad346af980000074855c7f87fd705c4af62f8cdd01a1
6
+ metadata.gz: b8d0bdd85bfeb292e4a52f4186d34667f4e0866af137fbefd258ee662e227297f7508542c64a658a045c5cac95bd37141d8587e623c2ba99d97d9e9d96940ad2
7
+ data.tar.gz: 7b705aa1272d5fd0f499d318678b5700ef75e84e8aed3fb41accbd39cb2679fd6ea8d711225ecbea4b5c4499fd1c4d910a4f0510321f4dd60d7aae2eed510f30
data/.travis.yml CHANGED
@@ -11,6 +11,10 @@ before_install:
11
11
  - gem --version
12
12
  - gem install bundler --no-rdoc --no-ri
13
13
  - bundle --version
14
+ - mkdir travis-phantomjs
15
+ - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
16
+ - tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
17
+ - export PATH=$PWD/travis-phantomjs:$PATH
14
18
 
15
19
  install: bundle install --without development
16
20
 
data/CHANGES.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.7.2 (2017-04-02)
2
+
3
+ * Fix summary bar fixer on sidekiq 4.2+.
4
+ ([@ixti])
5
+
6
+ * Fix regexp used to fix summay bar queues link when ui was enhanced.
7
+ ([@ixti])
8
+
9
+
1
10
  ## 0.7.1 (2017-03-30)
2
11
 
3
12
  * Fix summary bar queues link when queue ui was enhanced.
data/Gemfile CHANGED
@@ -19,6 +19,7 @@ end
19
19
  group :test do
20
20
  gem "capybara"
21
21
  gem "coveralls", :require => false
22
+ gem "poltergeist"
22
23
  gem "rack-test"
23
24
  gem "simplecov", ">= 0.9"
24
25
  gem "sinatra", "~> 1.4", ">= 1.4.6"
@@ -19,6 +19,7 @@ end
19
19
  group :test do
20
20
  gem "capybara"
21
21
  gem "coveralls", :require => false
22
+ gem "poltergeist"
22
23
  gem "rack-test"
23
24
  gem "simplecov", ">= 0.9"
24
25
  gem "sinatra", "~> 1.4", ">= 1.4.6"
@@ -19,6 +19,7 @@ end
19
19
  group :test do
20
20
  gem "capybara"
21
21
  gem "coveralls", :require => false
22
+ gem "poltergeist"
22
23
  gem "rack-test"
23
24
  gem "simplecov", ">= 0.9"
24
25
  gem "sinatra", "~> 1.4", ">= 1.4.6"
@@ -19,6 +19,7 @@ end
19
19
  group :test do
20
20
  gem "capybara"
21
21
  gem "coveralls", :require => false
22
+ gem "poltergeist"
22
23
  gem "rack-test"
23
24
  gem "simplecov", ">= 0.9"
24
25
  gem "sinatra", "~> 1.4", ">= 1.4.6"
@@ -3,6 +3,6 @@
3
3
  module Sidekiq
4
4
  module Throttled
5
5
  # Gem version
6
- VERSION = "0.7.1"
6
+ VERSION = "0.7.2"
7
7
  end
8
8
  end
@@ -40,7 +40,7 @@ module Sidekiq
40
40
 
41
41
  # @api private
42
42
  def registered(app)
43
- app.send(:include, SummaryFix)
43
+ SummaryFix.apply! app
44
44
  register_throttled_tab app
45
45
  register_enhanced_queues_tab app
46
46
  end
@@ -0,0 +1,7 @@
1
+ <script>
2
+ $(function ($el) {
3
+ var $el = $(".summary li.enqueued > a"),
4
+ url = $el.attr("href").replace(/\/queues$/, "/enhanced-queues");
5
+ $el.attr("href", url);
6
+ });
7
+ </script>
@@ -4,22 +4,22 @@ module Sidekiq
4
4
  module Throttled
5
5
  module Web
6
6
  module SummaryFix
7
- JAVASCRIPT = <<-JAVASCRIPT
8
- <script>
9
- $(function ($el) {
10
- var $el = $(".summary li.enqueued > a"),
11
- url = $el.attr("href").replace(/\/queues$/, "/enhanced-queues");
12
- $el.attr("href", url);
13
- });
14
- </script>
15
- JAVASCRIPT
7
+ HTML = File.read("#{__dir__}/summary_fix.html").freeze
16
8
 
17
9
  class << self
18
10
  attr_accessor :enabled
11
+
12
+ def apply!(app)
13
+ if "4.2.0" <= Sidekiq::VERSION
14
+ Sidekiq::WebAction.send(:prepend, SummaryFix)
15
+ else
16
+ app.send(:prepend, SummaryFix)
17
+ end
18
+ end
19
19
  end
20
20
 
21
21
  def display_custom_head
22
- SummaryFix.enabled ? "#{super}#{JAVASCRIPT}" : super
22
+ "#{super}#{HTML if SummaryFix.enabled}"
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-throttled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey V Zapparov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-30 00:00:00.000000000 Z
11
+ date: 2017-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -87,6 +87,7 @@ files:
87
87
  - lib/sidekiq/throttled/web.rb
88
88
  - lib/sidekiq/throttled/web/queues.html.erb
89
89
  - lib/sidekiq/throttled/web/stats.rb
90
+ - lib/sidekiq/throttled/web/summary_fix.html
90
91
  - lib/sidekiq/throttled/web/summary_fix.rb
91
92
  - lib/sidekiq/throttled/web/throttled.html.erb
92
93
  - lib/sidekiq/throttled/worker.rb