Giter VIP home page Giter VIP logo

figjam's People

Contributors

dependabot[bot] avatar hlascelles avatar owst avatar sweep-ai[bot] avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

figjam's Issues

Sweep: Convert all private methods identifiers

We currently have all private methods below one keyword saying "private".

This issue is to change all the private methods to be individually marked with the private keyword instead.

For example, change:

private 

def foo
end

def bar
end

To:

private def foo
end

private def bar
end

Error with Psych 4 when using aliases

Psych 4 (the default packaged with Ruby 3.0.1) uses safe_load by default, which does not support aliases. This causes an error when trying to load an application.yml that does use aliases. Rails 7 has adopted a simple patch to workaround this issue, since figjam calls YAML.load I think it should use the same workaround to support Psych 4.

Reproduction

With the following application.yml:

default: &default
  MY_SETTING: "my_value"

test:
  <<: *default

production:
  <<: *default

the following simple script fails:

require 'figjam'

p Figjam::Application.new(environment: :production, path: "application.yml").load

with

/Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych.rb:334:in `safe_load'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/3.1.0/psych.rb:369:in `load'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:65:in `parse'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:61:in `block in raw_configuration'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:61:in `raw_configuration'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:69:in `global_configuration'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:37:in `configuration'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:47:in `each'
	from /Users/owenstephens/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/figjam-1.5.0/lib/figjam/application.rb:41:in `load'
	```

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.