Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 97c2300063fa9af636c87d51daa136c187e78f1a 0 parents
@raw1z authored
Showing with 2,547 additions and 0 deletions.
  1. +10 −0 .gitignore
  2. +1 −0  .rspec
  3. +24 −0 Gemfile
  4. +201 −0 Gemfile.lock
  5. +20 −0 MIT-LICENSE
  6. +3 −0  README.rdoc
  7. +28 −0 Rakefile
  8. 0  app/assets/images/cargo/.gitkeep
  9. BIN  app/assets/images/cargo/accounts.png
  10. BIN  app/assets/images/cargo/articles.png
  11. BIN  app/assets/images/cargo/history.png
  12. +16 −0 app/assets/javascripts/cargo/application.js
  13. +14 −0 app/assets/javascripts/cargo/articles.js.coffee
  14. +16 −0 app/assets/javascripts/cargo/home.js.coffee
  15. +10 −0 app/assets/javascripts/cargo/html5-ie.js
  16. +3 −0  app/assets/javascripts/cargo/sessions.js.coffee
  17. +3 −0  app/assets/javascripts/cargo/users.js.coffee
  18. +3 −0  app/assets/javascripts/cargo/versions.js.coffee
  19. +12 −0 app/assets/stylesheets/cargo/_mixins.sass
  20. +15 −0 app/assets/stylesheets/cargo/application.css
  21. +45 −0 app/assets/stylesheets/cargo/articles.css.sass
  22. +132 −0 app/assets/stylesheets/cargo/home.css.sass
  23. +33 −0 app/assets/stylesheets/cargo/saxMono-fontfacekit/demo.html
  24. +1 −0  app/assets/stylesheets/cargo/saxMono-fontfacekit/s.a.x. Software License.txt
  25. BIN  app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.eot
  26. +155 −0 app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.svg
  27. BIN  app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.ttf
  28. BIN  app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.woff
  29. +16 −0 app/assets/stylesheets/cargo/saxMono-fontfacekit/stylesheet.css
  30. +5 −0 app/assets/stylesheets/cargo/sessions.css.sass
  31. +22 −0 app/assets/stylesheets/cargo/users.css.sass
  32. +3 −0  app/assets/stylesheets/cargo/versions.css.sass
  33. +36 −0 app/controllers/cargo/application_controller.rb
  34. +74 −0 app/controllers/cargo/articles_controller.rb
  35. +6 −0 app/controllers/cargo/home_controller.rb
  36. +25 −0 app/controllers/cargo/sessions_controller.rb
  37. +45 −0 app/controllers/cargo/users_controller.rb
  38. +12 −0 app/controllers/cargo/versions_controller.rb
  39. +4 −0 app/helpers/cargo/application_helper.rb
  40. +4 −0 app/helpers/cargo/articles_helper.rb
  41. +4 −0 app/helpers/cargo/home_helper.rb
  42. +4 −0 app/helpers/cargo/sessions_helper.rb
  43. +4 −0 app/helpers/cargo/users_helper.rb
  44. +4 −0 app/helpers/cargo/versions_helper.rb
  45. +15 −0 app/models/cargo/article.rb
  46. +23 −0 app/models/cargo/user.rb
  47. +7 −0 app/views/cargo/articles/_form.html.haml
  48. +8 −0 app/views/cargo/articles/edit.html.haml
  49. +28 −0 app/views/cargo/articles/index.html.haml
  50. +6 −0 app/views/cargo/articles/new.html.haml
  51. +10 −0 app/views/cargo/articles/show.html.haml
  52. +2 −0  app/views/cargo/home/index.html.haml
  53. +17 −0 app/views/cargo/sessions/new.html.haml
  54. +4 −0 app/views/cargo/users/_form.html.haml
  55. +1 −0  app/views/cargo/users/_user.html.haml
  56. +6 −0 app/views/cargo/users/edit.html.haml
  57. +20 −0 app/views/cargo/users/index.html.haml
  58. +6 −0 app/views/cargo/users/new.html.haml
  59. +19 −0 app/views/cargo/versions/index.html.haml
  60. +34 −0 app/views/layouts/cargo/application.html.haml
  61. +42 −0 cargo.gemspec
  62. +3 −0  config/initializers/paper_trail.rb
  63. +59 −0 config/locales/devise.en.yml
  64. +13 −0 config/routes.rb
  65. +10 −0 db/migrate/20120123133445_create_cargo_articles.rb
  66. +18 −0 db/migrate/20120123145745_create_versions.rb
  67. +10 −0 db/migrate/20120123162205_create_cargo_users.rb
  68. +5 −0 db/migrate/20120124104007_add_author_id_to_articles.rb
  69. +6 −0 db/migrate/20120124123937_add_auth_token_to_users.rb
  70. +5 −0 db/migrate/20120125072849_add_role_to_users.rb
  71. +4 −0 lib/cargo.rb
  72. +14 −0 lib/cargo/engine.rb
  73. +3 −0  lib/cargo/version.rb
  74. +4 −0 lib/tasks/cargo_tasks.rake
  75. +8 −0 script/rails
  76. +164 −0 spec/controllers/cargo/articles_controller_spec.rb
  77. +12 −0 spec/controllers/cargo/home_controller_spec.rb
  78. +5 −0 spec/controllers/cargo/sessions_controller_spec.rb
  79. +5 −0 spec/controllers/cargo/users_controller_spec.rb
  80. +12 −0 spec/controllers/cargo/versions_controller_spec.rb
  81. +261 −0 spec/dummy/README.rdoc
  82. +7 −0 spec/dummy/Rakefile
  83. +15 −0 spec/dummy/app/assets/javascripts/application.js
  84. +13 −0 spec/dummy/app/assets/stylesheets/application.css
  85. +3 −0  spec/dummy/app/controllers/application_controller.rb
  86. +3 −0  spec/dummy/app/helpers/application_helper.rb
  87. 0  spec/dummy/app/mailers/.gitkeep
  88. 0  spec/dummy/app/models/.gitkeep
  89. +14 −0 spec/dummy/app/views/layouts/application.html.erb
  90. +4 −0 spec/dummy/config.ru
  91. +56 −0 spec/dummy/config/application.rb
  92. +10 −0 spec/dummy/config/boot.rb
  93. +25 −0 spec/dummy/config/database.yml
  94. +5 −0 spec/dummy/config/environment.rb
  95. +40 −0 spec/dummy/config/environments/development.rb
  96. +67 −0 spec/dummy/config/environments/production.rb
  97. +37 −0 spec/dummy/config/environments/test.rb
  98. +7 −0 spec/dummy/config/initializers/backtrace_silencers.rb
  99. +15 −0 spec/dummy/config/initializers/inflections.rb
  100. +5 −0 spec/dummy/config/initializers/mime_types.rb
  101. +7 −0 spec/dummy/config/initializers/secret_token.rb
  102. +8 −0 spec/dummy/config/initializers/session_store.rb
  103. +14 −0 spec/dummy/config/initializers/wrap_parameters.rb
  104. +5 −0 spec/dummy/config/locales/en.yml
  105. +4 −0 spec/dummy/config/routes.rb
  106. +5 −0 spec/dummy/db/migrate/20120124171956_add_commit_message_to_versions.rb
  107. +45 −0 spec/dummy/db/schema.rb
  108. 0  spec/dummy/lib/assets/.gitkeep
  109. 0  spec/dummy/log/.gitkeep
  110. +26 −0 spec/dummy/public/404.html
  111. +26 −0 spec/dummy/public/422.html
  112. +25 −0 spec/dummy/public/500.html
  113. 0  spec/dummy/public/favicon.ico
  114. +6 −0 spec/dummy/script/rails
  115. +8 −0 spec/factories/cargo_articles.rb
  116. +8 −0 spec/factories/cargo_users.rb
  117. +15 −0 spec/helpers/cargo/articles_helper_spec.rb
  118. +15 −0 spec/helpers/cargo/home_helper_spec.rb
  119. +15 −0 spec/helpers/cargo/sessions_helper_spec.rb
  120. +15 −0 spec/helpers/cargo/users_helper_spec.rb
  121. +15 −0 spec/helpers/cargo/versions_helper_spec.rb
  122. +5 −0 spec/models/cargo/article_spec.rb
  123. +5 −0 spec/models/cargo/user_spec.rb
  124. +35 −0 spec/routing/cargo/articles_routing_spec.rb
  125. +32 −0 spec/spec_helper.rb
