namespace :staging do
  desc "Set staging settings for plugin redmine_checkout"
  task :checkout, [:needs] => :environment  do
    Setting[:plugin_redmine_checkout] = {
      :description_Mercurial=>"",
      :display_command_Darcs=>"0",
      :display_command_Subversion=>"0",
      :display_command_Git=>"0",
      :overwrite_description_Mercurial=>"0",
      :overwrite_description_Cvs=>"0",
      :protocols_Darcs=>[{
        :regex=>"",
        :command=>"darcs get",
        :is_default=>"1",
        :protocol=>"Darcs",
        :regex_replacement=>"",
        :access=>"permission"}],
      :use_zero_clipboard=>"1",
      :protocols_Mercurial=>[{
        :regex=>"",
        :command=>"hg clone",
        :is_default=>"1",
        :protocol=>"Mercurial",
        :regex_replacement=>"",
        :access=>"permission"}],
      :display_login=>"",
      :display_checkout_info=>"1",
      :overwrite_description_Darcs=>"0",
      :overwrite_description_Subversion=>"0",
      :display_command_Cvs=>"0",
      :description_Darcs=>"",
      :overwrite_description_Bazaar=>"0",
      :protocols_Bazaar=>[{
        :regex=>"",
        :command=>"bzr checkout",
        :is_default=>"1",
        :protocol=>"Bazaar",
        :regex_replacement=>"",
        :access=>"permission"}],
      :description_Git=>"",
      :description_Abstract=>"The data contained in this repository can be downloaded to your computer using one of several clients.\nPlease see the documentation of your version control software client for more information.\n\nPlease select the desired protocol below to get the URL.\n",
      :display_command_Mercurial=>"0",
      :description_Subversion=>"",
      :protocols_Git=>[{
        :regex=>"\\/opt\\/git\\/repositories\\/(.*)\\.git",
        :command=>"git clone",
        :is_default=>"1",
        :protocol=>"Git",
        :regex_replacement=>"git@ohwr.stataging.es:\\1.git",
        :access=>"read+write"},
        {:regex=>"\\/opt\\/git\\/repositories\\/(.*)\\.git",
        :command=>"git clone",
        :protocol=>"Git Read Only",
        :regex_replacement=>"git://ohwr.staging.es/\\1.git",
        :access=>"read-only"}],
      :description_Bazaar=>"",
      :overwrite_description_Git=>"0",
      :description_Cvs=>"",
      :display_command_Bazaar=>"0",
      :protocols_Cvs=>[{
        :regex=>"",
        :append_path=>"1",
        :command=>"cvs checkout",
        :is_default=>"1",
        :protocol=>"Cvs",
        :regex_replacement=>"",
        :access=>"permission"}],
      :protocols_Subversion=>[{
        :regex=>"file:\\/\\/\\/opt\\/svn\\/(.*)",
        :append_path=>"1",
        :command=>"svn checkout",
        :is_default=>"1",
        :protocol=>"Subversion",
        :regex_replacement=>"http://svn.ohwr.staging.es/\\1",
        :access=>"permission"}]
      }
  end
end

