Skip to content

Commit 95166db

Browse files
committed
Updated travis build scripts (from rspec-dev)
1 parent 7d68eb2 commit 95166db

8 files changed

+319
-18
lines changed

.rubocop_rspec_base.yml

Lines changed: 309 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,309 @@
1+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
2+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3+
4+
# This file contains defaults for RSpec projects. Individual projects
5+
# can customize by inheriting this file and overriding particular settings.
6+
7+
AccessModifierIndentation:
8+
Enabled: false
9+
10+
# "Use alias_method instead of alias"
11+
# We're fine with `alias`.
12+
Alias:
13+
Enabled: false
14+
15+
AlignParameters:
16+
EnforcedStyle: with_first_parameter
17+
18+
# "Avoid the use of the case equality operator ==="
19+
# We prefer using `Class#===` over `Object#is_a?` because `Class#===`
20+
# is less likely to be monkey patched than `is_a?` on a user object.
21+
CaseEquality:
22+
Enabled: false
23+
24+
# Warns when the class is excessively long.
25+
ClassLength:
26+
Max: 100
27+
28+
CollectionMethods:
29+
PreferredMethods:
30+
reduce: 'inject'
31+
32+
# Over time we'd like to get this down, but this is what we're at now.
33+
CyclomaticComplexity:
34+
Max: 10
35+
36+
# We use YARD to enforce documentation. It works better than rubocop's
37+
# enforcement...rubocop complains about the places we re-open
38+
# `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments.
39+
Documentation:
40+
Enabled: false
41+
42+
# We still support 1.8.7 which requires trailing dots
43+
DotPosition:
44+
EnforcedStyle: trailing
45+
46+
DoubleNegation:
47+
Enabled: false
48+
49+
# each_with_object is unavailable on 1.8.7 so we have to disable this one.
50+
EachWithObject:
51+
Enabled: false
52+
53+
FormatString:
54+
EnforcedStyle: percent
55+
56+
# As long as we support ruby 1.8.7 we have to use hash rockets.
57+
HashSyntax:
58+
EnforcedStyle: hash_rockets
59+
60+
# We can't use the new lambda syntax, since we still support 1.8.7.
61+
Lambda:
62+
Enabled: false
63+
64+
# Over time we'd like to get this down, but this is what we're at now.
65+
LineLength:
66+
Max: 100
67+
68+
# Over time we'd like to get this down, but this is what we're at now.
69+
MethodLength:
70+
Max: 15
71+
72+
# Who cares what we call the argument for binary operator methods?
73+
BinaryOperatorParameterName:
74+
Enabled: false
75+
76+
PercentLiteralDelimiters:
77+
PreferredDelimiters:
78+
'%': () # double-quoted string
79+
'%i': '[]' # array of symbols
80+
'%q': () # single-quoted string
81+
'%Q': () # double-quoted string
82+
'%r': '{}' # regular expression pattern
83+
'%s': () # a symbol
84+
'%w': '[]' # array of single-quoted strings
85+
'%W': '[]' # array of double-quoted strings
86+
'%x': () # a shell command as a string
87+
88+
# We have too many special cases where we allow generator methods or prefer a
89+
# prefixed predicate due to it's improved readability.
90+
PredicateName:
91+
Enabled: false
92+
93+
# On 1.8 `proc` is `lambda`, so we use `Proc.new` to ensure we get real procs on all supported versions.
94+
# http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/
95+
Proc:
96+
Enabled: false
97+
98+
# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue`
99+
RescueException:
100+
Enabled: true
101+
102+
# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention.
103+
SignalException:
104+
Enabled: false
105+
106+
# We've tended to use no space, so it's less of a change to stick with that.
107+
SpaceAroundEqualsInParameterDefault:
108+
EnforcedStyle: no_space
109+
110+
# We don't care about single vs double qoutes.
111+
StringLiterals:
112+
Enabled: false
113+
114+
# This rule favors constant names from the English standard library which we don't load.
115+
Style/SpecialGlobalVars:
116+
Enabled: false
117+
118+
Style/TrailingCommaInLiteral:
119+
Enabled: false
120+
121+
Style/TrailingCommaInArguments:
122+
Enabled: false
123+
124+
TrivialAccessors:
125+
AllowDSLWriters: true
126+
AllowPredicates: true
127+
ExactNameMatch: true
128+
129+
Style/ParallelAssignment:
130+
Enabled: false
131+
132+
Layout/EmptyLineBetweenDefs:
133+
Enabled: false
134+
135+
Layout/FirstParameterIndentation:
136+
Enabled: false
137+
138+
Naming/ConstantName:
139+
Enabled: false
140+
141+
Style/ClassCheck:
142+
Enabled: false
143+
144+
Style/ConditionalAssignment:
145+
Enabled: false
146+
147+
Style/EmptyMethod:
148+
Enabled: false
149+
150+
Style/FormatStringToken:
151+
Enabled: false
152+
153+
Style/GuardClause:
154+
Enabled: false
155+
156+
Style/IdenticalConditionalBranches:
157+
Enabled: false
158+
159+
Style/IfUnlessModifier:
160+
Enabled: false
161+
162+
Style/IfUnlessModifierOfIfUnless:
163+
Enabled: false
164+
165+
Style/MethodMissing:
166+
Enabled: false
167+
168+
Style/MixinUsage:
169+
Enabled: false
170+
171+
Style/MultipleComparison:
172+
Enabled: false
173+
174+
Style/MutableConstant:
175+
Enabled: false
176+
177+
Style/NestedModifier:
178+
Enabled: false
179+
180+
Style/NestedParenthesizedCalls:
181+
Enabled: false
182+
183+
Style/NumericPredicate:
184+
Enabled: false
185+
186+
Style/RedundantParentheses:
187+
Enabled: false
188+
189+
Style/StringLiteralsInInterpolation:
190+
Enabled: false
191+
192+
Style/SymbolArray:
193+
Enabled: false
194+
195+
Style/SymbolProc:
196+
Enabled: false
197+
198+
Style/YodaCondition:
199+
Enabled: false
200+
201+
Style/ZeroLengthPredicate:
202+
Enabled: false
203+
204+
Layout/ClosingParenthesisIndentation:
205+
Enabled: false
206+
207+
Layout/ExtraSpacing:
208+
Enabled: false
209+
210+
Layout/MultilineMethodCallBraceLayout:
211+
Enabled: false
212+
213+
Layout/MultilineMethodCallIndentation:
214+
Enabled: false
215+
216+
Layout/MultilineOperationIndentation:
217+
Enabled: false
218+
219+
Layout/SpaceAroundBlockParameters:
220+
Enabled: false
221+
222+
Layout/SpaceAroundOperators:
223+
Enabled: false
224+
225+
Layout/SpaceBeforeComma:
226+
Enabled: false
227+
228+
Style/BlockDelimiters:
229+
Enabled: false
230+
231+
Style/EmptyCaseCondition:
232+
Enabled: false
233+
234+
Style/MultilineIfModifier:
235+
Enabled: false
236+
237+
Style/RescueStandardError:
238+
Enabled: false
239+
240+
Style/StderrPuts:
241+
Enabled: false
242+
243+
Style/TernaryParentheses:
244+
Enabled: false
245+
246+
# This could likely be enabled, but it had a false positive on rspec-mocks
247+
# (suggested change was not behaviour preserving) so I don't trust it.
248+
Performance/HashEachMethods:
249+
Enabled: false
250+
251+
Naming/HeredocDelimiterNaming:
252+
Enabled: false
253+
254+
Layout/EmptyLineAfterMagicComment:
255+
Enabled: false
256+
257+
Layout/IndentArray:
258+
Enabled: false
259+
260+
Layout/IndentAssignment:
261+
Enabled: false
262+
263+
Layout/IndentHeredoc:
264+
Enabled: false
265+
266+
Layout/SpaceInsidePercentLiteralDelimiters:
267+
Enabled: false
268+
269+
Style/EmptyElse:
270+
Enabled: false
271+
272+
Style/IfInsideElse:
273+
Enabled: false
274+
275+
Style/RedundantReturn:
276+
Enabled: false
277+
278+
Style/StructInheritance:
279+
Enabled: false
280+
281+
Naming/VariableNumber:
282+
Enabled: false
283+
284+
Layout/SpaceInsideStringInterpolation:
285+
Enabled: false
286+
287+
Style/DateTime:
288+
Enabled: false
289+
290+
Style/ParenthesesAroundCondition:
291+
Enabled: false
292+
293+
Layout/EmptyLinesAroundBlockBody:
294+
Enabled: false
295+
296+
Lint/ImplicitStringConcatenation:
297+
Enabled: false
298+
299+
Lint/NestedMethodDefinition:
300+
Enabled: false
301+
302+
Style/RegexpLiteral:
303+
Enabled: false
304+
305+
Style/TrailingUnderscoreVariable:
306+
Enabled: false
307+
308+
Layout/EmptyLinesAroundAccessModifier:
309+
Enabled: false

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
1+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
version: "{build}"

