setup_script_generator 0.2.7 → 0.4.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fd5e83995916e6bf77222292688adcd991ad378dffe7fd9ec0e6a578239f03c
|
4
|
+
data.tar.gz: 0465dd858b92c3541770b3e2bf545be75d0fad94ba7edb31cce1884c4f04cbc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e61eab9c4e26823ce01571414712837241d3a7a81d0ff87bf456120b80545e131313597187325487336d5ea58b0e9c06a3d15164a627d18bcb8fd04e2737656
|
7
|
+
data.tar.gz: 9c567c47b33f8da7f7934a780a29efad0f03fc582609f86c06e8ff699a6d7d4e0a0e1a97411585b97ee3d4221b4345fa7be4fea03137dec84b41f44afea28ec0
|
data/bin/setup
CHANGED
@@ -17,7 +17,7 @@ provision-project() {
|
|
17
17
|
|
18
18
|
### DON'T MODIFY ANYTHING BELOW THIS LINE! #####################################
|
19
19
|
|
20
|
-
# This setup script was generated with setup_script_generator 0.
|
20
|
+
# This setup script was generated with setup_script_generator 0.4.0,
|
21
21
|
# available on RubyGems.
|
22
22
|
#
|
23
23
|
# To regenerate this section, install the gem and run:
|
@@ -190,20 +190,25 @@ provision-ruby() {
|
|
190
190
|
USE_BUNDLER_1=0
|
191
191
|
|
192
192
|
if [[ -f .tool-versions ]]; then
|
193
|
-
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | sed -Ee 's/^ruby (.+)$/\1/')
|
193
|
+
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | head -n 1 | sed -Ee 's/^ruby (.+)$/\1/')
|
194
194
|
elif [[ -f .ruby-version ]]; then
|
195
|
-
REQUIRED_RUBY_VERSION=$(cat .ruby-version)
|
196
|
-
|
197
|
-
|
195
|
+
REQUIRED_RUBY_VERSION=$(cat .ruby-version | head -n 1 | sed -Ee 's/^ruby-([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)$/\1/')
|
196
|
+
fi
|
197
|
+
|
198
|
+
if [[ -z $REQUIRED_RUBY_VERSION ]]; then
|
199
|
+
error "Could not determine required Ruby version for this project."
|
198
200
|
print-wrapped "\
|
199
|
-
|
200
|
-
|
201
|
+
Your project needs to include either a valid .tool-versions file with a 'ruby'
|
202
|
+
line or a valid .ruby-version file."
|
201
203
|
exit 1
|
202
204
|
fi
|
203
205
|
|
204
206
|
ensure-ruby-development-libraries-installed
|
205
207
|
ensure-ruby-installed
|
206
|
-
|
208
|
+
|
209
|
+
if [[ -f Gemfile ]]; then
|
210
|
+
ensure-project-ruby-dependencies-installed
|
211
|
+
fi
|
207
212
|
}
|
208
213
|
|
209
214
|
ensure-ruby-development-libraries-installed() {
|
@@ -237,10 +242,9 @@ ensure-ruby-installed() {
|
|
237
242
|
fi
|
238
243
|
fi
|
239
244
|
elif has-executable rvm; then
|
240
|
-
if ! (rvm list | grep $
|
241
|
-
banner "Installing Ruby $
|
242
|
-
rvm install $
|
243
|
-
rvm use $required_ruby_version
|
245
|
+
if ! (rvm list | grep $REQUIRED_RUBY_VERSION'\>' &>/dev/null); then
|
246
|
+
banner "Installing Ruby $REQUIRED_RUBY_VERSION with rvm"
|
247
|
+
rvm install $REQUIRED_RUBY_VERSION
|
244
248
|
fi
|
245
249
|
else
|
246
250
|
error "You don't seem to have a Ruby manager installed."
|
@@ -261,8 +265,8 @@ has-bundler() {
|
|
261
265
|
ensure-project-ruby-dependencies-installed() {
|
262
266
|
banner 'Installing Ruby dependencies'
|
263
267
|
|
264
|
-
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || [[ $(bundle -v) =~ '^1\.' ]]); then
|
265
|
-
gem install bundler
|
268
|
+
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ '^Bundler version 1\.' ]]); then
|
269
|
+
gem install bundler:'~> 1.0'
|
266
270
|
elif ! has-bundler; then
|
267
271
|
gem install bundler
|
268
272
|
fi
|
@@ -272,10 +276,6 @@ ensure-project-ruby-dependencies-installed() {
|
|
272
276
|
|
273
277
|
run-provisions() {
|
274
278
|
provision-ruby
|
275
|
-
|
276
|
-
if type provision-project &>/dev/null; then
|
277
|
-
provision-project
|
278
|
-
fi
|
279
279
|
}
|
280
280
|
|
281
281
|
# --- FIN ----------------------------------------------------------------------
|
@@ -5,11 +5,13 @@ provision-node() {
|
|
5
5
|
REQUIRED_NODE_VERSION=$(cat .node-version)
|
6
6
|
elif [[ -f .nvmrc ]]; then
|
7
7
|
REQUIRED_NODE_VERSION=$(cat .nvmrc)
|
8
|
-
|
9
|
-
|
8
|
+
fi
|
9
|
+
|
10
|
+
if [[ -z $REQUIRED_NODE_VERSION ]]; then
|
11
|
+
error "Could not determine required Node version for this project."
|
10
12
|
print-wrapped "\
|
11
|
-
|
12
|
-
|
13
|
+
Your project needs to include either a valid .tool-versions file with a 'nodejs'
|
14
|
+
line or a valid .node-version or .nvimrc file."
|
13
15
|
exit 1
|
14
16
|
fi
|
15
17
|
|
@@ -2,20 +2,25 @@ provision-ruby() {
|
|
2
2
|
USE_BUNDLER_1=0
|
3
3
|
|
4
4
|
if [[ -f .tool-versions ]]; then
|
5
|
-
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | sed -Ee 's/^ruby (.+)$/\1/')
|
5
|
+
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | head -n 1 | sed -Ee 's/^ruby (.+)$/\1/')
|
6
6
|
elif [[ -f .ruby-version ]]; then
|
7
|
-
REQUIRED_RUBY_VERSION=$(cat .ruby-version)
|
8
|
-
|
9
|
-
|
7
|
+
REQUIRED_RUBY_VERSION=$(cat .ruby-version | head -n 1 | sed -Ee 's/^ruby-([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)$/\1/')
|
8
|
+
fi
|
9
|
+
|
10
|
+
if [[ -z $REQUIRED_RUBY_VERSION ]]; then
|
11
|
+
error "Could not determine required Ruby version for this project."
|
10
12
|
print-wrapped "\
|
11
|
-
|
12
|
-
|
13
|
+
Your project needs to include either a valid .tool-versions file with a 'ruby'
|
14
|
+
line or a valid .ruby-version file."
|
13
15
|
exit 1
|
14
16
|
fi
|
15
17
|
|
16
18
|
ensure-ruby-development-libraries-installed
|
17
19
|
ensure-ruby-installed
|
18
|
-
|
20
|
+
|
21
|
+
if [[ -f Gemfile ]]; then
|
22
|
+
ensure-project-ruby-dependencies-installed
|
23
|
+
fi
|
19
24
|
}
|
20
25
|
|
21
26
|
ensure-ruby-development-libraries-installed() {
|
@@ -49,10 +54,9 @@ ensure-ruby-installed() {
|
|
49
54
|
fi
|
50
55
|
fi
|
51
56
|
elif has-executable rvm; then
|
52
|
-
if ! (rvm list | grep $
|
53
|
-
banner "Installing Ruby $
|
54
|
-
rvm install $
|
55
|
-
rvm use $required_ruby_version
|
57
|
+
if ! (rvm list | grep $REQUIRED_RUBY_VERSION'\>' &>/dev/null); then
|
58
|
+
banner "Installing Ruby $REQUIRED_RUBY_VERSION with rvm"
|
59
|
+
rvm install $REQUIRED_RUBY_VERSION
|
56
60
|
fi
|
57
61
|
else
|
58
62
|
error "You don't seem to have a Ruby manager installed."
|
@@ -74,7 +78,7 @@ ensure-project-ruby-dependencies-installed() {
|
|
74
78
|
banner 'Installing Ruby dependencies'
|
75
79
|
|
76
80
|
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ '^Bundler version 1\.' ]]); then
|
77
|
-
gem install bundler
|
81
|
+
gem install bundler:'~> 1.0'
|
78
82
|
elif ! has-bundler; then
|
79
83
|
gem install bundler
|
80
84
|
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setup_script_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Winkler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|