mirror of
https://github.com/fspc/bike-database.git
synced 2025-02-23 01:23:24 -05:00
Louis | reverts fa110, which was branched instead
This commit is contained in:
parent
fa110546c8
commit
3c8962fa49
75
.gitignore
vendored
75
.gitignore
vendored
@ -4,77 +4,18 @@
|
|||||||
# or operating system, you probably want to add a global ignore instead:
|
# or operating system, you probably want to add a global ignore instead:
|
||||||
# git config --global core.excludesfile '~/.gitignore_global'
|
# git config --global core.excludesfile '~/.gitignore_global'
|
||||||
|
|
||||||
# Created by http://www.gitignore.io
|
# Ignore bundler config.
|
||||||
|
/.bundle
|
||||||
|
|
||||||
### Vagrant ###
|
# Ignore the default SQLite database.
|
||||||
.vagrant/
|
|
||||||
|
|
||||||
|
|
||||||
### SublimeText ###
|
|
||||||
# workspace files are user-specific
|
|
||||||
*.sublime-workspace
|
|
||||||
|
|
||||||
# project files should be checked into the repository, unless a significant
|
|
||||||
# proportion of contributors will probably not be using SublimeText
|
|
||||||
# *.sublime-project
|
|
||||||
|
|
||||||
#sftp configuration file
|
|
||||||
sftp-config.json
|
|
||||||
|
|
||||||
|
|
||||||
### OSX ###
|
|
||||||
.DS_Store
|
|
||||||
.AppleDouble
|
|
||||||
.LSOverride
|
|
||||||
|
|
||||||
# Icon must end with two \r
|
|
||||||
Icon
|
|
||||||
|
|
||||||
|
|
||||||
# Thumbnails
|
|
||||||
._*
|
|
||||||
|
|
||||||
# Files that might appear on external disk
|
|
||||||
.Spotlight-V100
|
|
||||||
.Trashes
|
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
|
||||||
.AppleDB
|
|
||||||
.AppleDesktop
|
|
||||||
Network Trash Folder
|
|
||||||
Temporary Items
|
|
||||||
.apdisk
|
|
||||||
|
|
||||||
|
|
||||||
### Rails ###
|
|
||||||
*.rbc
|
|
||||||
capybara-*.html
|
|
||||||
.rspec
|
|
||||||
/log
|
|
||||||
/log/*.log
|
|
||||||
/tmp
|
|
||||||
/db/*.sqlite3
|
/db/*.sqlite3
|
||||||
/db/*.sqlite3-journal
|
/db/*.sqlite3-journal
|
||||||
/public/system
|
|
||||||
/coverage/
|
# Ignore all logfiles and tempfiles.
|
||||||
/spec/tmp
|
/log/*.log
|
||||||
**.orig
|
/tmp
|
||||||
rerun.txt
|
|
||||||
pickle-email-*.html
|
|
||||||
|
|
||||||
# Ignore secret assets
|
# Ignore secret assets
|
||||||
/lib/assets/*
|
/lib/assets/*
|
||||||
|
|
||||||
# TODO Comment out these rules if you are OK with secrets being uploaded to the repo
|
.DS_Store
|
||||||
config/initializers/secret_token.rb
|
|
||||||
config/secrets.yml
|
|
||||||
|
|
||||||
## Environment normalisation:
|
|
||||||
/.bundle
|
|
||||||
/vendor/bundle
|
|
||||||
|
|
||||||
# these should all be checked in to normalise the environment:
|
|
||||||
# Gemfile.lock, .ruby-version, .ruby-gemset
|
|
||||||
|
|
||||||
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
||||||
.rvmrc
|
|
||||||
|
1
.vagrant/machines/default/virtualbox/action_provision
Normal file
1
.vagrant/machines/default/virtualbox/action_provision
Normal file
@ -0,0 +1 @@
|
|||||||
|
1.5:e13fdd92-def4-4ed7-a167-23d9309061db
|
1
.vagrant/machines/default/virtualbox/action_set_name
Normal file
1
.vagrant/machines/default/virtualbox/action_set_name
Normal file
@ -0,0 +1 @@
|
|||||||
|
1409951176
|
1
.vagrant/machines/default/virtualbox/id
Normal file
1
.vagrant/machines/default/virtualbox/id
Normal file
@ -0,0 +1 @@
|
|||||||
|
e13fdd92-def4-4ed7-a167-23d9309061db
|
1
.vagrant/machines/default/virtualbox/index_uuid
Normal file
1
.vagrant/machines/default/virtualbox/index_uuid
Normal file
@ -0,0 +1 @@
|
|||||||
|
766e9debb0ee447db036220685ccdcd7
|
1
.vagrant/machines/default/virtualbox/synced_folders
Normal file
1
.vagrant/machines/default/virtualbox/synced_folders
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"nfs":{"/vagrant":{"type":"nfs","guestpath":"/vagrant","hostpath":"/Users/Thoughtworker/personal-projects/bike-database","disabled":false,"map_uid":502,"map_gid":20,"nfs_udp":true,"nfs_version":3,"uuid":"1546877126"}},"virtualbox":{"/tmp/vagrant-puppet-4/manifests":{"owner":"root","guestpath":"/tmp/vagrant-puppet-4/manifests","hostpath":"/Users/Thoughtworker/personal-projects/bike-database/puppet/manifests","disabled":false},"/tmp/vagrant-puppet-4/modules-0":{"owner":"root","guestpath":"/tmp/vagrant-puppet-4/modules-0","hostpath":"/Users/Thoughtworker/personal-projects/bike-database/puppet/modules","disabled":false}}}
|
59
NOTES.txt
59
NOTES.txt
@ -1,59 +0,0 @@
|
|||||||
|
|
||||||
* Road blocks and fixes:
|
|
||||||
|
|
||||||
##- When trying to do 'vagrant plugin install vagrant-vbguest' got the follownig nokogiri error. Vagrant v1.6.3 on OSX 10.8.5.
|
|
||||||
|
|
||||||
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
|
|
||||||
Building nokogiri using packaged libraries.
|
|
||||||
Building libxml2-2.8.0 for nokogiri with the following patches applied:
|
|
||||||
- 0001-Fix-parser-local-buffers-size-problems.patch
|
|
||||||
...
|
|
||||||
...
|
|
||||||
...
|
|
||||||
Bundler, the underlying system Vagrant uses to install plugins,
|
|
||||||
reported an error. The error is shown below. These errors are usually
|
|
||||||
caused by misconfigured plugin installations or transient network
|
|
||||||
issues. The error from Bundler is:
|
|
||||||
|
|
||||||
An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot continue.
|
|
||||||
Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling.
|
|
||||||
...
|
|
||||||
...
|
|
||||||
|
|
||||||
- Workaround
|
|
||||||
$ export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
|
||||||
$ vagrant plugin install vagrant vagrant-vbguest
|
|
||||||
$ vagrant plugin list (validate install)
|
|
||||||
|
|
||||||
|
|
||||||
##- Executing "rake db:create" you get the following errors
|
|
||||||
PG::Error: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
|
|
||||||
HINT: Use the same encoding as in the template database, or use template0 as template.
|
|
||||||
: CREATE DATABASE "db/bikedb_development" ENCODING = 'utf8'
|
|
||||||
|
|
||||||
- Solution: follow the instructions here
|
|
||||||
http://journal.tianhao.info/2010/12/postgresql-change-default-encoding-of-new-databases-to-utf-8-optional/
|
|
||||||
|
|
||||||
|
|
||||||
## UPDATE - 2014.09.03
|
|
||||||
Implemented a simple psql script that does the exactly as the url above. Do the following inside guest-OS
|
|
||||||
|
|
||||||
$ vagrant ssh
|
|
||||||
|
|
||||||
$ psql -d postgres -f /vagrant/etc/postgres/enable_utf8_template.sql
|
|
||||||
$ sudo -u postgres psql postgres
|
|
||||||
|
|
||||||
postgres=# \l
|
|
||||||
|
|
||||||
(The ENCODING should be UTF8 for 'template1' database)
|
|
||||||
|
|
||||||
|
|
||||||
Original resources for the Vagrantfile.
|
|
||||||
http://gorails.com/guides/using-vagrant-for-rails-development
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
|
|
||||||
## TODOs ##
|
|
||||||
- Add the etc/enable_utf8_template.sql into Vagrant provision routine. One less task to for developer to execute.
|
|
||||||
- Create developement instructions (README.rdoc?), outlining the commands get the Vagrant/Bike-DB up and running.
|
|
||||||
|
|
@ -8,4 +8,4 @@ An instance can be seen running at http://secret-earth-4230.herokuapp.com/
|
|||||||
|
|
||||||
The storyboard / feature list is at https://trello.com/b/ZCZ9sThH/bike-db-app
|
The storyboard / feature list is at https://trello.com/b/ZCZ9sThH/bike-db-app
|
||||||
|
|
||||||
Feel free to request feature additions!
|
Feel free to request feature additions!
|
||||||
|
@ -25,4 +25,4 @@ Things you may want to cover:
|
|||||||
|
|
||||||
|
|
||||||
Please feel free to use a different markup language if you do not plan to run
|
Please feel free to use a different markup language if you do not plan to run
|
||||||
<tt>rake doc:app</tt>.
|
<tt>rake doc:app</tt>.
|
||||||
|
36
Vagrantfile
vendored
36
Vagrantfile
vendored
@ -1,36 +0,0 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
|
|
||||||
Vagrant.configure('2') do |config|
|
|
||||||
config.vm.box = 'precise32'
|
|
||||||
config.vm.box_url = 'http://files.vagrantup.com/precise32.box'
|
|
||||||
config.vm.hostname = 'rails-dev-box'
|
|
||||||
|
|
||||||
config.vm.provider 'vmware_fusion' do |v, override|
|
|
||||||
override.vm.box = 'precise64'
|
|
||||||
override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box'
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.provider 'parallels' do |v, override|
|
|
||||||
override.vm.box = 'parallels/ubuntu-12.04'
|
|
||||||
override.vm.box_url = 'https://vagrantcloud.com/parallels/ubuntu-12.04'
|
|
||||||
|
|
||||||
# Can be running at background, see https://github.com/Parallels/vagrant-parallels/issues/39
|
|
||||||
v.customize ['set', :id, '--on-window-close', 'keep-running']
|
|
||||||
end
|
|
||||||
|
|
||||||
# Enable, if you are NOT OSX.
|
|
||||||
# config.vm.synced_folder '.', '/vagrant', type: 'rsync'
|
|
||||||
|
|
||||||
# Enable ,if you are on OSX for increase performance. NOTE: May require Admin password
|
|
||||||
config.vm.synced_folder '.', '/vagrant', type: 'nfs'
|
|
||||||
|
|
||||||
config.vm.network :private_network, ip: '33.33.33.33'
|
|
||||||
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
|
||||||
|
|
||||||
config.vm.provision :puppet do |puppet|
|
|
||||||
puppet.manifests_path = 'puppet/manifests'
|
|
||||||
puppet.module_path = 'puppet/modules'
|
|
||||||
end
|
|
||||||
end
|
|
12
config/initializers/secret_token.rb
Normal file
12
config/initializers/secret_token.rb
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Your secret key is used for verifying the integrity of signed cookies.
|
||||||
|
# If you change this key, all old signed cookies will become invalid!
|
||||||
|
|
||||||
|
# Make sure the secret is at least 30 characters and all random,
|
||||||
|
# no regular words or you'll be exposed to dictionary attacks.
|
||||||
|
# You can use `rake secret` to generate a secure secret key.
|
||||||
|
|
||||||
|
# Make sure your secret_key_base is kept private
|
||||||
|
# if you're sharing your code publicly.
|
||||||
|
Bikedb::Application.config.secret_key_base = '55bed17e71286b1810e75f047637fd1acd64351fcdd5591ab83af67bdc628cb65958d98992a653268015aec9274a2e573b66fb5895d2bf86acd8a5c0e9d35813'
|
@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* Updates the default 'template1' database into UTF-8 instead of SQL_ASCII.
|
|
||||||
*/
|
|
||||||
|
|
||||||
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
|
|
||||||
|
|
||||||
DROP DATABASE template1;
|
|
||||||
|
|
||||||
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
|
|
||||||
|
|
||||||
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
|
|
||||||
|
|
||||||
\c template1
|
|
||||||
VACUUM FREEZE;
|
|
||||||
|
|
||||||
UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1';
|
|
0
public/favicon.ico
Normal file
0
public/favicon.ico
Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user