raykit 0.0.270 → 0.0.271

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a4c65a71476a373d00dbe0f09d3979745f7816eddee9cb63c70580de41415d2
4
- data.tar.gz: 3813539267dab3fe18d39a437d629b550ac98652f61fd1bdc697055d539576f7
3
+ metadata.gz: 4f57d52cdb2ccceb597b61d2dc512acc75b57dad910049c8b1a3b72dac275063
4
+ data.tar.gz: 8b30dfebe9f3dce735b2a5b769257ee5816543f154b64b2d5ec8a8b3ea9e9b8e
5
5
  SHA512:
6
- metadata.gz: 47184a7ddadcf5ffb19b9e78ebbb404b01fb9bd865f91a21906be2fec018ba82e44dfeb0254419f48e89cf7dc5f936087ce022c819285b2e238624aa6ff55ee0
7
- data.tar.gz: 8bb6dd924aa8cb25eebf970ca03ca2e1c920b45c409a970239410c24398141a647aeb206c31a5e433a379977ab4b9cbdc8c8ac0cd912c9bf2a3ebc78c25c06b0
6
+ metadata.gz: 6a07b5dde44d345bd662e22fbe8397e7ca3d9f7ffad8a58f3a8d755e13701531efb79b2a7518e54eb31328a7279d638996090499180666df948a4f659c9c6489
7
+ data.tar.gz: d34e9e7d2990a343cdc2a6dfbdfb1ccd4130be33e3d28e7c30adbb9a630628927d77ebaf8ae76c13112320b12cd3414b61372f979ed233799c3cfc157aab6600
@@ -27,19 +27,13 @@ task :integrate do
27
27
  commit_message='integrate'
28
28
  PROJECT.run("git commit -m\"#{commit_message}\"") if(PROJECT.outstanding_commit?)
29
29
  PROJECT.run("git pull")
30
- #PROJECT.run("git push")
31
- #PROJECT.run("git push --tags")
30
+ PROJECT.run("git push")
31
+ PROJECT.run("git push --tags")
32
32
  end
33
33
  end
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
-
43
37
  desc "clean files not tracked by git"
44
38
  task :clean do
45
39
  puts Rainbow(':clean').blue.bright
@@ -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
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.270
4
+ version: 0.0.271
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-14 00:00:00.000000000 Z
11
+ date: 2021-01-25 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
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  - !ruby/object:Gem::Version
122
123
  version: '0'
123
124
  requirements: []
124
- rubygems_version: 3.2.3
125
+ rubygems_version: 3.1.4
125
126
  signing_key:
126
127
  specification_version: 4
127
128
  summary: ruby gem to support rake ci/cd tasks