fluentd-ui 1.0.0.beta.1 → 1.0.0
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 +4 -4
- data/ChangeLog.md +24 -0
- data/Gemfile +5 -3
- data/Gemfile.lock +88 -75
- data/README.md +11 -0
- data/Rakefile +1 -1
- data/app/javascript/packs/aws_credential.js +1 -1
- data/app/javascript/packs/in_tail_parse.js +1 -1
- data/app/javascript/packs/owned_plugin_form.js +1 -1
- data/app/javascript/packs/settings.js +20 -9
- data/app/javascript/packs/transport_config.js +1 -1
- data/app/javascript/packs/transport_section.js +1 -1
- data/app/javascript/packs/treeview.js +2 -2
- data/app/models/plugin.rb +2 -2
- data/app/views/fluentd/settings/source_and_output.html.haml +12 -10
- data/app/views/layouts/application.html.erb +3 -0
- data/app/views/plugins/recommended.html.haml +3 -0
- data/app/views/plugins/updated.html.haml +5 -6
- data/config.ru +3 -1
- data/config/application.rb +1 -1
- data/config/application.yml +104 -31
- data/config/locales/translation_en.yml +1 -0
- data/config/locales/translation_ja.yml +1 -0
- data/gemfiles/ruby2.2.gemfile +2 -1
- data/lib/fluentd-ui/version.rb +1 -1
- data/test/application_system_test_case.rb +8 -0
- data/test/controllers/application_controller_test.rb +42 -0
- data/test/controllers/fluentd/agents_controller_test.rb +39 -0
- data/test/controllers/misc_controller_test.rb +70 -0
- data/test/controllers/polling_controller_test.rb +29 -0
- data/test/decorators/plugin_decorator_test.rb +26 -0
- data/{spec → test}/factories/fluentd.rb +0 -0
- data/{spec → test}/factories/plugins.rb +0 -0
- data/{spec → test}/factories/user.rb +0 -0
- data/{spec/support → test}/fixtures/error0.log +0 -0
- data/{spec/support → test}/fixtures/error2.log +0 -0
- data/{spec/support → test}/fixtures/error3.log +0 -0
- data/{spec/support → test}/fixtures/error4.log +0 -0
- data/{spec/support → test}/fixtures/multiline_example.log +0 -0
- data/test/integration/dashboard_test.rb +57 -0
- data/test/integration/fluentd/setting/histories_test.rb +139 -0
- data/test/integration/fluentd/setting/notes_test.rb +27 -0
- data/test/integration/fluentd/setting/running_backup_test.rb +65 -0
- data/test/integration/fluentd_ui_update_checking_test.rb +27 -0
- data/test/integration/sesstions_test.rb +56 -0
- data/test/integration/setting_test.rb +126 -0
- data/test/integration/users_test.rb +43 -0
- data/test/lib/filte_reverse_reader_test.rb +63 -0
- data/test/lib/fluentd_ui_test.rb +36 -0
- data/test/lib/regexp_preview/multi_line_test.rb +86 -0
- data/test/lib/regexp_preview/single_line_test.rb +87 -0
- data/test/models/fluent_gem_test.rb +76 -0
- data/test/models/fluentd/agent_test.rb +331 -0
- data/{spec/models/fluentd/setting/in_forward_spec.rb → test/models/fluentd/setting/in_forward_test.rb} +32 -44
- data/test/models/fluentd/setting/in_http_test.rb +30 -0
- data/test/models/fluentd/setting/in_monitor_agent_test.rb +30 -0
- data/test/models/fluentd/setting/in_syslog_test.rb +88 -0
- data/test/models/fluentd/setting/in_tail_test.rb +52 -0
- data/test/models/fluentd/setting/out_elasticsearch_test.rb +32 -0
- data/test/models/fluentd/setting/out_mongo_test.rb +61 -0
- data/test/models/fluentd/setting/out_s3_test.rb +112 -0
- data/test/models/fluentd/setting/out_stdout_test.rb +32 -0
- data/test/models/fluentd/setting/out_tdlog_test.rb +60 -0
- data/test/models/fluentd_log_test.rb +140 -0
- data/test/models/fluentd_test.rb +185 -0
- data/test/models/plugin_test.rb +144 -0
- data/test/models/user_test.rb +48 -0
- data/test/support/config_histories.rb +72 -0
- data/test/support/configurable_daemon_settings.rb +26 -0
- data/test/support/login_macro.rb +12 -0
- data/test/support/login_required.rb +8 -0
- data/test/support/stub_daemon.rb +14 -0
- data/test/system/fluentd/setting/in_forward_test.rb +13 -0
- data/test/system/fluentd/setting/in_http_test.rb +13 -0
- data/test/system/fluentd/setting/in_monitor_agent.rb +13 -0
- data/test/system/fluentd/setting/out_elasticsearch_test.rb +32 -0
- data/test/system/fluentd/setting/out_forward_test.rb +41 -0
- data/test/system/fluentd/setting/out_stdout_test.rb +15 -0
- data/test/system/fluentd/setting/out_tdlog_test.rb +15 -0
- data/test/system/source_and_output_test.rb +184 -0
- data/test/test_helper.rb +34 -0
- metadata +147 -161
- data/spec/controllers/application_controller_spec.rb +0 -84
- data/spec/controllers/fluentd/agents_controller_spec.rb +0 -61
- data/spec/controllers/misc_controller_spec.rb +0 -68
- data/spec/controllers/polling_controller_spec.rb +0 -39
- data/spec/controllers/sessions_controller_spec.rb +0 -5
- data/spec/decorators/plugin_decorator_spec.rb +0 -37
- data/spec/features/dashboard_spec.rb +0 -42
- data/spec/features/fluentd/setting/histories_spec.rb +0 -110
- data/spec/features/fluentd/setting/in_forward_spec.rb +0 -6
- data/spec/features/fluentd/setting/in_http_spec.rb +0 -6
- data/spec/features/fluentd/setting/in_monitor_agent_spec.rb +0 -6
- data/spec/features/fluentd/setting/notes_spec.rb +0 -27
- data/spec/features/fluentd/setting/out_forward_spec.rb +0 -38
- data/spec/features/fluentd/setting/out_stdout_spec.rb +0 -6
- data/spec/features/fluentd/setting/running_backup_spec.rb +0 -106
- data/spec/features/fluentd_status_spec.rb +0 -36
- data/spec/features/fluentd_ui_update_available_spec.rb +0 -33
- data/spec/features/out_elasticsearch_spec.rb +0 -28
- data/spec/features/out_forward_spec.rb +0 -36
- data/spec/features/out_tdlog_spec.rb +0 -26
- data/spec/features/sessions_spec.rb +0 -79
- data/spec/features/setting_spec.rb +0 -95
- data/spec/features/shared_examples/configurable_daemon_settings.rb +0 -17
- data/spec/features/shared_examples/login_required.rb +0 -4
- data/spec/features/source_and_output_spec.rb +0 -158
- data/spec/features/users_spec.rb +0 -53
- data/spec/grok_converter_spec.rb +0 -50
- data/spec/lib/file_reverse_reader_spec.rb +0 -93
- data/spec/lib/fluentd-ui_spec.rb +0 -35
- data/spec/lib/regexp_preview/multi_line_spec.rb +0 -111
- data/spec/lib/regexp_preview/single_line_spec.rb +0 -185
- data/spec/models/fluent_gem_spec.rb +0 -104
- data/spec/models/fluentd/agent/common_spec.rb +0 -82
- data/spec/models/fluentd/agent_spec.rb +0 -134
- data/spec/models/fluentd/setting/in_http_spec.rb +0 -31
- data/spec/models/fluentd/setting/in_monitor_agent_spec.rb +0 -31
- data/spec/models/fluentd/setting/in_syslog_spec.rb +0 -98
- data/spec/models/fluentd/setting/in_tail_spec.rb +0 -53
- data/spec/models/fluentd/setting/out_elasticsearch_spec.rb +0 -31
- data/spec/models/fluentd/setting/out_mongo_spec.rb +0 -62
- data/spec/models/fluentd/setting/out_s3_spec.rb +0 -128
- data/spec/models/fluentd/setting/out_stdout_spec.rb +0 -31
- data/spec/models/fluentd/setting/out_tdlog_spec.rb +0 -46
- data/spec/models/fluentd_log_spec.rb +0 -171
- data/spec/models/fluentd_spec.rb +0 -164
- data/spec/models/plugin_spec.rb +0 -191
- data/spec/models/user_spec.rb +0 -59
- data/spec/spec_helper.rb +0 -85
- data/spec/support/config_histories.rb +0 -57
- data/spec/support/fluentd_agent_common_behavior.rb +0 -181
- data/spec/support/fluentd_agent_restart_strategy.rb +0 -94
- data/spec/support/javascript_macro.rb +0 -21
- data/spec/support/login_macro.rb +0 -10
- data/spec/support/stub_daemon.rb +0 -12
data/test/test_helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
require_relative '../config/environment'
|
3
|
+
require 'test/unit/rails/test_help'
|
4
|
+
require 'test/unit/rr'
|
5
|
+
require 'test/unit/capybara'
|
6
|
+
require 'capybara-screenshot/testunit' # for integration test
|
7
|
+
|
8
|
+
if ENV["TRAVIS"]
|
9
|
+
require "chromedriver/helper"
|
10
|
+
Chromedriver.set_version "2.35"
|
11
|
+
end
|
12
|
+
|
13
|
+
require 'webmock/test_unit'
|
14
|
+
WebMock.disable_net_connect!(allow_localhost: true)
|
15
|
+
|
16
|
+
|
17
|
+
module FixturePath
|
18
|
+
def fixture_path(fixture_name)
|
19
|
+
Rails.root.join("test/fixtures", fixture_name).to_s
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class ActiveSupport::TestCase
|
24
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
25
|
+
#fixtures :all
|
26
|
+
|
27
|
+
# Add more helper methods to be used by all tests here...
|
28
|
+
include FixturePath
|
29
|
+
extend FixturePath
|
30
|
+
end
|
31
|
+
|
32
|
+
Dir[Rails.root.join("test/support/**/*.rb")].each do |path|
|
33
|
+
require(path)
|
34
|
+
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: 1.0.0
|
4
|
+
version: 1.0.0
|
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: 2018-
|
12
|
+
date: 2018-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -676,7 +676,7 @@ files:
|
|
676
676
|
- public/404.html
|
677
677
|
- public/422.html
|
678
678
|
- public/500.html
|
679
|
-
- public/assets/.sprockets-manifest-
|
679
|
+
- public/assets/.sprockets-manifest-9693cd2afe926a5ca7da6b040a9a2e6b.json
|
680
680
|
- public/assets/application-db8ee881ff43fff5b8f3a6c96c92c2c62428cc6340162b5fde8d0cbf80c03d2f.css
|
681
681
|
- public/assets/application-db8ee881ff43fff5b8f3a6c96c92c2c62428cc6340162b5fde8d0cbf80c03d2f.css.gz
|
682
682
|
- public/assets/fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2
|
@@ -696,9 +696,9 @@ files:
|
|
696
696
|
- public/packs/application-d9c1a8fd897e89f4339b.js
|
697
697
|
- public/packs/application-d9c1a8fd897e89f4339b.js.gz
|
698
698
|
- public/packs/application-d9c1a8fd897e89f4339b.js.map
|
699
|
-
- public/packs/aws_credential-
|
700
|
-
- public/packs/aws_credential-
|
701
|
-
- public/packs/aws_credential-
|
699
|
+
- public/packs/aws_credential-f430abe47eff7a069b97.js
|
700
|
+
- public/packs/aws_credential-f430abe47eff7a069b97.js.gz
|
701
|
+
- public/packs/aws_credential-f430abe47eff7a069b97.js.map
|
702
702
|
- public/packs/codemirror-ee4da72eacbf03f4a8a6.js
|
703
703
|
- public/packs/codemirror-ee4da72eacbf03f4a8a6.js.gz
|
704
704
|
- public/packs/codemirror-ee4da72eacbf03f4a8a6.js.map
|
@@ -708,9 +708,9 @@ files:
|
|
708
708
|
- public/packs/fluent_log-1a50e9efd568574f6edb.js
|
709
709
|
- public/packs/fluent_log-1a50e9efd568574f6edb.js.gz
|
710
710
|
- public/packs/fluent_log-1a50e9efd568574f6edb.js.map
|
711
|
-
- public/packs/in_tail_parse-
|
712
|
-
- public/packs/in_tail_parse-
|
713
|
-
- public/packs/in_tail_parse-
|
711
|
+
- public/packs/in_tail_parse-2de6badcc5ad71a660ff.js
|
712
|
+
- public/packs/in_tail_parse-2de6badcc5ad71a660ff.js.gz
|
713
|
+
- public/packs/in_tail_parse-2de6badcc5ad71a660ff.js.map
|
714
714
|
- public/packs/manifest.json
|
715
715
|
- public/packs/manifest.json.gz
|
716
716
|
- public/packs/nested_settings-2313b8ea59398970c904.js
|
@@ -719,98 +719,91 @@ files:
|
|
719
719
|
- public/packs/notification-f768826be3e0288d203f.js
|
720
720
|
- public/packs/notification-f768826be3e0288d203f.js.gz
|
721
721
|
- public/packs/notification-f768826be3e0288d203f.js.map
|
722
|
-
- public/packs/out_forward_setting-
|
723
|
-
- public/packs/out_forward_setting-
|
724
|
-
- public/packs/out_forward_setting-
|
725
|
-
- public/packs/out_s3_setting-
|
726
|
-
- public/packs/out_s3_setting-
|
727
|
-
- public/packs/out_s3_setting-
|
728
|
-
- public/packs/owned_plugin_form-
|
729
|
-
- public/packs/owned_plugin_form-
|
730
|
-
- public/packs/owned_plugin_form-
|
722
|
+
- public/packs/out_forward_setting-ce4c7ee9e840771e7b92.js
|
723
|
+
- public/packs/out_forward_setting-ce4c7ee9e840771e7b92.js.gz
|
724
|
+
- public/packs/out_forward_setting-ce4c7ee9e840771e7b92.js.map
|
725
|
+
- public/packs/out_s3_setting-85b0127b3014a94572a4.js
|
726
|
+
- public/packs/out_s3_setting-85b0127b3014a94572a4.js.gz
|
727
|
+
- public/packs/out_s3_setting-85b0127b3014a94572a4.js.map
|
728
|
+
- public/packs/owned_plugin_form-bea7a26ed698d078f6b3.js
|
729
|
+
- public/packs/owned_plugin_form-bea7a26ed698d078f6b3.js.gz
|
730
|
+
- public/packs/owned_plugin_form-bea7a26ed698d078f6b3.js.map
|
731
731
|
- public/packs/parser_multiline_form-cca4bfb7c59eb3f2ede8.js
|
732
732
|
- public/packs/parser_multiline_form-cca4bfb7c59eb3f2ede8.js.gz
|
733
733
|
- public/packs/parser_multiline_form-cca4bfb7c59eb3f2ede8.js.map
|
734
|
-
- public/packs/plugin_setting-
|
735
|
-
- public/packs/plugin_setting-
|
736
|
-
- public/packs/plugin_setting-
|
737
|
-
- public/packs/settings-
|
738
|
-
- public/packs/settings-
|
739
|
-
- public/packs/settings-
|
740
|
-
- public/packs/transport_config-
|
741
|
-
- public/packs/transport_config-
|
742
|
-
- public/packs/transport_config-
|
743
|
-
- public/packs/transport_section-
|
744
|
-
- public/packs/transport_section-
|
745
|
-
- public/packs/transport_section-
|
746
|
-
- public/packs/treeview-
|
747
|
-
- public/packs/treeview-
|
748
|
-
- public/packs/treeview-
|
734
|
+
- public/packs/plugin_setting-d563e7fbddcd0da1e35e.js
|
735
|
+
- public/packs/plugin_setting-d563e7fbddcd0da1e35e.js.gz
|
736
|
+
- public/packs/plugin_setting-d563e7fbddcd0da1e35e.js.map
|
737
|
+
- public/packs/settings-f9107f3bfc68b1b265ce.js
|
738
|
+
- public/packs/settings-f9107f3bfc68b1b265ce.js.gz
|
739
|
+
- public/packs/settings-f9107f3bfc68b1b265ce.js.map
|
740
|
+
- public/packs/transport_config-7dbe5e320e90edd6b4bd.js
|
741
|
+
- public/packs/transport_config-7dbe5e320e90edd6b4bd.js.gz
|
742
|
+
- public/packs/transport_config-7dbe5e320e90edd6b4bd.js.map
|
743
|
+
- public/packs/transport_section-9685495922d19daeb522.js
|
744
|
+
- public/packs/transport_section-9685495922d19daeb522.js.gz
|
745
|
+
- public/packs/transport_section-9685495922d19daeb522.js.map
|
746
|
+
- public/packs/treeview-d456ff8f7149706457d3.js
|
747
|
+
- public/packs/treeview-d456ff8f7149706457d3.js.gz
|
748
|
+
- public/packs/treeview-d456ff8f7149706457d3.js.map
|
749
749
|
- public/robots.txt
|
750
750
|
- public/td-logo.png
|
751
|
-
-
|
752
|
-
-
|
753
|
-
-
|
754
|
-
-
|
755
|
-
-
|
756
|
-
-
|
757
|
-
-
|
758
|
-
-
|
759
|
-
-
|
760
|
-
-
|
761
|
-
-
|
762
|
-
-
|
763
|
-
-
|
764
|
-
-
|
765
|
-
-
|
766
|
-
-
|
767
|
-
-
|
768
|
-
-
|
769
|
-
-
|
770
|
-
-
|
771
|
-
-
|
772
|
-
-
|
773
|
-
-
|
774
|
-
-
|
775
|
-
-
|
776
|
-
-
|
777
|
-
-
|
778
|
-
-
|
779
|
-
-
|
780
|
-
-
|
781
|
-
-
|
782
|
-
-
|
783
|
-
-
|
784
|
-
-
|
785
|
-
-
|
786
|
-
-
|
787
|
-
-
|
788
|
-
-
|
789
|
-
-
|
790
|
-
-
|
791
|
-
-
|
792
|
-
-
|
793
|
-
-
|
794
|
-
-
|
795
|
-
-
|
796
|
-
-
|
797
|
-
-
|
798
|
-
-
|
799
|
-
-
|
800
|
-
-
|
801
|
-
-
|
802
|
-
-
|
803
|
-
-
|
804
|
-
-
|
805
|
-
-
|
806
|
-
-
|
807
|
-
- spec/support/fixtures/error4.log
|
808
|
-
- spec/support/fixtures/multiline_example.log
|
809
|
-
- spec/support/fluentd_agent_common_behavior.rb
|
810
|
-
- spec/support/fluentd_agent_restart_strategy.rb
|
811
|
-
- spec/support/javascript_macro.rb
|
812
|
-
- spec/support/login_macro.rb
|
813
|
-
- spec/support/stub_daemon.rb
|
751
|
+
- test/application_system_test_case.rb
|
752
|
+
- test/controllers/application_controller_test.rb
|
753
|
+
- test/controllers/fluentd/agents_controller_test.rb
|
754
|
+
- test/controllers/misc_controller_test.rb
|
755
|
+
- test/controllers/polling_controller_test.rb
|
756
|
+
- test/decorators/plugin_decorator_test.rb
|
757
|
+
- test/factories/fluentd.rb
|
758
|
+
- test/factories/plugins.rb
|
759
|
+
- test/factories/user.rb
|
760
|
+
- test/fixtures/error0.log
|
761
|
+
- test/fixtures/error2.log
|
762
|
+
- test/fixtures/error3.log
|
763
|
+
- test/fixtures/error4.log
|
764
|
+
- test/fixtures/multiline_example.log
|
765
|
+
- test/integration/dashboard_test.rb
|
766
|
+
- test/integration/fluentd/setting/histories_test.rb
|
767
|
+
- test/integration/fluentd/setting/notes_test.rb
|
768
|
+
- test/integration/fluentd/setting/running_backup_test.rb
|
769
|
+
- test/integration/fluentd_ui_update_checking_test.rb
|
770
|
+
- test/integration/sesstions_test.rb
|
771
|
+
- test/integration/setting_test.rb
|
772
|
+
- test/integration/users_test.rb
|
773
|
+
- test/lib/filte_reverse_reader_test.rb
|
774
|
+
- test/lib/fluentd_ui_test.rb
|
775
|
+
- test/lib/regexp_preview/multi_line_test.rb
|
776
|
+
- test/lib/regexp_preview/single_line_test.rb
|
777
|
+
- test/models/fluent_gem_test.rb
|
778
|
+
- test/models/fluentd/agent_test.rb
|
779
|
+
- test/models/fluentd/setting/in_forward_test.rb
|
780
|
+
- test/models/fluentd/setting/in_http_test.rb
|
781
|
+
- test/models/fluentd/setting/in_monitor_agent_test.rb
|
782
|
+
- test/models/fluentd/setting/in_syslog_test.rb
|
783
|
+
- test/models/fluentd/setting/in_tail_test.rb
|
784
|
+
- test/models/fluentd/setting/out_elasticsearch_test.rb
|
785
|
+
- test/models/fluentd/setting/out_mongo_test.rb
|
786
|
+
- test/models/fluentd/setting/out_s3_test.rb
|
787
|
+
- test/models/fluentd/setting/out_stdout_test.rb
|
788
|
+
- test/models/fluentd/setting/out_tdlog_test.rb
|
789
|
+
- test/models/fluentd_log_test.rb
|
790
|
+
- test/models/fluentd_test.rb
|
791
|
+
- test/models/plugin_test.rb
|
792
|
+
- test/models/user_test.rb
|
793
|
+
- test/support/config_histories.rb
|
794
|
+
- test/support/configurable_daemon_settings.rb
|
795
|
+
- test/support/login_macro.rb
|
796
|
+
- test/support/login_required.rb
|
797
|
+
- test/support/stub_daemon.rb
|
798
|
+
- test/system/fluentd/setting/in_forward_test.rb
|
799
|
+
- test/system/fluentd/setting/in_http_test.rb
|
800
|
+
- test/system/fluentd/setting/in_monitor_agent.rb
|
801
|
+
- test/system/fluentd/setting/out_elasticsearch_test.rb
|
802
|
+
- test/system/fluentd/setting/out_forward_test.rb
|
803
|
+
- test/system/fluentd/setting/out_stdout_test.rb
|
804
|
+
- test/system/fluentd/setting/out_tdlog_test.rb
|
805
|
+
- test/system/source_and_output_test.rb
|
806
|
+
- test/test_helper.rb
|
814
807
|
- tmp/.gitkeep
|
815
808
|
- vendor/patterns/firewalls
|
816
809
|
- vendor/patterns/grok-patterns
|
@@ -841,9 +834,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
841
834
|
version: '0'
|
842
835
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
843
836
|
requirements:
|
844
|
-
- - "
|
837
|
+
- - ">="
|
845
838
|
- !ruby/object:Gem::Version
|
846
|
-
version:
|
839
|
+
version: '0'
|
847
840
|
requirements: []
|
848
841
|
rubyforge_project:
|
849
842
|
rubygems_version: 2.7.6
|
@@ -851,66 +844,59 @@ signing_key:
|
|
851
844
|
specification_version: 4
|
852
845
|
summary: Web UI for Fluentd
|
853
846
|
test_files:
|
854
|
-
-
|
855
|
-
-
|
856
|
-
-
|
857
|
-
-
|
858
|
-
-
|
859
|
-
-
|
860
|
-
-
|
861
|
-
-
|
862
|
-
-
|
863
|
-
-
|
864
|
-
-
|
865
|
-
-
|
866
|
-
-
|
867
|
-
-
|
868
|
-
-
|
869
|
-
-
|
870
|
-
-
|
871
|
-
-
|
872
|
-
-
|
873
|
-
-
|
874
|
-
-
|
875
|
-
-
|
876
|
-
-
|
877
|
-
-
|
878
|
-
-
|
879
|
-
-
|
880
|
-
-
|
881
|
-
-
|
882
|
-
-
|
883
|
-
-
|
884
|
-
-
|
885
|
-
-
|
886
|
-
-
|
887
|
-
-
|
888
|
-
-
|
889
|
-
-
|
890
|
-
-
|
891
|
-
-
|
892
|
-
-
|
893
|
-
-
|
894
|
-
-
|
895
|
-
-
|
896
|
-
-
|
897
|
-
-
|
898
|
-
-
|
899
|
-
-
|
900
|
-
-
|
901
|
-
-
|
902
|
-
-
|
903
|
-
-
|
904
|
-
-
|
905
|
-
-
|
906
|
-
-
|
907
|
-
-
|
908
|
-
-
|
909
|
-
-
|
910
|
-
- spec/support/fixtures/error4.log
|
911
|
-
- spec/support/fixtures/multiline_example.log
|
912
|
-
- spec/support/fluentd_agent_common_behavior.rb
|
913
|
-
- spec/support/fluentd_agent_restart_strategy.rb
|
914
|
-
- spec/support/javascript_macro.rb
|
915
|
-
- spec/support/login_macro.rb
|
916
|
-
- spec/support/stub_daemon.rb
|
847
|
+
- test/application_system_test_case.rb
|
848
|
+
- test/controllers/application_controller_test.rb
|
849
|
+
- test/controllers/fluentd/agents_controller_test.rb
|
850
|
+
- test/controllers/misc_controller_test.rb
|
851
|
+
- test/controllers/polling_controller_test.rb
|
852
|
+
- test/decorators/plugin_decorator_test.rb
|
853
|
+
- test/factories/fluentd.rb
|
854
|
+
- test/factories/plugins.rb
|
855
|
+
- test/factories/user.rb
|
856
|
+
- test/fixtures/error0.log
|
857
|
+
- test/fixtures/error2.log
|
858
|
+
- test/fixtures/error3.log
|
859
|
+
- test/fixtures/error4.log
|
860
|
+
- test/fixtures/multiline_example.log
|
861
|
+
- test/integration/dashboard_test.rb
|
862
|
+
- test/integration/fluentd/setting/histories_test.rb
|
863
|
+
- test/integration/fluentd/setting/notes_test.rb
|
864
|
+
- test/integration/fluentd/setting/running_backup_test.rb
|
865
|
+
- test/integration/fluentd_ui_update_checking_test.rb
|
866
|
+
- test/integration/sesstions_test.rb
|
867
|
+
- test/integration/setting_test.rb
|
868
|
+
- test/integration/users_test.rb
|
869
|
+
- test/lib/filte_reverse_reader_test.rb
|
870
|
+
- test/lib/fluentd_ui_test.rb
|
871
|
+
- test/lib/regexp_preview/multi_line_test.rb
|
872
|
+
- test/lib/regexp_preview/single_line_test.rb
|
873
|
+
- test/models/fluent_gem_test.rb
|
874
|
+
- test/models/fluentd/agent_test.rb
|
875
|
+
- test/models/fluentd/setting/in_forward_test.rb
|
876
|
+
- test/models/fluentd/setting/in_http_test.rb
|
877
|
+
- test/models/fluentd/setting/in_monitor_agent_test.rb
|
878
|
+
- test/models/fluentd/setting/in_syslog_test.rb
|
879
|
+
- test/models/fluentd/setting/in_tail_test.rb
|
880
|
+
- test/models/fluentd/setting/out_elasticsearch_test.rb
|
881
|
+
- test/models/fluentd/setting/out_mongo_test.rb
|
882
|
+
- test/models/fluentd/setting/out_s3_test.rb
|
883
|
+
- test/models/fluentd/setting/out_stdout_test.rb
|
884
|
+
- test/models/fluentd/setting/out_tdlog_test.rb
|
885
|
+
- test/models/fluentd_log_test.rb
|
886
|
+
- test/models/fluentd_test.rb
|
887
|
+
- test/models/plugin_test.rb
|
888
|
+
- test/models/user_test.rb
|
889
|
+
- test/support/config_histories.rb
|
890
|
+
- test/support/configurable_daemon_settings.rb
|
891
|
+
- test/support/login_macro.rb
|
892
|
+
- test/support/login_required.rb
|
893
|
+
- test/support/stub_daemon.rb
|
894
|
+
- test/system/fluentd/setting/in_forward_test.rb
|
895
|
+
- test/system/fluentd/setting/in_http_test.rb
|
896
|
+
- test/system/fluentd/setting/in_monitor_agent.rb
|
897
|
+
- test/system/fluentd/setting/out_elasticsearch_test.rb
|
898
|
+
- test/system/fluentd/setting/out_forward_test.rb
|
899
|
+
- test/system/fluentd/setting/out_stdout_test.rb
|
900
|
+
- test/system/fluentd/setting/out_tdlog_test.rb
|
901
|
+
- test/system/source_and_output_test.rb
|
902
|
+
- test/test_helper.rb
|
@@ -1,84 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
class DummyController < ApplicationController; end
|
4
|
-
|
5
|
-
describe DummyController do
|
6
|
-
controller DummyController do
|
7
|
-
skip_before_action :login_required
|
8
|
-
def index
|
9
|
-
render plain: "Hello World"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
describe '#set_locale' do
|
14
|
-
let!(:default_locale) { :en }
|
15
|
-
|
16
|
-
before do
|
17
|
-
I18n.locale = I18n.default_locale #initialize
|
18
|
-
end
|
19
|
-
|
20
|
-
context 'with params[:lang]' do
|
21
|
-
before do
|
22
|
-
get 'index', params: { lang: param_lang }
|
23
|
-
end
|
24
|
-
|
25
|
-
context 'and in available_locales' do
|
26
|
-
let(:param_lang) { :ja }
|
27
|
-
|
28
|
-
it 'params[:lang] will be set as locale' do
|
29
|
-
expect(I18n.locale).to eq :ja
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
context 'and out of available_locales' do
|
34
|
-
let(:param_lang) { :ka }
|
35
|
-
|
36
|
-
it 'defalut locale will be set as locale' do
|
37
|
-
expect(I18n.locale).to eq default_locale
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context 'with session[:prefer_lang]' do
|
43
|
-
before do
|
44
|
-
controller.session[:prefer_lang] = :ja
|
45
|
-
end
|
46
|
-
|
47
|
-
it 'session[:prefer_lang] will be set as locale' do
|
48
|
-
get 'index'
|
49
|
-
expect(I18n.locale).to eq :ja
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
context 'with request.env["HTTP_ACCEPT_LANGUAGE"]' do
|
54
|
-
before do
|
55
|
-
request.stub(:env).and_return({ "HTTP_ACCEPT_LANGUAGE" => accept_language })
|
56
|
-
get 'index'
|
57
|
-
end
|
58
|
-
|
59
|
-
context 'accept_language is available' do
|
60
|
-
let(:accept_language) { 'ja' }
|
61
|
-
|
62
|
-
it 'session[:prefer_lang] will be set as locale' do
|
63
|
-
expect(I18n.locale).to eq :ja
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
context 'accept_language is not available but start with en' do
|
68
|
-
let(:accept_language) { 'en-us' }
|
69
|
-
|
70
|
-
it ':en will be set as locale' do
|
71
|
-
expect(I18n.locale).to eq :en
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
context 'accept_language is not available' do
|
76
|
-
let(:accept_language) { 'ka' }
|
77
|
-
|
78
|
-
it 'default_locale will be set as locale' do
|
79
|
-
expect(I18n.locale).to eq default_locale
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|