bootstrap-propshaft 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +14 -0
- data/.github/workflows/ci.yml +61 -0
- data/.gitignore +19 -0
- data/CHANGELOG.md +25 -0
- data/Gemfile +12 -0
- data/LICENSE +21 -0
- data/README.md +138 -0
- data/Rakefile +89 -0
- data/assets/javascripts/bootstrap/alert.js +89 -0
- data/assets/javascripts/bootstrap/base-component.js +83 -0
- data/assets/javascripts/bootstrap/button.js +78 -0
- data/assets/javascripts/bootstrap/carousel.js +387 -0
- data/assets/javascripts/bootstrap/collapse.js +248 -0
- data/assets/javascripts/bootstrap/dom/data.js +62 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +236 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +71 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +103 -0
- data/assets/javascripts/bootstrap/dropdown.js +401 -0
- data/assets/javascripts/bootstrap/modal.js +319 -0
- data/assets/javascripts/bootstrap/offcanvas.js +245 -0
- data/assets/javascripts/bootstrap/popover.js +95 -0
- data/assets/javascripts/bootstrap/scrollspy.js +274 -0
- data/assets/javascripts/bootstrap/tab.js +284 -0
- data/assets/javascripts/bootstrap/toast.js +198 -0
- data/assets/javascripts/bootstrap/tooltip.js +545 -0
- data/assets/javascripts/bootstrap/util/backdrop.js +139 -0
- data/assets/javascripts/bootstrap/util/component-functions.js +41 -0
- data/assets/javascripts/bootstrap/util/config.js +67 -0
- data/assets/javascripts/bootstrap/util/focustrap.js +113 -0
- data/assets/javascripts/bootstrap/util/index.js +281 -0
- data/assets/javascripts/bootstrap/util/sanitizer.js +110 -0
- data/assets/javascripts/bootstrap/util/scrollbar.js +112 -0
- data/assets/javascripts/bootstrap/util/swipe.js +134 -0
- data/assets/javascripts/bootstrap/util/template-factory.js +150 -0
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +28 -0
- data/assets/javascripts/bootstrap.js +4493 -0
- data/assets/javascripts/bootstrap.min.js +6 -0
- data/assets/stylesheets/_bootstrap-grid.scss +62 -0
- data/assets/stylesheets/_bootstrap-reboot.scss +10 -0
- data/assets/stylesheets/_bootstrap-utilities.scss +19 -0
- data/assets/stylesheets/_bootstrap.scss +52 -0
- data/assets/stylesheets/bootstrap/_accordion.scss +158 -0
- data/assets/stylesheets/bootstrap/_alert.scss +68 -0
- data/assets/stylesheets/bootstrap/_badge.scss +38 -0
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +40 -0
- data/assets/stylesheets/bootstrap/_button-group.scss +142 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +207 -0
- data/assets/stylesheets/bootstrap/_card.scss +239 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +244 -0
- data/assets/stylesheets/bootstrap/_close.scss +63 -0
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +250 -0
- data/assets/stylesheets/bootstrap/_forms.scss +9 -0
- data/assets/stylesheets/bootstrap/_functions.scss +302 -0
- data/assets/stylesheets/bootstrap/_grid.scss +39 -0
- data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
- data/assets/stylesheets/bootstrap/_images.scss +42 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +197 -0
- data/assets/stylesheets/bootstrap/_maps.scss +174 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +42 -0
- data/assets/stylesheets/bootstrap/_modal.scss +237 -0
- data/assets/stylesheets/bootstrap/_nav.scss +197 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +289 -0
- data/assets/stylesheets/bootstrap/_offcanvas.scss +146 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +109 -0
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +196 -0
- data/assets/stylesheets/bootstrap/_progress.scss +68 -0
- data/assets/stylesheets/bootstrap/_reboot.scss +611 -0
- data/assets/stylesheets/bootstrap/_root.scss +187 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +85 -0
- data/assets/stylesheets/bootstrap/_tables.scss +171 -0
- data/assets/stylesheets/bootstrap/_toasts.scss +73 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +119 -0
- data/assets/stylesheets/bootstrap/_transitions.scss +27 -0
- data/assets/stylesheets/bootstrap/_type.scss +106 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +806 -0
- data/assets/stylesheets/bootstrap/_variables-dark.scss +87 -0
- data/assets/stylesheets/bootstrap/_variables.scss +1747 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +95 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +189 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +214 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +80 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +132 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_clearfix.scss +3 -0
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
- data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +36 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +78 -0
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +127 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +70 -0
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +69 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +153 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +47 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +151 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +16 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +26 -0
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +26 -0
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +97 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +33 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +348 -0
- data/bootstrap.gemspec +39 -0
- data/lib/bootstrap/engine.rb +22 -0
- data/lib/bootstrap/version.rb +6 -0
- data/lib/bootstrap.rb +75 -0
- data/tasks/updater/js.rb +92 -0
- data/tasks/updater/logger.rb +57 -0
- data/tasks/updater/network.rb +109 -0
- data/tasks/updater/scss.rb +26 -0
- data/tasks/updater.rb +67 -0
- data/test/dummy_rails/README.rdoc +3 -0
- data/test/dummy_rails/Rakefile +6 -0
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/images/.keep +0 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +8 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/dummy_rails/app/assets/stylesheets/application.sass +4 -0
- data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
- data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
- data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +16 -0
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +32 -0
- data/test/dummy_rails/config/boot.rb +5 -0
- data/test/dummy_rails/config/environment.rb +5 -0
- data/test/dummy_rails/config/environments/development.rb +23 -0
- data/test/dummy_rails/config/environments/production.rb +82 -0
- data/test/dummy_rails/config/environments/test.rb +38 -0
- data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy_rails/config/initializers/inflections.rb +16 -0
- data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
- data/test/dummy_rails/config/initializers/session_store.rb +3 -0
- data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_rails/config/locales/en.yml +3 -0
- data/test/dummy_rails/config/locales/es.yml +3 -0
- data/test/dummy_rails/config/routes.rb +3 -0
- data/test/dummy_rails/config.ru +4 -0
- data/test/dummy_rails/log/.keep +0 -0
- data/test/gemfiles/rails_4_2.gemfile +7 -0
- data/test/gemfiles/rails_5_0.gemfile +8 -0
- data/test/gemfiles/rails_5_1.gemfile +8 -0
- data/test/gemfiles/rails_5_2.gemfile +8 -0
- data/test/gemfiles/rails_6_0.gemfile +8 -0
- data/test/gemfiles/rails_6_1.gemfile +8 -0
- data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
- data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
- data/test/rails_test.rb +24 -0
- data/test/support/dummy_rails_integration.rb +31 -0
- data/test/support/reporting.rb +27 -0
- data/test/test_helper.rb +42 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +471 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
if config.respond_to?(:serve_static_files)
|
17
|
+
# rails >= 4.2
|
18
|
+
config.serve_static_files = true
|
19
|
+
elsif config.respond_to?(:serve_static_assets)
|
20
|
+
# rails < 4.2
|
21
|
+
config.serve_static_assets = true
|
22
|
+
end
|
23
|
+
config.static_cache_control = "public, max-age=3600"
|
24
|
+
|
25
|
+
# Show full error reports and disable caching.
|
26
|
+
config.consider_all_requests_local = true
|
27
|
+
config.action_controller.perform_caching = false
|
28
|
+
|
29
|
+
# Raise exceptions instead of rendering exception templates.
|
30
|
+
config.action_dispatch.show_exceptions = false
|
31
|
+
|
32
|
+
# Disable request forgery protection in test environment.
|
33
|
+
config.action_controller.allow_forgery_protection = false
|
34
|
+
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
config.active_support.deprecation = :stderr
|
38
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
token = '4380f36fda304251bf48f12ad4474b6d11447f1f959bd5b77a5d56c92b97f4c403ee0ae13d31a85ed88058ff8795bf31ec17e70e5c229b3707a77a2ee7e81cc'
|
13
|
+
|
14
|
+
if Dummy::Application.config.respond_to?(:secret_key_base=)
|
15
|
+
Dummy::Application.config.secret_key_base = token
|
16
|
+
else
|
17
|
+
Dummy::Application.config.secret_token = token
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
File without changes
|
data/test/rails_test.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'test_helper_rails'
|
2
|
+
|
3
|
+
class RailsTest < ActionDispatch::IntegrationTest
|
4
|
+
include ::DummyRailsIntegration
|
5
|
+
|
6
|
+
def test_visit_root
|
7
|
+
visit root_path
|
8
|
+
# ^ will raise on JS errors
|
9
|
+
|
10
|
+
assert_equal 200, page.status_code
|
11
|
+
|
12
|
+
screenshot!
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_autoprefixer
|
16
|
+
get ActionController::Base.helpers.stylesheet_path('application.css')
|
17
|
+
assert_match(/-webkit-(?:transition|transform)/, response.body)
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_precompile
|
21
|
+
Dummy::Application.load_tasks
|
22
|
+
Rake::Task['assets:precompile'].invoke
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'capybara/dsl'
|
2
|
+
require 'fileutils'
|
3
|
+
module DummyRailsIntegration
|
4
|
+
include Capybara::DSL
|
5
|
+
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
cleanup_dummy_rails_files
|
9
|
+
end
|
10
|
+
|
11
|
+
def teardown
|
12
|
+
super
|
13
|
+
cleanup_dummy_rails_files
|
14
|
+
Capybara.reset_sessions!
|
15
|
+
Capybara.use_default_driver
|
16
|
+
end
|
17
|
+
|
18
|
+
def screenshot!
|
19
|
+
path = "tmp/#{name}.png"
|
20
|
+
full_path = File.join(GEM_PATH, path)
|
21
|
+
FileUtils.mkdir_p(File.dirname(full_path))
|
22
|
+
page.driver.render(full_path, full: true)
|
23
|
+
STDERR.puts "Screenshot saved to #{path}"
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
def cleanup_dummy_rails_files
|
28
|
+
FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
|
29
|
+
FileUtils.rm Dir.glob('test/dummy_rails/public/assets/{.[^\.]*,*}')
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Kernel
|
2
|
+
def silence_stdout_if(cond, &run)
|
3
|
+
silence_stream_if(cond, STDOUT, &run)
|
4
|
+
end
|
5
|
+
|
6
|
+
def silence_stderr_if(cond, &run)
|
7
|
+
silence_stream_if(cond, STDERR, &run)
|
8
|
+
end
|
9
|
+
|
10
|
+
def silence_stream_if(cond, stream, &run)
|
11
|
+
if cond
|
12
|
+
silence_stream(stream, &run)
|
13
|
+
else
|
14
|
+
run.call
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def silence_stream(stream)
|
19
|
+
old_stream = stream.dup
|
20
|
+
stream.reopen(File::NULL)
|
21
|
+
stream.sync = true
|
22
|
+
yield
|
23
|
+
ensure
|
24
|
+
stream.reopen(old_stream)
|
25
|
+
old_stream.close
|
26
|
+
end unless method_defined?(:silence_stream)
|
27
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/reporters'
|
3
|
+
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
|
4
|
+
|
5
|
+
require 'active_support/core_ext/kernel/reporting'
|
6
|
+
|
7
|
+
Dir['test/support/**/*.rb'].each do |file|
|
8
|
+
# strip ^test/ and .rb$
|
9
|
+
file = file[5..-4]
|
10
|
+
require_relative File.join('.', file)
|
11
|
+
end
|
12
|
+
|
13
|
+
GEM_PATH = File.expand_path('../', File.dirname(__FILE__))
|
14
|
+
|
15
|
+
#= Capybara
|
16
|
+
require 'capybara/cuprite'
|
17
|
+
|
18
|
+
browser_path = ENV['CHROMIUM_BIN'] || %w[
|
19
|
+
/usr/bin/chromium-browser
|
20
|
+
/snap/bin/chromium
|
21
|
+
/Applications/Chromium.app/Contents/MacOS/Chromium
|
22
|
+
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
|
23
|
+
].find { |path| File.executable?(path) }
|
24
|
+
|
25
|
+
Capybara.register_driver :cuprite do |app|
|
26
|
+
options = {
|
27
|
+
window_size: [1280, 1024],
|
28
|
+
timeout: 15,
|
29
|
+
process_timeout: 15
|
30
|
+
}
|
31
|
+
options[:browser_path] = browser_path if browser_path
|
32
|
+
Capybara::Cuprite::Driver.new(app, options)
|
33
|
+
end
|
34
|
+
|
35
|
+
Capybara.configure do |config|
|
36
|
+
config.server = :webrick
|
37
|
+
config.app_host = 'http://localhost:7000'
|
38
|
+
config.default_driver = :cuprite
|
39
|
+
config.javascript_driver = :cuprite
|
40
|
+
config.server_port = 7000
|
41
|
+
config.default_max_wait_time = 10
|
42
|
+
end
|