GithubHelp home page GithubHelp logo

config_hound's People

Contributors

chengqing-su avatar dtbell91 avatar mdub avatar rea-jonpad avatar tigris avatar

Watchers

 avatar  avatar  avatar  avatar

config_hound's Issues

Can't load config with YAML aliases

Config Hound no longer accepts YAML documents with aliases:

# cat /app/test.yml 
---
foo: &foo
bar:
  <<: *foo

# bundle exec ruby -e "require 'config_hound'; ConfigHound.load('/app/test.yml')"
/usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:402:in `visit_Psych_Nodes_Alias': Unknown alias: foo (Psych::BadAlias)
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:16:in `visit'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:6:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:32:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:338:in `block in revive_hash'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:336:in `each'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:336:in `each_slice'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:336:in `revive_hash'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:162:in `visit_Psych_Nodes_Mapping'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:16:in `visit'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:6:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:32:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:338:in `block in revive_hash'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:336:in `each'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:336:in `each_slice'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:336:in `revive_hash'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:162:in `visit_Psych_Nodes_Mapping'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:16:in `visit'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:6:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:32:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:311:in `visit_Psych_Nodes_Document'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:16:in `visit'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/visitor.rb:6:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych/visitors/to_ruby.rb:32:in `accept'
        from /usr/local/lib/ruby/2.4.0/psych.rb:302:in `safe_load'
        from /app/lib/config_hound/parser.rb:19:in `parse_yaml'
        from /app/lib/config_hound/parser.rb:12:in `parse'
        from /app/lib/config_hound/parser.rb:6:in `parse'
        from /app/lib/config_hound/resource.rb:61:in `load'
        from /app/lib/config_hound/loader.rb:29:in `load_source'
        from /app/lib/config_hound/loader.rb:20:in `map'
        from /app/lib/config_hound/loader.rb:20:in `load'
        from /app/lib/config_hound.rb:10:in `load'
        from -e:1:in `<main>'

The change appears related to the use of YAML#safe_load. The internet informs me that we can enable aliases, even when using safe_load.

Would you be happy for a PR that restores alias support?

Can not load config from s3 object with versionId

When we try to use config_hound to get a file with a specified version from S3 bucket. I found an issue that config_hound can not get the right format.

For example, the file path is s3://test-s3-bucket/config.yml?versionId=version, config_hound will get the format is yml?versionId=version.

We want to config_hound support load configs from an s3 object with the specified version.

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.