karlfreeman / middleman-deploy

Deploy a middleman built site over rsync, ftp, stfp, or git (e.g. gh-pages on github).
MIT License
553 stars 124 forks source link

Allow specifying env #104

Open johnnyshields opened 9 years ago

johnnyshields commented 9 years ago

The original code here:

        env = options['environment'] ? :production : options['environment'].to_s.to_sym

Looks backwards, as it will force env to always be production. Since you are defaulting the environment to production in the Thor args

      class_option :environment,
                 aliases: '-e',
                 default: ENV['MM_ENV'] || ENV['RACK_ENV'] || 'production',

you can simplify this.