Skip to content
This repository
Browse code

readme

  • Loading branch information...
commit 1ac74bc463e3ced8e05d32ce376afea9928054d7 1 parent 12ea8a9
Lance Pollard authored December 21, 2011

Showing 40 changed files with 8 additions and 182 deletions. Show diff stats Hide diff stats

  1. 4  .npmignore
  2. 1  docs
  3. 1  examples/api/Procfile
  4. 23  examples/api/README.md
  5. 17  examples/api/app/controllers/posts_controller.coffee
  6. 3  examples/api/app/docs/home.md
  7. 5  examples/api/app/helpers/application_helper.coffee
  8. 2  examples/api/app/models/post.coffee
  9. 2  examples/api/app/presenters/post/index_presenter.coffee
  10. 18  examples/api/app/views/layouts/application.jade
  11. 2  examples/api/app/views/posts/index.jade
  12. 1  examples/api/app/views/shared/_head.jade
  13. 14  examples/api/config/application.coffee
  14. 6  examples/api/config/locales/en.coffee
  15. 9  examples/api/config/routes.coffee
  16. 51  examples/api/package.json
  17. 12  examples/api/server.js
  18. 4  lib/tower/model.js
  19. 0  examples/api/app/assets/javascripts/application.coffee → src/tower/generator/generators/app/Cakefile
  20. 0  examples/api/app/assets/stylesheets/application.css → src/tower/generator/generators/app/README.md
  21. 0  examples/api/app/assets/stylesheets/application.css.styl → src/tower/generator/generators/app/Watchfile
  22. 1  src/tower/generator/generators/app/app/client/controllers/applicationController.coffee
  23. 0  ...s/api/app/views/posts/_form.jade → src/tower/generator/generators/app/app/stylesheets/application.styl
  24. 0  ...pi/app/views/posts/edit.jade → src/tower/generator/generators/app/app/views/layouts/application.coffee
  25. 0  examples/api/app/views/posts/new.jade → src/tower/generator/generators/app/config/application.coffee
  26. 0  examples/api/app/views/posts/show.jade → src/tower/generator/generators/app/config/routes.coffee
  27. 0  src/tower/generator/generators/app/package.json
  28. 0  src/tower/generator/generators/app/public/humans.txt
  29. 0  src/tower/generator/generators/app/public/robots.txt
  30. 0  src/tower/generator/generators/app/server.js
  31. 0  src/tower/generator/generators/app/vendor/javascripts/coffeekup.js
  32. 0  src/tower/generator/generators/app/vendor/javascripts/socket.io.js
  33. 0  src/tower/generator/generators/app/vendor/javascripts/underscore.js
  34. 2  src/tower/model.coffee
  35. 8  src/tower/model/versioning.coffee
  36. 0  src/tower/tasks/assets.cake
  37. 3  src/tower/tasks/db.cake
  38. 0  src/tower/tasks/log.cake
  39. 0  src/tower/tasks/routes.cake
  40. 1  wiki
4  .npmignore
@@ -4,8 +4,10 @@
4 4
 .git*
5 5
 Cakefile
6 6
 wiki/
7  
-examples/
  7
+docs/
8 8
 src/
9 9
 spec/
  10
+dist/
  11
+examples/
10 12
 favicon.ico
11 13
 Watchfile
1  docs
... ...
@@ -0,0 +1 @@
  1
