raykit 0.0.366 → 0.0.369
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/filesystem.rb +1 -1
- data/lib/raykit/version.rb +7 -0
- data/lib/raykit.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2937aae4a1a4f74565c8f6f5f4b53b43864db29284d6588f64850f38909ca5cc
|
4
|
+
data.tar.gz: 2b57ca37b299c269c20d6cfaab95ef7ebf8ce57fc5ccfc8b67d37ed81bceaa0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87e9bde8729b0623271eeddeff4aaebd993781b8447fa9fa0e74549186da0d2fb579169273a6094dc1d8406ee40584039b1f1e1a8cf04be9dc350e1534ec64fa
|
7
|
+
data.tar.gz: c24b12ca86ee38d54f0baa709184fb918a75ebc2e8f2d7c051caf131d70d7dcd861f5d576845c894e6031a2590e61f43bc7097a3191c73ae558e81de321a7bfd
|
data/lib/raykit/filesystem.rb
CHANGED
data/lib/raykit/version.rb
CHANGED
@@ -51,10 +51,17 @@ module Raykit
|
|
51
51
|
version
|
52
52
|
end
|
53
53
|
|
54
|
+
def self.set_version_in_glob(glob_pattern, version)
|
55
|
+
Dir.glob(glob_pattern).each { |f|
|
56
|
+
Raykit::Version::set_version_in_file(f, version)
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
54
60
|
def self.set_version_in_file(filename, version)
|
55
61
|
text = IO.read(filename)
|
56
62
|
new_text = text.gsub(/version\s?=\s?['|"]([.\d]+)['|"]/, "version='#{version}'") if filename.include?(".gemspec")
|
57
63
|
new_text = text.gsub(/<Version>([-\w\d.]+)</, "<Version>#{version}<") if filename.include?(".csproj")
|
64
|
+
new_text = text.gsub(/<version>([-\w\d.]+)</, "<version>#{version}<") if filename.include?(".nuspec")
|
58
65
|
# new_text=text.gsub(/<Version>([-\w\d.]+)</,"<Version>#{version}<")
|
59
66
|
# new_text=new_text.gsub(/version[\s]+=\s?['|"]([.\d]+)['|"]/,"version='#{version}'")
|
60
67
|
# new_text=new_text.gsub(/Version="([.\d]+)"/,"Version=\"#{version}\"")
|
data/lib/raykit.rb
CHANGED
@@ -38,6 +38,10 @@ if defined?(RAYKIT_GLOBALS)
|
|
38
38
|
Raykit::Log.show_value(name, value)
|
39
39
|
end
|
40
40
|
|
41
|
+
def copy_files(src_dir, target_dir, glob)
|
42
|
+
Raykit::FileSystem::copy_files(src_dir, target_dir, glob)
|
43
|
+
end
|
44
|
+
|
41
45
|
def copy_file_to_dir(file, dir)
|
42
46
|
Raykit::FileSystem::copy_file_to_dir(file, dir)
|
43
47
|
end
|