crystal-environment
Version, currently 0.1.01 version
- 0.1.0latestSep 23, 2018
github.com/Sija/crystal-environment
Crystal::Environment
9 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
crystal-environment:
github: Sija/crystal-environment
version: ~> 0.1.0Then run:
shards installshard.yml
- Crystal
0.23.1- License
- MIT
- Author
- Sijawusz Pur Rahnama <sija@sija.pl>
Dependencies
Development Dependencies
- ameba0.8.0github: veelenga/amebadev
README
# crystal-environment [](https://travis-ci.org/Sija/crystal-environment) [](https://github.com/Sija/crystal-environment/releases) [](https://github.com/Sija/crystal-environment/blob/master/LICENSE)
Adds `Crystal::Environment` module for querying `CRYSTAL_ENV` variable in a
compile-time safe manner.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
crystal-environment:
github: Sija/crystal-environment
```
## Usage
```crystal
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
1. [Fork it](https://github.com/Sija/crystal-environment/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new [Pull Request](https://github.com/Sija/crystal-environment/pulls)
## Contributors
- [@Sija](https://github.com/Sija) Sijawusz Pur Rahnama - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Sep 23, 2018
- Commit
8f49b354f635- Crystal
0.23.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Sija/crystal-environment
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1