+Subproject commit a0729d74ab78f9b8a4f9f7abe4d0f4a15cf9eeae
1  examples/api/Procfile
... ...
@@ -1 +0,0 @@
1  
-web: node server.js
23  examples/api/README.md
Source Rendered
... ...
@@ -1,23 +0,0 @@
1  
-# Example Metro Web Service App
2  
-
3  
-## Development Environment
4  
-
5  
-```
6  
-brew install https://raw.github.com/mxcl/homebrew/cb6a4b4765ca4439eb03cd137cc6cbae143a8c62/Library/Formula/node.rb # heroku
7  
-npm install metro
8  
-```
9  
-
10  
-## Run
11  
-
12  
-```
13  
-node server.js
14  
-```
15  
-
16  
-## Deploy to Heroku
17  
-
18  
-```
19  
-heroku create --stack cedar
20  
-git push heroku master
21  
-```
22  
-
23  
-Make sure to add any new node modules to `package.json`.
17  examples/api/app/controllers/posts_controller.coffee
... ...
@@ -1,17 +0,0 @@
1  
-class PostsController
2  
-  @include  Metro.Controllers.Base
3  
-  
4  
-  #@layout   "application"
5  
-  @layout   false
6  
-  
7  
-  t: (string) ->
8  
-    @_t ?= require("#{Metro.root}/config/locales/en")
9  
-    @_t[string]
10  
-    
11  
-  index: ->
12  
-    #@render layout: false, json: hello: 'world'
13  
-    @render json: hello: 'world'
14  
-    #@render "posts/index"
15  
-    #@respond_with hello: 'world'
16  
-
17  
-module.exports = PostsController
3  examples/api/app/docs/home.md
Source Rendered
... ...
@@ -1,3 +0,0 @@
1  
-# Metro Bootstrap App
2  
-
3  
-This is a doc!
5  examples/api/app/helpers/application_helper.coffee
... ...
@@ -1,5 +0,0 @@
1  
-class ApplicationHelper
2  
-  t: (string) ->
3  
-    @_t ?= require("#{Metro.root}/config/locales/en")
4  
-    @_t[string]
5  
-  
2  examples/api/app/models/post.coffee
... ...
@@ -1,2 +0,0 @@
1  
-class Post
2  
-  @include Metro.Models.Base
2  examples/api/app/presenters/post/index_presenter.coffee
... ...
@@ -1,2 +0,0 @@
1  
-class Post.IndexPresenter
2  
-  @include Metro.Presenter
18  examples/api/app/views/layouts/application.jade
... ...
@@ -1,18 +0,0 @@
1  
-!!! 5
2  
-html
3  
-  head
4  
-    meta(charset="UTF-8")
5  
-    title= t("title")
6  
-    meta(name="description", content=t("description"))
7  
-    meta(name="keywords", content=t("keywords"))
8  
-    //-!= stylesheet_link_tag("application")
9  
-  body(role="application")
10  
-    nav#navigation(role="navigation")
11  
-      .frame
12  
-    header#header
13  
-      .frame
14  
-    section#body
15  
-      .frame
16  
-        != yield
17  
-    footer#footer
18  
-      .frame
2  examples/api/app/views/posts/index.jade
... ...
@@ -1,2 +0,0 @@
1  
-header.header
2  
-  h1.title#title Hello World
1  examples/api/app/views/shared/_head.jade
... ...
@@ -1 +0,0 @@
1  
-= meta_tag("title", t("title"))
14  examples/api/config/application.coffee
... ...
@@ -1,14 +0,0 @@
1  
-Metro.configure ->
2  
-  #@models.orm             = "metro-mongo"
3  
-  
4  
-  #@views.engine           = "jade"
5  
-  
6  
-  @assets.path            = "./public/assets"
7  
-  @assets.css_compressor  = "yui"
8  
-  @assets.js_compressor   = "uglifier"
9  
-  @assets.js              = ["application.js"]
10  
-  @assets.css             = ["application.css", "theme.css"]
11  
-  @assets.css_paths       = ["./app/assets/stylesheets"]
12  
-  @assets.js_paths        = ["./app/assets/javascripts"]
13  
-
14  
-Metro.Views.engine = "jade"
6  examples/api/config/locales/en.coffee
... ...
@@ -1,6 +0,0 @@
1  
-en =
2  
-  title: "Metro Bootstrap"
3  
-  description: "Node like Rails"
4  
-  keywords: "Node.js, Ruby on Rails, MVC"
5  
-  
6  
-module.exports = en
9  examples/api/config/routes.coffee
... ...
@@ -1,9 +0,0 @@
1  
-Metro.Application.routes().draw ->
2  
-  @match "/login",          to: "sessions#new", via: "get", as: "login"
3  
-  
4  
-  @match "/posts",          to: "posts#index", via: "get"
5  
-  @match "/posts/:id/edit", to: "posts#edit", via: "get"
6  
-  @match "/posts/:id",      to: "posts#show", via: "get"
7  
-  @match "/posts",          to: "posts#create", via: "post"
8  
-  @match "/posts/:id",      to: "posts#update", via: "put"
9  
-  @match "/posts/:id",      to: "posts#destroy", via: "delete"
51  examples/api/package.json
... ...
@@ -1,51 +0,0 @@
1  
-{
2  
-  "name": "metro-bootstrap",
3  
-  "version": "0.2.3",
4  
-  "description": "Rails-esque Framework for Node.js",
5  
-  "homepage": "http://viatropos.github.com/metro.js",
6  
-  "main": "lib/metro.js",
7  
-  "author": "Lance Pollard <lancejpollard@gmail.com>",
8  
-  "keywords": [
9  
-    "framework",
10  
-    "compression",
11  
-    "node"
12  
-  ],
13  
-  "licenses": [
14  
-    {
15  
-      "type": "MIT",
16  
-      "url": "http://mths.be/mit"
17  
-    }
18  
-  ],
19  
-  "bugs": {
20  
-    "url": "https://github.com/viatropos/metro.js/issues"
21  
-  },
22  
-  "repository": {
23  
-    "type": "git",
24  
-    "url": "https://github.com/viatropos/metro.js.git"
25  
-  },
26  
-  "engines": { "node": ">= 0.4.0" },
27  
-  "directories": {
28  
-    "test": "spec"
29  
-  },
30  
-  "dependencies": {
31  
-    "coffee-script":      ">= 1.1.0",
32  
-    "uglify-js":          ">= 1.1.1",
33  
-    "file":               ">= 0.1.1",
34  
-    "underscore":         ">= 1.1.6",
35  
-    "underscore.string":  ">= 1.1.6",
36  
-    "mime":               ">= 1.2.4",
37  
-    "connect":            ">= 1.7.1",
38  
-    "findit":             ">= 0.1.1",
39  
-    "stylus":             ">= 0.17.0",
40  
-    "ejs":                ">= 0.4.3",
41  
-    "hamljs":             ">= 0.5.1",
42  
-    "jade":               ">= 0.16.2",
43  
-    "less":               ">= 1.1.4",
44  
-    "sass":               ">= 0.5.0",
45  
-    "scss":               ">= 0.2.0",
46  
-    "mustache":           ">= 0.3.1-dev",
47  
-    "markdown":           ">= 0.2.1",
48  
-    "qs":                 ">= 0.3.1",
49  
-    "metro":              ">= 0.2.5"
50  
-  }
51  
-}
12  examples/api/server.js
... ...
@@ -1,12 +0,0 @@
1  
-var Metro = require("metro");
2  
-require("coffee-script");
3  
-
4  
-Metro.root = process.cwd();
5  
-Metro.Views.load_paths =  [Metro.root + "/app/views"]
6  
-Metro.env  = "development";
7  
-Metro.port = process.env.PORT || 1597;
8  
-
9  
-Metro.Views.pretty_print = true
10  
-
11  
-Metro.Application.bootstrap();
12  
-Metro.Application.run();
4  lib/tower/model.js
@@ -48,8 +48,6 @@
48 48
 
49 49
   require('./model/field');
50 50
 
51  
-  require('./model/versioning');
52  
-
53 51
   require('./model/fields');
54 52
 
55 53
   require('./model/persistence');
@@ -76,8 +74,6 @@
76 74
 
77 75
   Tower.Model.include(Tower.Model.Atomic);
78 76
 
79  
-  Tower.Model.include(Tower.Model.Versioning);
80  
-
81 77
   Tower.Model.include(Tower.Model.Metadata);
82 78
 
83 79
   Tower.Model.include(Tower.Model.Dirty);
0  ...les/api/app/assets/javascripts/application.coffee → src/tower/generator/generators/app/Cakefile
File renamed without changes
0  examples/api/app/assets/stylesheets/application.css → src/tower/generator/generators/app/README.md
Source Rendered
File renamed without changes
0  ...s/api/app/assets/stylesheets/application.css.styl → src/tower/generator/generators/app/Watchfile
File renamed without changes
1  src/tower/generator/generators/app/app/client/controllers/applicationController.coffee
... ...
@@ -0,0 +1 @@
  1
+class App.PostsController extends Tower.Controller
0  examples/api/app/views/posts/_form.jade → ...r/generators/app/app/stylesheets/application.styl
File renamed without changes
0  examples/api/app/views/posts/edit.jade → ...nerators/app/app/views/layouts/application.coffee
File renamed without changes
0  examples/api/app/views/posts/new.jade → ...enerator/generators/app/config/application.coffee
File renamed without changes
0  examples/api/app/views/posts/show.jade → ...wer/generator/generators/app/config/routes.coffee
File renamed without changes
0  src/tower/generator/generators/app/package.json
No changes.
0  src/tower/generator/generators/app/public/humans.txt
No changes.
0  src/tower/generator/generators/app/public/robots.txt
No changes.
0  src/tower/generator/generators/app/server.js
No changes.
0  src/tower/generator/generators/app/vendor/javascripts/coffeekup.js
No changes.
0  src/tower/generator/generators/app/vendor/javascripts/socket.io.js
No changes.
0  src/tower/generator/generators/app/vendor/javascripts/underscore.js
No changes.
2  src/tower/model.coffee
@@ -26,7 +26,6 @@ require './model/inheritance'
26 26
 require './model/relation'
27 27
 require './model/relations'
28 28
 require './model/field'
29  
-require './model/versioning'
30 29
 require './model/fields'
31 30
 require './model/persistence'
32 31
 require './model/atomic'
@@ -41,7 +40,6 @@ require './model/locale/en'
41 40
 
42 41
 Tower.Model.include Tower.Model.Persistence
43 42
 Tower.Model.include Tower.Model.Atomic
44  
-Tower.Model.include Tower.Model.Versioning
45 43
 Tower.Model.include Tower.Model.Metadata
46 44
 Tower.Model.include Tower.Model.Dirty
47 45
 Tower.Model.include Tower.Model.Criteria
8  src/tower/model/versioning.coffee
... ...
@@ -1,8 +0,0 @@
1  
-# http://mongoid.org/docs/extras.html
2  
-Tower.Model.Versioning =
3  
-  ClassMethods:
4  
-    maxVersions: (number) ->
5  
-      
6  
-    
7  
-
8  
-module.exports = Tower.Model.Versioning
0  src/tower/tasks/assets.cake
No changes.
3  src/tower/tasks/db.cake
... ...
@@ -0,0 +1,3 @@
  1
+cake 'db:push', ->
  2
+
  3
+cake 'db:pull', ->
0  src/tower/tasks/log.cake
No changes.
0  src/tower/tasks/routes.cake
No changes.
1  wiki
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 105f1c2162e0a89bbda1779e6cb11fdd6b532896

0 notes on commit 1ac74bc

Please sign in to comment.
Something went wrong with that request. Please try again.