dicker 0.0.10 → 0.0.11

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
  SHA1:
3
- metadata.gz: d126fc1fa3c0eef686280c3243e4bbdd44dcf9e3
4
- data.tar.gz: 076513946bc5be9595ff219fd1596c0a51239e45
3
+ metadata.gz: 714a371e7c2b73fddd051e45a982752aa759495e
4
+ data.tar.gz: 45483afff9ed62115b35c2f939be29e34113cefb
5
5
  SHA512:
6
- metadata.gz: c9483b6701733b08960e3c5622fbf87074e7221e4520b1047bff7cdbeae4959651bbd7794ec4df9b9a3f27f1ea5795fceea1802b90fd6963f3e96c64f057f770
7
- data.tar.gz: a5d74ef10507995ea6abc2b258e1cf7598ee6877eeb1846efb3dfb0c5e8faae34d22a2a54f869ac6e087797cfd58e4cd76d74862eb4b5d99463058cc987e0395
6
+ metadata.gz: 7da55d0b3eb5409dbb384e3b60a0d6e742894ceaade595fd5be49f608e7726a1a06c861c3b16e5acd9804230232e802b233093919f43cfcf0355b1723793af2f
7
+ data.tar.gz: 4aff047b3d064e030a83009a9690b713a005bf96c1420a782da564e48b3899e0dc4ff0cc2efa2649f0dd911022c70b28b981f4905ff3f9ff16c57e10d84532bd
data/bin/dicker CHANGED
@@ -5,10 +5,16 @@ require 'dicker'
5
5
  argument = ARGV[0]
6
6
  project = ARGV[1]
7
7
 
8
+ source = 'pegisis'
9
+
10
+ if !ARGV[2].nil?
11
+ source = ARGV[2]
12
+ end
13
+
8
14
  if !argument.nil?
9
15
  case argument
10
16
  when 'dynamic'
11
- Dicker.dynamic(project)
17
+ Dicker.dynamic(project, source)
12
18
  when 'static'
13
19
  Dicker.static(project)
14
20
  when 'server'
data/lib/dicker/build.rb CHANGED
@@ -1,15 +1,29 @@
1
1
  class Dicker::Build
2
- def initialize(title)
3
- @project = title
2
+ def initialize(project, source_dir)
3
+ @project = project
4
+ @source_dir = source_dir
4
5
  end
5
6
 
6
- def static
7
- output = system("git clone git@github.com:banksy89/curtiss.git #{@project}")
8
- return output
7
+ def build
8
+ self.copy_files
9
+ self.init_git
9
10
  end
10
11
 
11
- def dynamic
12
- output = system("git clone git@github.com:StormCreative/pegisis.git #{@project}")
13
- return output
12
+ def init_git
13
+ Dir.chdir @project
14
+ system('git init')
15
+ end
16
+
17
+ def copy_files
18
+ Find.find("#{@source_dir}") do |source|
19
+ target = source.sub(/^#{@source_dir}/, @project)
20
+ if File.directory? source
21
+ Find.prune if File.basename(source) == '.git'
22
+ FileUtils.mkdir target unless File.exists? target
23
+ else
24
+ FileUtils.copy source, target
25
+ puts "Copying #{source}"
26
+ end
27
+ end
14
28
  end
15
29
  end
@@ -1,3 +1,3 @@
1
1
  module Dicker
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
data/lib/dicker.rb CHANGED
@@ -16,6 +16,13 @@ module Dicker
16
16
  end
17
17
  end
18
18
 
19
+ def self.dynamic(project, source)
20
+ puts "--> Building framework environment"
21
+ build = Build.new(project, source)
22
+ build.build
23
+ puts "--> Build complete."
24
+ end
25
+
19
26
  def self.server
20
27
  commands = Commands.new
21
28
  commands.server
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashley Banks