forked from tslocke/hobocookbook
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
69 lines (45 loc) · 2.45 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Hobo Cookbook!
This is the open-source code that implements the site at http://cookbook.hobocentral.net
# How to run locally
The cookbook does not run under Ruby 1.9.2, it requires Ruby 1.8.7.
This should be easy to fix if anybody wants to take a crack at it.
We're using Vlad for deployment, but it messes with our rake tasks at
other times, so the first step is to comment out the call to Vlad.load
in Rakefile.
As for many rails3 apps:
$ git submodule update --init
$ bundle install
$ vi config/database.yml # and adjust as required
$ bundle exec rake db:migrate
Unique to the cookbook:
$ pwd > git-path
$ echo 'master' > git-version
Run this command now and whenever you want to update/rebuild any of the external dependencies such as hobo, the plugins or the tutorials.
$ bundle exec rake cookbook:update
# How to update the Agility Tutorial
The Agility tutorial is a Gitorial, a git based tutorial build with stacked git. These are the steps to edit the tutorial:
* Clone https://github.com/Hobo/agility-gitorial-patches
* Follow the steps from the Readme in https://github.com/Hobo/agility-gitorial-patches to edit the patches
* Make a commit to Hobo/agility-gitorial-patches
* Overwrite history in Hobo/agility-gitorial:
cd agility-gitorial
git remote add origin [email protected]:Hobo/agility-gitorial.git
gitorial-bulk-tag # Download from here: https://github.com/bryanlarsen/gitorial-tools/blob/master/gitorial-bulk-tag
git push origin --force
git push --tags origin --force
* Clone this repository and build the contents: https://github.com/Hobo/agility-gitorial-patches. (A new copy is recommended)
git clone [email protected]:Hobo/hobocookbook
cd hobocookbook
bundle
bundle exec rake db:migrate
git submodule update --init
pwd > git-path
echo 'master' > git-version
bundle exec rake cookbook:update
bundle exec rails s
* Go to http://localhost:3000 and check that the tutorial has been updated successfully
* Edit gitorials/agility.markdown and remove the last sections, starting with "Unit Testing". This is because a bug in Kramdown and Ruby 1.8.7: it breaks with files which are too long. In the future we'll divide the tutorial into different sections.
* Push the changes to Github and update the production server
git add gitorials/agility.markdown
git push origin master
bundle exec rake vlad:update && bundle exec rake vlad:start_app # you need admin privileges for this :)