Browse Source

Louis | reverts fa110, which was branched instead

master
Loos 10 years ago
parent
commit
3c8962fa49
  1. 73
      .gitignore
  2. 1
      .vagrant/machines/default/virtualbox/action_provision
  3. 1
      .vagrant/machines/default/virtualbox/action_set_name
  4. 1
      .vagrant/machines/default/virtualbox/id
  5. 1
      .vagrant/machines/default/virtualbox/index_uuid
  6. 1
      .vagrant/machines/default/virtualbox/synced_folders
  7. 0
      Gemfile
  8. 0
      Gemfile.lock
  9. 59
      NOTES.txt
  10. 0
      Rakefile
  11. 36
      Vagrantfile
  12. 0
      app/assets/images/.keep
  13. 0
      app/assets/javascripts/application.js
  14. 0
      app/assets/javascripts/bikes.js
  15. 0
      app/assets/javascripts/datepicker.js
  16. 0
      app/assets/javascripts/selectpicker.js
  17. 0
      app/assets/stylesheets/application.css
  18. 0
      app/assets/stylesheets/bikes.css.scss
  19. 0
      app/assets/stylesheets/scaffolds.css.scss
  20. 0
      app/controllers/application_controller.rb
  21. 0
      app/controllers/bikes_controller.rb
  22. 0
      app/controllers/concerns/.keep
  23. 0
      app/controllers/static_pages_controller.rb
  24. 0
      app/controllers/volunteers_controller.rb
  25. 0
      app/helpers/application_helper.rb
  26. 0
      app/helpers/bikes_helper.rb
  27. 0
      app/mailers/.keep
  28. 0
      app/models/.keep
  29. 0
      app/models/bike.rb
  30. 0
      app/models/concerns/.keep
  31. 0
      app/models/user.rb
  32. 0
      app/models/volunteer.rb
  33. 0
      app/views/bikes/_fields.html.haml
  34. 0
      app/views/bikes/_form.html.haml
  35. 0
      app/views/bikes/edit.html.haml
  36. 0
      app/views/bikes/index.html.haml
  37. 0
      app/views/bikes/new.html.haml
  38. 0
      app/views/bikes/show.html.haml
  39. 0
      app/views/devise/confirmations/new.html.erb
  40. 0
      app/views/devise/mailer/confirmation_instructions.html.erb
  41. 0
      app/views/devise/mailer/reset_password_instructions.html.erb
  42. 0
      app/views/devise/mailer/unlock_instructions.html.erb
  43. 0
      app/views/devise/passwords/edit.html.erb
  44. 0
      app/views/devise/passwords/new.html.erb
  45. 0
      app/views/devise/registrations/edit.html.erb
  46. 0
      app/views/devise/registrations/new.html.haml
  47. 0
      app/views/devise/sessions/new.html.erb
  48. 0
      app/views/devise/shared/_links.erb
  49. 0
      app/views/devise/unlocks/new.html.erb
  50. 0
      app/views/layouts/_head.html.erb
  51. 0
      app/views/layouts/_navbar.html.erb
  52. 0
      app/views/layouts/application.html.erb
  53. 0
      app/views/static_pages/home.html.haml
  54. 0
      app/views/volunteers/_fields.html.haml
  55. 0
      app/views/volunteers/_form.html.haml
  56. 0
      app/views/volunteers/edit.html.haml
  57. 0
      app/views/volunteers/index.html.haml
  58. 0
      app/views/volunteers/new.html.haml
  59. 0
      app/views/volunteers/show.html.haml
  60. 0
      bin/bundle
  61. 0
      bin/rails
  62. 0
      bin/rake
  63. 0
      config.ru
  64. 0
      config/application.rb
  65. 0
      config/boot.rb
  66. 0
      config/database.yml
  67. 0
      config/environment.rb
  68. 0
      config/environments/development.rb
  69. 0
      config/environments/production.rb
  70. 0
      config/environments/test.rb
  71. 0
      config/initializers/backtrace_silencers.rb
  72. 0
      config/initializers/devise.rb
  73. 0
      config/initializers/filter_parameter_logging.rb
  74. 0
      config/initializers/inflections.rb
  75. 0
      config/initializers/mime_types.rb
  76. 12
      config/initializers/secret_token.rb
  77. 0
      config/initializers/session_store.rb
  78. 0
      config/initializers/wrap_parameters.rb
  79. 0
      config/locales/devise.en.yml
  80. 0
      config/locales/en.yml
  81. 0
      config/routes.rb
  82. 0
      db/migrate/20140118202104_create_bike_table.rb
  83. 0
      db/migrate/20140118205930_create_bikes.rb
  84. 0
      db/migrate/20140214152631_change_type_to_bicycle_type.rb
  85. 0
      db/migrate/20140312232550_add_fields_to_bike.rb
  86. 0
      db/migrate/20140313000619_create_volunteers.rb
  87. 0
      db/migrate/20140814020954_devise_create_users.rb
  88. 0
      db/schema.rb
  89. 0
      db/seeds.rb
  90. 16
      etc/postgres/enable_utf8_template.sql
  91. 0
      lib/tasks/.keep
  92. 0
      lib/tasks/bikeloader.rake
  93. 0
      log/.keep
  94. 0
      public/404.html
  95. 0
      public/422.html
  96. 0
      public/500.html
  97. 0
      public/favicon.ico
  98. 0
      public/robots.txt
  99. 158
      puppet/manifests/default.pp
  100. 2
      puppet/modules/memcached/.gitignore

