ci-scripts 0.0.3 → 0.0.4
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/.gitlab-ci.yml +11 -3
- data/ci-scripts.gemspec +1 -0
- data/lib/ci_scripts/helpers.rb +6 -1
- data/lib/ci_scripts/version.rb +1 -1
- data/lib/scripts/demo/test.rb +1 -1
- data/lib/scripts/ruby/bundler.rb +3 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 581b396ce611e652b0f31d492464356c9393a5bd
|
4
|
+
data.tar.gz: a994bdfece227d71ad7d06cfa89abf2cecbb08aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a390d9a63f2f6dc8f4063eeb3224e71f3351cab6f0c90b81569a9a2b1e0fd7a98331da8e63b0678ba83a9a4e8d1e9f5f39731ba39685f07019ece2ee948b692
|
7
|
+
data.tar.gz: 1b9c5c682a918bf89a06d84e345588fd3cb73e8df49a74a0e9fcc7b66956565144099debd8f40319aa023ed8c714c670cb1814b481849edce86d5bfa0eeb4b6c
|
data/.gitlab-ci.yml
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
image: "ruby:2.3"
|
2
2
|
|
3
|
+
# Cache gems in between builds
|
4
|
+
cache:
|
5
|
+
paths:
|
6
|
+
- vendor/ruby
|
7
|
+
|
8
|
+
|
3
9
|
# Cache gems in between builds
|
4
10
|
cache:
|
5
11
|
paths:
|
@@ -8,10 +14,12 @@ cache:
|
|
8
14
|
before_script:
|
9
15
|
- ruby -v # Print out ruby version for debugging
|
10
16
|
- gem install ci-scripts
|
11
|
-
|
17
|
+
- ci-scripts ruby/bundler
|
18
|
+
|
12
19
|
rubocop:
|
13
20
|
script:
|
14
|
-
- ci-scripts ruby/bundler
|
15
21
|
- ci-scripts ruby/rubocop
|
16
|
-
- ci-scripts ruby/rake_test
|
17
22
|
|
23
|
+
test:
|
24
|
+
script:
|
25
|
+
- ci-scripts ruby/rake_test
|
data/ci-scripts.gemspec
CHANGED
data/lib/ci_scripts/helpers.rb
CHANGED
@@ -13,13 +13,18 @@ def log_error(s)
|
|
13
13
|
puts("\x1b[31m#{s}\x1b[0m")
|
14
14
|
end
|
15
15
|
|
16
|
+
def nice_exit(code, msg="Something happened")
|
17
|
+
log_error(msg)
|
18
|
+
exit code
|
19
|
+
end
|
20
|
+
|
16
21
|
# Timed runs
|
17
22
|
def command(*options)
|
18
23
|
log_info(options.join(" "))
|
19
24
|
t = Time.now
|
20
25
|
system(*options)
|
21
26
|
log_success("#{(Time.now - t).round(2)}s\n ")
|
22
|
-
exit $CHILD_STATUS if $CHILD_STATUS.exitstatus != 0
|
27
|
+
exit $CHILD_STATUS.exitstatus if $CHILD_STATUS && $CHILD_STATUS.exitstatus != 0
|
23
28
|
end
|
24
29
|
|
25
30
|
def timed_run(name)
|
data/lib/ci_scripts/version.rb
CHANGED
data/lib/scripts/demo/test.rb
CHANGED
data/lib/scripts/ruby/bundler.rb
CHANGED
@@ -5,8 +5,10 @@ module Ruby
|
|
5
5
|
command("gem", "install", "bundler", "--no-ri", "--no-rdoc")
|
6
6
|
end
|
7
7
|
|
8
|
+
install_path = env_fetch("BUNDLER_INSTALL_PATH", "vendor")
|
9
|
+
|
8
10
|
unless test_command?("bundler", "check")
|
9
|
-
command("bundler", "install")
|
11
|
+
command("bundler", "install", "--path", install_path)
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci-scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Caldwell
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.49.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.49.0
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- caldwellbenjamin8@gmail.com
|