staff_bar 0.1.0 → 0.1.1
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 +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +2 -2
- data/app/views/staff_bar/_staff_bar.html.erb +1 -1
- data/lib/staff_bar/version.rb +1 -1
- metadata +3 -66
- data/.gitignore +0 -8
- data/Gemfile +0 -15
- data/Gemfile.lock +0 -149
- data/Rakefile +0 -27
- data/bin/test +0 -5
- data/preview-sm.png +0 -0
- data/preview.png +0 -0
- data/staff_bar.gemspec +0 -24
- data/test/dummy/.ruby-version +0 -1
- data/test/dummy/BRANCH +0 -1
- data/test/dummy/REVISION +0 -1
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/config/manifest.js +0 -2
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/channels/application_cable/channel.rb +0 -4
- data/test/dummy/app/channels/application_cable/connection.rb +0 -4
- data/test/dummy/app/controllers/application_controller.rb +0 -2
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/javascript/packs/application.js +0 -15
- data/test/dummy/app/jobs/application_job.rb +0 -7
- data/test/dummy/app/mailers/application_mailer.rb +0 -4
- data/test/dummy/app/models/application_record.rb +0 -3
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/test/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -33
- data/test/dummy/config/application.rb +0 -19
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/cable.yml +0 -10
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -62
- data/test/dummy/config/environments/production.rb +0 -112
- data/test/dummy/config/environments/test.rb +0 -48
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/test/dummy/config/initializers/assets.rb +0 -12
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/content_security_policy.rb +0 -28
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -33
- data/test/dummy/config/puma.rb +0 -38
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/config/spring.rb +0 -6
- data/test/dummy/config/storage.yml +0 -34
- data/test/dummy/config.ru +0 -5
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/staff_bar_test.rb +0 -67
- data/test/test_helper.rb +0 -20
File without changes
|
data/test/staff_bar_test.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class StaffBar::Test < ActiveSupport::TestCase
|
4
|
-
def setup
|
5
|
-
Rails.application.config.action_controller.perform_caching = false
|
6
|
-
end
|
7
|
-
|
8
|
-
test "revision" do
|
9
|
-
assert_equal "abcd123", StaffBar.revision
|
10
|
-
end
|
11
|
-
|
12
|
-
test "branch" do
|
13
|
-
assert_equal "foo-branch", StaffBar.branch
|
14
|
-
end
|
15
|
-
|
16
|
-
test "rails_version" do
|
17
|
-
assert_equal "6.0.0", StaffBar.rails_version
|
18
|
-
end
|
19
|
-
|
20
|
-
test "environment" do
|
21
|
-
assert_equal "test", StaffBar.environment
|
22
|
-
end
|
23
|
-
|
24
|
-
test "time" do
|
25
|
-
travel_to Time.zone.parse("2019-10-01 00:00:00") do
|
26
|
-
assert_equal "2019-10-01 00:00:00 UTC", StaffBar.time
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
test "time_zone" do
|
31
|
-
assert_equal "Etc/UTC", StaffBar.time_zone
|
32
|
-
end
|
33
|
-
|
34
|
-
test "cache" do
|
35
|
-
assert_equal "Caching disabled", StaffBar.cache
|
36
|
-
|
37
|
-
Rails.application.config.action_controller.perform_caching = true
|
38
|
-
assert_equal "Caching enabled", StaffBar.cache
|
39
|
-
end
|
40
|
-
|
41
|
-
test "cache_class" do
|
42
|
-
assert_equal "", StaffBar.cache_class
|
43
|
-
|
44
|
-
Rails.application.config.action_controller.perform_caching = true
|
45
|
-
assert_equal "staff-bar-green", StaffBar.cache_class
|
46
|
-
end
|
47
|
-
|
48
|
-
test "position_class" do
|
49
|
-
assert_equal "staff-bar-bottom", StaffBar.position_class
|
50
|
-
|
51
|
-
StaffBar.config.position = :top
|
52
|
-
assert_equal "staff-bar-top", StaffBar.position_class
|
53
|
-
|
54
|
-
StaffBar.config.position = :foobar
|
55
|
-
assert_equal "staff-bar-bottom", StaffBar.position_class
|
56
|
-
end
|
57
|
-
|
58
|
-
test "theme_class" do
|
59
|
-
assert_equal "", StaffBar.theme_class
|
60
|
-
|
61
|
-
StaffBar.config.theme = :light
|
62
|
-
assert_equal "staff-bar-inverse", StaffBar.theme_class
|
63
|
-
|
64
|
-
StaffBar.config.theme = :foobar
|
65
|
-
assert_equal "", StaffBar.theme_class
|
66
|
-
end
|
67
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# Configure Rails Environment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require_relative "../test/dummy/config/environment"
|
5
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
|
6
|
-
require "rails/test_help"
|
7
|
-
|
8
|
-
# Filter out the backtrace from minitest while preserving the one from other libraries.
|
9
|
-
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
10
|
-
|
11
|
-
require "rails/test_unit/reporter"
|
12
|
-
Rails::TestUnitReporter.executable = 'bin/test'
|
13
|
-
|
14
|
-
# Load fixtures from the engine
|
15
|
-
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
16
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__)
|
17
|
-
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
18
|
-
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
|
19
|
-
ActiveSupport::TestCase.fixtures :all
|
20
|
-
end
|