Created
September 11, 2013 02:07
-
-
Save benjohnson77/6518558 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g_dirs = g_connection.directories.all.map(&:key) | |
puts g_dirs | |
# create all the buckets that we need on google. | |
rs_connection.directories.each do |dir| | |
#refresh the list of google dirs | |
g_dirs = g_connection.directories.all.map(&:key) | |
dir_name_arr = dir.key.split("-") | |
# check if the bucket is already created in google cloud. | |
next if g_dirs.find('dir').any? | |
if dir_name_arr.last.to_i = 0 | |
puts "the last part of the name does have a number" | |
#mkdir = g_connection.directories.create(:key => dir.key, :public => true) | |
else | |
puts dir.key | |
end | |
#if dir_name_arr[1] = 'bookshout' && dir_name_arr[2] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment