yore 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/yore +12 -1
- data/lib/yore/yore_core.rb +20 -0
- data/yore.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
data/bin/yore
CHANGED
@@ -6,6 +6,7 @@ require 'rubygems'
|
|
6
6
|
gem 'buzzcore'; require 'buzzcore';
|
7
7
|
gem 'cmdparse'; require 'cmdparse'
|
8
8
|
|
9
|
+
require_paths_first '../lib'
|
9
10
|
require 'yore/yore_core'
|
10
11
|
|
11
12
|
CMD_OPTIONS = {} # options given on command line
|
@@ -28,7 +29,7 @@ end
|
|
28
29
|
|
29
30
|
cmd = CmdParse::CommandParser.new( true )
|
30
31
|
cmd.program_name = "yore"
|
31
|
-
cmd.program_version = [0, 0,
|
32
|
+
cmd.program_version = [0, 0, 10]
|
32
33
|
# Options are given after a command and before arguments on the command line
|
33
34
|
# so global options are given first, before the first command
|
34
35
|
# ie ruby yore.rb --global_option command --command_option argument1 argument2 argumentn
|
@@ -62,12 +63,22 @@ load_save_option_parser = CmdParse::OptionParserWrapper.new do |opt|
|
|
62
63
|
end
|
63
64
|
end
|
64
65
|
|
66
|
+
encrypt_decrypt_option_parser = CmdParse::OptionParserWrapper.new do |opt|
|
67
|
+
#opt.on( '--all', 'Delete all IP addresses' ) do
|
68
|
+
# CMD_OPTIONS[:deleteAll] = true
|
69
|
+
#end
|
70
|
+
end
|
71
|
+
|
65
72
|
command(cmd,yore,:backup,"Backup filelist to S3",option_parser)
|
66
73
|
|
67
74
|
command(cmd,yore,:save,"Save application data to local file",load_save_option_parser)
|
68
75
|
|
69
76
|
command(cmd,yore,:load,"Load application data from local file",load_save_option_parser)
|
70
77
|
|
78
|
+
command(cmd,yore,:decrypt,"Expand archive file",encrypt_decrypt_option_parser)
|
79
|
+
|
80
|
+
#command(cmd,yore,:encrypt,"Create archive file",encrypt_decrypt_option_parser)
|
81
|
+
|
71
82
|
command(cmd,yore,:test_email,"Test email sending\n")
|
72
83
|
|
73
84
|
command(cmd,yore,:db_dump,"Dump database by name in job\n")
|
data/lib/yore/yore_core.rb
CHANGED
@@ -593,6 +593,26 @@ module YoreCore
|
|
593
593
|
end
|
594
594
|
end
|
595
595
|
|
596
|
+
#def encrypt(aArgs)
|
597
|
+
# archive = aArgs.delete(0)
|
598
|
+
# paths = aArgs
|
599
|
+
# # filelist from paths
|
600
|
+
# compress(filelist,aFilename)
|
601
|
+
#end
|
602
|
+
|
603
|
+
# needs :crypto_key, :crypto_iv
|
604
|
+
# args :
|
605
|
+
# archive : source file to decrypt
|
606
|
+
# folder : destination folder to decrypt to
|
607
|
+
def decrypt(aArgs)
|
608
|
+
archive = aArgs[0]
|
609
|
+
folder = MiscUtils.file_no_extension(archive) unless folder = aArgs[1]
|
610
|
+
folder = File.expand_path(folder,config[:basepath])
|
611
|
+
temp_file = File.expand_path('file.tar',temp_path)
|
612
|
+
unpack(archive,temp_file)
|
613
|
+
uncompress(temp_file,folder)
|
614
|
+
end
|
615
|
+
|
596
616
|
def test_email(*aDb)
|
597
617
|
args = {
|
598
618
|
:host => config[:mail_host],
|
data/yore.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{yore}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["buzzware"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-17}
|
13
13
|
s.default_executable = %q{yore}
|
14
14
|
s.description = %q{yore (as in "days of yore") is a user data management utility for web applications.}
|
15
15
|
s.email = %q{contact@buzzware.com.au}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- buzzware
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-17 00:00:00 +08:00
|
13
13
|
default_executable: yore
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|