Best way to keep some custom local changes in GIT? - ruby-on-rails

We have a Rails app that we share with several developers and we are using git.
I've made a few changes to the Rails app to match my computer configuration and my own preferences that I don't want to share in the main GitHub repository. I wonder what's the best way to keep my custom changes when I am developing while being able to push/pull to stay up to date with the main branch and being able to do pull requests to share the work I am doing on the app.

Related

How can I add a large number of static HTML files to rails app without slowing the development cycle?

I am wondering the best way to include an old web site into a newer rails app.
The legacy web site:
Has 21,000 small text files with minimal markup that are linked together.
Totals ~ 220MB
Has a root page located within a directory and is linked to many sub-directories
I'd like to include the old site in my rails app folder, but I am concerned that it will mean a much longer development cycle each time I deploy. I am using capistrano and my first thought is to place the folder with Old Site in the shared directory on the production server and symbolically link to it accordingly. This approach strikes me as undesirable as my resources for New App will be split in more than one location. The benefit might be a much quicker debug/deploy cycle.
Right now, I have no plans to modify the Old Site files. At some point, that could change.
I have been impressed with how quickly my otherwise lightweight project will deploy. Right now I am making frequent changes and repeating the code/deploy cycle often. I'd like to avoid slowing that down unnecessarily.
Is there a best practice for this sort of thing?
I don't think there is a "best practice" per se, but one option would be to use "Git Submodules". Add your Old Site as a submodule in the right folder in your New Site and you have one developer git repository and Capistrano will not fetch git submodule files while deploying.
With submodules, you will have 2 git repositories. But, one will be linked from within another one ("old site" in "new site"). I think, it is logical. You will have old site repo and new site repo. They are 2 separate sites after all, just linked.

How to version control the JIRA changes?

I asked the following two questions in JIRA Answers, but got no reply so far:
Question 1
Question 2
Basically my question is what's the best way to make changes in a JIRA production environment.
This will be rather general answer, but this is how I do it:
I avoid modifying JIRA production files. When I need it (e.g. mail templates), I keep them under source control along with plugin in 'deploy' directory which mimics JIRA directory structure so it is possible to grap it and deploy it with copy&paste
I frequently use javascript to decorate screens with custom behavior
Schema changes, custom fields and other meta data are all created in code
Keep everything in plugin and leverage plugin versioning system. Plugin should be able to check whether there is everything it needs and when not it should be able to upgrade incrementally.
For JIRA configuration - this is the same, plugin should check whether it has everything it needs, but you can also keep configuration changes in some excel file and have it under source control
My aproach is to have everything possible in source control and modify production files only when absolutely necessary. Do as much in code as possible.

How can I have persistence Modifying a Grails plugin?

I'm developing a grails application that uses export:1.6 plugin, but for particular reasons in some cases the result of an action using services is wrong, so I had to get in the methods of the plugin and I had to make son modifications inside the plugin, trouble comes when I want to commit it in our SVN repository (because we are working in a develop team), I'm going to update the app with the plugin modified, but when another person downloads it, the original plugin is going to be originally installed. So I thought to create a new plug in, but, do you have any another suggestion? or if the best way is to create a new plugin, how can I publish it in our Repo? oris it possible to download it with my changes?
This question is similar to this one. In your case, you are better off creating a new plugin.

Source Control Workflow: synching code changes on a staging webserver

I am currently using TFS to source changes to a web site code base. Currently, when I'm done making a change, I need to deploy the changes to a web server for review by the end user.
Generally the way I would do this is just connect to that machine via RDP, open visual studio and get latest to pull changes...
However, this only works if I'm the only one working on the entire site. If someone else RDP in to make changes, the site is locked to my TFS account, and they can't make any changes to it...
They could pull their own copy of the site into their own machine via TFS and check in the changes there but because so much of their part is done on the database (vs code) they'd have to duplicate everything they do into the website every time them commit a change, so they prefer to work directly on the machine...
is there any way to make this work, a better way to set this up so I can pull their changes into my local copy via TFS?
my biggest problem to overcome is the fact that when I Get Latest on the webserver via RDP it locks the entire solution to my TFS account, so that when they login to RDP with their credentials, they can't make any changes because the files are checked in, and of course they can't checkout because of course the solution is tied to my account.
If I can get past that I think we'd be okay.
any info is appreciated, please let me know if I can provide more context, thanks
Can you set up a different TFS workspace for each user on your RDP machine? This should allow multiple users to use the TFS client to pull the same solution on the same machine without issue.

Rails App in Dropbox

I would like to backup my rails app usig a private git repo. I've decided to use Dropbox but I've already deployed to heroku, setup DNS for a custom domain name without backing up and would hate for something to go wrong by transferring my project.
Does anyone have experience with this or knows if something will go wrong? Should I reconfigure any files before transferring to a private dropbox folder?
Heroku's addons (i.e. custom domain) configurations are located on their server, not on your computer. Typically configs appear in ENV variables. Type heroku config to see what you have.
So yes, you are free to copy your code anywhere you like, and be sure to copy your dotfiles as well.
Personally, I use github for my code backups.
bitbucket now has private git repos. Unfuddle had them for a while too. These are all free, BTW.
In short - don't reconfigure or setup anything - have fun of some coding instead :)
If you just want your repo to stay safely in the "cloud" then:
Bundle (for git or mercurial)
Gmail the bundle to yourself as a reply to the same "pull" message". Or, in case you have a fellow coder, then gmail to him/her. Double-backup.
Done and forgotten. There is plenty of room in you gmail inbox and sent-items for the source-code of several projects.
IMHO it is:
fast
platform-neutral
shareable via smart-phone within 5 minutes maximum
pull/push/work anywhere
secure
easy
a natural habit

Resources