theleoborges / app_constants Goto Github PK
View Code? Open in Web Editor NEWA clean and simple way to manage your application's environment specific constants
License: MIT License
A clean and simple way to manage your application's environment specific constants
License: MIT License
After pushing to heroku, app crashes (H10 error)
Wouldn't it be good if there was a rake task to verify that all keys are present before starting the app server or before/during deployment?
We did this at the big webhosting client around 3+ years ago. Please ping me at vraravam -at- thoughtworks -dot- com in case you are interested. I can help implement this. (I did the exact same functionality along with that rake task there - but it could not be open sourced).
Greetings! Thanks for your work on this project. I have had some trouble integrating app_constants with other libraries because the ghost method technique is not reinforced through the use of the respond_to? methods. When integrating with libraries that choose to reflect on the methods defined in AppConstants, it will claim the class doesn't not define any of the methods set dynamically in the configurations.yml file.
My question is as following. According to your ghost method implementation in #method_missing and self.method_missing, it would appear that #respond_to? and self.respond_to? should always return true. This specifically boils down to the #method_missing instance method.
lines 35.36
if constants_hash[method.to_s].nil?
""
I will submit a patch for this if it is desired behavior. Otherwise, we could decide to get more specific and only respond true for configuration methods that do exist. My current implementation is as following:
def self.respond_to?(method)
@@instance.constants_hash[method.to_s].present?
end
def respond_to?(method)
constants_hash[method.to_s].present?
end
.. However your ghost method implementation is more permissive. Any thoughts on this? Thanks again for your work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.