raykit 0.0.135 → 0.0.136
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/log.rb +40 -0
- data/lib/raykit/project.rb +8 -2
- data/lib/raykit/version.rb +0 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '008e98e64b7b0a8a148bdf1d107b5c125fa89c329a0479439ee225e30302d351'
|
4
|
+
data.tar.gz: d8d5343a23c0ebe89881bbb51ed05c91240f9dbc4fee2330d15e8b87a9be1f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b41d67358f9194bf353a955115f984d9907ed8dcd56b8279291253d48df5ebec30c296ce831ce515bff2f12d6f6f33086e3ed88506c9ef256edd809af2083a7b
|
7
|
+
data.tar.gz: b949dea699a15d30e802c6967a99293135a3a0f0cfca757167af0d0e4452ce14da2675bd6cba310af37748407d7e8e3fdfbc2b237379475ef4ef10dd71752e7b
|
data/lib/raykit/log.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'json'
|
2
|
+
RAKE_DIRECTORY=Rake.application.original_dir
|
3
|
+
|
4
|
+
module Raykit
|
5
|
+
class Log < Hash
|
6
|
+
@filename
|
7
|
+
def initialize(filename)
|
8
|
+
@filename=filename
|
9
|
+
if(File.exist?(@filename))
|
10
|
+
data=JSON.parse(File.read(filename))
|
11
|
+
data.each{|k,v|
|
12
|
+
self[k] = v
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def save
|
18
|
+
File.open(@filename, 'w') {|f| f.write(JSON.generate(self)) }
|
19
|
+
end
|
20
|
+
|
21
|
+
def update_command_time(command,timestamp)
|
22
|
+
command_times = Hash.new()
|
23
|
+
command_times = self["command_times"] if(self.has_key?("command_times"))
|
24
|
+
command_times.delete(command) if(command_times.has_key?(command))
|
25
|
+
command_times[command] = timestamp.iso8601()
|
26
|
+
self["command_times"] = command_times
|
27
|
+
save
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_command_time(command)
|
31
|
+
if(self.has_key?("command_times"))
|
32
|
+
command_times = self["command_times"]
|
33
|
+
if(command_times.has_key?(command))
|
34
|
+
return DateTime.parse(command_times[command])
|
35
|
+
end
|
36
|
+
end
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/raykit/project.rb
CHANGED
@@ -11,6 +11,7 @@ module Raykit
|
|
11
11
|
@remote
|
12
12
|
@repository
|
13
13
|
@git_directory
|
14
|
+
@log
|
14
15
|
|
15
16
|
def initialize()
|
16
17
|
@verbose=false
|
@@ -27,7 +28,7 @@ module Raykit
|
|
27
28
|
#@remote=''
|
28
29
|
end
|
29
30
|
|
30
|
-
|
31
|
+
@log=Log.new("#{RAKE_DIRECTORY}/raykit.log")
|
31
32
|
|
32
33
|
if(defined?(NAME))
|
33
34
|
@name=NAME
|
@@ -157,7 +158,12 @@ module Raykit
|
|
157
158
|
if(status.include?('Changes not staged for commit:'))
|
158
159
|
run("git add --all")
|
159
160
|
if(GIT_DIRECTORY.outstanding_commit?)
|
160
|
-
|
161
|
+
if(File.exist?('commit_message.txt'))
|
162
|
+
run("git commit --file commit_message.txt")
|
163
|
+
File.delete('commit_message.txt')
|
164
|
+
else
|
165
|
+
run("git commit -m'update'")
|
166
|
+
end
|
161
167
|
end
|
162
168
|
end
|
163
169
|
else
|
data/lib/raykit/version.rb
CHANGED
@@ -64,7 +64,6 @@ module Raykit
|
|
64
64
|
# increment to last digit of a version string
|
65
65
|
def self.bump(version)
|
66
66
|
# major.minor[.build[.revision]] (example: 1.2.12.102)
|
67
|
-
|
68
67
|
version_ints = version.split('.').map{|s| s.to_i}
|
69
68
|
version_ints[-1] = version_ints.last + 1;
|
70
69
|
version_ints.map{|i| i.to_s}.join('.')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.136
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/raykit/git/directory.rb
|
86
86
|
- lib/raykit/git/repositories.rb
|
87
87
|
- lib/raykit/git/repository.rb
|
88
|
+
- lib/raykit/log.rb
|
88
89
|
- lib/raykit/logging.rb
|
89
90
|
- lib/raykit/msbuild.rb
|
90
91
|
- lib/raykit/nugetpackage.rb
|
@@ -113,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
114
|
- !ruby/object:Gem::Version
|
114
115
|
version: '0'
|
115
116
|
requirements: []
|
116
|
-
rubygems_version: 3.0.
|
117
|
+
rubygems_version: 3.0.6
|
117
118
|
signing_key:
|
118
119
|
specification_version: 4
|
119
120
|
summary: ruby gem to support rake ci/cd tasks
|