diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/configuration.rb | 16 | ||||
-rw-r--r-- | lib/tasks/themes.rake | 12 | ||||
-rw-r--r-- | lib/timezone_fixes.rb | 3 | ||||
-rw-r--r-- | lib/world_foi_websites.rb | 13 |
4 files changed, 32 insertions, 12 deletions
diff --git a/lib/configuration.rb b/lib/configuration.rb index 5f761a1f6..abd0f5cdc 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -17,19 +17,20 @@ module Configuration :DEBUG_RECORD_MEMORY => false, :DEFAULT_LOCALE => '', :DOMAIN => 'localhost:3000', - :EXCEPTION_NOTIFICATIONS_FROM => nil, - :EXCEPTION_NOTIFICATIONS_TO => nil, + :EXCEPTION_NOTIFICATIONS_FROM => '', + :EXCEPTION_NOTIFICATIONS_TO => '', :FORCE_REGISTRATION_ON_NEW_REQUEST => false, :FORWARD_NONBOUNCE_RESPONSES_TO => 'user-support@localhost', :FRONTPAGE_PUBLICBODY_EXAMPLES => '', :GA_CODE => '', :GAZE_URL => '', - :HTML_TO_PDF_COMMAND => nil, + :HTML_TO_PDF_COMMAND => '', :INCOMING_EMAIL_DOMAIN => 'localhost', :INCOMING_EMAIL_PREFIX => '', :INCOMING_EMAIL_SECRET => 'dummysecret', :ISO_COUNTRY_CODE => 'GB', - :MAX_REQUESTS_PER_USER_PER_DAY => nil, + :MAX_REQUESTS_PER_USER_PER_DAY => '', + :MTA_LOG_TYPE => 'exim', :NEW_RESPONSE_REMINDER_AFTER_DAYS => [3, 10, 24], :OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS => '', :RAW_EMAILS_LOCATION => 'files/raw_emails', @@ -41,15 +42,18 @@ module Configuration :SITE_NAME => 'Alaveteli', :SKIP_ADMIN_AUTH => false, :SPECIAL_REPLY_VERY_LATE_AFTER_DAYS => 60, + :THEME_BRANCH => false, :THEME_URL => "", :THEME_URLS => [], + :TIME_ZONE => "UTC", :TRACK_SENDER_EMAIL => 'contact@localhost', :TRACK_SENDER_NAME => 'Alaveteli', :TWITTER_USERNAME => '', + :TWITTER_WIDGET_ID => false, :USE_DEFAULT_BROWSER_LANGUAGE => true, - :USE_GHOSTSCRIPT_COMPRESSION => nil, + :USE_GHOSTSCRIPT_COMPRESSION => false, :UTILITY_SEARCH_PATH => ["/usr/bin", "/usr/local/bin"], - :VARNISH_HOST => nil, + :VARNISH_HOST => '', :WORKING_OR_CALENDAR_DAYS => 'working', } diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake index f06cf6312..14aa15551 100644 --- a/lib/tasks/themes.rake +++ b/lib/tasks/themes.rake @@ -16,6 +16,10 @@ namespace :themes do success end + def checkout_remote_branch(branch) + system("git checkout origin/#{branch}") + end + def usage_tag(version) "use-with-alaveteli-#{version}" end @@ -26,8 +30,12 @@ namespace :themes do clone_command = "git clone #{uri} #{name}" if system(clone_command) Dir.chdir install_path do - # try to checkout a tag exactly matching ALAVETELI VERSION - tag_checked_out = checkout_tag(ALAVETELI_VERSION) + # First try to checkout a specific branch of the theme + tag_checked_out = checkout_remote_branch(Configuration::theme_branch) if Configuration::theme_branch + if !tag_checked_out + # try to checkout a tag exactly matching ALAVETELI VERSION + tag_checked_out = checkout_tag(ALAVETELI_VERSION) + end if ! tag_checked_out # if we're on a hotfix release (four sequence elements or more), # look for a usage tag matching the minor release (three sequence elements) diff --git a/lib/timezone_fixes.rb b/lib/timezone_fixes.rb index b830ded4e..e6d2f9470 100644 --- a/lib/timezone_fixes.rb +++ b/lib/timezone_fixes.rb @@ -1,4 +1,4 @@ -# Taken from +# Taken from # https://rails.lighthouseapp.com/projects/8994/tickets/2946 # http://github.com/rails/rails/commit/6f97ad07ded847f29159baf71050c63f04282170 @@ -11,7 +11,6 @@ module ActiveRecord module ConnectionAdapters # :nodoc: module Quoting def quoted_date(value) - value.to_s(:db) if value.acts_like?(:time) zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal value.respond_to?(zone_conversion_method) ? value.send(zone_conversion_method) : value diff --git a/lib/world_foi_websites.rb b/lib/world_foi_websites.rb index f175afd3d..2ff924713 100644 --- a/lib/world_foi_websites.rb +++ b/lib/world_foi_websites.rb @@ -45,7 +45,16 @@ class WorldFOIWebsites {:name => "Acceso Intelligente", :country_name => "Chile", :country_iso_code => "CL", - :url => "http://accesointeligente.org"}] + :url => "http://accesointeligente.org"}, + {:country_name => "Australia", + :country_iso_code => "AU", + # The Australian site is not yet live. So, not including name & url yet. + }, + {:name => "Informace pro Vsechny", + :country_name => "Česká republika", + :country_iso_code => "CZ", + :url => "http://www.infoprovsechny.cz"} + ] return world_foi_websites end @@ -54,4 +63,4 @@ class WorldFOIWebsites return result end end - + |