crystal-environment v0.1.0
crystal-environment
Adds Crystal::Environment
module for querying CRYSTAL_ENV
variable in a compile-time safe manner.
Installation
Add this to your application's shard.yml
:
dependencies:
crystal-environment:
github: Sija/crystal-environment
Usage
require "crystal-environment"
Crystal.env.name # => "development"
Crystal.env.development? # => true
Crystal.env.production? # => false
# Defining custom environments
Crystal.env.staging? # Throws compile-time error
Crystal::Environment.setup %i(staging)
Crystal.env.staging? # => true
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- @Sija Sijawusz Pur Rahnama - creator, maintainer
Repository
crystal-environment
Owner
Statistic
- 6
- 1
- 0
- 1
- 1
- 3 months ago
- November 2, 2017
License
MIT License
Links
Synced at
Sat, 21 Dec 2024 08:28:08 GMT
Languages