raykit 0.0.285 → 0.0.286
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/lib/raykit/environment.rb +2 -2
- data/lib/raykit/secrets.rb +22 -0
- data/lib/raykit/tasks.rb +18 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 738325d3fc54e5ab0ac4eb8601ad904c5d46d25fabdeb586d347476b626a2cda
|
4
|
+
data.tar.gz: 8e471c7a4df1fc056e309ce5dc45a1acec782952b4c19991d29fc4e273a730cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2c665a23eee6f2fb379f643b218370abdf00e34e3e31a4e5d96efe1eeddf04257d62e10d9fb78820e3327da209d83b0a5aa7d31452ce3f2aa9efbd37788f86b
|
7
|
+
data.tar.gz: 16d87464c793877a71b2b5e6c910f55ed82024e86bd4a6f203f1a9ca090be43b522b787f7445053cfabc53ae6a065116672690a2e1860f839538db5e0c9f5078
|
data/lib/raykit/environment.rb
CHANGED
@@ -29,11 +29,11 @@ module Raykit
|
|
29
29
|
def self.get_dev_dir(name)
|
30
30
|
dir = Pathname.new("#{Environment::root_dir}/#{name}")
|
31
31
|
dir.mkpath
|
32
|
-
dir.to_s
|
32
|
+
dir.to_s().gsub('//','/')
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.get_work_dir(url)
|
36
|
-
Raykit::Environment::get_dev_dir('work') + url.gsub('://','/').gsub('.git','')
|
36
|
+
Raykit::Environment::get_dev_dir('work') +'/' + url.gsub('://','/').gsub('.git','')
|
37
37
|
end
|
38
38
|
# Get the size of a directory and its contents
|
39
39
|
def self.get_dir_size(dir)
|
data/lib/raykit/secrets.rb
CHANGED
@@ -3,6 +3,21 @@ require 'time'
|
|
3
3
|
module Raykit
|
4
4
|
# Provides functionality to record the time execution times
|
5
5
|
class Secrets < Hash
|
6
|
+
def initialize()
|
7
|
+
if ENV.has_key?('RAYKIT_SECRETS_PATH')
|
8
|
+
secrets_file = ENV['RAYKIT_SECRETS_PATH']
|
9
|
+
if File.exists?(secrets_file)
|
10
|
+
text = IO.read(secrets_file)
|
11
|
+
if (text.length > 7 )
|
12
|
+
data = JSON.parse(text)
|
13
|
+
data.each{|key,value|
|
14
|
+
self[key] = value
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
6
21
|
def hide(text)
|
7
22
|
hidden=text
|
8
23
|
self.each{|k,v|
|
@@ -12,5 +27,12 @@ module Raykit
|
|
12
27
|
}
|
13
28
|
hidden
|
14
29
|
end
|
30
|
+
|
31
|
+
def save()
|
32
|
+
if ENV.has_key?('RAYKIT_SECRETS_PATH')
|
33
|
+
secrets_file = ENV['RAYKIT_SECRETS_PATH']
|
34
|
+
File.open(secrets_file,"w") { |f| f.puts self.to_json }
|
35
|
+
end
|
36
|
+
end
|
15
37
|
end
|
16
38
|
end
|
data/lib/raykit/tasks.rb
CHANGED
@@ -9,7 +9,9 @@ task :integrate do
|
|
9
9
|
puts Rainbow(':integrate').blue.bright
|
10
10
|
|
11
11
|
git_dir=Raykit::Git::Directory.new(Rake.application.original_dir)
|
12
|
-
if(
|
12
|
+
if(git_dir.detached?)
|
13
|
+
puts "detached head state, skipping integrate operations"
|
14
|
+
else
|
13
15
|
if(PROJECT.outstanding_commit?)
|
14
16
|
if(Rake::Task.task_defined?("test"))
|
15
17
|
Rake::Task["test"].invoke
|
@@ -23,17 +25,29 @@ task :integrate do
|
|
23
25
|
puts "warning: .gitignore does not exist."
|
24
26
|
else
|
25
27
|
PROJECT.run('git add --all')
|
26
|
-
if(
|
28
|
+
if(!`git status`.include?('nothing to commit'))
|
29
|
+
#if(PROJECT.outstanding_commit?)
|
27
30
|
commit_message='integrate'
|
28
31
|
PROJECT.run("git commit -m\"#{commit_message}\"") if(PROJECT.outstanding_commit?)
|
29
32
|
PROJECT.run("git pull")
|
30
|
-
PROJECT.run("git push")
|
31
|
-
PROJECT.run("git push --tags")
|
33
|
+
#PROJECT.run("git push")
|
34
|
+
#PROJECT.run("git push --tags")
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
35
38
|
end
|
36
39
|
|
40
|
+
desc "push changes including tags"
|
41
|
+
task :push do
|
42
|
+
git_dir=Raykit::Git::Directory.new(Rake.application.original_dir)
|
43
|
+
if(git_dir.detached?)
|
44
|
+
puts "detached head state, skipping push operations"
|
45
|
+
else
|
46
|
+
PROJECT.run("git push")
|
47
|
+
PROJECT.run("git push --tags")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
37
51
|
desc "clean files not tracked by git"
|
38
52
|
task :clean do
|
39
53
|
puts Rainbow(':clean').blue.bright
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raykit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.286
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|