juice 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/juice +21 -1
- data/bin/juice +21 -1
- data/lib/juice.rb +1 -1
- metadata +1 -1
data/bin/juice
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
require 'webrick'
|
3
3
|
require 'JSquish.rb'
|
4
4
|
include WEBrick
|
5
|
+
require 'zlib'
|
6
|
+
require 'archive/tar/minitar'
|
7
|
+
include Archive::Tar
|
8
|
+
require 'ftools'
|
9
|
+
|
5
10
|
class File
|
6
11
|
def self.readt_s(filename)
|
7
12
|
data = ''
|
@@ -22,10 +27,25 @@ module Juice
|
|
22
27
|
elsif params[0] == 'build'
|
23
28
|
Juice::Base.build()
|
24
29
|
else
|
25
|
-
|
30
|
+
Juice::Base.create()
|
26
31
|
end
|
27
32
|
end
|
28
33
|
|
34
|
+
def self.create
|
35
|
+
name = ARGV[0]
|
36
|
+
start = Dir.getwd
|
37
|
+
Dir.chdir(File.dirname(__FILE__))
|
38
|
+
Dir.chdir('../')
|
39
|
+
File.open(name+'.tar', 'wb') do |tar|
|
40
|
+
Minitar.pack(name, tar)
|
41
|
+
end
|
42
|
+
theBin = Dir.getwd
|
43
|
+
Dir.chdir(start)
|
44
|
+
Minitar.unpack(theBin+'/'+name+'.tar', name)
|
45
|
+
Dir.chdir(theBin)
|
46
|
+
File.delete(name+'.tar')
|
47
|
+
end
|
48
|
+
|
29
49
|
def self.build
|
30
50
|
save_file = ARGV[1].nil? ? 'production.js' : ARGV[1]
|
31
51
|
if !File.exists?("juice.app")
|
data/bin/juice
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
require 'webrick'
|
3
3
|
require 'JSquish.rb'
|
4
4
|
include WEBrick
|
5
|
+
require 'zlib'
|
6
|
+
require 'archive/tar/minitar'
|
7
|
+
include Archive::Tar
|
8
|
+
require 'ftools'
|
9
|
+
|
5
10
|
class File
|
6
11
|
def self.readt_s(filename)
|
7
12
|
data = ''
|
@@ -22,10 +27,25 @@ module Juice
|
|
22
27
|
elsif params[0] == 'build'
|
23
28
|
Juice::Base.build()
|
24
29
|
else
|
25
|
-
|
30
|
+
Juice::Base.create()
|
26
31
|
end
|
27
32
|
end
|
28
33
|
|
34
|
+
def self.create
|
35
|
+
name = ARGV[0]
|
36
|
+
start = Dir.getwd
|
37
|
+
Dir.chdir(File.dirname(__FILE__))
|
38
|
+
Dir.chdir('../')
|
39
|
+
File.open(name+'.tar', 'wb') do |tar|
|
40
|
+
Minitar.pack(name, tar)
|
41
|
+
end
|
42
|
+
theBin = Dir.getwd
|
43
|
+
Dir.chdir(start)
|
44
|
+
Minitar.unpack(theBin+'/'+name+'.tar', name)
|
45
|
+
Dir.chdir(theBin)
|
46
|
+
File.delete(name+'.tar')
|
47
|
+
end
|
48
|
+
|
29
49
|
def self.build
|
30
50
|
save_file = ARGV[1].nil? ? 'production.js' : ARGV[1]
|
31
51
|
if !File.exists?("juice.app")
|
data/lib/juice.rb
CHANGED