nex-bootstrap 4.6.3
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/.gitignore +19 -0
- data/.travis.yml +31 -0
- data/CHANGELOG.md +25 -0
- data/Gemfile +11 -0
- data/LICENSE +21 -0
- data/README.md +109 -0
- data/Rakefile +63 -0
- data/assets/javascripts/bootstrap/alert.js +183 -0
- data/assets/javascripts/bootstrap/button.js +225 -0
- data/assets/javascripts/bootstrap/carousel.js +640 -0
- data/assets/javascripts/bootstrap/collapse.js +394 -0
- data/assets/javascripts/bootstrap/dropdown.js +557 -0
- data/assets/javascripts/bootstrap/modal.js +660 -0
- data/assets/javascripts/bootstrap/popover.js +243 -0
- data/assets/javascripts/bootstrap/scrollspy.js +337 -0
- data/assets/javascripts/bootstrap/tab.js +259 -0
- data/assets/javascripts/bootstrap/toast.js +265 -0
- data/assets/javascripts/bootstrap/tooltip.js +886 -0
- data/assets/javascripts/bootstrap/util.js +189 -0
- data/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/assets/javascripts/bootstrap.js +4356 -0
- data/assets/javascripts/bootstrap.min.js +6 -0
- data/assets/stylesheets/_bootstrap-grid.scss +30 -0
- data/assets/stylesheets/_bootstrap-reboot.scss +12 -0
- data/assets/stylesheets/_bootstrap.scss +44 -0
- data/assets/stylesheets/bootstrap/_alert.scss +52 -0
- data/assets/stylesheets/bootstrap/_badge.scss +54 -0
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +42 -0
- data/assets/stylesheets/bootstrap/_button-group.scss +163 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +142 -0
- data/assets/stylesheets/bootstrap/_card.scss +286 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +200 -0
- data/assets/stylesheets/bootstrap/_close.scss +40 -0
- data/assets/stylesheets/bootstrap/_code.scss +48 -0
- data/assets/stylesheets/bootstrap/_custom-forms.scss +526 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +192 -0
- data/assets/stylesheets/bootstrap/_forms.scss +347 -0
- data/assets/stylesheets/bootstrap/_functions.scss +190 -0
- data/assets/stylesheets/bootstrap/_grid.scss +73 -0
- data/assets/stylesheets/bootstrap/_images.scss +42 -0
- data/assets/stylesheets/bootstrap/_input-group.scss +211 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +17 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +154 -0
- data/assets/stylesheets/bootstrap/_media.scss +8 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +47 -0
- data/assets/stylesheets/bootstrap/_modal.scss +240 -0
- data/assets/stylesheets/bootstrap/_nav.scss +125 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +332 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +74 -0
- data/assets/stylesheets/bootstrap/_popover.scss +170 -0
- data/assets/stylesheets/bootstrap/_print.scss +132 -0
- data/assets/stylesheets/bootstrap/_progress.scss +47 -0
- data/assets/stylesheets/bootstrap/_reboot.scss +484 -0
- data/assets/stylesheets/bootstrap/_root.scss +19 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +65 -0
- data/assets/stylesheets/bootstrap/_tables.scss +185 -0
- data/assets/stylesheets/bootstrap/_toasts.scss +46 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +115 -0
- data/assets/stylesheets/bootstrap/_transitions.scss +26 -0
- data/assets/stylesheets/bootstrap/_type.scss +125 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/_variables.scss +1149 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +13 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +23 -0
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +76 -0
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +20 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +123 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +110 -0
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +62 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +195 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +45 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +80 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +69 -0
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +37 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +36 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +22 -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/_screen-reader.scss +34 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +39 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +11 -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/_visibility.scss +8 -0
- data/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
- data/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +75 -0
- data/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
- data/assets/stylesheets/bootstrap/utilities/_display.scss +26 -0
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +39 -0
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +51 -0
- data/assets/stylesheets/bootstrap/utilities/_float.scss +11 -0
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_position.scss +32 -0
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +20 -0
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +73 -0
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +72 -0
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +13 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +228 -0
- data/bootstrap.gemspec +38 -0
- data/lib/bootstrap/engine.rb +15 -0
- data/lib/bootstrap/version.rb +6 -0
- data/lib/bootstrap.rb +75 -0
- data/tasks/updater/js.rb +68 -0
- data/tasks/updater/logger.rb +57 -0
- data/tasks/updater/network.rb +103 -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 +7 -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 +14 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +58 -0
- data/test/dummy_rails/config/application.rb +35 -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_6_0.gemfile +7 -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 +41 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +445 -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,41 @@
|
|
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
|
+
}
|
29
|
+
options[:browser_path] = browser_path if browser_path
|
30
|
+
Capybara::Cuprite::Driver.new(app, options)
|
31
|
+
end
|
32
|
+
|
33
|
+
Capybara.configure do |config|
|
34
|
+
config.server = :webrick
|
35
|
+
config.app_host = 'http://localhost:7000'
|
36
|
+
config.default_driver = :cuprite
|
37
|
+
config.javascript_driver = :cuprite
|
38
|
+
config.server_port = 7000
|
39
|
+
config.default_max_wait_time = 10
|
40
|
+
end
|
41
|
+
|