Coder Social home page Coder Social logo

cr-dotenv's People

Contributors

bcardiff avatar bonyiii avatar dscottboggs avatar gdotdesign avatar j8r avatar jwoertink avatar kalinon avatar marceloboeira avatar neovintage avatar rodrigopinto avatar skojin avatar tmilewski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cr-dotenv's Issues

Ignore Quotes

Quotes should be handled

now

NAME="value"

loaded as in code as

ENV["NAME"] == "\"value\""

it should be

ENV["NAME"] == "value"

Overriding a loaded env

Is there a way to override the ENV once it's loaded?

#.env
DB_URL=postgres://localhost:5432/dev
#.env.test
DB_URL=postgres://localhost:5432/test
require "dotenv"

Dotenv.load
Dotenv.load ".env.test"

puts ENV["DB_URL"]? #=> postgres://localhost:5432/dev

Shards update broken on Crystal 1.0

Currently on doing shards update, I am getting a missing version warning;

rishav@rishav-sbook:~/digglu$ shards update
Resolving dependencies
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/gdotdesign/cr-dotenv.git
Fetching https://github.com/crystal-community/jwt.git
Fetching https://github.com/evanhahn/crystal-helmet.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/spider-gazelle/openssl_ext.git
Unable to satisfy the following requirements:

- `crystal (>= 0.35.0, < 2.0.0)` required by `pg 0.23.2`
- `crystal (>= 0.34.0, < 2.0.0)` required by `dotenv 1.0.0`
- `crystal (>= 0.36.1)` required by `jwt 1.5.1`
- `crystal (< 1.0.0)` required by `helmet 0.2.2`
- `crystal (>= 0.35.0, < 2.0.0)` required by `db 0.10.1`
- `crystal (>= 0.36.1)` required by `openssl_ext 2.1.4`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.

There more info here https://forum.crystal-lang.org/t/weird-shards-outdated-output-crystal-1-0-0/3065
Essentially this is an explicit check to ensure that a library works with Crystal 1.0

error with crystal 0.34

I get this compile error with crystal 0.34

Unhandled exception: Parse error on line 2:5 (Dotenv::Parser::Error)
  from lib/dotenv/src/parser.cr:33:11 in 'parse'
  from lib/dotenv/src/dotenv.cr:24:5 in 'parse'
  from lib/dotenv/src/dotenv.cr:114:7 in 'load'

File descriptor leak

I noticed in the code you do File.open but never close the file. That file descriptor will be forever occupied for the rest of the program.

File.open(File.expand_path(filename))

Please consider using the block form, File.open(filename) { do_something_here } to make sure the file is closed after you use it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.