Skip to content

Allow specifying env#104

Open
johnnyshields wants to merge 1 commit intokarlfreeman:masterfrom
johnnyshields:patch-1
Open

Allow specifying env#104
johnnyshields wants to merge 1 commit intokarlfreeman:masterfrom
johnnyshields:patch-1

Conversation

@johnnyshields
Copy link

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant