raykit 0.0.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.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +3 -0
  4. data/lib/raykit.rb +21 -0
  5. data/lib/timer.rb +19 -0
  6. metadata +47 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0b8284f46ac14e6de78900c80f87d1a0ddd99e530910bdb22e02cfe71f6ba0ed
4
+ data.tar.gz: 378d54c543115783b439a887dca8cbd01377ddc8a268073a1e34e1ba572b654b
5
+ SHA512:
6
+ metadata.gz: 3f5653e2fc3379c3adc7e14798ea2b1e85ebdf156ce2ccfc862cb2d28b41662661f5b2c420ec45a34e8a01d96e94769c027c27d83ac79d8c1f33b39465acff69
7
+ data.tar.gz: bb821ae9f0a087c014d3750fcb09cbda3d4a3d4a06e50efe41ddd225493a262c88ab7008d004a59f1a4136a050f07f81bec09eccdc34a04566088bb5e17c9a8d
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Louis Parslow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ # rakit
2
+
3
+ ruby gem supporting rake ci/cd tasks
@@ -0,0 +1,21 @@
1
+ require './lib/timer.rb'
2
+ require 'rainbow'
3
+ require 'rake/clean'
4
+
5
+ module Raykit
6
+ def Raykit.run(command)
7
+ timer = Timer.new
8
+ if(system(command))
9
+ puts timer.elapsed_str + " " + Rainbow(command).yellow.bright
10
+ return timer.elapsed_str + " " + command
11
+ else
12
+ #puts ''
13
+ puts '\r\n' + command + '\r\n'
14
+ #puts ''
15
+ system(command)
16
+ puts ''
17
+ abort Rainbow(timer.elapsed_str).red.bright + " " + Rainbow(command).white
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,19 @@
1
+ require 'time'
2
+
3
+ module Raykit
4
+ class Timer
5
+ attr_accessor :start_time
6
+
7
+ def initialize
8
+ @start_time=Time.now
9
+ end
10
+
11
+ def elapsed # in seconds
12
+ return Time.now-@start_time
13
+ end
14
+
15
+ def elapsed_str
16
+ "[" + "%.0f" % (elapsed) + "s]"
17
+ end
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: raykit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Lou Parslow
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-09-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: supports common ci/cd development tasks
14
+ email: lou.parslow@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - LICENSE
20
+ - README.md
21
+ - lib/raykit.rb
22
+ - lib/timer.rb
23
+ homepage: http://rubygems.org/gems/raykit
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 2.0.0
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 2.7.3
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: ruby gem to support rake ci/cd tasks
47
+ test_files: []