fluentd-ui 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd-ui might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd82626dac8fa5a41f6a2f86269c6a312da42528
4
- data.tar.gz: 111ca2fe63f517dff32c5d3102ae51dc325b29ad
3
+ metadata.gz: 0331a441430ebf79173a5f487edb2a3c27e39153
4
+ data.tar.gz: f163ed82b19a95b3855e9b4498bab294464253b6
5
5
  SHA512:
6
- metadata.gz: a24ea27306a2f29f56d11915cfe75d34645aba7ecf3fdc4fdb6babc5170781a7e0c234a475b375a334d285bd67c6103165e43220ef2780835953c46e10fb38f3
7
- data.tar.gz: d91e0b3c499494c524c58bd92d056ee7841a9b70d20c278bedaf83329974e4a71a2f05d191c0c93fc8fc719caffbe51f8c1c263958767e100fb1230286f55b45
6
+ metadata.gz: e220e3a0da1426600ae7ff2a9b17ad69b42da407a1f21ef67f489dfe87ec75a702dc9b3ede54273350f555b71bc716322d54d548edb2c31f493f122b0dce1dfa
7
+ data.tar.gz: 3d6c95420e6981e516806ee6da6922ead65d08548d554b593a0c50d4ae269d5cd7e5c27d6c607bdab7d0d3132b3c56041930b01e1c82c8583b7f55dce4c5f7c7
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ Release 0.3.2 - 2014/11/10
2
+
3
+ * [fixed] Auto update fluentd-ui feature
4
+
5
+
1
6
  Release 0.3.1 - 2014/11/05
2
7
 
3
8
  * [maintenance] Update dependencies
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluentd-ui (0.3.1)
4
+ fluentd-ui (0.3.2)
5
5
  addressable
6
6
  bundler
7
7
  draper (~> 1.3)
@@ -103,7 +103,7 @@ GEM
103
103
  http-cookie (1.0.2)
104
104
  domain_name (~> 0.5)
105
105
  http_parser.rb (0.6.0)
106
- httpclient (2.5.3.1)
106
+ httpclient (2.5.3.2)
107
107
  i18n (0.6.11)
108
108
  i18n_generators (1.2.1)
109
109
  mechanize
@@ -3,11 +3,12 @@
3
3
  = icon('fa-download')
4
4
  = t('.download_system_information')
5
5
 
6
- - if FluentdUI.update_available?
6
+ - if FluentdUI.update_available? && !FluentdUI.td_agent_ui?
7
+ - # NOTE: td-agent-ui shouldn't have auto update feature
7
8
  .row
8
9
  .col-xs-12
9
10
  %p
10
- = link_to misc_update_daemon_ui_path, class: "btn btn-primary btn-lg", method: :post do
11
+ = link_to misc_update_fluentd_ui_path, class: "btn btn-primary btn-lg", method: :post do
11
12
  = t('.update_fluentd_ui', version: FluentdUI.latest_version, title: fluentd_ui_title)
12
13
  = t('.update_fluentd_ui_caution', brand: fluentd_ui_brand)
13
14
 
@@ -3,7 +3,7 @@ class FluentdUiUpdateCheck
3
3
 
4
4
  def perform
5
5
  pl = Plugin.new(gem_name: "fluentd-ui")
6
- if pl.gem_versions # NOTE: fluentd-ui is not released yet, so `pl.latest_version` will fail for now
6
+ if pl.gem_versions
7
7
  FluentdUI.latest_version = pl.latest_version
8
8
  end
9
9
  later(3600) # will be checked every hour
@@ -0,0 +1,6 @@
1
+ unless Rails.env.test?
2
+ unless FluentdUI.td_agent_ui?
3
+ # td-agent-ui shouldn't auto update
4
+ FluentdUiUpdateCheck.new.async.perform
5
+ end
6
+ end
@@ -25,4 +25,8 @@ module FluentdUI
25
25
  FileUtils.mkdir_p(dir) # ensure directory exists
26
26
  dir
27
27
  end
28
+
29
+ def self.td_agent_ui?
30
+ ENV["FLUENTD_UI_TD_AGENT"].present?
31
+ end
28
32
  end
@@ -1,3 +1,3 @@
1
1
  module FluentdUI
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -0,0 +1,33 @@
1
+ require "spec_helper"
2
+
3
+ describe "fluentd-ui updates checking" do
4
+ let(:exists_user) { build(:user) }
5
+ before { login_with(exists_user) }
6
+
7
+ describe "Show popup if newer version is available" do
8
+ let(:version) { "9999.99" }
9
+ let(:message) { I18n.t("messages.available_new_fluentd_ui", version: FluentdUI.latest_version, update_url: misc_information_path, title: "dummy") }
10
+ before { FluentdUI.latest_version = version }
11
+ after { FluentdUI.latest_version = ::FluentdUI::VERSION }
12
+
13
+ it do
14
+ visit root_path
15
+ page.should have_css('.alert-info')
16
+ page.should have_content(version)
17
+ page.body.should include(message)
18
+ end
19
+ end
20
+
21
+ describe "Not shown popup if newer version is not available" do
22
+ let(:version) { ::FluentdUI::VERSION }
23
+ let(:message) { I18n.t("messages.available_new_fluentd_ui", version: FluentdUI.latest_version, update_url: misc_information_path, title: "dummy") }
24
+
25
+ it do
26
+ visit root_path
27
+ page.should_not have_css('.alert-info')
28
+ page.should_not have_content(version)
29
+ page.body.should_not include(message)
30
+ end
31
+ end
32
+
33
+ end
@@ -1,6 +1,6 @@
1
- describe "users" do
2
- let(:exists_user) { create(:user) }
1
+ require "spec_helper"
3
2
 
3
+ describe "users" do
4
4
  describe "edit" do
5
5
  let(:url) { user_path }
6
6
  it_should_behave_like "login required"
@@ -33,6 +33,7 @@ RSpec.configure do |config|
33
33
 
34
34
  # Syntax sugar to use the FactoryGirl methods directly instead FactoryGirl.create ete.
35
35
  config.include FactoryGirl::Syntax::Methods
36
+ config.include LoginMacro
36
37
 
37
38
  # If true, the base class of anonymous controllers will be inferred
38
39
  # automatically. This will be the default behavior in future versions of
@@ -0,0 +1,10 @@
1
+ module LoginMacro
2
+ def login_with(user)
3
+ visit '/sessions/new'
4
+ within("form") do
5
+ fill_in 'session_name', :with => exists_user.name
6
+ fill_in 'session_password', :with => exists_user.password
7
+ end
8
+ click_button I18n.t("terms.sign_in")
9
+ end
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Nakagawa
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-05 00:00:00.000000000 Z
12
+ date: 2014-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -412,6 +412,7 @@ files:
412
412
  - config/initializers/backtrace_silencers.rb
413
413
  - config/initializers/cookies_serializer.rb
414
414
  - config/initializers/filter_parameter_logging.rb
415
+ - config/initializers/fluentd_ui_update_check.rb
415
416
  - config/initializers/inflections.rb
416
417
  - config/initializers/mime_types.rb
417
418
  - config/initializers/prefetch_gem_updates.rb
@@ -463,6 +464,7 @@ files:
463
464
  - spec/features/fluentd/setting/out_elasticsearch_spec.rb
464
465
  - spec/features/fluentd/setting/out_forward_spec.rb
465
466
  - spec/features/fluentd/setting/out_td_spec.rb
467
+ - spec/features/fluentd_ui_update_available_spec.rb
466
468
  - spec/features/sessions_spec.rb
467
469
  - spec/features/shared_examples/login_required.rb
468
470
  - spec/features/users_spec.rb
@@ -482,6 +484,7 @@ files:
482
484
  - spec/support/fixtures/error2.log
483
485
  - spec/support/fluentd_agent_common_behavior.rb
484
486
  - spec/support/fluentd_agent_restart_strategy.rb
487
+ - spec/support/login_macro.rb
485
488
  - tmp/.gitkeep
486
489
  - vendor/assets/javascripts/.keep
487
490
  - vendor/assets/javascripts/bower/es6-promise/.bower.json
@@ -626,6 +629,7 @@ test_files:
626
629
  - spec/features/fluentd/setting/out_elasticsearch_spec.rb
627
630
  - spec/features/fluentd/setting/out_forward_spec.rb
628
631
  - spec/features/fluentd/setting/out_td_spec.rb
632
+ - spec/features/fluentd_ui_update_available_spec.rb
629
633
  - spec/features/sessions_spec.rb
630
634
  - spec/features/shared_examples/login_required.rb
631
635
  - spec/features/users_spec.rb
@@ -645,3 +649,4 @@ test_files:
645
649
  - spec/support/fixtures/error2.log
646
650
  - spec/support/fluentd_agent_common_behavior.rb
647
651
  - spec/support/fluentd_agent_restart_strategy.rb
652
+ - spec/support/login_macro.rb