10 .gitignore
@@ -0,0 +1,10 @@
+.DS_Store
+.rvmrc
+.bundle/
+log/*.log
+pkg/
+spec/dummy/db/*.sqlite3
+spec/dummy/log/*.log
+spec/dummy/tmp/
+spec/dummy/.sass-cache
+vendor/cache/
1  .rspec
@@ -0,0 +1 @@
+--colour
24 Gemfile
@@ -0,0 +1,24 @@
+source 'http://rubygems.org'
+
+gem "jquery-rails"
+gem "haml-rails"
+gem "sass-rails"
+gem "compass", ">= 0.12.alpha.4"
+gem "coffee-rails"
+gem "execjs"
+gem "paper_trail"
+gem "simple_form"
+gem "factory_girl_rails"
+gem "rails3-generators"
+gem "devise", "~> 2.0.0.rc"
+gem "cancan"
+gem "redcarpet"
+gem "awesome_print"
+
+gem "sqlite3"
+gem "rspec-rails"
+gem "capybara"
+gem "launchy"
+gem "database_cleaner"
+gem "eventmachine" #, ">= 1.0.0.beta.4.1"
+gem "thin"
201 Gemfile.lock
@@ -0,0 +1,201 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.2.0)
+ actionpack (= 3.2.0)
+ mail (~> 2.4.0)
+ actionpack (3.2.0)
+ activemodel (= 3.2.0)
+ activesupport (= 3.2.0)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.0)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.0)
+ activesupport (= 3.2.0)
+ builder (~> 3.0.0)
+ activerecord (3.2.0)
+ activemodel (= 3.2.0)
+ activesupport (= 3.2.0)
+ arel (~> 3.0.0)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.0)
+ activemodel (= 3.2.0)
+ activesupport (= 3.2.0)
+ activesupport (3.2.0)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ addressable (2.2.6)
+ arel (3.0.0)
+ awesome_print (1.0.2)
+ bcrypt-ruby (3.0.1)
+ builder (3.0.0)
+ cancan (1.6.7)
+ capybara (1.1.2)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.0)
+ ffi (~> 1.0.6)
+ chunky_png (1.2.5)
+ coffee-rails (3.2.1)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0.beta)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.2.0)
+ compass (0.12.alpha.4)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ daemons (1.1.5)
+ database_cleaner (0.7.1)
+ devise (2.0.0.rc)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ warden (~> 1.1)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ eventmachine (0.12.10)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ factory_girl (2.5.0)
+ activesupport
+ factory_girl_rails (1.6.0)
+ factory_girl (~> 2.5.0)
+ railties (>= 3.0.0)
+ ffi (1.0.11)
+ fssm (0.2.8.1)
+ haml (3.1.4)
+ haml-rails (0.3.4)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ haml (~> 3.0)
+ railties (~> 3.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.0)
+ jquery-rails (2.0.0)
+ railties (>= 3.2.0.beta, < 5.0)
+ thor (~> 0.14)
+ json (1.6.5)
+ launchy (2.0.5)
+ addressable (~> 2.2.6)
+ mail (2.4.1)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.17.2)
+ multi_json (1.0.4)
+ nokogiri (1.5.0)
+ orm_adapter (0.0.6)
+ paper_trail (2.6.0)
+ rails (~> 3)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.2.0)
+ actionmailer (= 3.2.0)
+ actionpack (= 3.2.0)
+ activerecord (= 3.2.0)
+ activeresource (= 3.2.0)
+ activesupport (= 3.2.0)
+ bundler (~> 1.0)
+ railties (= 3.2.0)
+ rails3-generators (0.17.4)
+ railties (>= 3.0.0)
+ railties (3.2.0)
+ actionpack (= 3.2.0)
+ activesupport (= 3.2.0)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ redcarpet (2.0.1)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+ rspec-rails (2.8.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.8.0)
+ rubyzip (0.9.5)
+ sass (3.1.12)
+ sass-rails (3.2.3)
+ railties (~> 3.2.0.beta)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ selenium-webdriver (2.17.0)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0.9)
+ multi_json (~> 1.0.4)
+ rubyzip
+ simple_form (1.5.2)
+ actionpack (~> 3.0)
+ activemodel (~> 3.0)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.5)
+ thin (1.3.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.31)
+ warden (1.1.0)
+ rack (>= 1.0)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ awesome_print
+ cancan
+ capybara
+ coffee-rails
+ compass (>= 0.12.alpha.4)
+ database_cleaner
+ devise (~> 2.0.0.rc)
+ eventmachine
+ execjs
+ factory_girl_rails
+ haml-rails
+ jquery-rails
+ launchy
+ paper_trail
+ rails3-generators
+ redcarpet
+ rspec-rails
+ sass-rails
+ simple_form
+ sqlite3
+ thin
20 MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright 2012 YOURNAME
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3  README.rdoc
@@ -0,0 +1,3 @@
+= Cargo
+
+This project rocks and uses MIT-LICENSE.
28 Rakefile
@@ -0,0 +1,28 @@
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
+
+RDoc::Task.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'Cargo'
+ rdoc.options << '--line-numbers'
+ rdoc.rdoc_files.include('README.rdoc')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
+load 'rails/tasks/engine.rake'
+
+
+
+Bundler::GemHelper.install_tasks
0  app/assets/images/cargo/.gitkeep
No changes.
BIN  app/assets/images/cargo/accounts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  app/assets/images/cargo/articles.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  app/assets/images/cargo/history.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 app/assets/javascripts/cargo/application.js
@@ -0,0 +1,16 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require cargo/html5-ie
+//= require_tree .
14 app/assets/javascripts/cargo/articles.js.coffee
@@ -0,0 +1,14 @@
+# setup the layout of the articles new/edit form
+setInputWidth = (input, margin=10, padding=10) ->
+ width = $(input).closest('form').width()
+ $(input).css('width', width - margin - padding)
+ $(input).css('margin-left', margin/2)
+ $(input).css('padding-left', padding/2)
+ $(input).css('margin-right', padding/2)
+ $(input).next('.hint').css('margin-left', margin/2)
+
+jQuery ->
+ setInputWidth('#article_title')
+ setInputWidth('#article_body')
+ setInputWidth('#article_last_commit_message')
+
16 app/assets/javascripts/cargo/home.js.coffee
@@ -0,0 +1,16 @@
+hideFlash = ->
+ $('.flash').slideUp()
+ clearTimeout()
+
+jQuery ->
+ # set the active tab
+ $('nav a').removeClass('active')
+ $('nav li.home', 'body.home').addClass('active')
+ $('nav li.articles', 'body.articles').addClass('active')
+ $('nav li.history', 'body.history').addClass('active')
+
+ # setup the nav bar
+ $('nav').height($(document).height())
+
+ # hide the flash
+ setTimeout(hideFlash, 5000)
10 app/assets/javascripts/cargo/html5-ie.js
@@ -0,0 +1,10 @@
+document.createElement("header");
+document.createElement("footer");
+document.createElement("section");
+document.createElement("aside");
+document.createElement("nav");
+document.createElement("article");
+document.createElement("figure");
+document.createElement("figcaption");
+document.createElement("hgroup");
+document.createElement("time");
3  app/assets/javascripts/cargo/sessions.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3  app/assets/javascripts/cargo/users.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3  app/assets/javascripts/cargo/versions.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
12 app/assets/stylesheets/cargo/_mixins.sass
@@ -0,0 +1,12 @@
+=base-button($button-color: #fff, $button-hover-color: #f8f8f8)
+ +border-radius
+ +background-image(linear-gradient($button-color, darken($button-color, 10)))
+ background-color: darken($button-color, 10)
+ border: 1px solid darken($button-color, 15)
+ padding: 0.5em
+ color: $font-color
+ text-decoration: none
+ &:hover
+ +background-image(linear-gradient($button-hover-color, darken($button-hover-color, 10)))
+ cursor: pointer
+ background-color: darken($button-hover-color, 10)
15 app/assets/stylesheets/cargo/application.css
@@ -0,0 +1,15 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require cargo/saxMono-fontfacekit/stylesheet.css
+ *= require cargo/home
+ *= require_tree .
+*/
45 app/assets/stylesheets/cargo/articles.css.sass
@@ -0,0 +1,45 @@
+@import compass
+@import blueprint
+@import blueprint/liquid
+@import cargo/mixins
+
+article
+ +column(24)
+ margin-top: 1em
+ .title
+ +column(24)
+ font-size: 2em
+ margin: 1em 0 0.5em 0
+ .body
+ +column(24)
+ text-align: justify
+
+form.article
+ +border-radius
+ border: 1px solid #ddd
+ background-color: #eee
+
+ label
+ display: none
+
+ input[type=text], textarea
+ +border-radius
+ font-family: "saxMonoRegular"
+ font-size: 1em
+ outline: none
+ display: block
+ padding: 10px 0 10px 0
+
+ textarea
+ height: 40em
+
+ input[type=submit], .actions a
+ +base-button
+ margin: 5px 5px
+
+ .hint
+ display: block
+ margin-bottom: 0.5em
+
+ .errors
+ color: $error-color
132 app/assets/stylesheets/cargo/home.css.sass
@@ -0,0 +1,132 @@
+@import compass
+@import blueprint
+@import blueprint/liquid
+@import cargo/mixins
+
+$blueprint-liquid-container-width: 100%
+$font-color: #223
+$link-color: $font-color
+$link-hover-color: #ff2300
+$error-color: #f00
+$nav-bg-color: #222
+$nav-color: #eee
+
++blueprint
+
+body
+ font-family: "saxMonoRegular", "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif
+ margin: 0
+ padding: 0
+
+strong, em, b, i
+ font-family: "saxMonoRegular", "Lucida Sans", "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif
+
+h1, h2, h3, h4, h5, h6, address
+ font-family: "saxMonoRegular", "Lucida Sans", "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif
+ color: $font-color
+
+a
+ +hover-link
+ +link-colors($link-color, $link-hover-color, $link-color, $link-color, $link-color)
+ text-decoration: none
+
+.flash
+ position: fixed
+ top: 0
+ left: 120px
+ width: 400px
+ z-index: 9999
+ text-align: center
+ margin-top: 0.5em
+ &#flash-notice
+ +notice
+
+ &#flash-error, &#flash-alert
+ +error
+
+#session
+ +single-box-shadow
+ +border-bottom-radius
+ position: absolute
+ top: 0
+ right: 20px
+ background-color: $nav-bg-color
+ padding: 0.5em
+ a
+ +link-colors($nav-color)
+
+#container
+ +container
+
+nav
+ +column(2, true)
+ +single-box-shadow
+ font-size: 1.1em
+ background-color: $nav-bg-color
+ color: $nav-color
+
+ ul
+ +no-bullet
+ margin: 1em 0 0 0
+ padding: 0
+
+ li
+ text-align: center
+ margin-bottom: 1em
+ a
+ +link-colors($nav-color, $nav-color, $nav-color, $nav-color, $nav-color)
+ img
+ border: none
+
+#body
+ +column(20)
+ +prepend(1)
+
+header
+ +column(24)
+
+ #logo
+ font-size: 4em
+ font-weight: bold
+ text-align: center
+ padding: 0.5em
+ a
+ +link-colors($font-color)
+
+
+#content
+ +column(24)
+
+ .toolbar
+ margin-top: 1em
+ margin-bottom: 1em
+ text-align: right
+ font-size: 0.9em
+ a
+ +base-button
+
+ h1
+ text-align: center
+ border-bottom: 1px solid $font-color
+ letter-spacing: 0
+ text-transform: uppercase
+
+ table.list
+ +border-radius
+ font-size: 1.1em
+ th
+ background-color: $nav-bg-color
+ color: $nav-color
+ &:first-child
+ +border-top-left-radius
+ &:last-child
+ +border-top-right-radius
+ td
+ text-align: center
+ tr
+ background-color: #eee
+ &:last-child
+ td:first-child
+ +border-bottom-left-radius
+ td:last-child
+ +border-bottom-right-radius
33 app/assets/stylesheets/cargo/saxMono-fontfacekit/demo.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+ <title>Font Face Demo</title>
+ <link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8">
+ <style type="text/css" media="screen">
+ h1.fontface {font: 60px/68px 'saxMonoRegular', Arial, sans-serif;letter-spacing: 0;}
+
+ p.style1 {font: 18px/27px 'saxMonoRegular', Arial, sans-serif;}
+
+ #container {
+ width: 800px;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ </style>
+</head>
+
+<body>
+ <div id="container">
+ <h1 class="fontface">Font-face Demo for the saxMono Font</h1>
+
+
+
+ <p class="style1">saxMono Regular - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+
+ </div>
+</body>
+</html>
1  app/assets/stylesheets/cargo/saxMono-fontfacekit/s.a.x. Software License.txt
@@ -0,0 +1 @@
+You may download this font, circulate it und use it freely. You may not alter rename, change copyrights or modify this font in any way.
BIN  app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.eot
Binary file not shown
155 app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.svg
@@ -0,0 +1,155 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Font Squirrel.
+Copyright : 1999 by sax Software GmbH Karlsruhe Germany
+Designer : Robert Norton
+Foundry : sax Software
+Foundry URL : httpwwwsaxsoftdetypographydefaulthtm
+</metadata>
+<defs>
+<font id="webfonts9ceVB7T" horiz-adv-x="1122" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="500" />
+<glyph unicode=" " />
+<glyph unicode="!" d="M436 94q0 55 35 90q33 33 90 33q55 0 88 -35t33 -92q0 -117 -121 -117q-125 0 -125 121zM451 1294q-2 49 26.5 74t85.5 25q39 0 72 -23q35 -25 35 -61q0 -14 -2 -33l-52 -627q-6 -61 -57 -61q-45 0 -51 61z" />
+<glyph unicode="&#x22;" d="M219 1274q0 119 123 119t123 -115v-31l-64 -487q-10 -78 -59 -78q-51 0 -61 84l-60 481q-2 13 -2 27zM653 1274q0 119 123 119t123 -115v-31l-64 -487q-10 -78 -59 -78q-51 0 -61 84l-60 481q-2 13 -2 27z" />
+<glyph unicode="#" d="M55 520q0 68 66 68h190l37 205h-168q-57 0 -57 63q0 66 61 66h183l71 411q8 59 67.5 59.5t59.5 -59.5l-219 -1290q-8 -70 -72 -70q-61 0 -59 70l76 414h-166q-70 0 -70 63zM553 43l215 1290q8 59 63 60q63 0 64 -60l-66 -411h156q80 0 80 -62q0 -68 -82 -67h-174 l-37 -205h146q80 0 79.5 -65.5t-77.5 -65.5h-166l-74 -414q-8 -70 -72 -70q-61 0 -55 70z" />
+<glyph unicode="$" d="M96 190q0 23 16.5 39.5t41.5 16.5q10 0 137 -72q125 -70 217 -70v574q-190 66 -258 113q-125 88 -125 235q0 322 383 367v133q0 72 67.5 71.5t67.5 -71.5v-133q117 -10 221 -64q135 -72 135 -168q0 -55 -53 -55q-20 0 -121 70q-111 76 -182 88v-492q205 -63 275 -121 q109 -90 108 -268q0 -176 -106 -283q-98 -98 -277 -127v-161q0 -72 -65 -72q-70 0 -70 78v155q-111 12 -244 66q-168 67 -168 151zM260 1036q0 -94 82 -151q37 -25 166 -74v453q-248 -19 -248 -228zM643 104q113 16 178 89q68 74 68 186q0 117 -70 176q-39 33 -176 86v-537z " />
+<glyph unicode="%" d="M500 1157v-276q0 -229 -238 -230q-111 0 -176 60q-63 57 -63 170v276q0 113 63 174q66 61 176.5 61.5t174 -63t63.5 -172.5zM123 1157v-276q0 -57 41 -95q40 -37 98 -36q63 0 100 34.5t37 96.5v276q0 59 -41 98t-102 39q-59 0 -96 -37t-37 -100zM991 1393q49 0 49 -50 q0 -29 -34 -81l-795 -1239q-28 -49 -74 -50q-53 0 -53 52q0 27 24 63l791 1235q37 70 92 70zM1098 489v-276q0 -229 -238 -230q-111 0 -176 60q-63 57 -63 170v276q0 113 63 174q66 61 176.5 61.5t174 -63t63.5 -172.5zM721 489v-276q0 -57 41 -95q40 -37 98 -36 q63 0 100 34.5t37 96.5v276q0 59 -41 98t-102 39q-59 0 -96 -37t-37 -100z" />
+<glyph unicode="&#x26;" d="M82 344q0 143 86 287q55 92 188 237l-82 150q-43 92 -43 160q0 215 244 215q236 0 236 -211q0 -82 -68 -183q-35 -47 -127 -151l193 -344l34 125q31 94 58 119q33 27 125 26q66 0 84 -8q41 -14 41 -64q0 -55 -70 -59q-84 -2 -102.5 -20.5t-87.5 -280.5l57 -104 q41 -76 70 -99q8 -6 92 -26q55 -12 55 -54q0 -49 -51 -57q-10 -2 -86 -2q-61 0 -113 63q-16 16 -76 113q-57 -106 -116 -149q-70 -47 -187 -47q-164 0 -258 100q-96 102 -96 264zM211 352q0 -102 65 -174q63 -70 166 -69q88 0 144 59q37 37 84 133l-250 449 q-104 -119 -141 -181q-68 -111 -68 -217zM362 1176q0 -41 35 -111l58 -102q16 18 35.5 43.5l41.5 52.5q47 66 48 112q0 94 -109 95q-41 0 -74 -23q-35 -24 -35 -67z" />
+<glyph unicode="'" d="M436 1274q0 119 123 119t123 -115v-31l-64 -487q-10 -78 -59 -78q-51 0 -61 84l-60 481q-2 13 -2 27z" />
+<glyph unicode="(" d="M328 516q0 424 295 756q106 121 165 121q20 0 41 -17q18 -15 19 -37q0 -31 -76 -102q-307 -295 -307 -729q0 -481 317 -784q66 -61 66 -99q0 -20 -18.5 -38.5t-41.5 -18.5q-74 0 -208 172q-252 319 -252 776z" />
+<glyph unicode=")" d="M272 -379q0 31 76 103q307 295 307 729q0 481 -317 784q-66 61 -66 96q0 23 18.5 41.5t41.5 18.5q72 0 207 -172q254 -326 254 -777q0 -424 -295 -755q-106 -121 -166 -121q-25 0 -41 14q-19 16 -19 39z" />
+<glyph unicode="*" d="M102 987q0 63 76 64h268q-147 244 -147 280q0 61 66 62q33 0 53 -33l141 -244l137 234q25 43 66 43q57 0 57 -62q0 -31 -149 -280h264q84 0 84 -62q0 -68 -84 -67h-264l86 -138q63 -109 63 -145q0 -53 -55 -53q-43 0 -68 45l-137 233l-133 -229q-29 -49 -72 -49 q-55 0 -55 55q0 29 16 57l131 224h-268q-76 -1 -76 65z" />
+<glyph unicode="+" d="M109 522q0 66 73 66h314v307q0 78 63 78q66 0 66 -74v-311h307q78 0 78 -64q0 -33 -23 -49q-25 -18 -53 -18h-309v-307q0 -78 -64 -78q-66 0 -65 75v310h-310q-77 -1 -77 65z" />
+<glyph unicode="," d="M395 117q0 45 35 73q33 27 82 27q61 0 96 -41q33 -39 33 -102q0 -100 -59 -180q-66 -86 -144 -87q-43 0 -43 41q0 18 54 62q51 43 51 78q0 23 -51 55q-54 35 -54 74z" />
+<glyph unicode="-" d="M328 522.5q0 65.5 73 65.5h314q78 0 78 -65.5t-78 -65.5h-309q-78 0 -78 65.5z" />
+<glyph unicode="." d="M436 96q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123z" />
+<glyph unicode="/" d="M123 33q0 18 22 57l721 1247q31 55 72 56q59 0 59 -50q0 -27 -24 -69l-719 -1247q-29 -47 -70 -47q-61 0 -61 53z" />
+<glyph unicode="0" d="M137 393v580q0 188 113 303q114 117 313 117t309.5 -117t110.5 -303v-580q0 -205 -106 -311q-109 -109 -314 -109q-200 0 -313 111q-113 110 -113 309zM274 393q0 -137 76 -213t213 -76q285 0 285 289v580q0 125 -78 207t-217 82q-279 0 -279 -289v-580z" />
+<glyph unicode="1" d="M190 66q0 66 78 65h250v1104h-196q-76 0 -76 65.5t76 65.5h266q68 0 67 -66v-1169h209q78 0 78 -70q0 -61 -78 -61h-596q-78 0 -78 66z" />
+<glyph unicode="2" d="M137 57q0 27 29 62l590 712q92 111 92 207q0 106 -86 168q-78 55 -189 56q-139 0 -215 -88q-33 -39 -84 -162q-33 -86 -77 -86q-59 0 -60 69q0 82 53 179q121 219 390 219q170 0 280 -84q123 -96 123 -256q0 -143 -139 -310l-510 -612h555q94 0 94 -65.5t-78 -65.5h-694 q-74 0 -74 57z" />
+<glyph unicode="3" d="M109 32.5q0 59.5 81 59.5q156 0 275 53q139 61 246 170q123 129 123 263q0 74 -48 127q-45 51 -118 51q-59 0 -138 -33q-82 -35 -100 -35q-45 0 -45 57q0 37 23 62l350 428h-520q-88 0 -88 65.5t88 65.5h641q78 0 77 -53q0 -31 -18 -51l-311 -381q28 6 55 6 q135 0 211 -82q78 -84 78 -215q0 -252 -262 -443q-238 -174 -502 -174q-98 0 -98 59.5z" />
+<glyph unicode="4" d="M123 305q0 20 22 94l295 901q20 57 25 64q16 29 51 29q61 0 62 -60q0 -10 -11 -45l-282 -897h356v555q0 78 70 78q68 0 67 -78v-555h144q76 0 75 -65q0 -68 -75 -68h-144v-209q0 -76 -67 -76q-70 0 -70 76v209h-457q-61 0 -61 47z" />
+<glyph unicode="5" d="M123 33q0 57 88 65q233 20 364 88q258 133 259 361q0 106 -62 180q-65 80 -172 80q-68 0 -170 -43q-106 -45 -131 -45q-55 0 -51 78l14 448q3 58 19 80q23 41 73 41h514q74 0 74 -63q0 -29 -22 -48q-25 -20 -52 -20h-481l-14 -358q135 59 225 59q160 0 268 -115 q104 -111 105 -274q0 -270 -262 -434q-221 -139 -514 -140q-72 1 -72 60z" />
+<glyph unicode="6" d="M137 453q0 455 379 774q197 166 293 166q51 0 51 -56q0 -31 -26 -51q-2 -2 -54 -31q-397 -233 -481 -602q111 125 293 125q168 0 280 -114q111 -113 111 -285q0 -174 -119 -291q-117 -115 -297 -115q-211 0 -323 138q-107 127 -107 342zM272 383q0 -125 82 -201 q84 -78 207 -78q125 0 205 74q82 76 82 199q0 121 -80 196q-74 72 -201 72q-129 0 -207 -65q-88 -72 -88 -197z" />
+<glyph unicode="7" d="M123 1303q0 63 86 63h711q78 0 77 -55q0 -27 -28 -99l-461 -1169q-29 -70 -76 -70q-59 0 -59 60q0 23 20 71l449 1131h-633q-86 0 -86 68z" />
+<glyph unicode="8" d="M137 383q0 256 240 365q-186 92 -187 278q0 158 109 262q106 104 268 105q156 0 258 -101q104 -100 105 -256q0 -180 -172 -286q225 -106 225 -359q0 -190 -113 -303q-115 -115 -301 -115q-184 0 -307 113q-125 113 -125 297zM274 389q0 -131 88 -217q89 -86 222 -86 q125 0 194.5 86t69.5 213q0 125 -76 211t-205 86q-133 0 -213 -80t-80 -213zM328 1022q0 -100 71 -162q63 -55 168 -55q100 0 164 59q61 57 61.5 161.5t-63.5 168.5q-68 68 -166 68q-100 0 -167.5 -68t-67.5 -172z" />
+<glyph unicode="9" d="M137 985q0 176 119 293q117 115 297 115q211 0 324 -138q106 -127 106 -340q0 -231 -100 -438q-96 -203 -277 -354q-176 -150 -246 -150q-53 0 -53 56q0 45 64 84q365 236 456 600q-137 -125 -288 -125q-174 0 -287 112q-115 115 -115 285zM274 987q0 -121 78 -194.5 t201 -73.5q127 0 207 67q88 72 88 195q0 127 -82 203q-84 78 -207 78t-203 -74q-82 -76 -82 -201z" />
+<glyph unicode=":" d="M436 96q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123zM436 901q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123z" />
+<glyph unicode=";" d="M395 117q0 45 35 73q33 27 82 27q61 0 96 -41q33 -39 33 -102q0 -100 -59 -180q-66 -86 -144 -87q-43 0 -43 41q0 18 54 62q51 43 51 78q0 23 -51 55q-54 35 -54 74zM397 901q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123z" />
+<glyph unicode="&#x3c;" d="M109 524q0 41 73 78l705 346q49 25 71 25q55 0 56 -55q0 -41 -47 -64l-699 -332l701 -336q43 -23 43 -59q0 -55 -49 -55q-20 0 -82 28l-703 349q-69 34 -69 75z" />
+<glyph unicode="=" d="M109 324q0 66 73 65h750q78 0 78 -63q0 -33 -23 -50q-25 -18 -53 -18h-748q-77 0 -77 66zM109 727q0 66 73 66h750q78 0 78 -64q0 -33 -23 -49q-25 -18 -53 -18h-748q-77 -1 -77 65z" />
+<glyph unicode="&#x3e;" d="M109 127q0 43 47 66l698 329l-700 334q-41 20 -41 62q0 23 14 39t39 16q14 0 76 -29l702 -346q70 -35 70 -76q0 -43 -76 -80l-702 -348q-49 -23 -72 -22q-55 0 -55 55z" />
+<glyph unicode="?" d="M123 1057q0 84 78 184q121 152 354 152q174 0 301 -90q141 -101 141 -271q0 -86 -57 -145q-33 -37 -123 -90q-88 -53 -125 -97q-25 -27 -47 -129q-23 -80 -72 -79q-66 0 -65 81q0 125 90 211l168 121q88 63 88 142q0 100 -109 163q-88 53 -202 54q-104 0 -178 -41 q-90 -49 -109 -142l-10 -43q-10 -47 -62 -47q-61 0 -61 66zM436 94q0 55 35 90q33 33 90 33q55 0 88 -35t33 -92q0 -117 -121 -117q-125 0 -125 121z" />
+<glyph unicode="@" d="M41 295v557q0 279 129 410t403 131q268 0 387 -125t119 -391v-502q0 -225 -194 -225q-90 0 -154 88q-100 -88 -219 -88q-115 0 -184.5 69.5t-69.5 183.5q0 123 74 203q70 76 196 76q115 0 168 -53v96q0 88 -22 123q-31 47 -117 47q-68 0 -102 -39q-12 -12 -43 -68 q-23 -39 -56 -38q-25 0 -43 18t-18 43q0 51 43 113q70 100 227 100q143 0 205 -78q53 -70 53 -219v-381q0 -27 18.5 -47t43.5 -20q66 0 65 94v499q0 205 -94 299.5t-299 94.5q-387 0 -387 -416v-549q0 -406 442 -405q139 0 258 53q72 31 84 31q53 0 54 -60q0 -72 -172 -119 q-125 -33 -236 -32q-260 0 -405 131q-154 137 -154 395zM387 403q0 -125 141 -124q115 0 168 79v148q-58 49 -141 49q-74 0 -119 -39q-49 -43 -49 -113z" />
+<glyph unicode="A" d="M186 567q100 496 125 598q45 227 250 227.5t250 -227.5l125 -585q104 -502 104 -539q0 -70 -71 -70q-55 0 -66 49l-76 375h-540l-78 -383q-8 -39 -59 -39q-66 0 -66 51q-1 37 102 543zM309 528h494l-113 564q-35 170 -135 170q-63 0 -94 -48q-29 -45 -45 -133z" />
+<glyph unicode="B" d="M109 68v1226q0 72 73 72h422q406 0 406 -340q0 -215 -172 -311q213 -70 213 -324q0 -391 -389 -391h-480q-73 0 -73 68zM246 131h403q135 0 200.5 59.5t65.5 194.5q0 121 -67.5 188.5t-183.5 67.5h-418v-510zM246 772h416q96 0 157 74q55 63 55 168q0 106 -65 166 q-65 55 -172 55h-391v-463z" />
+<glyph unicode="C" d="M123 395v559q0 438 465 439q190 0 305 -84q131 -104 131 -275q0 -84 -68 -84q-45 0 -67 78q-10 59 -51 127q-59 106 -260 107q-172 0 -248 -88q-70 -76 -70 -254v-467q0 -182 74 -260q80 -88 252 -89q262 0 303 185q14 63 14 69q14 37 53 37q68 0 68 -82 q0 -164 -139 -266q-111 -74 -293 -74q-211 0 -336 103q-133 108 -133 319z" />
+<glyph unicode="D" d="M111 70v1214q0 82 67 82h357q244 0 368 -123q121 -133 121 -338v-446q0 -459 -500 -459h-346q-67 0 -67 70zM246 131h278q193 0 277 82q86 82 86 248v444q0 330 -363 330h-278v-1104z" />
+<glyph unicode="E" d="M109 84v1204q0 34 24 55q27 23 62 23h718q96 0 97 -61q0 -70 -97 -70h-667v-463h479q94 0 94 -59q0 -72 -94 -72h-479v-510h669q94 0 95 -61q0 -70 -95 -70h-720q-86 0 -86 84z" />
+<glyph unicode="F" d="M109 59v1227q0 80 73 80h772q55 0 56 -63q0 -68 -90 -68h-674v-463h491q82 0 82 -63q0 -68 -82 -68h-491v-582q0 -86 -68 -86q-69 0 -69 86z" />
+<glyph unicode="G" d="M96 393v561q0 438 443 439q319 0 436 -228q37 -71 37 -135q0 -74 -72 -74q-43 0 -70 80q-35 102 -77 146q-76 80 -242 80q-317 0 -318 -308v-561q0 -144 99 -221q90 -68 237.5 -68t231.5 70q90 72 90 219v72h-184q-82 0 -82 63q0 68 82 68h249q68 0 68 -82v-469 q0 -72 -61 -72q-66 0 -66 52v106q-127 -158 -346 -158q-197 0 -324 109q-131 112 -131 311z" />
+<glyph unicode="H" d="M111 51v1225q0 117 69 117q68 0 68 -111v-510h629v522q0 98 67.5 98.5t67.5 -98.5v-1251q0 -70 -67.5 -70t-67.5 70v598h-629v-590q0 -78 -68 -78q-69 0 -69 78z" />
+<glyph unicode="I" d="M166 63q0 68 74 68h254v1104h-242q-86 0 -86 65.5t76 65.5h635q80 0 79 -63q0 -68 -79 -68h-248v-1104h237q90 0 90 -65.5t-90 -65.5h-626q-74 0 -74 63z" />
+<glyph unicode="J" d="M96 328q0 76 72 75q39 0 51 -36l14 -50q31 -98 117 -157q80 -55 191 -56q143 0 227 72q92 78 92 217v842h-420q-72 0 -71 63q0 68 71 68h494q63 0 63 -84v-889q0 -200 -129 -313q-121 -106 -327 -107q-238 0 -367 168q-78 103 -78 187z" />
+<glyph unicode="K" d="M109 49v1274q0 70 69 70q68 0 68 -74v-737l641 776q29 35 63 35q61 0 62 -58q0 -27 -23 -55l-436 -539l498 -659q14 -20 14 -45q0 -27 -18.5 -45.5t-45.5 -18.5q-37 0 -61 33l-483 635l-211 -256v-336q0 -76 -70 -76q-67 0 -67 76z" />
+<glyph unicode="L" d="M125 70v1230q0 92 68 93q68 0 67 -99v-1163h719q86 0 86 -65.5t-86 -65.5h-784q-27 0 -50 16q-20 15 -20 54z" />
+<glyph unicode="M" d="M82 55v1248q0 90 74 90q47 0 69 -54l346 -784l326 780q25 57 76 58q66 0 65 -90v-1256q0 -74 -65 -74q-72 0 -72 93v985l-268 -629q-25 -59 -64 -60q-45 0 -69 60l-281 629v-1004q0 -74 -67 -74q-70 0 -70 82z" />
+<glyph unicode="N" d="M96 49v1249q0 94 66 95q41 0 71 -52l656 -1083v1040q0 94 65 95q70 0 70 -95v-1255q0 -70 -68 -70q-49 0 -73 43l-650 1090v-1057q0 -76 -71 -76q-66 0 -66 76z" />
+<glyph unicode="O" d="M96 391v565q0 215 133 330q121 106 344 107q213 0 330 -111q121 -115 121 -326v-565q0 -205 -131 -315q-121 -102 -332 -102.5t-332 102.5q-133 110 -133 315zM233 401q0 -143 95 -223q86 -74 233 -74q328 0 328 297v545q0 315 -340 316q-143 0 -232 -82 q-84 -78 -84 -228v-551z" />
+<glyph unicode="P" d="M109 49v1251q0 66 71 66h553q156 0 248 -111q84 -98 84 -260q0 -215 -102.5 -311t-319.5 -96h-397v-539q0 -76 -70 -76q-67 0 -67 76zM246 719h391q147 0 217 59q74 66 74 209q0 248 -217 248h-465v-516z" />
+<glyph unicode="Q" d="M96 395v563q0 207 129 324q123 111 334 111q213 0 336 -111q129 -115 129 -324v-563q0 -129 -55 -219q-55 -88 -168 -156q47 -47 180 -129q43 -27 43 -59q0 -57 -61 -57q-72 0 -170 73q-77 58 -136 136q-57 -10 -98 -11q-209 0 -332 105q-131 110 -131 317zM233 395 q0 -291 334 -291q-94 170 -94 322q0 117 74 117q39 0 53 -25q16 -27 16 -94q0 -147 103 -303q170 96 170 272v565q0 303 -328 304q-147 0 -235 -76q-92 -80 -93 -228v-563z" />
+<glyph unicode="R" d="M109 49v1243q0 43 14 58q16 16 55 16h504q170 0 266 -109q88 -102 88 -278q0 -162 -57 -240q-57 -80 -211 -125l293 -524q18 -31 18 -59q0 -59 -61 -60q-47 0 -74 52l-315 565h-383v-539q0 -78 -68 -78q-69 0 -69 78zM246 719h377q279 0 278 258q0 113 -49 180 q-55 78 -164 78h-442v-516z" />
+<glyph unicode="S" d="M76 172q0 57 57 57q25 0 129 -57q127 -68 291 -68q141 0 240 62q117 74 116 207q0 188 -225 243l-289 93q-305 80 -305 317q0 190 135 285q115 82 314 82q303 0 432 -148q35 -41 35 -71q0 -55 -60 -56q-25 0 -72 33q-49 34 -110 61q-109 49 -236 50q-129 0 -206 -52 q-96 -61 -97 -180q0 -139 213 -205l383 -120q223 -98 223 -347q0 -190 -157 -301q-132 -86 -344 -86q-125 0 -277 45q-190 58 -190 156z" />
+<glyph unicode="T" d="M55 1298q0 68 80 68h846q84 0 84 -65.5t-84 -65.5h-352v-1186q0 -78 -68 -78q-70 0 -69 78v1186h-365q-72 0 -72 63z" />
+<glyph unicode="U" d="M102 397v908q0 88 66 88q72 0 72 -88v-906q0 -150 98 -225q88 -70 240 -70q303 0 303 295v904q0 90 65 90q72 0 72 -90v-906q0 -207 -121 -317q-113 -106 -324 -107q-207 0 -333 107q-138 112 -138 317z" />
+<glyph unicode="V" horiz-adv-x="1107" d="M68 1337q0 55 63 56q45 0 64 -56l360 -1106l352 1106q18 55 66 56q63 0 63 -56q0 -18 -6 -41l-412 -1280q-16 -43 -63 -43q-51 0 -66 43l-413 1280q-8 29 -8 41z" />
+<glyph unicode="W" d="M68 1333q0 59 57 60q61 0 68 -72l120 -1225l133 676q25 129 113 129q92 0 123 -137l149 -668l95 1225q6 72 63 72q66 0 62 -66v-27l-86 -1181q-12 -145 -131 -146q-70 0 -101 39q-18 25 -39 105l-135 600l-110 -592q-29 -152 -140 -152q-115 0 -131 152l-108 1180 q-2 14 -2 28z" />
+<glyph unicode="X" d="M68 35q0 27 20 55l389 612l-364 586q-18 28 -19 43q0 61 68 62q31 0 53 -31l340 -541l332 525q35 57 67 57q29 0 49.5 -18.5t20.5 -41.5q0 -25 -25 -65l-364 -576l395 -612q23 -35 23 -57q0 -59 -66 -60q-31 0 -59 41l-373 570l-354 -570q-25 -41 -68 -41q-65 1 -65 62z " />
+<glyph unicode="Y" d="M96 1333q0 59 62 60q39 0 63 -45l338 -623l336 616q27 51 68 52q61 0 61 -50q0 -29 -18 -59l-377 -704v-533q0 -74 -70 -74q-68 0 -67 74v541l-379 692q-17 26 -17 53z" />
+<glyph unicode="Z" d="M68 53q0 37 36 92l744 1090h-662q-92 0 -92 65.5t92 65.5h750q88 0 88 -55q0 -29 -31 -76l-749 -1104h714q92 0 93 -68q0 -43 -27 -55q-16 -8 -66 -8h-802q-88 0 -88 53z" />
+<glyph unicode="[" d="M328 -350v1650q0 66 71 66h373q76 0 76 -65.5t-76 -65.5h-313v-1522h321q68 0 68 -63q0 -61 -78 -62h-371q-71 1 -71 62z" />
+<glyph unicode="\" d="M123 1339q0 53 57 54q43 0 66 -35l737 -1280q14 -23 14 -43q0 -55 -63 -55q-37 0 -55 30l-742 1282q-14 22 -14 47z" />
+<glyph unicode="]" d="M272 -346q0 66 74 65h316v1522h-322q-68 0 -68 59q0 66 76 66h373q72 0 72 -66v-1638q0 -74 -72 -74h-375q-74 0 -74 66z" />
+<glyph unicode="^" d="M109 684q0 27 28 74l348 565q43 70 76 70t78 -74l348 -567q25 -39 25 -66q0 -57 -60 -57q-37 0 -61 43l-332 563l-334 -565q-23 -41 -59 -41q-57 0 -57 55z" />
+<glyph unicode="_" d="M-80 -366.5q0 65.5 74 65.5h1132q76 0 76 -65.5t-76 -65.5h-1128q-78 0 -78 65.5z" />
+<glyph unicode="`" d="M375 1366q0 88 78 88q47 0 86 -45l170 -184q35 -37 34 -60q0 -49 -47 -49q-20 0 -69 33l-187 125q-65 47 -65 92z" />
+<glyph unicode="a" d="M123 285q0 156 125 243q113 78 272 78q133 0 305 -61v157q0 113 -104 160q-72 33 -182 33q-252 0 -277 -139q-4 -18 -6 -36t-4 -25t-2 -9q-15 -31 -55 -31q-72 0 -72 74q0 100 80 186q98 109 346 109q193 0 293 -68q115 -80 114 -266v-457q0 -82 33 -108q8 -8 64 -29 q33 -14 32 -61q0 -55 -59 -55q-14 0 -55 14q-63 20 -88 33q-40 22 -49 73q-96 -70 -152 -92q-70 -29 -172 -28q-158 0 -266 69q-121 80 -121 236zM254 291q0 -96 86 -146q68 -37 174 -36q92 0 168 34q51 20 143 95v190q-151 49 -282 49q-289 0 -289 -186z" />
+<glyph unicode="b" d="M123 49v1313q0 92 67 92q63 0 64 -92v-467q143 129 346 129q166 0 281 -80q129 -88 129 -260v-375q0 -330 -404 -329q-117 0 -188.5 22.5t-163.5 101.5q-6 -52 -18 -79q-16 -45 -56 -45q-57 -1 -57 69zM254 258q158 -152 344 -152q283 0 283 205v363q0 117 -97 174 q-76 47 -202 47q-166 0 -328 -127v-510z" />
+<glyph unicode="c" d="M123 319v365q0 340 448 340q162 0 289 -70q150 -86 150 -241q0 -57 -56 -58q-39 0 -69 62q-41 84 -80 117q-74 61 -223 61q-328 0 -328 -219v-357q0 -126 104 -178q76 -35 242 -35q119 0 201 41q47 20 96 72q41 41 59 41q55 0 56 -55q0 -53 -68 -121q-111 -104 -362 -104 q-459 -1 -459 339z" />
+<glyph unicode="d" d="M109 315v377q0 164 127 254q109 78 280 78q111 0 191 -27q72 -25 159 -96v461q0 92 64 92q66 0 65 -92v-1313q0 -70 -59 -69q-37 0 -49 43q-8 31 -13 77q-102 -72 -161 -94q-72 -27 -183 -26q-178 0 -292 75q-129 86 -129 260zM240 326q0 -115 100 -170q78 -45 203 -45 q106 0 178 32q63 31 145 109v516q-102 72 -153 94q-74 33 -176 33q-125 0 -203 -47q-94 -57 -94 -168v-354z" />
+<glyph unicode="e" d="M109 336v358q0 125 92 213q123 117 368 117q440 0 441 -438q0 -109 -80 -109h-690v-141q0 -227 325 -227q119 0 195 24q39 12 133 74q59 53 78 53q53 0 53 -55q0 -57 -80 -121q-129 -104 -385 -104q-450 0 -450 356zM240 606h641q0 289 -326 289q-119 0 -215 -53 q-100 -68 -100 -160v-76z" />
+<glyph unicode="f" d="M123 940q0 63 76 64h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66z" />
+<glyph unicode="g" d="M109 315v371q0 336 428 336q111 0 178 -23q59 -20 153 -94q20 117 72 117q55 0 55 -84v-983q0 -387 -448 -387q-106 0 -230 45q-152 59 -151 141q0 59 55 60q8 0 110.5 -59.5t225.5 -59.5q211 0 272 108q37 53 37 287q-145 -111 -346 -110q-4 0 -7 -1q-404 0 -404 336z M240 319q0 -211 286 -210q111 0 183 26q68 23 157 92v523q-109 145 -311 145q-315 0 -315 -203v-373z" />
+<glyph unicode="h" d="M123 70v1296q0 88 65.5 88t65.5 -88v-446q100 61 168 84q63 20 184 20q403 0 404 -340v-614q0 -90 -64 -90q-66 0 -65 90v614q0 211 -301 211q-172 0 -326 -129v-696q0 -90 -65.5 -90t-65.5 90z" />
+<glyph unicode="i" d="M518 127v747h-217q-96 0 -96 68q0 61 96 62h258q90 0 90 -82v-795h244q90 0 90 -63.5t-84 -63.5h-678q-84 0 -84 63.5t84 63.5h297zM555 1454q51 0 84 -37q37 -41 37 -86q0 -51 -37 -88q-35 -35 -86 -35q-53 0 -88 35t-35 88q0 51 37 88q35 35 88 35z" />
+<glyph unicode="j" d="M696 874h-241q-86 0 -86 64q0 66 86 66h284q86 0 86 -84v-988q0 -186 -82 -274q-84 -90 -270 -90q-143 0 -276 102q-129 98 -129 197q0 92 67 92q23 0 53 -74q37 -86 88 -121q96 -70 201 -69q123 0 172 57q47 53 47 180v942zM676 1454q51 0 84 -37q37 -41 37 -86 q0 -51 -37 -88q-35 -35 -86 -35q-53 0 -88 35t-35 88q0 51 37 88q35 35 88 35z" />
+<glyph unicode="k" d="M123 45v1341q0 68 65.5 68t65.5 -68v-933l623 526q45 45 92 45q55 0 55 -63q0 -33 -35 -56l-403 -338l405 -463q33 -31 33 -59q0 -66 -45 -65q-53 0 -80 26l-414 486l-231 -197v-250q0 -66 -65.5 -66t-65.5 66z" />
+<glyph unicode="l" d="M137 66q0 61 82 61h299v1178h-196q-76 0 -76 61q0 68 76 68h262q66 0 65 -68v-1239h260q74 0 74 -63.5t-74 -63.5h-690q-82 0 -82 66z" />
+<glyph unicode="m" d="M96 70v888q0 66 54 66q29 0 45 -39q16 -35 18 -70q49 61 80 80q45 29 110 29q102 0 185 -113q55 63 96 86q53 27 127 27q233 0 233 -225v-729q0 -90 -65 -90q-63 0 -64 90v684q0 141 -114 141q-88 0 -166 -102v-723q0 -90 -66 -90q-63 0 -63 90v669q0 156 -123 156 q-82 0 -158 -102v-723q0 -90 -65 -90q-64 0 -64 90z" />
+<glyph unicode="n" d="M123 70v876q0 78 61 78q37 0 52 -49q12 -35 18 -76q100 72 170 96q70 29 182 29q403 0 404 -338v-616q0 -90 -66 -90q-63 0 -63 90v612q0 111 -65.5 162t-215.5 51q-104 0 -182 -39q-63 -29 -164 -102v-684q0 -90 -65.5 -90t-65.5 90z" />
+<glyph unicode="o" d="M109 317v367q0 340 450.5 340t450.5 -340v-367q0 -338 -445 -337q-456 -1 -456 337zM240 317q0 -209 321 -208q319 0 320 208v367q0 211 -328 211q-313 0 -313 -211v-367z" />
+<glyph unicode="p" d="M123 -334v1262q0 96 51 96q29 0 51 -43q4 -12 29 -66q152 109 348 109q408 0 408 -340v-371q0 -158 -115 -250q-106 -84 -281 -83q-207 0 -360 110v-424q0 -98 -65.5 -98t-65.5 98zM254 233q137 -125 340 -124q119 0 197 47q90 53 90 157v373q0 115 -97 170 q-78 41 -200 41q-106 0 -183 -33q-57 -27 -147 -112v-519z" />
+<glyph unicode="q" d="M109 317v367q0 172 129 262q113 78 299 78q197 0 329 -117q25 117 72 117q57 0 57 -80v-1278q0 -98 -63 -98q-66 0 -66 98v422q-84 -66 -157 -88q-72 -20 -179 -20q-421 -1 -421 337zM238 317q0 -104 104 -163q84 -47 205 -48q174 0 319 127v519q-123 143 -329 143 q-123 0 -201 -45q-96 -53 -96 -162z" />
+<glyph unicode="r" d="M109 63.5q0 63.5 77 63.5h197v747h-197q-78 0 -77 64q0 66 77 66h258q68 0 68 -111q119 131 256 131q113 0 176 -70q68 -74 68 -182q0 -76 -66 -76q-41 0 -55 52q-27 88 -31 96q-27 51 -100 51q-76 0 -142 -55q-37 -27 -106 -113v-600h244q78 0 78 -59q0 -68 -78 -68 h-570q-77 0 -77 63.5z" />
+<glyph unicode="s" d="M117 207q0 53 53 53q23 0 82 -41q66 -45 127 -72q92 -41 184 -41q111 0 199 41q113 53 112 144q0 117 -190 147l-350 60q-190 61 -191 227q0 299 394 299q111 0 239 -43q160 -55 160 -152q0 -53 -53 -53q-12 0 -125 59.5t-221 59.5q-96 0 -172 -33q-92 -47 -93 -133 q0 -104 197 -135l266 -41q268 -43 269 -258q0 -156 -132 -242q-111 -74 -284 -73q-219 0 -357 96q-114 80 -114 131z" />
+<glyph unicode="t" d="M123 938q0 66 74 66h184v350q0 100 63 100q66 0 66 -100v-350h344q76 0 76 -64q0 -66 -76 -66h-344v-573q0 -195 182 -195q94 0 184.5 59.5t102.5 59.5q59 0 59 -57q0 -70 -145 -143q-96 -45 -215 -45q-297 0 -297 321v573h-184q-74 1 -74 64z" />
+<glyph unicode="u" d="M109 317v633q0 74 63 74q68 0 68 -74v-620q0 -119 73 -174q68 -49 217 -50q182 0 336 142v702q0 74 66 74q63 0 63 -74v-897q0 -74 -55 -73q-33 0 -49 53q-8 25 -17 82q-104 -76 -172 -103q-88 -33 -198 -32q-184 0 -289 88q-106 91 -106 249z" />
+<glyph unicode="v" d="M102 963q0 25 18.5 43t43.5 18q47 0 69 -57l326 -779l326 785q23 51 65 51q68 0 68 -57q0 -16 -17 -56l-362 -868q-27 -63 -80 -63q-51 0 -78 63l-366 870q-13 32 -13 50z" />
+<glyph unicode="w" d="M68 954q0 70 59 70q55 0 66 -68l124 -886l148 745q16 72 94 72q74 0 92 -72l183 -745l90 882q10 72 67 72q61 0 62 -70q0 -2 -11 -104l-98 -803q-18 -68 -119 -67q-88 0 -104 63l-166 713l-131 -709q-12 -68 -102 -67q-104 0 -119 79l-121 789q-14 92 -14 106z" />
+<glyph unicode="x" d="M123 33q0 27 29 65l321 404l-317 407q-18 25 -19 52q0 63 64 63q29 0 55 -33l301 -385l305 385q27 33 56 33q25 0 45 -18.5t20 -40.5q0 -25 -20 -47l-322 -416l334 -406q23 -29 22 -53q0 -63 -59 -63q-41 0 -80 45l-301 372l-287 -366q-41 -51 -86 -51q-61 0 -61 53z" />
+<glyph unicode="y" d="M109 -334q0 61 61 62q12 0 49 -17q31 -14 66 -14q66 0 102 90l100 250l-362 866q-16 39 -16 58q0 63 65 63q40 0 62 -49l327 -768l303 737q27 80 82 80q61 0 62 -53q0 -31 -17 -66l-495 -1190q-61 -147 -211 -147q-63 0 -113 18q-65 29 -65 80z" />
+<glyph unicode="z" d="M109 57q0 29 32 68l619 749h-504q-80 0 -80 66q0 63 80 64h649q63 0 64 -50q0 -29 -23 -57l-631 -770h611q84 0 84 -63.5t-84 -63.5h-746q-71 0 -71 57z" />
+<glyph unicode="{" d="M287 475q0 57 49 66q82 14 88 18q47 27 47 131v397q0 238 123 269q27 10 65 10h101q74 0 74 -66q0 -63 -70 -63h-92q-37 0 -49 -27q-23 -27 -23 -166v-372q0 -176 -176 -195q176 -18 176 -194v-392q0 -121 27 -151q20 -20 45 -21h96q66 0 66 -65.5t-74 -65.5h-121 q-77 0 -123 56q-45 47 -45 209v430q0 86 -47 112q-4 2 -88 19q-49 8 -49 61z" />
+<glyph unicode="|" d="M492 -373v1764q0 63 69 63q68 0 68 -63v-1764q0 -59 -72 -59q-65 0 -65 59z" />
+<glyph unicode="}" d="M835.018 475q0 57 -48.9971 66q-81.9951 14 -87.9951 18q-46.9971 27 -46.9971 131v397q0 238 -122.992 269q-26.998 10 -64.9961 10h-100.993q-73.9961 0 -73.9961 -66q0 -63 69.9961 -63h91.9941q36.998 0 48.9971 -27q22.999 -27 22.999 -166v-372 q0 -176 175.988 -195q-175.988 -18 -175.988 -194v-392q0 -121 -26.999 -151q-19.999 -20 -44.9971 -21h-95.9941q-65.9961 0 -65.9961 -65.5t73.9961 -65.5h120.992q76.9951 0 122.992 56q44.9971 47 44.9971 209v430q0 86 46.9971 112q4 2 87.9951 19 q48.9971 8 48.9971 61z" />
+<glyph unicode="~" d="M176 791q0 45 76 139t117 94q45 0 172 -76t176 -76t102 76t76 76q47 0 47 -51q0 -57 -84 -146q-84 -86 -145 -86q-46 0 -172 74q-129 76 -154 76q-31 0 -84 -76q-52 -74 -80 -74q-47 1 -47 50z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#xa2;" d="M137 311v373q0 309 369 340v174q0 84 72 84q63 0 63 -84v-174q131 -18 229 -92q113 -86 113 -209q0 -68 -61 -68q-41 0 -68 52q-46 86 -61 104q-49 59 -152 78v-787q101 6 141 25q25 14 72 70q39 49 72 49q57 0 57 -60q0 -70 -94 -143q-82 -63 -248 -70v-182 q0 -78 -70 -78q-66 0 -65 78v182q-201 14 -283 90q-86 84 -86 248zM274 309q0 -94 54 -145q47 -47 178 -60v785q-123 -12 -172 -55q-59 -47 -60 -156v-369z" />
+<glyph unicode="&#xa3;" d="M123 199q0 90 59.5 155.5t149.5 65.5q31 0 74 -17l-74 283h-131q-78 0 -78 68q0 66 74 65h102q-12 41 -22.5 81l-20.5 77q-25 95 -25 160q0 129 105 196q90 59 223 60q229 0 318 -125q66 -96 65 -183q0 -61 -68 -61q-39 0 -63 61q-33 82 -59 113q-59 63 -183 64 q-203 0 -202 -121q0 -68 24 -162q20 -80 43 -160h238q80 0 80 -67q0 -66 -80 -66h-203l98 -373q119 -123 125 -127q98 -86 154 -86q59 0 84 95q25 92 74 92q61 0 61 -66q0 -98 -53 -170q-59 -78 -156 -78q-141 0 -287 152q-37 -78 -80 -113q-47 -39 -133 -39 q-106 0 -169.5 62t-63.5 164zM254 195q0 -94 98 -95q39 0 70 27q27 25 27 68q0 39 -31 65q-29 27 -74 27q-39 0 -65 -27q-25 -24 -25 -65z" />
+<glyph unicode="&#xa5;" d="M96 1337q0 55 62 56q40 0 61 -37l322 -572l336 555q29 53 65 54q61 0 62 -60q0 -27 -17 -53l-379 -627h275q74 0 73 -63q0 -68 -77 -68h-250v-114h254q74 0 73.5 -66t-77.5 -66h-250v-231q0 -72 -72 -72q-66 0 -65 72v231h-254q-74 0 -74 66t74 66h254v114h-254 q-74 0 -74 68q0 63 74 63h233l-356 633q-19 31 -19 51z" />
+<glyph unicode="&#xa9;" d="M27 864q0 225 153 377q156 152 379 152q225 0 379 -148q154 -152 154 -373q0 -236 -146 -387q-147 -158 -379 -157q-240 0 -391 147q-149 147 -149 389zM129 866q0 -195 119 -315q121 -125 311.5 -125t308.5 125q121 127 121 313q0 184 -125 307q-127 123 -311 123 q-178 0 -301 -125t-123 -303zM342 750v225q0 209 221 209q86 0 142 -41q66 -49 65 -121q0 -49 -41 -49q-29 0 -41 37q-14 43 -16 47q-31 47 -117 47q-129 0 -129 -146v-182q0 -145 135 -145q111 0 125 74q12 57 43 57q41 0 41 -47q0 -80 -68 -127q-57 -39 -137 -39 q-223 0 -223 201z" />
+<glyph unicode="&#xad;" d="M328 522.5q0 65.5 73 65.5h314q78 0 78 -65.5t-78 -65.5h-309q-78 0 -78 65.5z" />
+<glyph unicode="&#xae;" d="M27 864q0 225 153 377q156 152 379 152q225 0 379 -148q154 -152 154 -373q0 -236 -146 -387q-147 -158 -379 -157q-240 0 -391 147q-149 147 -149 389zM129 866q0 -195 119 -315q121 -125 311.5 -125t308.5 125q121 127 121 313q0 184 -125 307q-127 123 -311 123 q-178 0 -301 -125t-123 -303zM348 594v532q0 45 41 45h227q170 0 170 -178q0 -72 -24.5 -108.5t-89.5 -59.5l125 -207q10 -16 10 -32q0 -37 -39 -37q-25 0 -43 29l-139 229h-156v-213q0 -45 -41 -45t-41 45zM430 889h160q115 0 115 104q0 96 -84 97h-191v-201z" />
+<glyph unicode="&#xb4;" d="M375 1165q0 25 41 70l153 162q51 57 99 57q76 0 75 -88q0 -41 -71 -92l-176 -125q-49 -33 -72 -33q-49 0 -49 49z" />
+<glyph unicode="&#x131;" d="M518 127v747h-217q-96 0 -96 68q0 61 96 62h258q90 0 90 -82v-795h244q90 0 90 -63.5t-84 -63.5h-678q-84 0 -84 63.5t84 63.5h297z" />
+<glyph unicode="&#x2d9;" d="M555 1454q51 0 84 -37q37 -41 37 -86q0 -51 -37 -88q-35 -35 -86 -35q-53 0 -88 35t-35 88q0 51 37 88q35 35 88 35z" />
+<glyph unicode="&#x2000;" horiz-adv-x="796" />
+<glyph unicode="&#x2001;" horiz-adv-x="1595" />
+<glyph unicode="&#x2002;" horiz-adv-x="796" />
+<glyph unicode="&#x2003;" horiz-adv-x="1595" />
+<glyph unicode="&#x2004;" horiz-adv-x="530" />
+<glyph unicode="&#x2005;" horiz-adv-x="397" />
+<glyph unicode="&#x2006;" horiz-adv-x="264" />
+<glyph unicode="&#x2007;" horiz-adv-x="264" />
+<glyph unicode="&#x2008;" horiz-adv-x="198" />
+<glyph unicode="&#x2009;" horiz-adv-x="317" />
+<glyph unicode="&#x200a;" horiz-adv-x="86" />
+<glyph unicode="&#x2010;" d="M328 522.5q0 65.5 73 65.5h314q78 0 78 -65.5t-78 -65.5h-309q-78 0 -78 65.5z" />
+<glyph unicode="&#x2011;" d="M328 522.5q0 65.5 73 65.5h314q78 0 78 -65.5t-78 -65.5h-309q-78 0 -78 65.5z" />
+<glyph unicode="&#x2012;" d="M328 522.5q0 65.5 73 65.5h314q78 0 78 -65.5t-78 -65.5h-309q-78 0 -78 65.5z" />
+<glyph unicode="&#x2013;" d="M164 522.5q0 65.5 74 65.5h641q78 0 77.5 -65.5t-77.5 -65.5h-635q-80 0 -80 65.5z" />
+<glyph unicode="&#x2014;" d="M-82 522.5q0 65.5 74 65.5h1132q76 0 76 -65.5t-76 -65.5h-1128q-78 0 -78 65.5z" />
+<glyph unicode="&#x2018;" d="M436 1128q0 74 66 168q66 96 137 97q43 0 43 -41q0 -16 -51 -59.5t-51 -78.5q0 -23 51 -55.5t51 -75.5q0 -45 -33 -71q-35 -29 -82 -29q-61 0 -96 41t-35 104z" />
+<glyph unicode="&#x2019;" d="M436 1293q0 45 35 73q33 27 82 27q61 0 96 -41q33 -39 33 -102q0 -100 -59 -180q-66 -86 -144 -87q-43 0 -43 41q0 18 54 62q51 43 51 78q0 23 -51 55q-54 35 -54 74z" />
+<glyph unicode="&#x201c;" d="M248 1128q0 74 66 168q66 96 137 97q43 0 43 -41q0 -16 -51 -59.5t-51 -78.5q0 -23 51 -55.5t51 -75.5q0 -45 -33 -71q-35 -29 -82 -29q-61 0 -96 41t-35 104zM626 1128q0 74 66 168q66 96 137 97q43 0 43 -41q0 -16 -51 -59.5t-51 -78.5q0 -23 51 -55.5t51 -75.5 q0 -45 -33 -71q-35 -29 -82 -29q-61 0 -96 41t-35 104z" />
+<glyph unicode="&#x201d;" d="M248 1293q0 45 35 73q33 27 82 27q61 0 96 -41q33 -39 33 -102q0 -100 -59 -180q-66 -86 -144 -87q-43 0 -43 41q0 18 54 62q51 43 51 78q0 23 -51 55q-54 35 -54 74zM624 1293q0 45 35 73q33 27 82 27q61 0 96 -41q33 -39 33 -102q0 -100 -59 -180q-66 -86 -144 -87 q-43 0 -43 41q0 18 54 62q51 43 51 78q0 23 -51 55q-54 35 -54 74z" />
+<glyph unicode="&#x2022;" d="M328 702q0 102 65.5 164t168 62t165.5 -64q66 -66 66 -166q0 -98 -68 -165.5t-166 -67.5q-102 0 -168 65q-63 63 -63 172z" />
+<glyph unicode="&#x2026;" d="M51 96q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123zM436 96q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123zM821 96q0 123 125 123q121 0 121 -123t-121 -123q-125 0 -125 123z" />
+<glyph unicode="&#x202f;" horiz-adv-x="317" />
+<glyph unicode="&#x2044;" d="M989 1393q49 0 49 -50q0 -29 -34 -81l-795 -1239q-28 -49 -74 -50q-53 0 -53 52q0 27 24 63l791 1235q37 70 92 70z" />
+<glyph unicode="&#x205f;" horiz-adv-x="397" />
+<glyph unicode="&#x2070;" d="M799 1157v-276q0 -229 -238 -230q-111 0 -176 60q-63 57 -63 170v276q0 113 63 174q66 61 176.5 61.5t174 -63t63.5 -172.5zM422 1157v-276q0 -57 41 -95q40 -37 98 -36q63 0 100 34.5t37 96.5v276q0 59 -41 98t-102 39q-59 0 -96 -37t-37 -100z" />
+<glyph unicode="&#x20ac;" d="M41 553q0 66 78 65h59v109h-59q-78 0 -78 68q0 66 78 65h59v164q0 369 459 369q442 0 442 -338q0 -82 -67 -82q-53 0 -66 61q0 227 -315 228q-317 0 -318 -238v-164h277q80 0 80 -67q0 -66 -80 -66h-277v-109h277q80 0 80 -67q0 -66 -80 -66h-277v-143q0 -238 328 -238 q305 0 305 222q16 68 66 67q68 0 67 -84q0 -336 -434 -336q-467 0 -467 369v143h-59q-78 0 -78 68z" />
+<glyph unicode="&#x2122;" d="M8 1329q0 49 58 49h421q57 0 58 -47q0 -49 -58 -49h-161v-575q0 -55 -49.5 -55.5t-49.5 55.5v575h-168q-51 0 -51 47zM582 709v622q0 61 53 62q33 0 47 -35l160 -361l149 359q16 37 51 37q49 0 50 -60v-628q0 -53 -50 -54q-51 0 -51 64v415l-104 -243q-14 -39 -45 -39 t-49 37l-111 250v-430q0 -53 -49 -54q-51 1 -51 58z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1025" d="M0 1025h1025v-1025h-1025v1025z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="2244" d="M1640 127v747h-217q-96 0 -96 68q0 61 96 62h258q90 0 90 -82v-795h244q90 0 90 -63.5t-84 -63.5h-678q-84 0 -84 63.5t84 63.5h297zM1677 1454q51 0 84 -37q37 -41 37 -86q0 -51 -37 -88q-35 -35 -86 -35q-53 0 -88 35t-35 88q0 51 37 88q35 35 88 35zM123 940 q0 63 76 64h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="2244" d="M1259 66q0 61 82 61h299v1178h-196q-76 0 -76 61q0 68 76 68h262q66 0 65 -68v-1239h260q74 0 74 -63.5t-74 -63.5h-690q-82 0 -82 66zM123 940q0 63 76 64h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105 q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="3368" d="M2765 127v747h-217q-96 0 -96 68q0 61 96 62h258q90 0 90 -82v-795h244q90 0 90 -63.5t-84 -63.5h-678q-84 0 -84 63.5t84 63.5h297zM2802 1454q51 0 84 -37q37 -41 37 -86q0 -51 -37 -88q-35 -35 -86 -35q-53 0 -88 35t-35 88q0 51 37 88q35 35 88 35zM1245 940 q0 63 76 64h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66zM123 940q0 63 76 64 h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="3368" d="M2384 66q0 61 82 61h299v1178h-196q-76 0 -76 61q0 68 76 68h262q66 0 65 -68v-1239h260q74 0 74 -63.5t-74 -63.5h-690q-82 0 -82 66zM1245 940q0 63 76 64h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105 q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66zM123 940q0 63 76 64h143v124q0 326 332 326q133 0 223 -49q115 -72 115 -199q0 -84 -68 -84q-43 0 -67 49q-29 86 -48 105 q-39 49 -155 49q-203 0 -203 -201v-120h262q86 0 86 -66q0 -63 -86 -64h-262v-819q0 -76 -65 -75q-63 0 -64 75v819h-143q-76 0 -76 66z" />
+<glyph d="M696 874h-241q-86 0 -86 64q0 66 86 66h284q86 0 86 -84v-988q0 -186 -82 -274q-84 -90 -270 -90q-143 0 -276 102q-129 98 -129 197q0 92 67 92q23 0 53 -74q37 -86 88 -121q96 -70 201 -69q123 0 172 57q47 53 47 180v942z" />
+</font>
+</defs></svg>
BIN  app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.ttf
Binary file not shown
BIN  app/assets/stylesheets/cargo/saxMono-fontfacekit/saxmono-webfont.woff
Binary file not shown
16 app/assets/stylesheets/cargo/saxMono-fontfacekit/stylesheet.css
@@ -0,0 +1,16 @@
+/* Generated by Font Squirrel (http://www.fontsquirrel.com) on January 24, 2012 10:05:11 AM America/New_York */
+
+
+
+@font-face {
+ font-family: 'saxMonoRegular';
+ src: url('saxmono-webfont.eot');
+ src: url('saxmono-webfont.eot?#iefix') format('embedded-opentype'),
+ url('saxmono-webfont.woff') format('woff'),
+ url('saxmono-webfont.ttf') format('truetype'),
+ url('saxmono-webfont.svg#saxMonoRegular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+
5 app/assets/stylesheets/cargo/sessions.css.sass
@@ -0,0 +1,5 @@
+body.sessions
+
+ form
+ .input
+ margin-bottom: 1em
22 app/assets/stylesheets/cargo/users.css.sass
@@ -0,0 +1,22 @@
+@import compass
+@import blueprint
+@import blueprint/liquid
+@import cargo/mixins
+
+form.user
+ label
+ display: inline-block
+ width: 200px
+ text-align: right
+ margin-right: 1em
+
+ abbr
+ border-bottom: none
+ color: $error-color
+
+ input[type=submit]
+ +base-button
+
+table.users
+ tr
+ background-color: #eee
3  app/assets/stylesheets/cargo/versions.css.sass
@@ -0,0 +1,3 @@
+// Place all the styles related to the versions controller here.
+// They will automatically be included in application.css.
+// You can use Sass here: http://sass-lang.com/
36 app/controllers/cargo/application_controller.rb
@@ -0,0 +1,36 @@
+module Cargo
+ class ApplicationController < ActionController::Base
+ private
+
+ def signed_in?
+ current_user.nil? ? false : true
+ end
+ helper_method :signed_in?
+
+ def current_user
+ @current_user ||= User.find_by_auth_token(cookies[:auth_token]) if cookies[:auth_token]
+ end
+ helper_method :current_user
+
+ def markdown(text)
+ options = {:hard_wrap => true, :filter_html => true, :autolink => true, :no_intraemphasis => true, :fenced_code => true, :gh_blockcode => true, :tables => true}
+ markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options)
+ markdown.render(text).html_safe
+ end
+ helper_method :markdown
+
+ def require_login
+ unless signed_in?
+ flash.alert = "You must be logged in to access this page"
+ redirect_to login_path
+ end
+ end
+
+ def require_admin
+ unless current_user.admin?
+ flash.alert = "You do not have the permissions to access this page"
+ redirect_to root_path
+ end
+ end
+ end
+end
74 app/controllers/cargo/articles_controller.rb
@@ -0,0 +1,74 @@
+module Cargo
+ class ArticlesController < ApplicationController
+ before_filter :require_login, :except => [:index, :show]
+
+ def index
+ @articles = Article.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @articles }
+ end
+ end
+
+ def show
+ @article = Article.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @article }
+ end
+ end
+
+ def new
+ @article = current_user.articles.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @article }
+ end
+ end
+
+ def edit
+ @article = Article.find(params[:id])
+ end
+
+ def create
+ @article = current_user.articles.new(params[:article])
+
+ respond_to do |format|
+ if @article.save
+ format.html { redirect_to @article, notice: 'Article was successfully created.' }
+ format.json { render json: @article, status: :created, location: @article }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @article.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ def update
+ @article = Article.find(params[:id])
+
+ respond_to do |format|
+ if @article.update_attributes(params[:article])
+ format.html { redirect_to @article, notice: 'Article was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @article.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ def destroy
+ @article = Article.find(params[:id])
+ @article.destroy
+
+ respond_to do |format|
+ format.html { redirect_to articles_url }
+ format.json { head :no_content }
+ end
+ end
+ end
+end
6 app/controllers/cargo/home_controller.rb
@@ -0,0 +1,6 @@
+module Cargo
+ class HomeController < ApplicationController
+ def index
+ end
+ end
+end
25 app/controllers/cargo/sessions_controller.rb
@@ -0,0 +1,25 @@
+module Cargo
+ class SessionsController < ApplicationController
+ def new
+ if signed_in?
+ redirect_to root_url, :alert => "You're already logged in"
+ end
+ end
+
+ def create
+ user = User.find_by_username(params[:username])
+ if user && user.authenticate(params[:password])
+ params[:remember_me] ? cookies.permanent[:auth_token] = user.auth_token : cookies[:auth_token] = user.auth_token
+ redirect_to root_url, :notice => "Logged in!"
+ else
+ flash.now.alert = "Invalid username or password"
+ render "new"
+ end
+ end
+
+ def destroy
+ cookies.delete(:auth_token)
+ redirect_to root_url, :notice => "Logged out!"
+ end
+ end
+end
45 app/controllers/cargo/users_controller.rb
@@ -0,0 +1,45 @@
+module Cargo
+ class UsersController < ApplicationController
+ before_filter :require_login, :require_admin
+
+ def index
+ @users = User.all
+ end
+
+ def new
+ @user = User.new
+ end
+
+ def create
+ @user = User.new(params[:user])
+ if @user.save
+ redirect_to users_path, :notice => "Account created!"
+ else
+ render "new"
+ end
+ end
+
+ def show
+ @user = User.find(params[:id])
+ end
+
+ def edit
+ @user = User.find(params[:id])
+ end
+
+ def update
+ @user = User.find(params[:id])
+ if @user.update_attributes(params[:user])
+ redirect_to users_path, :notice => "Updated successfully!"
+ else
+ render "edit"
+ end
+ end
+
+ def destroy
+ @user = User.find(params[:id])
+ @user.destroy
+ redirect_to users_path, :notice => "successfully destroyed!"
+ end
+ end
+end
12 app/controllers/cargo/versions_controller.rb
@@ -0,0 +1,12 @@
+module Cargo
+ class VersionsController < ApplicationController
+ def index
+ if params[:article_id]
+ @article = Article.find(params[:article_id])
+ @versions = @article.versions.all.reverse
+ else
+ @versions = Version.order('created_at DESC')
+ end
+ end
+ end
+end
4 app/helpers/cargo/application_helper.rb
@@ -0,0 +1,4 @@
+module Cargo
+ module ApplicationHelper
+ end
+end
4 app/helpers/cargo/articles_helper.rb
@@ -0,0 +1,4 @@
+module Cargo
+ module ArticlesHelper
+ end
+end
4 app/helpers/cargo/home_helper.rb
@@ -0,0 +1,4 @@
+module Cargo
+ module HomeHelper
+ end
+end
4 app/helpers/cargo/sessions_helper.rb
@@ -0,0 +1,4 @@
+module Cargo
+ module SessionsHelper
+ end
+end
4 app/helpers/cargo/users_helper.rb
@@ -0,0 +1,4 @@
+module Cargo
+ module UsersHelper
+ end
+end
4 app/helpers/cargo/versions_helper.rb
@@ -0,0 +1,4 @@
+module Cargo
+ module VersionsHelper
+ end
+end
15 app/models/cargo/article.rb
@@ -0,0 +1,15 @@
+module Cargo
+ class Article < ActiveRecord::Base
+ attr_accessor :last_commit_message
+
+ attr_accessible :title, :body, :last_commit_message
+ has_paper_trail :meta => { :commit_message => :last_commit_message }
+
+ belongs_to :author, :class_name => 'User'
+ validates_presence_of :title, :body, :last_commit_message
+
+ def last_update_by
+ User.find(self.versions.last.whodunnit)
+ end
+ end
+end
23 app/models/cargo/user.rb
@@ -0,0 +1,23 @@
+module Cargo
+ class User < ActiveRecord::Base
+ ROLES = %w(editor admin)
+
+ attr_accessible :username, :password, :password_confirmation, :role
+
+ has_secure_password
+
+ validates_presence_of :username, :password, :role, :on => :create
+ has_many :articles, :foreign_key => :author_id
+ before_create { generate_token(:auth_token) }
+
+ def generate_token(column)
+ begin
+ self[column] = SecureRandom.urlsafe_base64
+ end while User.exists?(column => self[column])
+ end
+
+ def admin?
+ self.role == "admin"
+ end
+ end
+end
7 app/views/cargo/articles/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for @article do |f|
+ = f.input :title
+ = f.input :body
+ = f.input :last_commit_message, :hint => "Describe your changes here"
+
+ .actions
+ = f.button :submit
8 app/views/cargo/articles/edit.html.haml
@@ -0,0 +1,8 @@
+- if signed_in?
+ .toolbar
+ = link_to 'Show', @article
+ = link_to 'Back', articles_path
+
+%h1 Editing article
+
+= render 'form'
28 app/views/cargo/articles/index.html.haml
@@ -0,0 +1,28 @@
+%h1 Articles
+
+- if signed_in?
+ .toolbar
+ = link_to 'New Article', new_article_path
+
+%table.list
+ %thead
+ %tr
+ %th Title
+ %th Author
+ %th Last Update by
+ %th Last Update Date
+ %th Actions
+ %tbody
+ - @articles.each do |article|
+ %tr
+ %td= link_to article.title, article
+ %td= article.author.username
+ %td= article.last_update_by.username
+ %td= l article.updated_at, :format => :short
+ %td
+ = link_to 'History', article_versions_path(article)
+ - if signed_in?
+ |
+ = link_to 'Edit', edit_article_path(article)
+ |
+ = link_to 'Destroy', article, :confirm => 'Are you sure?', :method => :delete
6 app/views/cargo/articles/new.html.haml
@@ -0,0 +1,6 @@
+%h1 New article
+
+.toolbar
+ = link_to 'Back to articles', articles_path
+
+= render 'form'
10 app/views/cargo/articles/show.html.haml
@@ -0,0 +1,10 @@
+.toolbar
+ = link_to 'History', article_versions_path(@article)
+ - if signed_in?
+ = link_to 'Edit', edit_article_path(@article)
+ = link_to 'Back to articles', articles_path
+
+%h1= @article.title
+= markdown @article.body
+
+
2  app/views/cargo/home/index.html.haml
@@ -0,0 +1,2 @@
+%h1 Home#index
+%p Find me in app/views/cargo/home/index.html.haml
17 app/views/cargo/sessions/new.html.haml
@@ -0,0 +1,17 @@
+%h1 S'identifier
+
+= form_tag sessions_path do
+ .input
+ = label_tag :username
+ = text_field_tag :username, params[:email], :autofocus => true
+
+ .input
+ = label_tag :password
+ = password_field_tag :password
+
+ .input
+ = check_box_tag :remember_me, 1, params[:remember_me]
+ = label_tag :remember_me
+
+ .actions
+ = submit_tag "Login"
4 app/views/cargo/users/_form.html.haml
@@ -0,0 +1,4 @@
+= form.input :username
+= form.input :role, :collection => Cargo::User::ROLES
+= form.input :password
+= form.input :password_confirmation
1  app/views/cargo/users/_user.html.haml
@@ -0,0 +1 @@
+.users
6 app/views/cargo/users/edit.html.haml
@@ -0,0 +1,6 @@
+%h1 Editing Account
+
+= simple_form_for @user do |f|
+ = render 'form', :form => f
+ .actions
+ = f.button :submit, "Update"
20 app/views/cargo/users/index.html.haml
@@ -0,0 +1,20 @@
+%h1 Accounts
+
+.toolbar
+ = link_to "New Account", new_user_path
+
+%table.list
+ %thead
+ %tr
+ %th Username
+ %th Role
+ %th Actions
+ %tbody
+ - @users.each do |user|
+ %tr
+ %td= user.username
+ %td= user.role
+ %td
+ = link_to "Edit", edit_user_path(user)
+ |
+ = link_to "Destroy", user, :method => :delete
6 app/views/cargo/users/new.html.haml
@@ -0,0 +1,6 @@
+%h1 New Account
+
+= simple_form_for @user do |f|
+ = render 'form', :form => f
+ .actions
+ = f.button :submit, "Create"
19 app/views/cargo/versions/index.html.haml
@@ -0,0 +1,19 @@
+%h1 History
+
+%table.list
+ %thead
+ %tr
+ - if @article.nil?
+ %th Article
+ %th Commit message
+ %th Changes by
+ %th Date
+
+ %tbody
+ - @versions.each do |version|
+ %tr
+ - if @article.nil?
+ %td= link_to version.item.title, version.item
+ %td= version.commit_message
+ %td= Cargo::User.find(version.terminator).username
+ %td=l version.created_at, :format => :short
34 app/views/layouts/cargo/application.html.haml
@@ -0,0 +1,34 @@
+!!!5
+%html
+ %head
+ %title TP Wiki
+ = stylesheet_link_tag "cargo/application", :media => "all"
+ = javascript_include_tag "cargo/application"
+ = csrf_meta_tags
+
+ %body(class="#{controller_name}")
+ #container
+ - flash.each do |name, msg|
+ = content_tag :div, msg, :id => "flash-#{name}", :class => "flash"
+
+ %nav(role='navigation')
+ %ul
+ %li.articles= link_to image_tag('cargo/articles.png') + raw('<br/> Articles'), articles_path
+ %li.history= link_to image_tag('cargo/history.png') + raw('<br/> History'), versions_path
+ - if signed_in? and current_user.admin?
+ %li.users= link_to image_tag('cargo/accounts.png') + raw('<br/> Accounts'), users_path
+
+ #body
+ %header(role='banner')
+ #logo= link_to "CARGO", root_url
+
+ #session
+ - unless signed_in?
+ = link_to "Connexion", login_path
+ -else
+ = link_to "Déconnexion", logout_path, :method => :delete
+
+ #content(role='main')
+ = yield
+
+ %footer
42 cargo.gemspec
@@ -0,0 +1,42 @@
+$:.push File.expand_path("../lib", __FILE__)
+
+# Maintain your gem"s version:
+require "cargo/version"
+
+# Describe your gem and declare its dependencies:
+Gem::Specification.new do |s|
+ s.name = "cargo"
+ s.version = Cargo::VERSION
+ s.authors = ["Rawane ZOSSOU"]
+ s.email = ["dev@raw1z.fr"]
+ s.homepage = "TODO"
+ s.summary = "Wiki engine"
+ s.description = "Wiki engine based on Rails 3 engine"
+
+ s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
+ s.test_files = Dir["spec/**/*"]
+
+ s.add_dependency "rails", "~> 3.2.0"
+ s.add_dependency "jquery-rails"
+ s.add_dependency "haml-rails"
+ s.add_dependency "sass-rails"
+ s.add_dependency "compass", ">= 0.12.alpha.4"
+ s.add_dependency "coffee-rails"
+ s.add_dependency "execjs"
+ s.add_dependency "paper_trail"
+ s.add_dependency "simple_form"
+ s.add_dependency "factory_girl_rails"
+ s.add_dependency "rails3-generators"
+ s.add_dependency "devise", "~> 2.0.0.rc"
+ s.add_dependency "cancan"
+ s.add_dependency "redcarpet"
+ s.add_dependency "awesome_print"
+
+ s.add_development_dependency "sqlite3"
+ s.add_development_dependency "rspec-rails"
+ s.add_development_dependency "capybara"
+ s.add_development_dependency "launchy"
+ s.add_development_dependency "database_cleaner"
+ s.add_development_dependency "eventmachine"#, ">= 1.0.0.beta.4.1"
+ s.add_development_dependency "thin"
+end
3  config/initializers/paper_trail.rb
@@ -0,0 +1,3 @@
+class Version < ActiveRecord::Base
+ attr_accessible :commit_message
+end
59 config/locales/devise.en.yml
@@ -0,0 +1,59 @@
+# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
+
+en:
+ errors:
+ messages:
+ expired: "has expired, please request a new one"
+ not_found: "not found"
+ already_confirmed: "was already confirmed, please try signing in"
+ not_locked: "was not locked"
+ not_saved:
+ one: "1 error prohibited this %{resource} from being saved:"
+ other: "%{count} errors prohibited this %{resource} from being saved:"
+
+ devise:
+ failure:
+ already_authenticated: 'You are already signed in.'
+ unauthenticated: 'You need to sign in or sign up before continuing.'
+ unconfirmed: 'You have to confirm your account before continuing.'
+ locked: 'Your account is locked.'
+ invalid: 'Invalid email or password.'
+ invalid_token: 'Invalid authentication token.'
+ timeout: 'Your session expired, please sign in again to continue.'
+ inactive: 'Your account was not activated yet.'
+ sessions:
+ signed_in: 'Signed in successfully.'
+ signed_out: 'Signed out successfully.'
+ passwords:
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
+ updated: 'Your password was changed successfully. You are now signed in.'
+ updated_not_active: 'Your password was changed successfully.'
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
+ confirmations:
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
+ registrations:
+ signed_up: 'Welcome! You have signed up successfully.'
+ inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
+ updated: 'You updated your account successfully.'
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
+ reasons:
+ inactive: 'inactive'
+ unconfirmed: 'unconfirmed'
+ locked: 'locked'
+ unlocks:
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
+ omniauth_callbacks:
+ success: 'Successfully authorized from %{kind} account.'
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
+ mailer:
+ confirmation_instructions:
+ subject: 'Confirmation instructions'
+ reset_password_instructions:
+ subject: 'Reset password instructions'
+ unlock_instructions:
+ subject: 'Unlock Instructions'
13 config/routes.rb
@@ -0,0 +1,13 @@
+Cargo::Engine.routes.draw do
+ resources :versions, :only => :index
+ resources :users
+
+ resources :articles do
+ resources :versions, :only => :index
+ end
+
+ resources :sessions
+ match 'login', :to => 'sessions#new', :as => 'login'
+ match 'logout', :to => 'sessions#destroy', :as => 'logout', :method => :delete
+ root :to => 'articles#index'
+end
10 db/migrate/20120123133445_create_cargo_articles.rb
@@ -0,0 +1,10 @@
+class CreateCargoArticles < ActiveRecord::Migration
+ def change
+ create_table :cargo_articles do |t|
+ t.string :title
+ t.text :body
+
+ t.timestamps
+ end
+ end
+end
18 db/migrate/20120123145745_create_versions.rb
@@ -0,0 +1,18 @@
+class CreateVersions < ActiveRecord::Migration
+ def self.up
+ create_table :versions do |t|
+ t.string :item_type, :null => false
+ t.integer :item_id, :null => false
+ t.string :event, :null => false
+ t.string :whodunnit
+ t.text :object
+ t.datetime :created_at
+ end
+ add_index :versions, [:item_type, :item_id]
+ end
+
+ def self.down
+ remove_index :versions, [:item_type, :item_id]
+ drop_table :versions
+ end
+end
10 db/migrate/20120123162205_create_cargo_users.rb
@@ -0,0 +1,10 @@
+class CreateCargoUsers < ActiveRecord::Migration
+ def change
+ create_table :cargo_users do |t|
+ t.string :username
+ t.string :password_digest
+
+ t.timestamps
+ end
+ end
+end
5 db/migrate/20120124104007_add_author_id_to_articles.rb
@@ -0,0 +1,5 @@
+class AddAuthorIdToArticles < ActiveRecord::Migration
+ def change
+ add_column :cargo_articles, :author_id, :integer
+ end
+end
6 db/migrate/20120124123937_add_auth_token_to_users.rb
@@ -0,0 +1,6 @@
+class AddAuthTokenToUsers < ActiveRecord::Migration
+ def change
+ add_column :cargo_users, :auth_token, :string
+
+ end
+end
5 db/migrate/20120125072849_add_role_to_users.rb
@@ -0,0 +1,5 @@
+class AddRoleToUsers < ActiveRecord::Migration
+ def change
+ add_column :cargo_users, :role, :string
+ end
+end
4 lib/cargo.rb
@@ -0,0 +1,4 @@
+require "cargo/engine"
+
+module Cargo
+end
14 lib/cargo/engine.rb
@@ -0,0 +1,14 @@
+module Cargo
+ class Engine < ::Rails::Engine
+ isolate_namespace Cargo
+
+ config.generators do |g|
+ g.template_engine :haml
+ g.stylesheet_engine :sass
+ g.javascript_engine :coffee
+ g.fixture_replacement :factory_girl, :dir => "spec/factories"
+ g.test_framework :rspec, :view_specs => false
+ g.form_builder :simple_form
+ end
+ end
+end
3  lib/cargo/version.rb
@@ -0,0 +1,3 @@
+module Cargo
+ VERSION = "0.0.1"
+end
4 lib/tasks/cargo_tasks.rake
@@ -0,0 +1,4 @@
+# desc "Explaining what the task does"
+# task :cargo do
+# # Task goes here
+# end
8 script/rails
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby.exe
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+ENGINE_ROOT = File.expand_path('../..', __FILE__)
+ENGINE_PATH = File.expand_path('../../lib/cargo/engine', __FILE__)
+
+require 'rails/all'
+require 'rails/engine/commands'
164 spec/controllers/cargo/articles_controller_spec.rb
@@ -0,0 +1,164 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator. If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails. There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec. Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe ArticlesController do
+
+ # This should return the minimal set of attributes required to create a valid
+ # Article. As you add validations to Article, be sure to
+ # update the return value of this method accordingly.
+ def valid_attributes
+ {}
+ end
+
+ # This should return the minimal set of values that should be in the session
+ # in order to pass any filters (e.g. authentication) defined in
+ # ArticlesController. Be sure to keep this updated too.
+ def valid_session
+ {}
+ end
+
+ describe "GET index" do
+ it "assigns all articles as @articles" do
+ article = Article.create! valid_attributes
+ get :index, {}, valid_session
+ assigns(:articles).should eq([article])
+ end
+ end
+
+ describe "GET show" do
+ it "assigns the requested article as @article" do
+ article = Article.create! valid_attributes
+ get :show, {:id => article.to_param}, valid_session
+ assigns(:article).should eq(article)
+ end
+ end
+
+ describe "GET new" do
+ it "assigns a new article as @article" do
+ get :new, {}, valid_session
+ assigns(:article).should be_a_new(Article)
+ end
+ end
+
+ describe "GET edit" do
+ it "assigns the requested article as @article" do
+ article = Article.create! valid_attributes
+ get :edit, {:id => article.to_param}, valid_session
+ assigns(:article).should eq(article)
+ end
+ end
+
+ describe "POST create" do
+ describe "with valid params" do
+ it "creates a new Article" do
+ expect {
+ post :create, {:article => valid_attributes}, valid_session
+ }.to change(Article, :count).by(1)
+ end
+
+ it "assigns a newly created article as @article" do
+ post :create, {:article => valid_attributes}, valid_session
+ assigns(:article).should be_a(Article)
+ assigns(:article).should be_persisted
+ end
+
+ it "redirects to the created article" do
+ post :create, {:article => valid_attributes}, valid_session
+ response.should redirect_to(Article.last)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns a newly created but unsaved article as @article" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Article.any_instance.stub(:save).and_return(false)
+ post :create, {:article => {}}, valid_session
+ assigns(:article).should be_a_new(Article)
+ end
+
+ it "re-renders the 'new' template" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Article.any_instance.stub(:save).and_return(false)
+ post :create, {:article => {}}, valid_session
+ response.should render_template("new")
+ end
+ end
+ end
+
+ describe "PUT update" do
+ describe "with valid params" do
+ it "updates the requested article" do
+ article = Article.create! valid_attributes
+ # Assuming there are no other articles in the database, this
+ # specifies that the Article created on the previous line
+ # receives the :update_attributes message with whatever params are
+ # submitted in the request.
+ Article.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+ put :update, {:id => article.to_param, :article => {'these' => 'params'}}, valid_session
+ end
+
+ it "assigns the requested article as @article" do
+ article = Article.create! valid_attributes
+ put :update, {:id => article.to_param, :article => valid_attributes}, valid_session
+ assigns(:article).should eq(article)
+ end
+
+ it "redirects to the article" do
+ article = Article.create! valid_attributes
+ put :update, {:id => article.to_param, :article => valid_attributes}, valid_session
+ response.should redirect_to(article)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns the article as @article" do
+ article = Article.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Article.any_instance.stub(:save).and_return(false)
+ put :update, {:id => article.to_param, :article => {}}, valid_session
+ assigns(:article).should eq(article)
+ end
+
+ it "re-renders the 'edit' template" do
+ article = Article.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Article.any_instance.stub(:save).and_return(false)
+ put :update, {:id => article.to_param, :article => {}}, valid_session
+ response.should render_template("edit")
+ end
+ end
+ end
+
+ describe "DELETE destroy" do
+ it "destroys the requested article" do
+ article = Article.create! valid_attributes
+ expect {
+ delete :destroy, {:id => article.to_param}, valid_session
+ }.to change(Article, :count).by(-1)
+ end
+
+ it "redirects to the articles list" do
+ article = Article.create! valid_attributes
+ delete :destroy, {:id => article.to_param}, valid_session
+ response.should redirect_to(articles_url)
+ end
+ end
+
+end
12 spec/controllers/cargo/home_controller_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe HomeController do
+
+ describe "GET 'index'" do
+ it "returns http success" do
+ get 'index'
+ response.should be_success
+ end
+ end
+
+end
5 spec/controllers/cargo/sessions_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe SessionsController do
+
+end
5 spec/controllers/cargo/users_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe UsersController do
+
+end
12 spec/controllers/cargo/versions_controller_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe VersionsController do
+
+ describe "GET 'index'" do
+ it "returns http success" do
+ get 'index'
+ response.should be_success
+ end
+ end
+
+end
261 spec/dummy/README.rdoc
@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+ <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
+
+2. Change directory to <tt>myapp</tt> and start the web server:
+ <tt>cd myapp; rails server</tt> (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+ "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+ class WeblogController < ActionController::Base
+ def destroy
+ @weblog = Weblog.find(params[:id])
+ @weblog.destroy
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+ end
+ end
+
+The result will be a message in your log file along the lines of:
+
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
+
+ class WeblogController < ActionController::Base
+ def index
+ @posts = Post.all
+ debugger
+ end
+ end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+ >> @posts.inspect
+ => "[#<Post:0x14a6be8
+ @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
+ #<Post:0x14a6620
+ @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+ >> @posts.first.title = "hello from a debugger"
+ => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+ >> f = @posts.first
+ => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+ >> f.
+ Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run <tt>rails console</tt> from the application
+directory.
+
+Options:
+
+* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
+ made to the database.
+* Passing an environment name as an argument will load the corresponding
+ environment. Example: <tt>rails console production</tt>.
+
+To reload your controllers and models after launching the console run
+<tt>reload!</tt>
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>rails
+dbconsole</tt>. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+ |-- app
+ | |-- assets
+ | |-- images
+ | |-- javascripts
+ | `-- stylesheets
+ | |-- controllers
+ | |-- helpers
+ | |-- mailers
+ | |-- models
+ | `-- views
+ | `-- layouts
+ |-- config
+ | |-- environments
+ | |-- initializers
+ | `-- locales
+ |-- db
+ |-- doc
+ |-- lib
+ | `-- tasks
+ |-- log
+ |-- public
+ |-- script
+ |-- test
+ | |-- fixtures
+ | |-- functional
+ | |-- integration
+ | |-- performance
+ | `-- unit
+ |-- tmp
+ | |-- cache
+ | |-- pids
+ | |-- sessions
+ | `-- sockets
+ `-- vendor
+ |-- assets
+ `-- stylesheets
+ `-- plugins
+
+app
+ Holds all the code that's specific to this particular application.
+
+app/assets
+ Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+ Holds controllers that should be named like weblogs_controller.rb for
+ automated URL mapping. All controllers should descend from
+ ApplicationController which itself descends from ActionController::Base.
+
+app/models
+ Holds models that should be named like post.rb. Models descend from
+ ActiveRecord::Base by default.
+
+app/views
+ Holds the template files for the view that should be named like
+ weblogs/index.html.erb for the WeblogsController#index action. All views use