setup_script_generator 0.2.6 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4379891f48bbc0eb854a07195331ea38069bf8757808cf07882aff97c419a29c
|
4
|
+
data.tar.gz: 355658991af90bc45354433fe5c0b4afb32b15cbc0db6916ec54515d8d94f4e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 396e36d2da122281011f4a12ad962f97d01f5bcff85598ca00f74a89c01f81a839d1eeb4a5491f5d5827078767ec7a0bbdab84e4ba8b264088aed8b338405c20
|
7
|
+
data.tar.gz: c0da9ecdb57e0292bf4c6cbd08f13820eabba6acf1e8774b04ec75322d346ae0adcf753bc72c585f5756ea4678bd09462faaa6a045604e9a8ca70f87ea0afcd9
|
@@ -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() {
|
@@ -48,12 +53,6 @@ ensure-ruby-installed() {
|
|
48
53
|
error "Please use chruby to install Ruby $REQUIRED_RUBY_VERSION!"
|
49
54
|
fi
|
50
55
|
fi
|
51
|
-
elif has-executable rvm; then
|
52
|
-
if ! (rvm list | grep $required_ruby_version'\>' &>/dev/null); then
|
53
|
-
banner "Installing Ruby $required_ruby_version with rvm"
|
54
|
-
rvm install $required_ruby_version
|
55
|
-
rvm use $required_ruby_version
|
56
|
-
fi
|
57
56
|
else
|
58
57
|
error "You don't seem to have a Ruby manager installed."
|
59
58
|
print-wrapped "\
|
@@ -73,8 +72,8 @@ has-bundler() {
|
|
73
72
|
ensure-project-ruby-dependencies-installed() {
|
74
73
|
banner 'Installing Ruby dependencies'
|
75
74
|
|
76
|
-
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ ^Bundler version 1\. ]]); then
|
77
|
-
gem install bundler
|
75
|
+
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ '^Bundler version 1\.' ]]); then
|
76
|
+
gem install bundler:'~> 1.0'
|
78
77
|
elif ! has-bundler; then
|
79
78
|
gem install bundler
|
80
79
|
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.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Winkler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|