script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
2+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
1+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
source $SCRIPT_DIR/travis_functions.sh
66
source $SCRIPT_DIR/predicate_functions.sh
77

88
# If JRUBY_OPTS isn't set, use these.
9-
# see http://docs.travis-ci.com/user/ci-environment/
9+
# see https://docs.travis-ci.com/user/ci-environment/
1010
export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
1111
SPECS_HAVE_RUN_FILE=specs.out
1212
MAINTENANCE_BRANCH=`cat maintenance-branch`

script/predicate_functions.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
1+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
function is_mri {
@@ -57,14 +57,6 @@ function is_mri_2plus {
5757
fi
5858
}
5959

60-
function is_ruby_23 {
61-
if ruby -e "exit(RUBY_VERSION.to_f == 2.3)"; then
62-
return 0
63-
else
64-
return 1
65-
fi
66-
}
67-
6860
function is_ruby_23_plus {
6961
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
7062
return 0

script/run_build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
2+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/travis_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
1+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# Taken from:

script/update_rubygems_and_install_bundler

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
2-
# This file was generated on 2019-07-24T15:33:53+02:00 from the rspec-dev repo.
2+
# This file was generated on 2019-12-18T09:08:59+00:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
66
source script/functions.sh
77

88
if is_ruby_23_plus; then
9-
gem update --system
10-
gem install bundler
9+
yes | gem update --system
10+
yes | gem install bundler
1111
else
1212
echo "Warning installing older versions of Rubygems / Bundler"
1313
gem update --system '2.7.8'

0 commit comments

Comments
 (0)