Skip to content

Commit

Permalink
bugfix, make roman time optional NUBIC#435
Browse files Browse the repository at this point in the history
  • Loading branch information
flockom committed Apr 15, 2013
1 parent f3e0b76 commit 1e458c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace :testbed do
task :migrate do
chdir('testbed') do
Bundler.with_clean_env do
sh 'bundle exec rails generate surveyor:install'
sh 'bundle exec rails generate surveyor:install --timezone=Rome'
sh 'bundle exec rake db:migrate db:test:prepare'
end
end
Expand Down
2 changes: 1 addition & 1 deletion ci-exec.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -xe

BUNDLER_VERSION=1.1.5
BUNDLER_VERSION=1.3.1
GEMSET=surveyor

if [ -z $CI_RUBY ]; then
Expand Down
7 changes: 5 additions & 2 deletions lib/generators/surveyor/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class InstallGenerator < Rails::Generators::Base
source_root File.expand_path("../templates", __FILE__)
desc "Generate surveyor README, migrations, assets and sample survey"
class_option :skip_migrations, :type => :boolean, :desc => "skip migrations, but generate everything else"
class_option :timezone, :type => :string, :desc => "set the Rails timezone in config/application.rb", :default => ""


MIGRATION_ORDER = %w(
Expand Down Expand Up @@ -100,8 +101,10 @@ def locales
end

def application_config
application do
"config.time_zone = 'Rome'"
unless options[:timezone].blank?
application do
"config.time_zone = '#{options[:timezone]}'"
end
end
end

Expand Down

0 comments on commit 1e458c0

Please sign in to comment.