raykit 0.0.269 → 0.0.274
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/tasks.rb +6 -0
- data/lib/raykit/text.rb +30 -0
- data/lib/raykit/version.rb +1 -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: 5d4d8edf70ff450040949de0b1e27a33d6936682e543d04b823bbea99346b308
|
4
|
+
data.tar.gz: 0d5c47984f53d2d06e08e470968f81e9be502b4f6a184c13f414c9c4943925ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48ad567c83ed363dabe3f98640b5fc64f5bf490be14c162a994dcafd8b6b9270bc0f585a6480d692b5da2ac204c45e8cd858db21a52c3bc302c9907bfe912a62
|
7
|
+
data.tar.gz: d5846164903b7c70b193ac11368096a4fa440dc64cafbaaf2ab98656d61db8b43f98b1dd387a653822dd909766b346ec6adf77a876689f7e6ee93b57d6b28257
|
data/lib/raykit/tasks.rb
CHANGED
@@ -34,6 +34,12 @@ task :integrate do
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
desc "push changes including tags"
|
38
|
+
task :push do
|
39
|
+
PROJECT.run("git push")
|
40
|
+
PROJECT.run("git push --tags")
|
41
|
+
end
|
42
|
+
|
37
43
|
desc "clean files not tracked by git"
|
38
44
|
task :clean do
|
39
45
|
puts Rainbow(':clean').blue.bright
|
data/lib/raykit/text.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
module Raykit
|
2
|
+
class Text
|
3
|
+
def self.replace_in_glob(glob,search,replace)
|
4
|
+
Dir.glob(glob).each{ |f| replace_in_file(f,search,replace) }
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.replace_in_file(filename,search,replace)
|
8
|
+
text1 = IO.read(filename)
|
9
|
+
text2 = text1.gsub(search) { |str| str=replace }
|
10
|
+
unless text1==text2
|
11
|
+
File.open(filename,"w") { |f| f.puts text2 }
|
12
|
+
return true
|
13
|
+
end
|
14
|
+
false
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.copy_if_different(source,destination)
|
18
|
+
if(!File.exists?(destination))
|
19
|
+
FileUtils.cp source, destination
|
20
|
+
else
|
21
|
+
source_text=IO.read(source)
|
22
|
+
destination_text=IO.read(destination)
|
23
|
+
if(source_text != destination_text)
|
24
|
+
FileUtils.rm destination
|
25
|
+
FileUtils.cp source, destination
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/raykit/version.rb
CHANGED
@@ -7,7 +7,7 @@ module Raykit
|
|
7
7
|
|
8
8
|
# detect a version number based on the NAME variable, if defined
|
9
9
|
def self.detect(name,verbose=false)
|
10
|
-
version=detect_from_file("#{name}/#{name}.csproj",/<Version>([-\w\d
|
10
|
+
version=detect_from_file("#{name}/#{name}.csproj",/<Version>([-\w\d\.]+)</,verbose)
|
11
11
|
return version if(version.length>0)
|
12
12
|
|
13
13
|
version=detect_from_file("#{name}/Properties/AssemblyInfo.cs",/^\[assembly: AssemblyVersion\(\"([.\w]+)/,verbose)
|
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.274
|
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-01-
|
11
|
+
date: 2021-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- lib/raykit/sourceImports.rb
|
100
100
|
- lib/raykit/string.rb
|
101
101
|
- lib/raykit/tasks.rb
|
102
|
+
- lib/raykit/text.rb
|
102
103
|
- lib/raykit/timer.rb
|
103
104
|
- lib/raykit/version.rb
|
104
105
|
- lib/raykit/zip.rb
|