Skip to content

Instantly share code, notes, and snippets.

@benjohnson77
Created September 11, 2013 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjohnson77/6518558 to your computer and use it in GitHub Desktop.
Save benjohnson77/6518558 to your computer and use it in GitHub Desktop.
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