What thing should be excluded when posting an open-source project on GitHub [closed] - ruby-on-rails

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I would like to add an open-source, ruby-on-rails project to GitHub. I would like to make it as easy as possible for others to contribute, while protecting sensitive information.
In addition to:
database passwords
API keys
Which things are best suited to environment variable (e.g. ENV['MY_API_KEY'])?
In addition to:
config/database.yml (thanks house9)
Which things are best included in the .gitignore file?
What gems or other tools are helpful in this regard?
Should sensitive accounts (e.g. 'admin') be created directly in the database in the production environment?

I would put config/database.yml in .gitignore and have a config/database.yml.example file for people to use
consider using dotenv
https://rubygems.org/gems/dotenv-rails
https://github.com/bkeepers/dotenv
the default .env file can have 'stubbed' out values that will at least let someone fire it up in development and then it can be replaced when deploying with actual values

Related

Where should I store a small amount of data for my application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am going to make a program for learning languages and I want to add words to the dictionary so I can check them whenever I want to. I am going to store the word, its translation, definition and example(s) of use.
I can use databases but I am afraid it is too much because once i finish this little project I want to convert it to .exe file (I am using python) and send it to my friends and I don't want them to download SQL DBMS.
I have seen some ideas like - store it in .csv or .xml or even .txt files but I am not sure if it's the best option.
I believe the most appropriate way of storing a dictionary is by using a .json file. IIRC the python package json makes importing and exporting easier.
You can use SQLite as database.
It does not require to install a DBMS and once you create the .exe all the modules from python to use it are included

how to run the rails example code present in github? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am trying to run the code present in https://github.com/binarylogic/authlogic_example.git but could not able to do. I have tried a few examples before and it went so good. I could not do the same with this. There is no gemfile and probably few things are missing. Somebody tell me how to execute this particular example.
The last commit is 3 years old on that repo so I doubt it is compatible with bundle and Rails 3. I would advise you to try devise for authentication instead os authlogic as with Rails3 that is the defacto auth gem.
Example applications: https://github.com/plataformatec/devise/wiki/Example-Applications

A tool to browse my rails app's database? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want a way to comprehensively view:
1. what's going on in my database
2. what the schema looks like
Is there a good tool that lets you do that?
There's a gem Active Admin that lets you do that: http://activeadmin.info/documentation.html
And of course you can use any other Administration tool that lets you connect to your database, for instance Squirrel http://squirrel-sql.sourceforge.net/ which connects to various sql databases, sqlite among them.
For development and testing, I would say the preferred way of knowing your data is generating it automatically using tools like FactoryGirl or Faker and look into schema.rb for the schema.

Ideal README file for Web applications [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am kind of obsessed with how I document and organize my projects. I am curious about best practices for readme files, and looking to learn more about what should be in it. I am mostly using rails. But I believe that readme should make no assumptions about the reader and explain everything with from scratch. So what would be your ideal descriptive timeless readme file for web application projects? Also It would ve very helpful if you attach the readme files you like.
content? short info the about app? language, framework? screenshot? format? markdown vs plain? ideal deployment? etc..
If you don't make assumptions about the reader then plain text is the best choice. Any markup language needs to be parsed and converted which may not be possible when viewing the readme locally. Sites such as Github support various markup formats which is good but you're limited to what they support.
It terms of content: it should explain everything that the user would possibly want to do, such as compile, build, run, modify, et cetera.

rails i18n rename key [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I work on a project translated to over 20 languages. I need to rename some keys, i.e. 'some.key.with.deep.nesting' to 'this.lives.in.another.place'. How do I do it? Manually moving parts of tree in YAMLs 20 times for each is too long and tedious. Are there some standard practices for managing i18n in Rails?
Official guide (http://guides.rubyonrails.org/i18n.html) explains how to start with i18n, but says nothing about managing translations.
There are some external solutions like localeapp.com, but last time i tested it, it failed to rename keys.
There are also projects like copycopter, i haven't installed it yet, but in description there's also nothing about renaming keys.
So what do you use to manage, rename, move and reorganize your locales?
Localeapp allows you to rename keys easily — you just need to press the additional options button:
And it does so for all your locales at once. Perhaps this feature was added after you tried it — it is beta after all.
If you don't mind your i18n files being mangled you can just use the console to read them in with a yaml parser, move the hashes around and dump it out to files again with a yaml encoder.
For translation management in rails you can give phraseapp a try. It provides an in-place editor as well as key management.
copycopter is just for this.
https://github.com/copycopter/copycopter-server
Here is also a rails cast
http://railscasts.com/episodes/336-copycopter

Resources