canzea 0.1.144 → 0.1.147

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1461435d2fdb6caf5d6cfe1379d7854aac4db37f
4
- data.tar.gz: 6641be56af7bd0f6eab8faecd5215c89de0a0306
3
+ metadata.gz: fc724b53aa0115d5f5bd2ff5c132015fc2ce2605
4
+ data.tar.gz: 5f0e03c9ff7bb2b4046e1c2d5fc801358619a7d2
5
5
  SHA512:
6
- metadata.gz: dcc56bde6268189ef8e330cb978765094154ddd40b8cea98f0a00f5e2bc56cddb2ab2944bd7a771b0ad0b9d734c74a22518afab56e3fd8715de9b1ffcec1fe8a
7
- data.tar.gz: 0d330d1934e1ce7b02b430e67bbc4433149e73f8680e185e6f794292b0d0a6496303bd455730c4fbe302ef0b0db7c0b6aa48ca3dfb2f85a95a148e2001fffe6c
6
+ metadata.gz: e7c8be4ee4b43a20cdd845b3c231588c6245219393c42b1a0be7968b4d599cc7b80f17892136490955b8c11635ff4ed6afab23b64bcf2ad35677ca73b7ecd7f9
7
+ data.tar.gz: 6359fcbacdfbce74e89f9c6f89e933ab473845fee44e683981900ec43f30fcff36019c5b8e27945c5cc3d5bd1d292b6b53438be565609af34dc5db7d3bf52fe2
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.144"
2
+ VERSION = "0.1.147"
3
3
  end
@@ -24,10 +24,24 @@ class PushConfig
24
24
  end
25
25
 
26
26
  def cp(filePath, destPath)
27
- write destPath, File.read(filePath)
27
+ if File.directory?(filePath)
28
+ Dir.foreach(filePath) { |x|
29
+ if x == '.' or x == '..' or x.starts_with('.')
30
+ else
31
+ if File.directory?("#{filePath}/#{x}")
32
+ cp "#{filePath}/#{x}", "#{destPath}/#{x}"
33
+ else
34
+ write "#{destPath}/#{x}", File.read("#{filePath}/#{x}")
35
+ end
36
+ end
37
+ }
38
+ else
39
+ write destPath, File.read(filePath)
40
+ end
28
41
  end
29
42
 
30
43
  def write(filePath, contents)
44
+
31
45
  path = "ecosystems/#{ENV['ECOSYSTEM']}/#{@relPath}#{filePath}"
32
46
 
33
47
  begin
@@ -55,6 +69,30 @@ class PushConfig
55
69
 
56
70
  end
57
71
 
72
+ def rm(filePath)
73
+ path = "ecosystems/#{ENV['ECOSYSTEM']}/#{@relPath}#{filePath}"
74
+
75
+ begin
76
+ folder = "_working"
77
+
78
+ if File.exists? folder
79
+ g = Git.init(folder)
80
+ else
81
+ g = Git.clone(ENV['ECOSYSTEM_CONFIG_GIT'], folder, :path => '.')
82
+ end
83
+ FileUtils.rmdir_p File.dirname("#{folder}/#{path}")
84
+
85
+ g.add("#{path}")
86
+
87
+ rescue => exception
88
+ @log.error("PushConfig Failed")
89
+ @log.error(exception.to_s)
90
+ @log.error(exception.backtrace)
91
+ abort()
92
+ end
93
+
94
+ end
95
+
58
96
  def commit(comment)
59
97
  folder = "_working"
60
98
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canzea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.144
4
+ version: 0.1.147
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-19 00:00:00.000000000 Z
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler