cifrado 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +5 -0
- data/lib/cifrado/cli/version.rb +8 -0
- data/lib/cifrado/cli.rb +11 -5
- data/lib/cifrado/version.rb +1 -1
- data/vendor/fog/lib/fog/openstack/storage.rb +56 -0
- data.tar.gz.sig +0 -0
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0746da846ed77bb7954fa0285936c7fcc391871
|
4
|
+
data.tar.gz: 646ed7ce8284059a364373c443d00957b415bd8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 099631ccabe814128d9cdd920761d5f930ce454bb85c9e6b97903c0449f4cf40fde243ec2f25e2408314c2a646d6a2570e07f55d0ed4ac839fc8de8c9b79739e
|
7
|
+
data.tar.gz: 78b659ca0e2f3794f39f365bcfdfc2f24a0e4dd6902587bd9463ad4bb1bdaa8bdff0e3517db7094385648a5ab0e2c291ea64822a51786a5e79bbc22b2a53ec95
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/lib/cifrado/cli.rb
CHANGED
@@ -88,14 +88,19 @@ module Cifrado
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
-
if
|
92
|
-
Log.
|
93
|
-
Log.error "Use --tenant option or run 'cifrado setup' first."
|
94
|
-
raise "Missing tenant"
|
95
|
-
else
|
91
|
+
if config[:auth_url] =~ /rackspacecloud\.com/
|
92
|
+
Log.debug "Rackspace Authentication, removing tenant."
|
96
93
|
# Make sure tenant is nil for Rackspace
|
97
94
|
# otherwise we get a service catalog without cloudFiles endpoints
|
98
95
|
config[:tenant] = nil
|
96
|
+
else
|
97
|
+
if config[:tenant].nil?
|
98
|
+
Log.error "Tenant not provided."
|
99
|
+
Log.error "Use --tenant option or run 'cifrado setup' first."
|
100
|
+
raise "Missing tenant"
|
101
|
+
else
|
102
|
+
Log.debug "OpenStack regular authentication, using tenant name."
|
103
|
+
end
|
99
104
|
end
|
100
105
|
|
101
106
|
unless config[:secure_random]
|
@@ -119,6 +124,7 @@ require 'cifrado/cli/set_acl'
|
|
119
124
|
require 'cifrado/cli/jukebox'
|
120
125
|
require 'cifrado/cli/cinema'
|
121
126
|
require 'cifrado/cli/saio'
|
127
|
+
require 'cifrado/cli/version'
|
122
128
|
|
123
129
|
at_exit do
|
124
130
|
include Cifrado::Utils
|
data/lib/cifrado/version.rb
CHANGED
@@ -57,6 +57,16 @@ module Fog
|
|
57
57
|
def reset_data
|
58
58
|
self.class.data.delete(@openstack_username)
|
59
59
|
end
|
60
|
+
|
61
|
+
def change_account(account)
|
62
|
+
@original_path ||= @path
|
63
|
+
version_string = @original_path.split('/')[1]
|
64
|
+
@path = "/#{version_string}/#{account}"
|
65
|
+
end
|
66
|
+
|
67
|
+
def reset_account_name
|
68
|
+
@path = @original_path
|
69
|
+
end
|
60
70
|
|
61
71
|
end
|
62
72
|
|
@@ -86,6 +96,52 @@ module Fog
|
|
86
96
|
def reload
|
87
97
|
@connection.reset
|
88
98
|
end
|
99
|
+
|
100
|
+
# Change the current account while re-using the auth token.
|
101
|
+
#
|
102
|
+
# This is usefull when you have an admin role and you're able
|
103
|
+
# to HEAD other user accounts, set quotas, list files, etc.
|
104
|
+
#
|
105
|
+
# For example:
|
106
|
+
#
|
107
|
+
# # List current user account details
|
108
|
+
# service = Fog::Storage[:openstack]
|
109
|
+
# service.request :method => 'HEAD'
|
110
|
+
#
|
111
|
+
# Would return something like:
|
112
|
+
#
|
113
|
+
# Account: AUTH_1234
|
114
|
+
# Date: Tue, 05 Mar 2013 16:50:52 GMT
|
115
|
+
# X-Account-Bytes-Used: 0 (0.00 Bytes)
|
116
|
+
# X-Account-Container-Count: 0
|
117
|
+
# X-Account-Object-Count: 0
|
118
|
+
#
|
119
|
+
# Now let's change the account
|
120
|
+
#
|
121
|
+
# service.change_account('AUTH_3333')
|
122
|
+
# service.request :method => 'HEAD'
|
123
|
+
#
|
124
|
+
# Would return something like:
|
125
|
+
#
|
126
|
+
# Account: AUTH_3333
|
127
|
+
# Date: Tue, 05 Mar 2013 16:51:53 GMT
|
128
|
+
# X-Account-Bytes-Used: 23423433
|
129
|
+
# X-Account-Container-Count: 2
|
130
|
+
# X-Account-Object-Count: 10
|
131
|
+
#
|
132
|
+
# If we wan't to go back to our original admin account:
|
133
|
+
#
|
134
|
+
# service.reset_account_name
|
135
|
+
#
|
136
|
+
def change_account(account)
|
137
|
+
@original_path ||= @path
|
138
|
+
version_string = @path.split('/')[1]
|
139
|
+
@path = "/#{version_string}/#{account}"
|
140
|
+
end
|
141
|
+
|
142
|
+
def reset_account_name
|
143
|
+
@path = @original_path
|
144
|
+
end
|
89
145
|
|
90
146
|
def request(params, parse_json = true, &block)
|
91
147
|
begin
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cifrado
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Rubio
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
/Nnaz9wOXu6/VjBcnvFOGY8f32hVq619QiJVpV9zRgYa5M05mWRmwHByrb4yK0Ab
|
30
30
|
3GpyuMMNBMk=
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-03-
|
32
|
+
date: 2013-03-05 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: excon
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- lib/cifrado/cli/setup.rb
|
198
198
|
- lib/cifrado/cli/stat.rb
|
199
199
|
- lib/cifrado/cli/upload.rb
|
200
|
+
- lib/cifrado/cli/version.rb
|
200
201
|
- lib/cifrado/config.rb
|
201
202
|
- lib/cifrado/core_ext/ruby18_base64.rb
|
202
203
|
- lib/cifrado/crypto_services.rb
|
metadata.gz.sig
CHANGED
Binary file
|