73
.gitignore

@ -4,77 +4,18 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Created by http://www.gitignore.io
### Vagrant ###
.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
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
### Rails ###
*.rbc
capybara-*.html
.rspec
/log
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
/public/system
/coverage/
/spec/tmp
**.orig
rerun.txt
pickle-email-*.html
# Ignore secret assets
/lib/assets/*
# TODO Comment out these rules if you are OK with secrets being uploaded to the repo
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
.DS_Store

1
.vagrant/machines/default/virtualbox/action_provision

@ -0,0 +1 @@
1.5:e13fdd92-def4-4ed7-a167-23d9309061db

1
.vagrant/machines/default/virtualbox/action_set_name

@ -0,0 +1 @@
1409951176

1
.vagrant/machines/default/virtualbox/id

@ -0,0 +1 @@
e13fdd92-def4-4ed7-a167-23d9309061db

1
.vagrant/machines/default/virtualbox/index_uuid

@ -0,0 +1 @@
766e9debb0ee447db036220685ccdcd7

1
.vagrant/machines/default/virtualbox/synced_folders

@ -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}}}

0
src/Gemfile → Gemfile

0
src/Gemfile.lock → Gemfile.lock

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.

0
src/Rakefile → Rakefile

36
Vagrantfile

@ -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

0
src/app/assets/images/.keep → app/assets/images/.keep

0
src/app/assets/javascripts/application.js → app/assets/javascripts/application.js

0
src/app/assets/javascripts/bikes.js → app/assets/javascripts/bikes.js

0
src/app/assets/javascripts/datepicker.js → app/assets/javascripts/datepicker.js

0
src/app/assets/javascripts/selectpicker.js → app/assets/javascripts/selectpicker.js

0
src/app/assets/stylesheets/application.css → app/assets/stylesheets/application.css

0
src/app/assets/stylesheets/bikes.css.scss → app/assets/stylesheets/bikes.css.scss

0
src/app/assets/stylesheets/scaffolds.css.scss → app/assets/stylesheets/scaffolds.css.scss

0
src/app/controllers/application_controller.rb → app/controllers/application_controller.rb

0
src/app/controllers/bikes_controller.rb → app/controllers/bikes_controller.rb

0
src/app/controllers/concerns/.keep → app/controllers/concerns/.keep

0
src/app/controllers/static_pages_controller.rb → app/controllers/static_pages_controller.rb

0
src/app/controllers/volunteers_controller.rb → app/controllers/volunteers_controller.rb

0
src/app/helpers/application_helper.rb → app/helpers/application_helper.rb

0
src/app/helpers/bikes_helper.rb → app/helpers/bikes_helper.rb

0
src/app/mailers/.keep → app/mailers/.keep

0
src/app/models/.keep → app/models/.keep

0
src/app/models/bike.rb → app/models/bike.rb

0
src/app/models/concerns/.keep → app/models/concerns/.keep

0
src/app/models/user.rb → app/models/user.rb

0
src/app/models/volunteer.rb → app/models/volunteer.rb

0
src/app/views/bikes/_fields.html.haml → app/views/bikes/_fields.html.haml

0
src/app/views/bikes/_form.html.haml → app/views/bikes/_form.html.haml

0
src/app/views/bikes/edit.html.haml → app/views/bikes/edit.html.haml

0
src/app/views/bikes/index.html.haml → app/views/bikes/index.html.haml

0
src/app/views/bikes/new.html.haml → app/views/bikes/new.html.haml

0
src/app/views/bikes/show.html.haml → app/views/bikes/show.html.haml

0
src/app/views/devise/confirmations/new.html.erb → app/views/devise/confirmations/new.html.erb

0
src/app/views/devise/mailer/confirmation_instructions.html.erb → app/views/devise/mailer/confirmation_instructions.html.erb

0
src/app/views/devise/mailer/reset_password_instructions.html.erb → app/views/devise/mailer/reset_password_instructions.html.erb

0
src/app/views/devise/mailer/unlock_instructions.html.erb → app/views/devise/mailer/unlock_instructions.html.erb

0
src/app/views/devise/passwords/edit.html.erb → app/views/devise/passwords/edit.html.erb

0
src/app/views/devise/passwords/new.html.erb → app/views/devise/passwords/new.html.erb

0
src/app/views/devise/registrations/edit.html.erb → app/views/devise/registrations/edit.html.erb

0
src/app/views/devise/registrations/new.html.haml → app/views/devise/registrations/new.html.haml

0
src/app/views/devise/sessions/new.html.erb → app/views/devise/sessions/new.html.erb

0
src/app/views/devise/shared/_links.erb → app/views/devise/shared/_links.erb

0
src/app/views/devise/unlocks/new.html.erb → app/views/devise/unlocks/new.html.erb

0
src/app/views/layouts/_head.html.erb → app/views/layouts/_head.html.erb

0
src/app/views/layouts/_navbar.html.erb → app/views/layouts/_navbar.html.erb

0
src/app/views/layouts/application.html.erb → app/views/layouts/application.html.erb

0
src/app/views/static_pages/home.html.haml → app/views/static_pages/home.html.haml

0
src/app/views/volunteers/_fields.html.haml → app/views/volunteers/_fields.html.haml

0
src/app/views/volunteers/_form.html.haml → app/views/volunteers/_form.html.haml

0
src/app/views/volunteers/edit.html.haml → app/views/volunteers/edit.html.haml

0
src/app/views/volunteers/index.html.haml → app/views/volunteers/index.html.haml

0
src/app/views/volunteers/new.html.haml → app/views/volunteers/new.html.haml

0
src/app/views/volunteers/show.html.haml → app/views/volunteers/show.html.haml

0
src/bin/bundle → bin/bundle

0
src/bin/rails → bin/rails

0
src/bin/rake → bin/rake

0
src/config.ru → config.ru

0
src/config/application.rb → config/application.rb

0
src/config/boot.rb → config/boot.rb

0
src/config/database.yml → config/database.yml

0
src/config/environment.rb → config/environment.rb

0
src/config/environments/development.rb → config/environments/development.rb

0
src/config/environments/production.rb → config/environments/production.rb

0
src/config/environments/test.rb → config/environments/test.rb

0
src/config/initializers/backtrace_silencers.rb → config/initializers/backtrace_silencers.rb

0
src/config/initializers/devise.rb → config/initializers/devise.rb

0
src/config/initializers/filter_parameter_logging.rb → config/initializers/filter_parameter_logging.rb

0
src/config/initializers/inflections.rb → config/initializers/inflections.rb

0
src/config/initializers/mime_types.rb → config/initializers/mime_types.rb

12
config/initializers/secret_token.rb

@ -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'

0
src/config/initializers/session_store.rb → config/initializers/session_store.rb

0
src/config/initializers/wrap_parameters.rb → config/initializers/wrap_parameters.rb

0
src/config/locales/devise.en.yml → config/locales/devise.en.yml

0
src/config/locales/en.yml → config/locales/en.yml

0
src/config/routes.rb → config/routes.rb

0
src/db/migrate/20140118202104_create_bike_table.rb → db/migrate/20140118202104_create_bike_table.rb

0
src/db/migrate/20140118205930_create_bikes.rb → db/migrate/20140118205930_create_bikes.rb

0
src/db/migrate/20140214152631_change_type_to_bicycle_type.rb → db/migrate/20140214152631_change_type_to_bicycle_type.rb

0
src/db/migrate/20140312232550_add_fields_to_bike.rb → db/migrate/20140312232550_add_fields_to_bike.rb

0
src/db/migrate/20140313000619_create_volunteers.rb → db/migrate/20140313000619_create_volunteers.rb

0
src/db/migrate/20140814020954_devise_create_users.rb → db/migrate/20140814020954_devise_create_users.rb

0
src/db/schema.rb → db/schema.rb

0
src/db/seeds.rb → db/seeds.rb

16
etc/postgres/enable_utf8_template.sql

@ -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
src/lib/tasks/.keep → lib/tasks/.keep

0
src/lib/tasks/bikeloader.rake → lib/tasks/bikeloader.rake

0
src/public/favicon.ico → log/.keep

0
src/public/404.html → public/404.html

0
src/public/422.html → public/422.html

0
src/public/500.html → public/500.html

0
public/favicon.ico

0
src/public/robots.txt → public/robots.txt

158
puppet/manifests/default.pp

@ -1,158 +0,0 @@
$ar_databases = ['activerecord_unittest', 'activerecord_unittest2']
$as_vagrant = 'sudo -u vagrant -H bash -l -c'
$home = '/home/vagrant'
# Pick a Ruby version modern enough, that works in the currently supported Rails
# versions, and for which RVM provides binaries.
$ruby_version = '2.1.1'
Exec {
path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin']
}
# --- Preinstall Stage ---------------------------------------------------------
stage { 'preinstall':
before => Stage['main']
}
class apt_get_update {
exec { 'apt-get -y update':
unless => "test -e ${home}/.rvm"
}
}
class { 'apt_get_update':
stage => preinstall
}
# --- SQLite -------------------------------------------------------------------
package { ['sqlite3', 'libsqlite3-dev']:
ensure => installed;
}
# --- MySQL --------------------------------------------------------------------
class install_mysql {
class { 'mysql': }
class { 'mysql::server':
config_hash => { 'root_password' => '' }
}
database { $ar_databases:
ensure => present,
charset => 'utf8',
require => Class['mysql::server']
}
database_user { 'rails@localhost':
ensure => present,
require => Class['mysql::server']
}
database_grant { ['rails@localhost/activerecord_unittest', 'rails@localhost/activerecord_unittest2', 'rails@localhost/inexistent_activerecord_unittest']:
privileges => ['all'],
require => Database_user['rails@localhost']
}
package { 'libmysqlclient15-dev':
ensure => installed
}
}
class { 'install_mysql': }
# --- PostgreSQL ---------------------------------------------------------------
class install_postgres {
class { 'postgresql': }
class { 'postgresql::server': }
pg_database { $ar_databases:
ensure => present,
encoding => 'UTF8',
require => Class['postgresql::server']
}
pg_user { 'rails':
ensure => present,
require => Class['postgresql::server']
}
pg_user { 'vagrant':
ensure => present,
superuser => true,
require => Class['postgresql::server']
}
package { 'libpq-dev':
ensure => installed
}
package { 'postgresql-contrib':
ensure => installed,
require => Class['postgresql::server'],
}
}
class { 'install_postgres': }
# --- Memcached ----------------------------------------------------------------
class { 'memcached': }
# --- Packages -----------------------------------------------------------------
package { 'curl':
ensure => installed
}
package { 'build-essential':
ensure => installed
}
package { 'git-core':
ensure => installed
}
# Nokogiri dependencies.
package { ['libxml2', 'libxml2-dev', 'libxslt1-dev']:
ensure => installed
}
# ExecJS runtime.
package { 'nodejs':
ensure => installed
}
# --- Ruby ---------------------------------------------------------------------
exec { 'install_rvm':
command => "${as_vagrant} 'curl -L https://get.rvm.io | bash -s stable'",
creates => "${home}/.rvm/bin/rvm",
require => Package['curl']
}
exec { 'install_ruby':
# We run the rvm executable directly because the shell function assumes an
# interactive environment, in particular to display messages or ask questions.
# The rvm executable is more suitable for automated installs.
#
# use a ruby patch level known to have a binary
command => "${as_vagrant} '${home}/.rvm/bin/rvm install ruby-${ruby_version} --binary --autolibs=enabled && rvm alias create default ${ruby_version}'",
creates => "${home}/.rvm/bin/ruby",
require => Exec['install_rvm']
}
# RVM installs a version of bundler, but for edge Rails we want the most recent one.
exec { "${as_vagrant} 'gem install bundler --no-rdoc --no-ri'":
creates => "${home}/.rvm/bin/bundle",
require => Exec['install_ruby']
}
# --- Locale -------------------------------------------------------------------
# Needed for docs generation.
exec { 'update-locale':
command => 'update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8'
}

2
puppet/modules/memcached/.gitignore

@ -1,2 +0,0 @@
pkg/
*.swp

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save