Permalink
Browse files

Inital commit

  • Loading branch information...
matharvard committed Sep 12, 2011
0 parents commit 464935659a1d9c2180e41d3788efe6f41af10ba1
Showing with 2,854 additions and 0 deletions.
  1. +7 −0 .gitignore
  2. +33 −0 Gemfile
  3. +136 −0 Gemfile.lock
  4. +32 −0 README.md
  5. +7 −0 Rakefile
  6. BIN app/assets/images/rails.png
  7. +3 −0 app/assets/javascripts/application.js
  8. 0 app/assets/javascripts/posts.js.coffee
  9. 0 app/assets/javascripts/sessions.js.coffee
  10. +161 −0 app/assets/stylesheets/application.css.scss
  11. +134 −0 app/assets/stylesheets/posts.css.scss
  12. +33 −0 app/assets/stylesheets/reset.css.scss
  13. 0 app/assets/stylesheets/sessions.css.scss
  14. +9 −0 app/controllers/application_controller.rb
  15. +15 −0 app/controllers/gridfs_controller.rb
  16. +60 −0 app/controllers/posts_controller.rb
  17. +28 −0 app/controllers/sessions_controller.rb
  18. +2 −0 app/helpers/application_helper.rb
  19. +2 −0 app/helpers/gridfs_helper.rb
  20. +81 −0 app/helpers/posts_helper.rb
  21. +2 −0 app/helpers/sessions_helper.rb
  22. +10 −0 app/mailers/user_mailer.rb
  23. +8 −0 app/models/article.rb
  24. +8 −0 app/models/chat.rb
  25. +14 −0 app/models/image.rb
  26. +9 −0 app/models/link.rb
  27. +13 −0 app/models/post.rb
  28. +9 −0 app/models/quote.rb
  29. +8 −0 app/models/snippet.rb
  30. +83 −0 app/models/user.rb
  31. +8 −0 app/models/video.rb
  32. +7 −0 app/views/articles/_article.atom.builder
  33. +14 −0 app/views/articles/_article.html.erb
  34. +7 −0 app/views/articles/_form.html.erb
  35. +7 −0 app/views/chats/_chat.atom.builder
  36. +16 −0 app/views/chats/_chat.html.erb
  37. +7 −0 app/views/chats/_form.html.erb
  38. +19 −0 app/views/images/_form.html.erb
  39. +10 −0 app/views/images/_image.atom.builder
  40. +22 −0 app/views/images/_image.html.erb
  41. +34 −0 app/views/layouts/application.html.erb
  42. +10 −0 app/views/links/_form.html.erb
  43. +7 −0 app/views/links/_link.atom.builder
  44. +18 −0 app/views/links/_link.html.erb
  45. +10 −0 app/views/posts/edit.html.erb
  46. +14 −0 app/views/posts/index.atom.builder
  47. +3 −0 app/views/posts/index.html.erb
  48. +10 −0 app/views/posts/new.html.erb
  49. +1 −0 app/views/posts/show.html.erb
  50. +10 −0 app/views/quotes/_form.html.erb
  51. +7 −0 app/views/quotes/_quote.atom.builder
  52. +18 −0 app/views/quotes/_quote.html.erb
  53. +15 −0 app/views/sessions/new.html.erb
  54. +7 −0 app/views/snippets/_form.html.erb
  55. +7 −0 app/views/snippets/_snippet.atom.builder
  56. +14 −0 app/views/snippets/_snippet.html.erb
  57. +9 −0 app/views/user_mailer/change_password.txt.erb
  58. +7 −0 app/views/videos/_form.html.erb
  59. +2 −0 app/views/videos/_video.atom.builder
  60. +12 −0 app/views/videos/_video.html.erb
  61. +4 −0 config.ru
  62. +54 −0 config/application.rb
  63. +6 −0 config/boot.rb
  64. +5 −0 config/environment.rb
  65. +30 −0 config/environments/development.rb
  66. +60 −0 config/environments/production.rb
  67. +42 −0 config/environments/test.rb
  68. +7 −0 config/initializers/backtrace_silencers.rb
  69. +10 −0 config/initializers/inflections.rb
  70. +7 −0 config/initializers/mime_types.rb
  71. +14 −0 config/initializers/mongodb.rb
  72. +8 −0 config/initializers/session_store.rb
  73. +5 −0 config/locales/en.yml
  74. +71 −0 config/routes.rb
  75. +13 −0 db/seeds.rb
  76. +2 −0 doc/README_FOR_APP
  77. +91 −0 lib/authentication.rb
  78. 0 lib/tasks/.gitkeep
  79. +7 −0 lib/tasks/mongo.rake
  80. +26 −0 public/404.html
  81. +26 −0 public/422.html
  82. +26 −0 public/500.html
  83. 0 public/favicon.ico
  84. +5 −0 public/robots.txt
  85. +6 −0 script/rails
  86. +8 −0 test/functional/gridfs_controller_test.rb
  87. +8 −0 test/functional/posts_controller_test.rb
  88. +8 −0 test/functional/sessions_controller_test.rb
  89. +8 −0 test/functional/user_mailer_test.rb
  90. +9 −0 test/performance/browsing_test.rb
  91. +7 −0 test/test_helper.rb
  92. +4 −0 test/unit/helpers/gridfs_helper_test.rb
  93. +4 −0 test/unit/helpers/posts_helper_test.rb
  94. +4 −0 test/unit/helpers/sessions_helper_test.rb
  95. 0 vendor/plugins/.gitkeep
  96. +5 −0 vendor/plugins/atom_feed_helper/CHANGELOG
  97. +20 −0 vendor/plugins/atom_feed_helper/MIT-LICENSE
  98. +72 −0 vendor/plugins/atom_feed_helper/README
  99. +22 −0 vendor/plugins/atom_feed_helper/Rakefile
  100. +2 −0 vendor/plugins/atom_feed_helper/init.rb
  101. +111 −0 vendor/plugins/atom_feed_helper/lib/atom_feed_helper.rb
  102. +8 −0 vendor/plugins/atom_feed_helper/test/atom_feed_helper_test.rb
  103. +20 −0 vendor/plugins/dynamic_form/MIT-LICENSE
  104. +13 −0 vendor/plugins/dynamic_form/README
  105. +10 −0 vendor/plugins/dynamic_form/Rakefile
  106. +12 −0 vendor/plugins/dynamic_form/dynamic_form.gemspec
  107. +1 −0 vendor/plugins/dynamic_form/init.rb
  108. +300 −0 vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb
  109. +8 −0 vendor/plugins/dynamic_form/lib/action_view/locale/en.yml
  110. +5 −0 vendor/plugins/dynamic_form/lib/dynamic_form.rb
  111. +42 −0 vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb
  112. +370 −0 vendor/plugins/dynamic_form/test/dynamic_form_test.rb
  113. +9 −0 vendor/plugins/dynamic_form/test/test_helper.rb
@@ -0,0 +1,7 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/
+.sass-cache/
+config/initializers/email_settings.rb
+config/initializers/secret_token.rb
33 Gemfile
@@ -0,0 +1,33 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.0'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+gem 'json'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', " ~> 3.1.0"
+ gem 'coffee-rails', "~> 3.1.0"
+ gem 'uglifier'
+end
+
+gem 'jquery-rails'
+
+gem 'mongo_mapper'
+gem 'joint'
+
+# Use unicorn as the web server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug'
+
@@ -0,0 +1,136 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.0)
+ actionpack (= 3.1.0)
+ mail (~> 2.3.0)
+ actionpack (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.0.3)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.0)
+ activemodel (3.1.0)
+ activesupport (= 3.1.0)
+ bcrypt-ruby (~> 3.0.0)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ activesupport (3.1.0)
+ multi_json (~> 1.0)
+ arel (2.2.1)
+ bcrypt-ruby (3.0.0)
+ bson (1.3.1)
+ builder (3.0.0)
+ coffee-rails (3.1.0)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.1.0.rc1)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.2)
+ erubis (2.7.0)
+ execjs (1.2.4)
+ multi_json (~> 1.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ jnunemaker-validatable (1.8.4)
+ activesupport (>= 2.3.4)
+ joint (0.5.5)
+ mime-types
+ mongo_mapper (~> 0.8.6)
+ wand (~> 0.4)
+ jquery-rails (1.0.14)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json (1.5.4)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ mongo (1.3.1)
+ bson (>= 1.3.1)
+ mongo_mapper (0.8.6)
+ activesupport (>= 2.3.4)
+ jnunemaker-validatable (~> 1.8.4)
+ plucky (~> 0.3.6)
+ multi_json (1.0.3)
+ plucky (0.3.8)
+ mongo (~> 1.3)
+ polyglot (0.3.2)
+ rack (1.3.2)
+ rack-cache (1.0.3)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.0)
+ actionmailer (= 3.1.0)
+ actionpack (= 3.1.0)
+ activerecord (= 3.1.0)
+ activeresource (= 3.1.0)
+ activesupport (= 3.1.0)
+ bundler (~> 1.0)
+ railties (= 3.1.0)
+ railties (3.1.0)
+ actionpack (= 3.1.0)
+ activesupport (= 3.1.0)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.9.4)
+ safe_shell (1.0.1)
+ sass (3.1.7)
+ sass-rails (3.1.0)
+ actionpack (~> 3.1.0)
+ railties (~> 3.1.0)
+ sass (>= 3.1.4)
+ sprockets (2.0.0)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (!= 1.3.0, ~> 1.1)
+ sqlite3 (1.3.4)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.29)
+ uglifier (1.0.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ wand (0.4)
+ mime-types
+ safe_shell (~> 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coffee-rails (~> 3.1.0)
+ joint
+ jquery-rails
+ json
+ mongo_mapper
+ rails (= 3.1.0)
+ sass-rails (~> 3.1.0)
+ sqlite3
+ uglifier
@@ -0,0 +1,32 @@
+# Waves #
+
+A MongoDB and Ruby on Rails powered application for running a tumblelog.
+
+This is the successor to my other venture into the tumbleverse in the form of
+[theorangeseed][theorangeseed].
+
+## Getting it up & Running ##
+
+You must have [MongoDB][mongodb] installed.
+
+1. Edit MongoDB configuration details in `config/initializers/mongodb.rb`
+2. Create `config/initializers/email_settings.rb` and put your
+ `smtp_settings` and `default_url_options` in it.
+3. Create `config/initializers/secret_token.rb` and put
+ `Waves::Application.config.secret_token = 'your-secret-token'` in it. A
+ token can be generated with `rake secret`.
+3. Run `bundle install`
+4. Run `rails server` and it should be good to go
+
+Create an account either through the console or with `rake db:seed`.
+
+## To Dos ##
+
+* Archives
+* Template system (like Liquid)
+* Improve Atom feed
+* Admin panel and/or more administration features
+
+
+[theorangeseed]: http://github.com/matharvard/theorangeseed
+[mongodb]: http://www.mongodb.org/
@@ -0,0 +1,7 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+require 'rake'
+
+Waves::Application.load_tasks
Binary file not shown.
@@ -0,0 +1,3 @@
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
No changes.
No changes.
@@ -0,0 +1,161 @@
+/*
+ * Waves
+ *= require_self
+*/
+
+/* RESET ------------------------------------------------------------------- */
+@import "reset.css.scss";
+
+/* BASE -------------------------------------------------------------------- */
+body {
+ background:#fff;
+ color:#999;
+ font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size:16px;
+ line-height:24px;
+}
+
+a,
+a:visited {
+ color:rgba(7, 115, 188, 1.0);
+ text-decoration:none;
+}
+
+a:focus,
+a:hover,
+a:active {
+color:rgba(7, 115, 188, 0.5);
+ text-decoration:none;
+}
+
+#content {
+ width:420px;
+ margin:0 auto;
+}
+
+/* HEADER ------------------------------------------------------------------ */
+header {
+ padding:48px;
+
+ h1 {
+ font-size:24px;
+ font-weight:normal;
+ text-align:center;
+ text-transform:lowercase;
+
+ a,
+ a:visited {
+ color:rgba(7, 115, 188, 0.5);
+ text-decoration:none;
+ }
+
+ a:focus,
+ a:hover,
+ a:active {
+ color:rgba(7, 115, 188, 0.8);
+ text-decoration:none;
+ }
+ }
+}
+
+/* POST -------------------------------------------------------------------- */
+@import "posts.css.scss";
+
+/* FOOTER ------------------------------------------------------------------ */
+footer {
+ width:420px;
+ margin:48px auto;
+
+ p {
+ font-size:12px;
+ }
+}
+
+/* FORMS ------------------------------------------------------------------- */
+form {
+
+}
+
+dl.form {
+
+}
+
+dl.form dt {
+
+}
+
+dl.form dt label {
+
+}
+
+dl.form dd {
+
+}
+
+dl.form dd input.text_field {
+ width:100%;
+ background:rgba(0, 0, 0, 0.05);
+ box-sizing:border-box;
+ font-family:inherit;
+ font-size:inherit;
+ line-height:1;
+ border:1px solid rgba(0, 0, 0, 0.05);
+ border-radius:3px;
+ padding:6px;
+ color:inherit;
+}
+
+dl.form dd input:focus {
+ outline:none;
+ box-shadow:0 0 6px rgba(0, 0, 0, 0.1);
+}
+
+dl.form dd textarea.text_area {
+ width:100%;
+ background:rgba(0, 0, 0, 0.05);
+ box-sizing:border-box;
+ font-family:inherit;
+ font-size:inherit;
+ line-height:1;
+ border:1px solid rgba(0, 0, 0, 0.05);
+ border-radius:3px;
+ padding:6px;
+ color:inherit;
+}
+
+dl.form dd textarea:focus {
+ outline:none;
+ box-shadow:0 0 6px rgba(0, 0, 0, 0.1);
+}
+
+dl.form dd textarea.code {
+ font-family:Consolas, monospace;
+}
+
+/* FLASH ------------------------------------------------------------------- */
+.flash {
+ position:absolute;
+ top:24px;
+ right:24px;
+ height:24px;
+ background:rgba(0, 0, 0, 0.1);
+ border:1px solid rgba(0, 0, 0, 0.2);
+ border-radius:3px;
+ box-shadow:0 0 3px rgba(0, 0, 0, 0.5);
+
+ p {
+ padding:0 12px;
+ font-size:12px;
+ font-weight:bold;
+ }
+}
+
+.notice {
+ color:rgba(0, 0, 0, 0.8);
+ text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);
+}
+
+.alert {
+ color:rgba(200, 0, 0, 0.8);
+ text-shadow:1px 1px 1px rgba(0, 0, 0, 0.8);
+}
Oops, something went wrong.

0 comments on commit 4649356

Please sign in to comment.