yore 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -40,13 +40,13 @@ to get an "Access Key ID" and click Show to get its "Secret Access Key"
40
40
 
41
41
  * Create a bucket with backup permissions for an AWS account
42
42
 
43
- yore new_backup_bucket --backup_email "blah@buzzware.com.au" testbucket
43
+ yore new_backup_bucket --backup_email "blah@buzzware.com.au" --bucket testbucket
44
44
 
45
45
  == SYNOPSIS:
46
46
 
47
47
  yore [global options] command [command options] [arguments]
48
48
  eg.
49
- * yore backup yore_config.xml
49
+ * yore backup yore.config.xml
50
50
  * cd my_rails_app; yore save --kind=spree data.tgz
51
51
 
52
52
  == REQUIREMENTS:
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ begin
11
11
  gem.homepage = "http://github.com/buzzware/yore"
12
12
  gem.authors = ["buzzware"]
13
13
  gem.rubyforge_project = "buzzware"
14
+ gem.add_dependency('cmdparse', '>= 2.0.2')
14
15
  gem.add_dependency('buzzcore', '>= 0.2.6')
15
16
  gem.add_dependency('aws-s3', '>= 0.6.2')
16
17
  gem.add_development_dependency "thoughtbot-shoulda"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/bin/yore CHANGED
@@ -70,6 +70,9 @@ encrypt_decrypt_option_parser = CmdParse::OptionParserWrapper.new do |opt|
70
70
  end
71
71
 
72
72
  new_backup_bucket_option_parser = CmdParse::OptionParserWrapper.new do |opt|
73
+ opt.on( '--bucket=Bucket Name', String, 'Name of bucket' ) do |value|
74
+ CMD_OPTIONS[:bucket] = value
75
+ end
73
76
  opt.on( '--backup_id=S3 Access Key ID', String, 'S3 Access Key ID from Amazon' ) do |value|
74
77
  CMD_OPTIONS[:backup_id] = value
75
78
  end
@@ -86,6 +89,8 @@ command(cmd,yore,:load,"Load application data from local file",load_save_option_
86
89
 
87
90
  command(cmd,yore,:decrypt,"Expand archive file",encrypt_decrypt_option_parser)
88
91
 
92
+ command(cmd,yore,:retrieve,"download and decrypt file",encrypt_decrypt_option_parser)
93
+
89
94
  #command(cmd,yore,:encrypt,"Create archive file",encrypt_decrypt_option_parser)
90
95
 
91
96
  command(cmd,yore,:test_email,"Test email sending\n")
@@ -264,6 +264,7 @@ module YoreCore
264
264
  @keepers << KeepMonthly.new(config[:keep_monthly])
265
265
 
266
266
  @s3client = ::AWSS3Client.new()
267
+ logger.info "Using S3 key #{@s3client.credentials[:s3_access_key_id]}"
267
268
  end
268
269
 
269
270
  def do_action(aAction,aArgs)
@@ -617,8 +618,13 @@ module YoreCore
617
618
  uncompress(temp_file,folder)
618
619
  end
619
620
 
621
+ def retrieve(aArgs)
622
+ download(aArgs[0])
623
+ decrypt(aArgs)
624
+ end
625
+
620
626
  def new_backup_bucket(aArgs)
621
- bucket_name = aArgs[0]
627
+ bucket_name = config[:bucket]
622
628
  if s3client.bucket_exists?(bucket_name)
623
629
  puts "sorry, bucket already exists"
624
630
  else
data/yore.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yore}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["buzzware"]
@@ -63,15 +63,18 @@ Gem::Specification.new do |s|
63
63
  s.specification_version = 3
64
64
 
65
65
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
66
+ s.add_runtime_dependency(%q<cmdparse>, [">= 2.0.2"])
66
67
  s.add_runtime_dependency(%q<buzzcore>, [">= 0.2.6"])
67
68
  s.add_runtime_dependency(%q<aws-s3>, [">= 0.6.2"])
68
69
  s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
69
70
  else
71
+ s.add_dependency(%q<cmdparse>, [">= 2.0.2"])
70
72
  s.add_dependency(%q<buzzcore>, [">= 0.2.6"])
71
73
  s.add_dependency(%q<aws-s3>, [">= 0.6.2"])
72
74
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
73
75
  end
74
76
  else
77
+ s.add_dependency(%q<cmdparse>, [">= 2.0.2"])
75
78
  s.add_dependency(%q<buzzcore>, [">= 0.2.6"])
76
79
  s.add_dependency(%q<aws-s3>, [">= 0.6.2"])
77
80
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzzware
@@ -12,6 +12,16 @@ cert_chain: []
12
12
  date: 2009-12-08 00:00:00 +08:00
13
13
  default_executable: yore
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: cmdparse
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.2
24
+ version:
15
25
  - !ruby/object:Gem::Dependency
16
26
  name: buzzcore
17
27
  type: :runtime