ci-scripts 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 46655709cc0544cba34bfaef732fb69e547ca407
4
- data.tar.gz: 46b0a3387faf3cd3ca5256449cccf92b14563cf0
3
+ metadata.gz: 57561cbdc7a876925ed58b292c24a1424fe9518e
4
+ data.tar.gz: d997ee9665c735089a6cf7cafef7025d6081bfad
5
5
  SHA512:
6
- metadata.gz: 7b35554c348a127b241c0f0577422e3ae1f6e2cf1bf69f60a478220927ec9cf3524ffd7192af283e819bc4c4f2e75b246af3932bfbfe9067d070f763eb18820b
7
- data.tar.gz: 42b06a920241347602ddf9b866860fd7b50e7b9946ac9b29c12c78f07528c8f9fe4a721f25a896a99004de6a4e0717eaad6307485b1aa31fdf448fd5b9d54909
6
+ metadata.gz: cd60f7b305468b33a29411c0d0730ecfae7b55c7ca6e78626c9dfd8ddfec2f33174ab0f9a2a3c231b6b0cd3bd530960cc9434634e8836e0749641742477fd809
7
+ data.tar.gz: 766ddfe8c49e693b8032ba23dc42795d5476122c91be5d191402090c4a76002de43219a7f5177e23f2baedad510aca79af0b6049b9137689b664658e6ec131ae
data/.gitlab-ci.yml CHANGED
@@ -11,5 +11,7 @@ before_script:
11
11
 
12
12
  rubocop:
13
13
  script:
14
+ - ci-scripts ruby/bundler
14
15
  - ci-scripts ruby/rubocop
16
+ - ci-scripts ruby/rake_test
15
17
 
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList["test/**/*_test.rb"]
8
8
  end
9
9
 
10
- task :default => :test
10
+ task default: :test
data/ci-scripts.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Benjamin Caldwell"]
10
10
  spec.email = ["caldwellbenjamin8@gmail.com"]
11
11
 
12
- spec.summary = %q(A collection fo scripts for commomly run scripts in CI.)
12
+ spec.summary = "A collection fo scripts for commomly run scripts in CI."
13
13
  # spec.description = %q{TODO: Write a longer description or delete this line.}
14
14
  spec.homepage = "http://github.com/benjamincaldwell/ci-scripts"
15
15
  spec.license = "MIT"
@@ -19,7 +19,7 @@ def command(*options)
19
19
  t = Time.now
20
20
  system(*options)
21
21
  log_success("#{(Time.now - t).round(2)}s\n ")
22
- exit $CHILD_STATUS if $CHILD_STATUS != 0
22
+ exit $CHILD_STATUS if $CHILD_STATUS.exitstatus != 0
23
23
  end
24
24
 
25
25
  def timed_run(name)
@@ -1,3 +1,3 @@
1
1
  module CIScripts
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/ci_scripts.rb CHANGED
@@ -27,6 +27,8 @@ module CIScripts
27
27
  module_name += classify(part)
28
28
  end
29
29
 
30
- Object.const_get(module_name).send(function_name)
30
+ result = Object.const_get(module_name).send(function_name)
31
+ return true if result.nil?
32
+ result
31
33
  end
32
34
  end
@@ -0,0 +1,6 @@
1
+ module Demo
2
+ extend self
3
+ def test
4
+
5
+ end
6
+ end
@@ -16,5 +16,3 @@ module Docker
16
16
  command('docker push "$DOCKER_IMAGE:$IMAGE_TAG"')
17
17
  end
18
18
  end
19
-
20
- Docker.build if __FILE__ == $PROGRAM_NAME
@@ -24,5 +24,3 @@ module Docker
24
24
  run_script("docker/build")
25
25
  end
26
26
  end
27
-
28
- Docker.herokuish if __FILE__ == $PROGRAM_NAME
@@ -15,5 +15,3 @@ module Docker
15
15
  command(login_command)
16
16
  end
17
17
  end
18
-
19
- Docker.login if __FILE__ == $PROGRAM_NAME
@@ -15,5 +15,3 @@ module Docker
15
15
  command("docker push \"$DOCKER_IMAGE:#{branch}\"")
16
16
  end
17
17
  end
18
-
19
- Docker.push_branch if __FILE__ == $PROGRAM_NAME
@@ -18,5 +18,3 @@ module Docker
18
18
  command('docker push "$DOCKER_IMAGE:latest"')
19
19
  end
20
20
  end
21
-
22
- Docker.push_latest if __FILE__ == $PROGRAM_NAME
@@ -6,5 +6,3 @@ module Git
6
6
  end
7
7
  end
8
8
  end
9
-
10
- Git.ssh_keys if __FILE__ == $PROGRAM_NAME
@@ -10,5 +10,3 @@ module Ruby
10
10
  end
11
11
  end
12
12
  end
13
-
14
- Ruby.bundler if __FILE__ == $PROGRAM_NAME
@@ -0,0 +1,13 @@
1
+ module Ruby
2
+ extend self
3
+ def rake_test
4
+ if test_command?("bundler", "exec", "rake", "-V")
5
+ return command("bundler", "exec", "rake", "test")
6
+ end
7
+
8
+ unless installed?("rake")
9
+ command("gem", "install", "rake")
10
+ end
11
+ command("rake", "test")
12
+ end
13
+ end
@@ -10,5 +10,3 @@ module Ruby
10
10
  command("rubocop")
11
11
  end
12
12
  end
13
-
14
- Ruby.rubocop if __FILE__ == $PROGRAM_NAME
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Caldwell
@@ -76,6 +76,7 @@ files:
76
76
  - lib/ci_scripts.rb
77
77
  - lib/ci_scripts/helpers.rb
78
78
  - lib/ci_scripts/version.rb
79
+ - lib/scripts/demo/test.rb
79
80
  - lib/scripts/docker/build.rb
80
81
  - lib/scripts/docker/herokuish.rb
81
82
  - lib/scripts/docker/login.rb
@@ -86,6 +87,7 @@ files:
86
87
  - lib/scripts/go/install
87
88
  - lib/scripts/go/test
88
89
  - lib/scripts/ruby/bundler.rb
90
+ - lib/scripts/ruby/rake_test.rb
89
91
  - lib/scripts/ruby/rubocop.rb
90
92
  homepage: http://github.com/benjamincaldwell/ci-scripts
91
93
  licenses: