dicker 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dicker +13 -23
- data/lib/dicker/build.rb +3 -15
- data/lib/dicker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d126fc1fa3c0eef686280c3243e4bbdd44dcf9e3
|
4
|
+
data.tar.gz: 076513946bc5be9595ff219fd1596c0a51239e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9483b6701733b08960e3c5622fbf87074e7221e4520b1047bff7cdbeae4959651bbd7794ec4df9b9a3f27f1ea5795fceea1802b90fd6963f3e96c64f057f770
|
7
|
+
data.tar.gz: a5d74ef10507995ea6abc2b258e1cf7598ee6877eeb1846efb3dfb0c5e8faae34d22a2a54f869ac6e087797cfd58e4cd76d74862eb4b5d99463058cc987e0395
|
data/bin/dicker
CHANGED
@@ -5,31 +5,21 @@ 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
|
-
|
14
|
-
build = false
|
15
|
-
|
16
8
|
if !argument.nil?
|
17
9
|
case argument
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
if build
|
32
|
-
|
10
|
+
when 'dynamic'
|
11
|
+
Dicker.dynamic(project)
|
12
|
+
when 'static'
|
13
|
+
Dicker.static(project)
|
14
|
+
when 'server'
|
15
|
+
Dicker.server
|
16
|
+
else
|
17
|
+
puts "--> Avaliable tasks:"
|
18
|
+
puts "\n"
|
19
|
+
puts " - static"
|
20
|
+
puts " - dynamic"
|
21
|
+
puts "\n"
|
22
|
+
puts "Ensure you provide a name for the project after a command call"
|
33
23
|
end
|
34
24
|
else
|
35
25
|
puts "--> Please ensure you type a method!"
|
data/lib/dicker/build.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
class Dicker::Build
|
2
|
-
def initialize(
|
3
|
-
@project =
|
4
|
-
@source_dir = source_dir
|
2
|
+
def initialize(title)
|
3
|
+
@project = title
|
5
4
|
end
|
6
5
|
|
7
6
|
def static
|
@@ -10,18 +9,7 @@ class Dicker::Build
|
|
10
9
|
end
|
11
10
|
|
12
11
|
def dynamic
|
13
|
-
|
14
|
-
target = source.sub(/^#{@source_dir}/, @project)
|
15
|
-
if File.directory? source
|
16
|
-
Find.prune if File.basename(source) == '.git'
|
17
|
-
FileUtils.mkdir target unless File.exists? target
|
18
|
-
else
|
19
|
-
FileUtils.copy source, target
|
20
|
-
puts "Copying #{source}"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
Dir.chdir @project
|
24
|
-
system('git init')
|
12
|
+
output = system("git clone git@github.com:StormCreative/pegisis.git #{@project}")
|
25
13
|
return output
|
26
14
|
end
|
27
15
|
end
|
data/lib/dicker/version.rb
CHANGED