bootstrap 4.2.1 → 4.5.2
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/.travis.yml +15 -1
- data/CHANGELOG.md +2 -14
- data/README.md +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +7 -7
- data/assets/javascripts/bootstrap.js +1054 -893
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +35 -57
- data/assets/javascripts/bootstrap/button.js +95 -69
- data/assets/javascripts/bootstrap/carousel.js +109 -165
- data/assets/javascripts/bootstrap/collapse.js +58 -114
- data/assets/javascripts/bootstrap/dropdown.js +138 -191
- data/assets/javascripts/bootstrap/modal.js +170 -176
- data/assets/javascripts/bootstrap/popover.js +31 -87
- data/assets/javascripts/bootstrap/scrollspy.js +54 -114
- data/assets/javascripts/bootstrap/tab.js +62 -81
- data/assets/javascripts/bootstrap/toast.js +80 -117
- data/assets/javascripts/bootstrap/tooltip.js +269 -157
- data/assets/javascripts/bootstrap/util.js +34 -9
- data/assets/stylesheets/_bootstrap-grid.scss +4 -4
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
- data/assets/stylesheets/_bootstrap.scss +4 -4
- data/assets/stylesheets/bootstrap/_badge.scss +3 -2
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
- data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +13 -11
- data/assets/stylesheets/bootstrap/_card.scss +49 -73
- data/assets/stylesheets/bootstrap/_carousel.scss +7 -8
- data/assets/stylesheets/bootstrap/_close.scss +3 -7
- data/assets/stylesheets/bootstrap/_code.scss +6 -6
- data/assets/stylesheets/bootstrap/_custom-forms.scss +40 -24
- data/assets/stylesheets/bootstrap/_dropdown.scss +24 -23
- data/assets/stylesheets/bootstrap/_forms.scss +38 -25
- data/assets/stylesheets/bootstrap/_functions.scss +62 -7
- data/assets/stylesheets/bootstrap/_grid.scss +32 -11
- data/assets/stylesheets/bootstrap/_images.scss +3 -3
- data/assets/stylesheets/bootstrap/_input-group.scss +4 -5
- data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +62 -29
- data/assets/stylesheets/bootstrap/_mixins.scss +9 -3
- data/assets/stylesheets/bootstrap/_modal.scss +65 -11
- data/assets/stylesheets/bootstrap/_nav.scss +6 -3
- data/assets/stylesheets/bootstrap/_navbar.scss +48 -23
- data/assets/stylesheets/bootstrap/_pagination.scss +3 -7
- data/assets/stylesheets/bootstrap/_popover.scss +54 -67
- data/assets/stylesheets/bootstrap/_print.scss +3 -3
- data/assets/stylesheets/bootstrap/_progress.scss +19 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +51 -33
- data/assets/stylesheets/bootstrap/_root.scss +1 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +3 -0
- data/assets/stylesheets/bootstrap/_tables.scss +6 -8
- data/assets/stylesheets/bootstrap/_toasts.scss +7 -4
- data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
- data/assets/stylesheets/bootstrap/_transitions.scss +0 -2
- data/assets/stylesheets/bootstrap/_type.scss +17 -17
- data/assets/stylesheets/bootstrap/_utilities.scss +2 -0
- data/assets/stylesheets/bootstrap/_variables.scss +168 -119
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +14 -15
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +12 -12
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +6 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +40 -60
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +29 -15
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +25 -7
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_image.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -3
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +13 -1
- data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
- data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +8 -3
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +1 -1
- data/tasks/updater/network.rb +2 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +14 -5
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
// stylelint-disable declaration-no-important
|
|
2
|
+
|
|
1
3
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
2
4
|
@include media-breakpoint-up($breakpoint) {
|
|
3
5
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
4
6
|
|
|
5
|
-
.float#{$infix}-left {
|
|
6
|
-
.float#{$infix}-right {
|
|
7
|
-
.float#{$infix}-none {
|
|
7
|
+
.float#{$infix}-left { float: left !important; }
|
|
8
|
+
.float#{$infix}-right { float: right !important; }
|
|
9
|
+
.float#{$infix}-none { float: none !important; }
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Stretched link
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.stretched-link {
|
|
6
|
+
&::after {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
right: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
z-index: 1;
|
|
13
|
+
// Just in case `pointer-events: none` is set on a parent
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
content: "";
|
|
16
|
+
// IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color
|
|
17
|
+
background-color: rgba(0, 0, 0, 0);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
// Text
|
|
5
5
|
//
|
|
6
6
|
|
|
7
|
-
.text-monospace { font-family: $font-family-monospace; }
|
|
7
|
+
.text-monospace { font-family: $font-family-monospace !important; }
|
|
8
8
|
|
|
9
9
|
// Alignment
|
|
10
10
|
|
|
11
11
|
.text-justify { text-align: justify !important; }
|
|
12
12
|
.text-wrap { white-space: normal !important; }
|
|
13
13
|
.text-nowrap { white-space: nowrap !important; }
|
|
14
|
-
.text-truncate { @include text-truncate; }
|
|
14
|
+
.text-truncate { @include text-truncate(); }
|
|
15
15
|
|
|
16
16
|
// Responsive alignment
|
|
17
17
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
.text-white { color: $white !important; }
|
|
46
46
|
|
|
47
47
|
@each $color, $value in $theme-colors {
|
|
48
|
-
@include text-emphasis-variant(".text-#{$color}", $value);
|
|
48
|
+
@include text-emphasis-variant(".text-#{$color}", $value, true);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.text-body { color: $body-color !important; }
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
|
|
63
63
|
.text-decoration-none { text-decoration: none !important; }
|
|
64
64
|
|
|
65
|
+
.text-break {
|
|
66
|
+
word-break: break-word !important; // IE & < Edge 18
|
|
67
|
+
overflow-wrap: break-word !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
65
70
|
// Reset
|
|
66
71
|
|
|
67
72
|
.text-reset { color: inherit !important; }
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
// stylelint-disable declaration-no-important
|
|
2
|
+
|
|
1
3
|
//
|
|
2
4
|
// Visibility utilities
|
|
3
5
|
//
|
|
4
6
|
|
|
5
7
|
.visible {
|
|
6
|
-
|
|
8
|
+
visibility: visible !important;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
.invisible {
|
|
10
|
-
|
|
12
|
+
visibility: hidden !important;
|
|
11
13
|
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
// stylelint-disable property-blacklist, scss/dollar-variable-default
|
|
2
|
+
|
|
3
|
+
// SCSS RFS mixin
|
|
4
|
+
//
|
|
5
|
+
// Automated font-resizing
|
|
6
|
+
//
|
|
7
|
+
// See https://github.com/twbs/rfs
|
|
8
|
+
|
|
9
|
+
// Configuration
|
|
10
|
+
|
|
11
|
+
// Base font size
|
|
12
|
+
$rfs-base-font-size: 1.25rem !default;
|
|
13
|
+
$rfs-font-size-unit: rem !default;
|
|
14
|
+
|
|
15
|
+
// Breakpoint at where font-size starts decreasing if screen width is smaller
|
|
16
|
+
$rfs-breakpoint: 1200px !default;
|
|
17
|
+
$rfs-breakpoint-unit: px !default;
|
|
18
|
+
|
|
19
|
+
// Resize font-size based on screen height and width
|
|
20
|
+
$rfs-two-dimensional: false !default;
|
|
21
|
+
|
|
22
|
+
// Factor of decrease
|
|
23
|
+
$rfs-factor: 10 !default;
|
|
24
|
+
|
|
25
|
+
@if type-of($rfs-factor) != "number" or $rfs-factor <= 1 {
|
|
26
|
+
@error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Generate enable or disable classes. Possibilities: false, "enable" or "disable"
|
|
30
|
+
$rfs-class: false !default;
|
|
31
|
+
|
|
32
|
+
// 1 rem = $rfs-rem-value px
|
|
33
|
+
$rfs-rem-value: 16 !default;
|
|
34
|
+
|
|
35
|
+
// Safari iframe resize bug: https://github.com/twbs/rfs/issues/14
|
|
36
|
+
$rfs-safari-iframe-resize-bug-fix: false !default;
|
|
37
|
+
|
|
38
|
+
// Disable RFS by setting $enable-responsive-font-sizes to false
|
|
39
|
+
$enable-responsive-font-sizes: true !default;
|
|
40
|
+
|
|
41
|
+
// Cache $rfs-base-font-size unit
|
|
42
|
+
$rfs-base-font-size-unit: unit($rfs-base-font-size);
|
|
43
|
+
|
|
44
|
+
// Remove px-unit from $rfs-base-font-size for calculations
|
|
45
|
+
@if $rfs-base-font-size-unit == "px" {
|
|
46
|
+
$rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1);
|
|
47
|
+
}
|
|
48
|
+
@else if $rfs-base-font-size-unit == "rem" {
|
|
49
|
+
$rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1 / $rfs-rem-value);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Cache $rfs-breakpoint unit to prevent multiple calls
|
|
53
|
+
$rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
|
|
54
|
+
|
|
55
|
+
// Remove unit from $rfs-breakpoint for calculations
|
|
56
|
+
@if $rfs-breakpoint-unit-cache == "px" {
|
|
57
|
+
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
|
|
58
|
+
}
|
|
59
|
+
@else if $rfs-breakpoint-unit-cache == "rem" or $rfs-breakpoint-unit-cache == "em" {
|
|
60
|
+
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Responsive font-size mixin
|
|
64
|
+
@mixin rfs($fs, $important: false) {
|
|
65
|
+
// Cache $fs unit
|
|
66
|
+
$fs-unit: if(type-of($fs) == "number", unit($fs), false);
|
|
67
|
+
|
|
68
|
+
// Add !important suffix if needed
|
|
69
|
+
$rfs-suffix: if($important, " !important", "");
|
|
70
|
+
|
|
71
|
+
// If $fs isn't a number (like inherit) or $fs has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
|
|
72
|
+
@if not $fs-unit or $fs-unit != "" and $fs-unit != "px" and $fs-unit != "rem" or $fs == 0 {
|
|
73
|
+
font-size: #{$fs}#{$rfs-suffix};
|
|
74
|
+
}
|
|
75
|
+
@else {
|
|
76
|
+
// Variables for storing static and fluid rescaling
|
|
77
|
+
$rfs-static: null;
|
|
78
|
+
$rfs-fluid: null;
|
|
79
|
+
|
|
80
|
+
// Remove px-unit from $fs for calculations
|
|
81
|
+
@if $fs-unit == "px" {
|
|
82
|
+
$fs: $fs / ($fs * 0 + 1);
|
|
83
|
+
}
|
|
84
|
+
@else if $fs-unit == "rem" {
|
|
85
|
+
$fs: $fs / ($fs * 0 + 1 / $rfs-rem-value);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Set default font-size
|
|
89
|
+
@if $rfs-font-size-unit == rem {
|
|
90
|
+
$rfs-static: #{$fs / $rfs-rem-value}rem#{$rfs-suffix};
|
|
91
|
+
}
|
|
92
|
+
@else if $rfs-font-size-unit == px {
|
|
93
|
+
$rfs-static: #{$fs}px#{$rfs-suffix};
|
|
94
|
+
}
|
|
95
|
+
@else {
|
|
96
|
+
@error "`#{$rfs-font-size-unit}` is not a valid unit for $rfs-font-size-unit. Use `px` or `rem`.";
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Only add media query if font-size is bigger as the minimum font-size
|
|
100
|
+
// If $rfs-factor == 1, no rescaling will take place
|
|
101
|
+
@if $fs > $rfs-base-font-size and $enable-responsive-font-sizes {
|
|
102
|
+
$min-width: null;
|
|
103
|
+
$variable-unit: null;
|
|
104
|
+
|
|
105
|
+
// Calculate minimum font-size for given font-size
|
|
106
|
+
$fs-min: $rfs-base-font-size + ($fs - $rfs-base-font-size) / $rfs-factor;
|
|
107
|
+
|
|
108
|
+
// Calculate difference between given font-size and minimum font-size for given font-size
|
|
109
|
+
$fs-diff: $fs - $fs-min;
|
|
110
|
+
|
|
111
|
+
// Base font-size formatting
|
|
112
|
+
// No need to check if the unit is valid, because we did that before
|
|
113
|
+
$min-width: if($rfs-font-size-unit == rem, #{$fs-min / $rfs-rem-value}rem, #{$fs-min}px);
|
|
114
|
+
|
|
115
|
+
// If two-dimensional, use smallest of screen width and height
|
|
116
|
+
$variable-unit: if($rfs-two-dimensional, vmin, vw);
|
|
117
|
+
|
|
118
|
+
// Calculate the variable width between 0 and $rfs-breakpoint
|
|
119
|
+
$variable-width: #{$fs-diff * 100 / $rfs-breakpoint}#{$variable-unit};
|
|
120
|
+
|
|
121
|
+
// Set the calculated font-size.
|
|
122
|
+
$rfs-fluid: calc(#{$min-width} + #{$variable-width}) #{$rfs-suffix};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Rendering
|
|
126
|
+
@if $rfs-fluid == null {
|
|
127
|
+
// Only render static font-size if no fluid font-size is available
|
|
128
|
+
font-size: $rfs-static;
|
|
129
|
+
}
|
|
130
|
+
@else {
|
|
131
|
+
$mq-value: null;
|
|
132
|
+
|
|
133
|
+
// RFS breakpoint formatting
|
|
134
|
+
@if $rfs-breakpoint-unit == em or $rfs-breakpoint-unit == rem {
|
|
135
|
+
$mq-value: #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit};
|
|
136
|
+
}
|
|
137
|
+
@else if $rfs-breakpoint-unit == px {
|
|
138
|
+
$mq-value: #{$rfs-breakpoint}px;
|
|
139
|
+
}
|
|
140
|
+
@else {
|
|
141
|
+
@error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@if $rfs-class == "disable" {
|
|
145
|
+
// Adding an extra class increases specificity,
|
|
146
|
+
// which prevents the media query to override the font size
|
|
147
|
+
&,
|
|
148
|
+
.disable-responsive-font-size &,
|
|
149
|
+
&.disable-responsive-font-size {
|
|
150
|
+
font-size: $rfs-static;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
@else {
|
|
154
|
+
font-size: $rfs-static;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@if $rfs-two-dimensional {
|
|
158
|
+
@media (max-width: #{$mq-value}), (max-height: #{$mq-value}) {
|
|
159
|
+
@if $rfs-class == "enable" {
|
|
160
|
+
.enable-responsive-font-size &,
|
|
161
|
+
&.enable-responsive-font-size {
|
|
162
|
+
font-size: $rfs-fluid;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
@else {
|
|
166
|
+
font-size: $rfs-fluid;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@if $rfs-safari-iframe-resize-bug-fix {
|
|
170
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
171
|
+
min-width: 0vw;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
@else {
|
|
176
|
+
@media (max-width: #{$mq-value}) {
|
|
177
|
+
@if $rfs-class == "enable" {
|
|
178
|
+
.enable-responsive-font-size &,
|
|
179
|
+
&.enable-responsive-font-size {
|
|
180
|
+
font-size: $rfs-fluid;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
@else {
|
|
184
|
+
font-size: $rfs-fluid;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@if $rfs-safari-iframe-resize-bug-fix {
|
|
188
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
189
|
+
min-width: 0vw;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// The font-size & responsive-font-size mixin uses RFS to rescale font sizes
|
|
198
|
+
@mixin font-size($fs, $important: false) {
|
|
199
|
+
@include rfs($fs, $important);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@mixin responsive-font-size($fs, $important: false) {
|
|
203
|
+
@include rfs($fs, $important);
|
|
204
|
+
}
|
data/bootstrap.gemspec
CHANGED
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
s.add_development_dependency 'term-ansicolor'
|
|
26
26
|
# Integration testing
|
|
27
27
|
s.add_development_dependency 'capybara', '>= 2.6.0'
|
|
28
|
-
s.add_development_dependency '
|
|
28
|
+
s.add_development_dependency 'cuprite'
|
|
29
29
|
# Dummy Rails app dependencies
|
|
30
30
|
s.add_development_dependency 'actionpack', '>= 4.1.5'
|
|
31
31
|
s.add_development_dependency 'activesupport', '>= 4.1.5'
|
data/lib/bootstrap/version.rb
CHANGED
data/tasks/updater/js.rb
CHANGED
|
@@ -29,7 +29,7 @@ class Updater
|
|
|
29
29
|
|
|
30
30
|
def bootstrap_js_files
|
|
31
31
|
@bootstrap_js_files ||= begin
|
|
32
|
-
src_files = get_paths_by_type('js/src', /\.js$/) - %w[index.js]
|
|
32
|
+
src_files = get_paths_by_type('js/src', /\.js$/) - %w[index.js tools/sanitizer.js]
|
|
33
33
|
imports = Deps.new
|
|
34
34
|
# Get the imports from the ES6 files to order requires correctly.
|
|
35
35
|
read_files('js/src', src_files).each do |name, content|
|
data/tasks/updater/network.rb
CHANGED
|
@@ -25,7 +25,7 @@ class Updater
|
|
|
25
25
|
log_http_get_files files, path_url, false
|
|
26
26
|
files.map do |name|
|
|
27
27
|
Thread.start {
|
|
28
|
-
contents[name] = open("#{path_url}/#{name}").read
|
|
28
|
+
contents[name] = URI.open("#{path_url}/#{name}").read
|
|
29
29
|
WRITE_FILES_MUTEX.synchronize { write_cached_files path, name => contents[name] }
|
|
30
30
|
}
|
|
31
31
|
end.each(&:join)
|
|
@@ -62,7 +62,7 @@ class Updater
|
|
|
62
62
|
File.read(cache_path, mode: 'rb')
|
|
63
63
|
else
|
|
64
64
|
log_http_get_file url, false
|
|
65
|
-
content = open(url).read
|
|
65
|
+
content = URI.open(url).read
|
|
66
66
|
File.open(cache_path, 'wb') { |f| f.write content }
|
|
67
67
|
content
|
|
68
68
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Chrome >= 25
|
|
@@ -17,7 +17,9 @@ module DummyRailsIntegration
|
|
|
17
17
|
|
|
18
18
|
def screenshot!
|
|
19
19
|
path = "tmp/#{name}.png"
|
|
20
|
-
|
|
20
|
+
full_path = File.join(GEM_PATH, path)
|
|
21
|
+
FileUtils.mkdir_p(File.dirname(full_path))
|
|
22
|
+
page.driver.render(full_path, full: true)
|
|
21
23
|
STDERR.puts "Screenshot saved to #{path}"
|
|
22
24
|
end
|
|
23
25
|
|
data/test/test_helper.rb
CHANGED
|
@@ -12,24 +12,29 @@ end
|
|
|
12
12
|
|
|
13
13
|
GEM_PATH = File.expand_path('../', File.dirname(__FILE__))
|
|
14
14
|
|
|
15
|
-
#= Capybara
|
|
16
|
-
require 'capybara/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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)
|
|
26
31
|
end
|
|
27
32
|
|
|
28
33
|
Capybara.configure do |config|
|
|
29
34
|
config.server = :webrick
|
|
30
35
|
config.app_host = 'http://localhost:7000'
|
|
31
|
-
config.default_driver = :
|
|
32
|
-
config.javascript_driver = :
|
|
36
|
+
config.default_driver = :cuprite
|
|
37
|
+
config.javascript_driver = :cuprite
|
|
33
38
|
config.server_port = 7000
|
|
34
39
|
config.default_max_wait_time = 10
|
|
35
40
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bootstrap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.2
|
|
4
|
+
version: 4.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Twitter, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-08-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: popper_js
|
|
@@ -115,7 +115,7 @@ dependencies:
|
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
116
|
version: 2.6.0
|
|
117
117
|
- !ruby/object:Gem::Dependency
|
|
118
|
-
name:
|
|
118
|
+
name: cuprite
|
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - ">="
|
|
@@ -304,6 +304,7 @@ files:
|
|
|
304
304
|
- assets/stylesheets/bootstrap/mixins/_buttons.scss
|
|
305
305
|
- assets/stylesheets/bootstrap/mixins/_caret.scss
|
|
306
306
|
- assets/stylesheets/bootstrap/mixins/_clearfix.scss
|
|
307
|
+
- assets/stylesheets/bootstrap/mixins/_deprecate.scss
|
|
307
308
|
- assets/stylesheets/bootstrap/mixins/_float.scss
|
|
308
309
|
- assets/stylesheets/bootstrap/mixins/_forms.scss
|
|
309
310
|
- assets/stylesheets/bootstrap/mixins/_gradients.scss
|
|
@@ -333,14 +334,17 @@ files:
|
|
|
333
334
|
- assets/stylesheets/bootstrap/utilities/_embed.scss
|
|
334
335
|
- assets/stylesheets/bootstrap/utilities/_flex.scss
|
|
335
336
|
- assets/stylesheets/bootstrap/utilities/_float.scss
|
|
337
|
+
- assets/stylesheets/bootstrap/utilities/_interactions.scss
|
|
336
338
|
- assets/stylesheets/bootstrap/utilities/_overflow.scss
|
|
337
339
|
- assets/stylesheets/bootstrap/utilities/_position.scss
|
|
338
340
|
- assets/stylesheets/bootstrap/utilities/_screenreaders.scss
|
|
339
341
|
- assets/stylesheets/bootstrap/utilities/_shadows.scss
|
|
340
342
|
- assets/stylesheets/bootstrap/utilities/_sizing.scss
|
|
341
343
|
- assets/stylesheets/bootstrap/utilities/_spacing.scss
|
|
344
|
+
- assets/stylesheets/bootstrap/utilities/_stretched-link.scss
|
|
342
345
|
- assets/stylesheets/bootstrap/utilities/_text.scss
|
|
343
346
|
- assets/stylesheets/bootstrap/utilities/_visibility.scss
|
|
347
|
+
- assets/stylesheets/bootstrap/vendor/_rfs.scss
|
|
344
348
|
- bootstrap.gemspec
|
|
345
349
|
- lib/bootstrap.rb
|
|
346
350
|
- lib/bootstrap/engine.rb
|
|
@@ -352,8 +356,10 @@ files:
|
|
|
352
356
|
- tasks/updater/scss.rb
|
|
353
357
|
- test/dummy_rails/README.rdoc
|
|
354
358
|
- test/dummy_rails/Rakefile
|
|
359
|
+
- test/dummy_rails/app/assets/config/manifest.js
|
|
355
360
|
- test/dummy_rails/app/assets/images/.keep
|
|
356
361
|
- test/dummy_rails/app/assets/javascripts/application.js
|
|
362
|
+
- test/dummy_rails/app/assets/stylesheets/.browserslistrc
|
|
357
363
|
- test/dummy_rails/app/assets/stylesheets/application.sass
|
|
358
364
|
- test/dummy_rails/app/controllers/application_controller.rb
|
|
359
365
|
- test/dummy_rails/app/controllers/pages_controller.rb
|
|
@@ -381,6 +387,7 @@ files:
|
|
|
381
387
|
- test/gemfiles/rails_4_2.gemfile
|
|
382
388
|
- test/gemfiles/rails_5_0.gemfile
|
|
383
389
|
- test/gemfiles/rails_5_1.gemfile
|
|
390
|
+
- test/gemfiles/rails_6_0.gemfile
|
|
384
391
|
- test/rails_test.rb
|
|
385
392
|
- test/support/dummy_rails_integration.rb
|
|
386
393
|
- test/support/reporting.rb
|
|
@@ -405,8 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
405
412
|
- !ruby/object:Gem::Version
|
|
406
413
|
version: '0'
|
|
407
414
|
requirements: []
|
|
408
|
-
|
|
409
|
-
rubygems_version: 2.7.8
|
|
415
|
+
rubygems_version: 3.1.2
|
|
410
416
|
signing_key:
|
|
411
417
|
specification_version: 4
|
|
412
418
|
summary: The most popular HTML, CSS, and JavaScript framework for developing responsive,
|
|
@@ -414,8 +420,10 @@ summary: The most popular HTML, CSS, and JavaScript framework for developing res
|
|
|
414
420
|
test_files:
|
|
415
421
|
- test/dummy_rails/README.rdoc
|
|
416
422
|
- test/dummy_rails/Rakefile
|
|
423
|
+
- test/dummy_rails/app/assets/config/manifest.js
|
|
417
424
|
- test/dummy_rails/app/assets/images/.keep
|
|
418
425
|
- test/dummy_rails/app/assets/javascripts/application.js
|
|
426
|
+
- test/dummy_rails/app/assets/stylesheets/.browserslistrc
|
|
419
427
|
- test/dummy_rails/app/assets/stylesheets/application.sass
|
|
420
428
|
- test/dummy_rails/app/controllers/application_controller.rb
|
|
421
429
|
- test/dummy_rails/app/controllers/pages_controller.rb
|
|
@@ -443,6 +451,7 @@ test_files:
|
|
|
443
451
|
- test/gemfiles/rails_4_2.gemfile
|
|
444
452
|
- test/gemfiles/rails_5_0.gemfile
|
|
445
453
|
- test/gemfiles/rails_5_1.gemfile
|
|
454
|
+
- test/gemfiles/rails_6_0.gemfile
|
|
446
455
|
- test/rails_test.rb
|
|
447
456
|
- test/support/dummy_rails_integration.rb
|
|
448
457
|
- test/support/reporting.rb
|