dev 2.0.85 → 2.0.86

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dev_environment.rb +27 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a275d2ae49de618a65ba997a0c6ee90753aaf5e
4
- data.tar.gz: 0818b01ca8174de54ed289f25e7c6fb6d978ea77
3
+ metadata.gz: 374ad3cc02e6af1519f1fba8f9c0ba62822a7a8a
4
+ data.tar.gz: c38ca71b9cddd388c9f73d4cb1eaeb4d6b509e04
5
5
  SHA512:
6
- metadata.gz: daa7d5163d79a99a5bbe65a085ac55056bf1276d2f00571e42bd5a5f9461da9e3acf8ee34253b08714580de453a4a409c8d6e551802f44f2a4a3554a06f507a4
7
- data.tar.gz: 54084bbad52f5d0f62fccc11b2ccd52753d8bc7e4e083590a57edd79a3966d93d90147ba7078346c7683890f8468e80d8658217640b12ac89537fb8e216900fa
6
+ metadata.gz: c78aa818f115212dfb862cc284b599142e721813ebb8ab89345aef37fbc9b921239cc02f91874d18a8641b809ba948592b01934331b56cea5eb3e63928fabbfa
7
+ data.tar.gz: 9298e1ca32132c3b0abac9f3531fc9edf51ee87c6c3dd38204b7d9eb8cd9c57a0ff4017a2d2f1facca386db63bc90dea1924d3265b7cd9ee75353a5055d2fd17
@@ -38,7 +38,11 @@ class Environment < Hash
38
38
  dir=home
39
39
  return dir
40
40
  end
41
+
42
+
41
43
  end
44
+ require 'fileutils'
45
+
42
46
  class File
43
47
  def self.amalgamate filename,source
44
48
  File.open(filename,'w'){|file|
@@ -47,4 +51,27 @@ class File
47
51
  }
48
52
  }
49
53
  end
54
+
55
+ def self.publish destination, source_dir, source_glob='**/*'
56
+
57
+ output = "\n"
58
+ # directory
59
+ FileUtils.mkdir_p destination if !File.exists? destination
60
+
61
+ files=nil
62
+ Dir.chdir(source_dir) do
63
+ files=FileList.new(source_glob).to_a
64
+ end
65
+ output = output + "\nfiles: #{files}.to_s"
66
+
67
+ Dir.chdir(source_dir) do
68
+ files.each{|f|
69
+ file="#{destination}/#{f}"
70
+ dirname=File.dirname(file)
71
+ FileUtils.mkdir_p dirname if !File.exists? dirname
72
+ FileUtils.cp(f,file) if !File.exists? file
73
+ }
74
+ end
75
+ output
76
+ end
50
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.85
4
+ version: 2.0.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow