A proof of concept of having Sinatra like routes inside your controllers.
Since the router is gone, feel free to remove config/routes.rb
.
Then add the file below to lib/action_controller/inline_routes.rb
inside your app.
class Parser | |
def initialize(hash) | |
@hash = hash | |
end | |
def parse() | |
@hash.inject({}) do |h, (k, v)| | |
h[k] = parse_element(k, v) | |
h | |
end |
#!/bin/bash | |
echo "Creating tags" | |
for tag in `git branch -r | grep "tags/" | egrep -vw "svn/tags/(integration|production)" | sed 's/ tags\///'`; do | |
git_tag_name=`echo "$tag" | sed 's/tags\///'` | |
parents=`git show --format="%P" refs/remotes/$tag` | |
real_parent=`echo "$parents" | cut -d' ' -f 2` | |
git tag -a -m"Converting SVN tags" $git_tag_name $real_parent | |
done |
# Update System | |
# ------------------------------------------------------------------------------ | |
echo 'Updating System...' | |
sudo apt-get -y update | |
# Hardware | |
# ------------------------------------------------------------------------------ | |
echo 'Installing bumblebee' | |
sudo add-apt-repository -y ppa:bumblebee/stable && sudo apt-get update | |
sudo apt-get -y install bumblebee bumblebee-nvidia |