Skip to content

Commit 04ad6ae

Browse files
committed
Upgrade gems.
1 parent 294e860 commit 04ad6ae

File tree

4 files changed

+49
-37
lines changed

4 files changed

+49
-37
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ gem 'git'
66
gem 'nokogiri'
77
gem 'rake'
88
gem 'rake_circle_ci'
9-
gem 'rake_dependencies'
109
gem 'rake_github'
1110
gem 'rake_gpg'
1211
gem 'rake_ssh'

Gemfile.lock

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ GEM
13131313
excon (~> 0.72)
13141314
rake_factory (~> 0.23)
13151315
sshkey (~> 2.0)
1316-
rake_dependencies (2.13.0)
1316+
rake_dependencies (3.1.0)
13171317
hamster (~> 3.0)
13181318
minitar (~> 0.9)
13191319
rake_factory (~> 0.23)
@@ -1333,9 +1333,9 @@ GEM
13331333
colored2 (~> 3.1)
13341334
rake_factory (~> 0.23)
13351335
sshkey (~> 2.0)
1336-
rake_terraform (1.21.0)
1336+
rake_terraform (1.22.0)
13371337
colored2 (~> 3.1)
1338-
rake_dependencies (~> 2.11)
1338+
rake_dependencies (~> 3.1)
13391339
rake_factory (~> 0.23)
13401340
ruby-terraform (~> 1.4)
13411341
rchardet (1.8.0)
@@ -1396,7 +1396,6 @@ DEPENDENCIES
13961396
nokogiri
13971397
rake
13981398
rake_circle_ci
1399-
rake_dependencies
14001399
rake_github
14011400
rake_gpg
14021401
rake_ssh

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
21+
THE SOFTWARE.

go

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,68 @@
33
[ -n "$GO_DEBUG" ] && set -x
44
set -e
55

6-
project_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
77

88
verbose="no"
9-
skip_checks="no"
109
offline="no"
10+
skip_checks="no"
1111

1212
missing_dependency="no"
1313

1414
[ -n "$GO_DEBUG" ] && verbose="yes"
1515
[ -n "$GO_SKIP_CHECKS" ] && skip_checks="yes"
1616
[ -n "$GO_OFFLINE" ] && offline="yes"
1717

18+
function loose_version() {
19+
local version="$1"
20+
21+
IFS="." read -r -a version_parts <<<"$version"
22+
23+
echo "${version_parts[0]}.${version_parts[1]}"
24+
}
1825

19-
if [[ "$skip_checks" = "no" ]]; then
20-
echo "Checking for system dependencies."
21-
ruby_version="$(cat "$project_dir"/.ruby-version)"
22-
if ! type ruby >/dev/null 2>&1 || ! ruby -v | grep -q "$ruby_version"; then
23-
echo "This codebase requires Ruby $ruby_version."
24-
missing_dependency="yes"
25-
fi
26+
ruby_full_version="$(cat "$project_dir"/.ruby-version)"
27+
ruby_loose_version="$(loose_version "$ruby_full_version")"
2628

27-
if [[ "$missing_dependency" = "yes" ]]; then
28-
echo "Please install missing dependencies to continue."
29-
exit 1
30-
fi
29+
if [[ "$skip_checks" == "no" ]]; then
30+
echo "Checking for system dependencies."
31+
if ! type ruby >/dev/null 2>&1 || ! ruby -v | grep -q "$ruby_loose_version"; then
32+
echo "This codebase requires Ruby $ruby_loose_version."
33+
missing_dependency="yes"
34+
fi
3135

32-
echo "All system dependencies present. Continuing."
36+
if ! type bundler >/dev/null 2>&1; then
37+
echo "This codebase requires Bundler."
38+
missing_dependency="yes"
39+
fi
40+
41+
if [[ "$missing_dependency" = "yes" ]]; then
42+
echo "Please install missing dependencies to continue."
43+
exit 1
44+
fi
45+
46+
echo "All system dependencies present. Continuing."
3347
fi
3448

35-
if [[ "$offline" = "no" ]]; then
36-
echo "Installing bundler."
37-
if [[ "$verbose" = "yes" ]]; then
38-
gem install --no-document bundler
39-
else
40-
gem install --no-document bundler > /dev/null
41-
fi
42-
43-
echo "Installing ruby dependencies."
44-
if [[ "$verbose" = "yes" ]]; then
45-
bundle install
46-
else
47-
bundle install > /dev/null
48-
fi
49+
if [[ "$offline" == "no" ]]; then
50+
echo "Installing bundler."
51+
if [[ "$verbose" == "yes" ]]; then
52+
gem install --no-document bundler
53+
else
54+
gem install --no-document bundler >/dev/null
55+
fi
56+
57+
echo "Installing ruby dependencies."
58+
if [[ "$verbose" == "yes" ]]; then
59+
bundle install
60+
else
61+
bundle install >/dev/null
62+
fi
4963
fi
5064

5165
echo "Starting rake."
52-
if [[ "$verbose" = "yes" ]]; then
53-
time bundle exec rake --verbose "$@"
66+
if [[ "$verbose" == "yes" ]]; then
67+
time bundle exec rake --verbose "$@"
5468
else
55-
time bundle exec rake "$@"
69+
time bundle exec rake "$@"
5670
fi

0 commit comments

Comments
 (0)