gokart 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. data/README.md +7 -6
  2. data/assets/Guardfile +0 -4
  3. data/assets/pkg/linux_amd64/server/config.a +0 -0
  4. data/assets/pkg/linux_amd64/server/controller.a +0 -0
  5. data/assets/pkg/linux_amd64/server/view.a +0 -0
  6. data/assets/src/server/config/config.go +5 -0
  7. data/assets/src/server/controller/presentation.go +42 -0
  8. data/assets/src/server/main.go +4 -0
  9. data/assets/src/server/server +0 -0
  10. data/assets/src/server/view/home.go +4 -0
  11. data/assets/src/server/view/presentation.go +32 -0
  12. data/assets/src/www/app/erb_helpers/erb_helper.rb +2 -2
  13. data/assets/src/www/app/sass/application.css.scss +6 -2
  14. data/assets/src/www/app/sass/presentation.css.scss +66 -0
  15. data/assets/src/www/app/sass/utils.scss +38 -0
  16. data/assets/src/www/app/scripts/application.js.coffee +1 -0
  17. data/assets/src/www/app/scripts/controllers/presentation_slides_controller.js +54 -0
  18. data/assets/src/www/app/scripts/pages/presentation.js +34 -0
  19. data/assets/src/www/app/scripts/vendor_wrapper.js +4 -0
  20. data/assets/src/www/app/scripts/views/presentation_slide_view.js +31 -0
  21. data/assets/src/www/app/scripts/views/presentation_view.js +104 -0
  22. data/assets/src/www/app/templates/base.gotmpl.erb +2 -2
  23. data/assets/src/www/app/templates/pages/home.gotmpl +8 -8
  24. data/assets/src/www/app/templates/pages/presentation.gotmpl +188 -0
  25. data/assets/src/www/spec/all-spec.js +1 -0
  26. data/assets/src/www/spec/support/jasmine.yml +5 -2
  27. data/assets/src/www/vendor/css/github.css +127 -0
  28. data/assets/src/www/vendor/js/highlight-min.js +1 -0
  29. data/lib/gokart/version.rb +1 -1
  30. metadata +47 -32
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Go Kart #
2
- Combination of tooks which will make developing webapps using go easier. The gokart gem by default combines SASS, Coffee Script, Rake, and Sprokets with Go to provide a great development environment. This environment supports test driven development (TDD) with ruby guard and jasmine.
3
- There are no external dependancies other than Go and ruby (which I expect you already have...). All dependancies are installed via bundler after the project directory is created.
2
+ Combination of tools which will make developing webapps using go easier. The gokart gem by default combines SASS, Coffee Script, Rake, and Sprockets with Go to provide a great development environment. This environment supports test driven development (TDD) with ruby guard and jasmine.
3
+ There are no external dependencies other than Go and ruby (which I expect you already have...). All dependencies are installed via bundler after the project directory is created.
4
+
5
+ Example [Presentationn]()
4
6
 
5
7
 
6
8
  # Usage #
@@ -9,7 +11,7 @@ With ruby (1.9.1 min maybe?) all you need to do is:
9
11
  gem install gokart
10
12
  ```
11
13
 
12
- Once installed to create a new go + sprockets enviornment:
14
+ Once installed to create a new go + sprockets environment:
13
15
  ```
14
16
  gokart APP_NAME
15
17
  ```
@@ -24,11 +26,10 @@ The environment is split into the following sections:
24
26
  * bin/assets/templates/ - Compiled Go HTML templates
25
27
  * bin/assets/www-min/ - Compiled and minified CSS/JS/images using sprockets
26
28
  * bin/assets/www-debug/ - Compiled, but non-minified/concatonated CSS/JS source, images are here also
27
- * lib/ - Where any Go libraries your app depends on will be installed by running 'go get'. Note: You'll need to set the project into your GOPATH, I haven't figured out a good solution for this yet.
28
29
  * spec/javascripts/ - Where all of the compiled JS specs will be written to, and run from. Note: Currently these do not go through sprockets, but only the coffee-script compiler. So no preprocessing is available
29
- * spec/javascripts/support - Configuration files for Jasmine. jasmin.yml contains the script specifiing the source files to load, and what order to load them in.
30
+ * spec/javascripts/support - Configuration files for Jasmine. jasmin.yml contains the script specifying the source files to load, and what order to load them in.
30
31
  * src/server/ - All of your Go code will go here following the normal Go 1.0 directory pattern
31
32
  * src/www/app/ - All of you Coffee script, sass, and Go Template are found here
32
33
  * src/www/spec/ - All coffee script spec files which will be compiled into js and run using jasmine.
33
34
  * src/www/vendor/ - js/css/image files for third party tools and libraries
34
- * tasks/ - Rake tasks to build, run, and test the application. There are sevearl tasks which you can run do 'rake --tasks' to see a complete list of them. 'rake app:test' to run test units, 'rake app:start' to build and run, use startdebug for a debug build. Note: when you do 'rake jasmine' or rake 'app:guard' you probably want to start these tasks in different tabs because they run until killed.
35
+ * tasks/ - Rake tasks to build, run, and test the application. There are several tasks which you can run do 'rake --tasks' to see a complete list of them. 'rake app:test' to run test units, 'rake app:start' to build and run, use rake app:startdebug for a debug build. Note: when you do 'rake jasmine' or rake 'app:guard' you probably want to start these tasks in different tabs because they run until killed.
data/assets/Guardfile CHANGED
@@ -27,10 +27,6 @@ guard 'rake', :task => 'app:www:images' do
27
27
  watch(%r{^src/www/app/images/.+$})
28
28
  end
29
29
 
30
- guard 'rake', :task => 'app:www:partials' do
31
- watch(%r{^src/www/app/partials/.+$})
32
- end
33
-
34
30
  guard 'rake', :task => 'app:www:spec' do
35
31
  watch(%r{^src/www/spec/.+$})
36
32
  end
@@ -5,6 +5,7 @@ import (
5
5
  "github.com/jasondelponte/golib/config"
6
6
  "net"
7
7
  "path"
8
+ "strings"
8
9
  )
9
10
 
10
11
  type Config struct {
@@ -32,6 +33,10 @@ func LoadConfig(fileName string) (*Config, error) {
32
33
  return nil, err
33
34
  }
34
35
 
36
+ if len(c.URLRoot) == 0 || !strings.HasPrefix(c.URLRoot, "/") {
37
+ c.URLRoot = "/"
38
+ }
39
+
35
40
  c.URLFullAssetsPath = c.buildURLFullAssetsPath()
36
41
 
37
42
  return c, nil
@@ -0,0 +1,42 @@
1
+ package controller
2
+
3
+ import (
4
+ "github.com/jasondelponte/golib/net/conn/httpserver"
5
+ "log"
6
+ "net/http"
7
+ "server/config"
8
+ "server/view"
9
+ )
10
+
11
+ type PresentationController struct {
12
+ view *view.PresentationView
13
+ config *config.Config
14
+ HandlerFuncs struct {
15
+ Show httpserver.HandlerFunc
16
+ }
17
+ }
18
+
19
+ func NewPresentationController(view *view.PresentationView, cfg *config.Config) *PresentationController {
20
+ c := &PresentationController{
21
+ view: view,
22
+ config: cfg,
23
+ }
24
+
25
+ c.HandlerFuncs.Show = c.buildShowHandler()
26
+
27
+ return c
28
+ }
29
+
30
+ func (c PresentationController) buildShowHandler() httpserver.HandlerFunc {
31
+ return func(w http.ResponseWriter, r *http.Request) {
32
+ if c.config.Debug {
33
+ log.Println("PresentationController: DEBUG, Request received. Path:", r.URL.Path)
34
+ }
35
+ b, err := c.view.RenderPresentation()
36
+ if err != nil {
37
+ // TODO error response
38
+ return
39
+ }
40
+ w.Write(b)
41
+ }
42
+ }
@@ -5,6 +5,7 @@ import (
5
5
  "github.com/jasondelponte/golib/net/conn/httpserver"
6
6
  "github.com/jasondelponte/golib/text/html/template"
7
7
  "log"
8
+ "path"
8
9
  "server/config"
9
10
  "server/controller"
10
11
  "server/view"
@@ -66,6 +67,9 @@ func initServer(cfg *config.Config, tmpl *template.Template) (*httpserver.HTTPSe
66
67
  home := controller.NewHomeController(view.NewHomeView(tmpl, cfg), cfg)
67
68
  server.AddHandlerFunc(cfg.URLRoot, home.HandlerFuncs.Welcome)
68
69
 
70
+ pres := controller.NewPresentationController(view.NewPresentationView(tmpl, cfg), cfg)
71
+ server.AddHandlerFunc(path.Join(cfg.URLRoot, "presentation", "show"), pres.HandlerFuncs.Show)
72
+
69
73
  static := controller.NewStaticAssetController(cfg)
70
74
  server.AddHandlerFunc(cfg.URLFullAssetsPath, static.HandlerFuncs.StaticAssets)
71
75
 
Binary file
@@ -24,5 +24,9 @@ func (v *HomeView) RenderWelcome() ([]byte, error) {
24
24
  RootURL: v.config.URLRoot,
25
25
  }
26
26
 
27
+ if v.config.Debug {
28
+ v.template.Reload()
29
+ }
30
+
27
31
  return v.template.Render("home", common, nil)
28
32
  }
@@ -0,0 +1,32 @@
1
+ package view
2
+
3
+ import (
4
+ "github.com/jasondelponte/golib/text/html/template"
5
+ "server/config"
6
+ )
7
+
8
+ type PresentationView struct {
9
+ template *template.Template
10
+ config *config.Config
11
+ }
12
+
13
+ func NewPresentationView(tmpl *template.Template, cfg *config.Config) *PresentationView {
14
+ return &PresentationView{
15
+ template: tmpl,
16
+ config: cfg,
17
+ }
18
+ }
19
+
20
+ func (v *PresentationView) RenderPresentation() ([]byte, error) {
21
+ common := template.CommonProps{
22
+ Title: "GoKart Presentation",
23
+ Debug: v.config.Debug,
24
+ RootURL: v.config.URLRoot,
25
+ }
26
+
27
+ if v.config.Debug {
28
+ v.template.Reload()
29
+ }
30
+
31
+ return v.template.Render("presentation", common, nil)
32
+ }
@@ -1,12 +1,12 @@
1
1
 
2
2
  module ErbHelper
3
3
  def ErbHelper.asset_link(asset, prefix)
4
- src = "{{PathJoin .RootURL \"/assets/\" \"#{asset}\"}}"
4
+ src = "{{PathJoin .Common.RootURL \"/assets/\" \"#{asset}\"}}"
5
5
  if (prefix == 'js')
6
6
  return "<script type=\"text/javascript\" src=\"#{src}\"></script>"
7
7
 
8
8
  elsif (prefix == 'css')
9
- return "<link rel=\"stylesheet\" type=\"text/css\" src=\"#{src}\">"
9
+ return "<link rel=\"stylesheet\" type=\"text/css\" href=\"#{src}\">"
10
10
  end
11
11
  end
12
12
 
@@ -1,10 +1,14 @@
1
+ //= require github
2
+ //= require utils
3
+ //= require presentation
4
+ //= include_self
5
+ //= require_tree ./
1
6
 
2
- $box_border: #C4A478;
7
+ $box_border : #C4A478;
3
8
  $lightBlue: #3bbfce;
4
9
  $warning: #f00;
5
10
  $base_bg: #fff;
6
11
 
7
-
8
12
  html, body, div, h1, h2, h3, h4, p {
9
13
  margin: 0;
10
14
  padding: 0;
@@ -0,0 +1,66 @@
1
+ @import "utils";
2
+
3
+ $slideWidth: 1000px;
4
+
5
+ .presentation {
6
+ font-size: 20px;
7
+ width: $slideWidth;
8
+ margin: 50px auto;
9
+
10
+ .pres-slides {
11
+ .presentation-slide {
12
+ width: $slideWidth;
13
+ display: inline-block;
14
+ vertical-align: top;
15
+ overflow: hidden;
16
+
17
+ @include transition-property(width, opacity);
18
+ @include transition-delay(0);
19
+ @include transition-duration(1s, 0.5s);
20
+
21
+ &.hidden {
22
+ @include transition-property(width, opacity);
23
+ @include transition-delay(0);
24
+ @include transition-duration(1s, 0.75s);
25
+ width: 0;
26
+ opacity: 0;
27
+ }
28
+
29
+ }
30
+ }
31
+
32
+ .slide-content {
33
+ width: $slideWidth;
34
+ font-size: 32px;
35
+
36
+ h1 {
37
+ font-size: 58px;
38
+ }
39
+
40
+ .bottom-right {
41
+ position: absolute;
42
+ right: 50px;
43
+ bottom: 50px;
44
+ }
45
+ }
46
+
47
+ .pres-controls {
48
+ text-align: center;
49
+ display: none;
50
+
51
+ .pres-control{
52
+ display: inline-block;
53
+ vertical-align: middle;
54
+ cursor: pointer;
55
+
56
+ padding: 10px 20px;
57
+
58
+ text-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.6);
59
+ @include background-gradient(#EEE, #A1A1A1);
60
+
61
+ &:active {
62
+ @include background-gradient(#A1A1A1, #EEE);
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,38 @@
1
+
2
+ @mixin background-gradient($from, $to) {
3
+ /* fallback/image non-cover color */
4
+ background-color: $from;
5
+
6
+ /* Firefox 3.6+ */
7
+ background-image: -moz-linear-gradient($from, $to);
8
+
9
+ /* Safari 4+, Chrome 1+ */
10
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to));
11
+
12
+ /* Safari 5.1+, Chrome 10+ */
13
+ background-image: -webkit-linear-gradient($from, $to);
14
+
15
+ /* Opera 11.10+ */
16
+ background-image: -o-linear-gradient($from, $to);
17
+ }
18
+
19
+ @mixin transition-delay($delays...) {
20
+ transition-delay: $delays;
21
+ -moz-transition-delay: $delays; /* Firefox 4 */
22
+ -webkit-transition-delay: $delays; /* Safari and Chrome */
23
+ -o-transition-delay: $delays; /* Opera */
24
+ }
25
+
26
+ @mixin transition-property($props...) {
27
+ transition-property: $props;
28
+ -moz-transition-property: $props;
29
+ -webkit-transition-property: $props;
30
+ -o-transition-property: $props;
31
+ }
32
+
33
+ @mixin transition-duration($durations...) {
34
+ transition-duration: $durations;
35
+ -moz-transition-duration: $durations;
36
+ -webkit-transition-duration: $durations;
37
+ -o-transition-duration: $durations;
38
+ }
@@ -3,6 +3,7 @@
3
3
  #= require underscore
4
4
  #= require backbone
5
5
  #= require mustache
6
+ #= require highlight-min
6
7
  #= require_tree ./controllers
7
8
  #= require_tree ./models
8
9
  #= require_tree ./pages
@@ -0,0 +1,54 @@
1
+ /*global define:true*/
2
+ define('controllers/presentation_slides_controller', [
3
+ 'underscore',
4
+ 'backbone'
5
+ ], function PresentationSlidesControllerModule(_, Backbone) {
6
+ 'use strict';
7
+
8
+ function PresentationSlidesController(options) {
9
+ this._container = options.container;
10
+ this._slideViews = options.slideViews;
11
+ }
12
+
13
+ _.extend(PresentationSlidesController.prototype, Backbone.Events, {
14
+ _currentSlideIdx: 0,
15
+
16
+ firstSlide: function firstSlide() {
17
+ this._showSlide(0);
18
+ },
19
+
20
+ nextSlide: function nextSlideFunc() {
21
+ if (this._currentSlideIdx === this._slideViews.length-1) {
22
+ return;
23
+ }
24
+
25
+ this._showSlide(this._currentSlideIdx-1, 'next');
26
+ },
27
+
28
+ prevSlide: function prevSlideFunc() {
29
+ if (this._currentSlideIdx === 0) {
30
+ return;
31
+ }
32
+
33
+ this._showSlide(this._currentSlideIdx+1, 'prev');
34
+ },
35
+
36
+ _showSlide: function _showSlideFunc(index, dir) {
37
+ var slide = this._slideViews[index];
38
+
39
+ var prevSlide = this._slideViews[this._currentSlideIdx];
40
+ if (dir === 'next') {
41
+ prevSlide.hideForNext();
42
+ }
43
+ else if (dir === 'prev') {
44
+ prevSlide.hideForPrev();
45
+ }
46
+
47
+ slide.show();
48
+
49
+ this._currentSlideIdx = index;
50
+ }
51
+ });
52
+
53
+ return PresentationSlidesController;
54
+ });
@@ -0,0 +1,34 @@
1
+ /*global define:true*/
2
+ define('pages/presentation_page', [
3
+ 'jquery',
4
+ 'underscore',
5
+ 'views/presentation_view'
6
+ ], function PresentationPageModule($, _, PresentationView) {
7
+ 'use strict';
8
+
9
+ function PresentationPage(options) {
10
+ this._container = $(options.container);
11
+
12
+ this.view = new PresentationView({
13
+ slides: [
14
+ 'slide1Intro',
15
+ 'slide2WhatIsGokart',
16
+ 'slide3DevEnv',
17
+ 'slide4WebServer',
18
+ 'slide5Client',
19
+ 'slide6Improvements',
20
+ ]
21
+ });
22
+ }
23
+
24
+ _.extend(PresentationPage.prototype, {
25
+ start: function () {
26
+ this.view.render();
27
+ this._container.append(this.view.$el);
28
+
29
+ this.view.showFirstSlide();
30
+ }
31
+ });
32
+
33
+ return PresentationPage;
34
+ });
@@ -8,4 +8,8 @@ define('jquery', [], function jQueryModule() {
8
8
 
9
9
  define('backbone', [], function BackboneModule() {
10
10
  return Backbone;
11
+ });
12
+
13
+ define('highlight', [], function HighlightModule() {
14
+ return hljs;
11
15
  });
@@ -0,0 +1,31 @@
1
+ /*global define:true*/
2
+ define('views/presentation_slide_view',[
3
+ 'jquery',
4
+ 'underscore',
5
+ 'backbone',
6
+ 'mustache'
7
+ ], function PresentationSlideViewModule($, _, Backbone, Mustache) {
8
+ 'use strict';
9
+
10
+ return Backbone.View.extend({
11
+ className: 'presentation-slide hidden',
12
+ template: null,
13
+
14
+ initialize: function initializeFunc(options) {
15
+ this.template = $('#'+options.slideId+'Template').html();
16
+ },
17
+
18
+ hide: function hideFunc() {
19
+ this.$el.addClass('hidden');
20
+ },
21
+
22
+ show: function showFunc() {
23
+ this.$el.removeClass('hidden next prev');
24
+ },
25
+
26
+ render: function renderFunc() {
27
+ this.$el.html(Mustache.render(this.template));
28
+ return this;
29
+ }
30
+ });
31
+ });
@@ -0,0 +1,104 @@
1
+ /*global define:true*/
2
+ define('views/presentation_view', [
3
+ 'jquery',
4
+ 'underscore',
5
+ 'backbone',
6
+ 'mustache',
7
+ 'highlight',
8
+ 'views/presentation_slide_view'
9
+ ], function PresentationViewModule($, _, Backbone, Mustache, Highlight, PresentationSlideView) {
10
+ 'use strict';
11
+
12
+ return Backbone.View.extend({
13
+ className: '',
14
+ template: $('#presentationContainerTemplate').html(),
15
+
16
+ events: {
17
+ 'click .pres-controls .prev': '_onPrev',
18
+ 'click .pres-controls .next': '_onNext'
19
+ },
20
+ _currentSlideIdx: 0,
21
+ _slides: null,
22
+ _slideViews: [],
23
+
24
+ initialize: function initializeFunc(options) {
25
+ this._slides = options.slides;
26
+
27
+ this._onKeyPress = _.bind(this._onKeyPress, this);
28
+ },
29
+
30
+ render: function renderFunc() {
31
+ this.$el.html(Mustache.render(this.template));
32
+ this._slideViews = this._initSlideViews(this._slides);
33
+
34
+ window.addEventListener('keyup', this._onKeyPress);
35
+
36
+ return this;
37
+ },
38
+
39
+ showFirstSlide: function showFirstSlideFunc() {
40
+ this._showSlide(0);
41
+ },
42
+
43
+ _initSlideViews: function _initSlideViewsFunc(slides) {
44
+ var slideViews = [];
45
+ var $slideCont = this.$('.pres-slides');
46
+ for (var i=0; i < slides.length; i++) {
47
+ var slide = new PresentationSlideView({slideId: slides[i]});
48
+ slide.render();
49
+
50
+ $slideCont.append(slide.$el);
51
+ slideViews.push(slide);
52
+ }
53
+ return slideViews;
54
+ },
55
+
56
+ _onKeyPress: function onKeyUpFunc(event) {
57
+ // TODO handle left/right arrows, enter and space for slide transition
58
+ console.log(event.keyCode, event.keyIdentifier);
59
+ var keyCode = event.keyCode;
60
+ if (keyCode === 39 || keyCode === 13 || keyCode === 32) {
61
+ this._onNext();
62
+ }
63
+ else if (keyCode === 37) {
64
+ this._onPrev();
65
+ }
66
+
67
+ return false;
68
+ },
69
+
70
+ _onPrev: function onPrevFunc(event) {
71
+ if (this._currentSlideIdx === 0) {
72
+ return;
73
+ }
74
+
75
+ this._showSlide(this._currentSlideIdx-1, 'prev');
76
+ },
77
+
78
+ _onNext: function onNextFunc(event) {
79
+ if (this._currentSlideIdx === this._slideViews.length-1) {
80
+ return;
81
+ }
82
+
83
+ this._showSlide(this._currentSlideIdx+1, 'next');
84
+ },
85
+
86
+ _showSlide: function _showSlideFunc(index, dir) {
87
+ var slide = this._slideViews[index];
88
+
89
+ var prevSlide = this._slideViews[this._currentSlideIdx];
90
+ if (dir === 'next' || dir === 'prev') {
91
+ prevSlide.hide();
92
+ }
93
+
94
+ slide.show();
95
+ slide.$('pre code').each(function(i, e) {
96
+ Highlight.highlightBlock(e);
97
+ });
98
+
99
+ this.trigger('slideChanged');
100
+
101
+ this._currentSlideIdx = index;
102
+ }
103
+ });
104
+ });
@@ -2,8 +2,8 @@
2
2
  <!DOCTYPE html>
3
3
  <html>
4
4
  <head>
5
- <title>{{.Title}}</title>
6
- {{if .Debug}}{{template "base.header.assets.debug" .}}{{else}}{{template "base.header.assets" .}}{{end}}
5
+ <title>{{.Common.Title}}</title>
6
+ {{if .Common.Debug}}{{template "base.header.assets.debug" .}}{{else}}{{template "base.header.assets" .}}{{end}}
7
7
  </head>
8
8
  <body>
9
9
  {{template "html_templates"}}
@@ -1,16 +1,17 @@
1
1
  {{define "home.contents"}}
2
2
  <div class="info-block">
3
3
  <h3>Go Kart</h3>
4
- <p>Combination of tools which will make developing webapps using go easier. The gokart gem by default combines SASS, Javascript, Coffee Script, Rake, and Sprokets with Go to provide a great development environment. This environment supports test driven development (TDD) with ruby guard and jasmine.</p>
4
+ <p>Combination of tools which will make developing webapps using go easier. The gokart gem by default combines SASS, Javascript, Coffee Script, Rake, and Sprockets with Go to provide a great development environment. This environment supports test driven development (TDD) with ruby guard and jasmine.</p>
5
5
  <p>There are no external dependencies other than Go and ruby (which I expect you already have...). All dependencies are installed via bundler after the project directory is created.</p>
6
+ <p>Example <a href="{{PathJoin .Common.RootURL "/presentation/" "show"}}">Presentation</a></p>
6
7
  </div>
7
8
  <div class="info-block">
8
9
  <h3>Usage</h3>
9
- <p>With ruby (1.9.1 min maybe?) all you need to do is:</p>
10
+ <p>With ruby all you need to do is:</p>
10
11
  <p class="code">gem install gokart</p>
11
12
  <p>Once installed to create a new go + sprockets environment:</p>
12
13
  <p class="code">gokart APP_NAME</p>
13
- <p>This utility/framework depends on the github.com/jasondelponte/go-utils to run out of the box, but if you choose it would be simple to remove and place with utilities of your choice.<p>
14
+ <p>This utility/framework depends on the github.com/jasondelponte/golib to run out of the box, but if you choose it would be simple to remove and place with utilities of your choice.<p>
14
15
  <p>There are several rake commands you can use to build/run/deploy the environment. Checkout rake --tasks for a list of them. In general you'll probably only ever need the app:x commands not app:server:x or app:www:x.</p>
15
16
  </div>
16
17
  <div class="info-block">
@@ -22,14 +23,13 @@
22
23
  <li><strong>bin/assets/templates/</strong> - Compiled Go HTML templates</li>
23
24
  <li><strong>bin/assets/www-min/</strong> - Compiled and minified CSS/JS/images using sprockets</li>
24
25
  <li><strong>bin/assets/www-debug/</strong> - Compiled, but non-minified/concatenated CSS/JS source, images are here also</li>
25
- <li><strong>lib/</strong> - Where any Go libraries your app depends on will be installed by running 'go get'. Note: You'll need to set the project into your GOPATH, I haven't figured out a good solution for this yet.</li>
26
- <li><strong>spec/javascripts/</strong> - Where all of the compiled JS specs will be written to, and run from. Note: Currently these do not go through sprockets, but only the coffee-script compiler. So no preprocessing is available</li>
26
+ <li><strong>spec/javascripts/</strong> - Where all of the compiled JS specs will be written to, and run from. Note: Currently these do not go through sprockets, but only the coffee-script compiler. So no pre-processing is available</li>
27
27
  <li><strong>spec/javascripts/support</strong> - Configuration files for Jasmine. jasmin.yml contains the script specifying the source files to load, and what order to load them in.</li>
28
28
  <li><strong>src/server/</strong> - All of your Go code will go here following the normal Go 1.0 directory pattern</li>
29
29
  <li><strong>src/www/app/</strong> - All of you Coffee script, sass, and Go Template are found here</li>
30
30
  <li><strong>src/www/spec/</strong> - All coffee script spec files which will be compiled into js and run using jasmine.</li>
31
31
  <li><strong>src/www/vendor/</strong> - js/css/image files for third party tools and libraries</li>
32
- <li><strong>tasks/</strong> - Rake tasks to build, run, and test the application. There are several tasks which you can run do 'rake --tasks' to see a complete list of them. 'rake app:test' to run test units, 'rake app:start' to build and run, use startdebug for a debug build. Note: when you do 'rake jasmine' or rake 'app:guard' you probably want to start these tasks in different tabs because they run until killed.</li>
32
+ <li><strong>tasks/</strong> - Rake tasks to build, run, and test the application. There are several tasks which you can run do 'rake --tasks' to see a complete list of them. 'rake app:test' to run test units, 'rake app:start' to build and run, use rake app:startdebug for a debug build. Note: when you do 'rake jasmine' or rake 'app:guard' you probably want to start these tasks in different tabs because they run until killed.</li>
33
33
  </ul>
34
34
  </div>
35
35
 
@@ -40,7 +40,7 @@
40
40
  {{end}}
41
41
 
42
42
  {{define "home"}}
43
- {{template "base.header" .Common}}
44
- {{template "home.contents" .Contents}}
43
+ {{template "base.header" .}}
44
+ {{template "home.contents" .}}
45
45
  {{template "base.footer"}}
46
46
  {{end}}
@@ -0,0 +1,188 @@
1
+ {{define "presentation.contents"}}
2
+ <div class="presentation">
3
+ </div>
4
+
5
+ <script id="presentationContainerTemplate" type="text/html">
6
+ <div class="pres-slides"></div>
7
+ <div class="pres-controls">
8
+ <div class="prev pres-control">Prev</div>
9
+ <div class="next pres-control">Next</div>
10
+ </div>
11
+ </script>
12
+
13
+ <script id="slide1IntroTemplate" type="text/html">
14
+ <div class="slide-content">
15
+ <h1 class="main-title">gokart</h1>
16
+ <div class="bottom-right">
17
+ <div>Jason Del Ponte</div>
18
+ <div><a href="https://github.com/jasondelponte/gokart">github.com/jasondelponte/gokart</a></div>
19
+ </div>
20
+ </div>
21
+ </script>
22
+
23
+ <script id="slide2WhatIsGokartTemplate" type="text/html">
24
+ <div class="slide-content">
25
+ <h1>What is the server?</h1>
26
+ <ul>
27
+ <li><p>Ruby gem to create a development environment for Go web applications have structured client scripting</p></li>
28
+ <li>
29
+ <p>Self contained web server</p>
30
+ <ul>
31
+ <li><p>Serves static and dynamically rendered content</p></li>
32
+ <li><p>Support SSL (soon)</p></li>
33
+ </ul>
34
+ </li>
35
+ <li><p>Integrates with existing Go workspaces without pollution</p></li>
36
+ <li><p>Easily Customized</p></li>
37
+ <li><p>Encourages continuous testing</p></li>
38
+ </ul>
39
+ </div>
40
+ </script>
41
+
42
+ <script id="slide3DevEnvTemplate" type="text/html">
43
+ <div class="slide-content">
44
+ <h1>Development Environment</h1>
45
+ <ul>
46
+ <li>
47
+ <p>Rake task build commands</p>
48
+ <ul>
49
+ <li><p>Simple and easy to use tasks for controlling the build environment</p></li>
50
+ </ul>
51
+ </li>
52
+ <li>
53
+ <p>Sprockets</p>
54
+ <ul>
55
+ <li><p>Pre-compiles all scripts and html templates</p></li>
56
+ </ul>
57
+ </li>
58
+ <li>
59
+ <p>Guard</p>
60
+ <ul>
61
+ <li><p>Unit testing on file changes</p></li>
62
+ <li><p>Rebuild of scripts and html template</p></li>
63
+ </ul>
64
+ </li>
65
+ <li>
66
+ <p>Unit tests</p>
67
+ <ul>
68
+ <li><p>Javascript Specs with Jasmine</p></li>
69
+ <li><p>Go tests</p></li>
70
+ </ul>
71
+ </li>
72
+ </ul>
73
+ </div>
74
+ </script>
75
+
76
+ <script id="slide4WebServerTemplate" type="text/html">
77
+ <div class="slide-content">
78
+ <h1>Web Server</h1>
79
+ <ul>
80
+ <li>
81
+ <p>Go Server</p>
82
+ <ul>
83
+ <li><p>Simple initial structure provided</p></li>
84
+ <li><p>Easily replaced or build on</p></li>
85
+ </ul>
86
+ </li>
87
+ <li>
88
+ <p>Structure</p>
89
+ <ul>
90
+ <li><p>Controllers with registered routes</p></li>
91
+ <li><p>Views render HTML template content</p></li>
92
+ </ul>
93
+ </li>
94
+ <li>
95
+ <p>HTML Templates</p>
96
+ <ul>
97
+ <li><p>Templates compiled by sprockets</p></li>
98
+ <li><p>Accept model data from view/controllers</p></li>
99
+ <li><p>Templates supports ERB helpers during compilation</p></li>
100
+ </ul>
101
+ </li>
102
+ </ul>
103
+ </div>
104
+ </script>
105
+
106
+ <script id="slide5ClientTemplate" type="text/html">
107
+ <div class="slide-content">
108
+ <h1>Client Scripting and Content</h1>
109
+ <ul>
110
+ <li>
111
+ <p>Scripting</p>
112
+ <ul>
113
+ <li><p>Supports Javascript, Coffeescript, CSS and SCSS</p></li>
114
+ <li><p>Sprockets used for compiling scripts</p></li>
115
+ </ul>
116
+ </li>
117
+ <li>
118
+ <p>Javascript AMD</p>
119
+ <ul>
120
+ <li><p>Compatible with most of require.js</p></li>
121
+ </ul>
122
+ </li>
123
+ <li>
124
+ <p>Jasmine Unit Testing</p>
125
+ <ul>
126
+ <li><p>Integrated with guard, and rake tasks</p></li>
127
+ <li><p>Test driven development</p></li>
128
+ </ul>
129
+ </li>
130
+ <li>
131
+ <p>Build</p>
132
+ <ul>
133
+ <li><p>Release: Single compressed JS/CSS files</p></li>
134
+ <li><p>Debug: JS/CSS files maintain pathing</p></li>
135
+ </ul>
136
+ </li>
137
+ </ul>
138
+ </div>
139
+ </script>
140
+
141
+ <script id="slide6ImprovementsTemplate" type="text/html">
142
+ <div class="slide-content">
143
+ <h1>Improvements</h1>
144
+ <ul>
145
+ <li>
146
+ <p>More thought out MVC model</p>
147
+ <ul>
148
+ <li><p>Both client side and in web server</p></li>
149
+ <li><p>HTML templates and javascript template cohesion</p></li>
150
+ </ul>
151
+ </li>
152
+ <li>
153
+ <p>Internationalization support</p>
154
+ <ul>
155
+ <li><p>Unification between html templates, and client scripts</p></li>
156
+ </ul>
157
+ </li>
158
+ <li>
159
+ <p>Generators</p>
160
+ <ul>
161
+ <li><p>Models/Views/Controllers</p></li>
162
+ <li><p>Boiler plate code</p></li>
163
+ </ul>
164
+ </li>
165
+ <li>
166
+ <p>Logging and Metrics tightly integrated</p>
167
+ <ul>
168
+ <li><p>Verification</p></li>
169
+ <li><p>Understanding scalability</p></li>
170
+ </ul>
171
+ </li>
172
+ </ul>
173
+ </div>
174
+ </script>
175
+
176
+ <script type="text/javascript">
177
+ var PresentationPage = require('pages/presentation_page');
178
+
179
+ var pres = new PresentationPage({container: ".presentation"});
180
+ pres.start();
181
+ </script>
182
+ {{end}}
183
+
184
+ {{define "presentation"}}
185
+ {{template "base.header" .}}
186
+ {{template "presentation.contents" .}}
187
+ {{template "base.footer"}}
188
+ {{end}}
@@ -7,5 +7,6 @@ define('spec/all', [
7
7
 
8
8
  window.addEventListener('load', function(){
9
9
  require('spec/all');
10
+ console.log('test');
10
11
  jasmine.getEnv().execute()
11
12
  }, false);
@@ -12,6 +12,8 @@
12
12
  #
13
13
  src_files:
14
14
  - "js/utilities/require.js"
15
+ - "js/underscore.js"
16
+ - "js/backbone.js"
15
17
  - "js/**/*.js"
16
18
 
17
19
  # stylesheets
@@ -50,6 +52,7 @@ helpers:
50
52
  # - **/*[sS]pec.js
51
53
  #
52
54
  spec_files:
55
+ - "**/*[sS]pec.js"
53
56
 
54
57
  # src_dir
55
58
  #
@@ -60,7 +63,7 @@ spec_files:
60
63
  #
61
64
  # src_dir: public
62
65
  #
63
- src_dir: bin/assets/www-debug
66
+ src_dir: "bin/assets/www-debug"
64
67
 
65
68
  # spec_dir
66
69
  #
@@ -71,4 +74,4 @@ src_dir: bin/assets/www-debug
71
74
  #
72
75
  # spec_dir: spec/javascripts
73
76
  #
74
- spec_dir: spec/javascripts
77
+ spec_dir: "spec/javascripts"
@@ -0,0 +1,127 @@
1
+ /*
2
+
3
+ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
4
+
5
+ */
6
+
7
+ pre code {
8
+ display: block; padding: 0.5em;
9
+ color: #333;
10
+ background: #f8f8ff
11
+ }
12
+
13
+ pre .comment,
14
+ pre .template_comment,
15
+ pre .diff .header,
16
+ pre .javadoc {
17
+ color: #998;
18
+ font-style: italic
19
+ }
20
+
21
+ pre .keyword,
22
+ pre .css .rule .keyword,
23
+ pre .winutils,
24
+ pre .javascript .title,
25
+ pre .nginx .title,
26
+ pre .subst,
27
+ pre .request,
28
+ pre .status {
29
+ color: #333;
30
+ font-weight: bold
31
+ }
32
+
33
+ pre .number,
34
+ pre .hexcolor,
35
+ pre .ruby .constant {
36
+ color: #099;
37
+ }
38
+
39
+ pre .string,
40
+ pre .tag .value,
41
+ pre .phpdoc,
42
+ pre .tex .formula {
43
+ color: #d14
44
+ }
45
+
46
+ pre .title,
47
+ pre .id {
48
+ color: #900;
49
+ font-weight: bold
50
+ }
51
+
52
+ pre .javascript .title,
53
+ pre .lisp .title,
54
+ pre .clojure .title,
55
+ pre .subst {
56
+ font-weight: normal
57
+ }
58
+
59
+ pre .class .title,
60
+ pre .haskell .type,
61
+ pre .vhdl .literal,
62
+ pre .tex .command {
63
+ color: #458;
64
+ font-weight: bold
65
+ }
66
+
67
+ pre .tag,
68
+ pre .tag .title,
69
+ pre .rules .property,
70
+ pre .django .tag .keyword {
71
+ color: #000080;
72
+ font-weight: normal
73
+ }
74
+
75
+ pre .attribute,
76
+ pre .variable,
77
+ pre .lisp .body {
78
+ color: #008080
79
+ }
80
+
81
+ pre .regexp {
82
+ color: #009926
83
+ }
84
+
85
+ pre .class {
86
+ color: #458;
87
+ font-weight: bold
88
+ }
89
+
90
+ pre .symbol,
91
+ pre .ruby .symbol .string,
92
+ pre .lisp .keyword,
93
+ pre .tex .special,
94
+ pre .prompt {
95
+ color: #990073
96
+ }
97
+
98
+ pre .built_in,
99
+ pre .lisp .title,
100
+ pre .clojure .built_in {
101
+ color: #0086b3
102
+ }
103
+
104
+ pre .preprocessor,
105
+ pre .pi,
106
+ pre .doctype,
107
+ pre .shebang,
108
+ pre .cdata {
109
+ color: #999;
110
+ font-weight: bold
111
+ }
112
+
113
+ pre .deletion {
114
+ background: #fdd
115
+ }
116
+
117
+ pre .addition {
118
+ background: #dfd
119
+ }
120
+
121
+ pre .diff .change {
122
+ background: #0086b3
123
+ }
124
+
125
+ pre .chunk {
126
+ color: #aaa
127
+ }
@@ -0,0 +1 @@
1
+ var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\b\\s*"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(E,F,C){function o(r,N){for(var M=0;M<N.c.length;M++){var L=N.c[M].bR.exec(r);if(L&&L.index==0){return N.c[M]}}}function s(L,r){if(L.e&&L.eR.test(r)){return L}if(L.eW){return s(L.parent,r)}}function t(r,L){return !C&&L.i&&L.iR.test(r)}function y(M,r){var L=G.cI?r[0].toLowerCase():r[0];return M.k.hasOwnProperty(L)&&M.k[L]}function H(){var L=l(w);if(!A.k){return L}var r="";var O=0;A.lR.lastIndex=0;var M=A.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=y(A,M);if(N){v+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=A.lR.lastIndex;M=A.lR.exec(L)}return r+L.substr(O)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function K(){return A.sL!==undefined?z():H()}function J(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){x+=L;w=""}else{if(M.eB){x+=l(r)+L;w=""}else{x+=L;w=r}}A=Object.create(M,{parent:{value:A}});B+=M.r}function D(L,r){w+=L;if(r===undefined){x+=K();return 0}var M=o(r,A);if(M){x+=K();J(M,r);return M.rB?0:r.length}var N=s(A,r);if(N){if(!(N.rE||N.eE)){w+=r}x+=K();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=N.parent);if(N.eE){x+=l(r)}w="";if(N.starts){J(N.starts,"")}return N.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var G=e[E];f(G);var A=G;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(F);if(!u){break}q=D(F.substr(p,u.index-p),u[0]);p=u.index+q}D(F.substr(p));return{r:B,keyword_count:v,value:x,language:E}}catch(I){if(I=="Illegal"){return{r:0,keyword_count:0,value:l(F)}}else{throw I}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.go=function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"string",b:"`",e:"`"},{cN:"number",b:"[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r:0},a.CNM]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\[\\\\/]"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[c,a.ASM,a.QSM,a.NM]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
@@ -1,3 +1,3 @@
1
1
  module Gokart
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gokart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-02 00:00:00.000000000 Z
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
16
- requirement: &16254360 !ruby/object:Gem::Requirement
16
+ requirement: &22302840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *16254360
24
+ version_requirements: *22302840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: coffee-script
27
- requirement: &16253320 !ruby/object:Gem::Requirement
27
+ requirement: &22302420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *16253320
35
+ version_requirements: *22302420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: therubyracer
38
- requirement: &16251740 !ruby/object:Gem::Requirement
38
+ requirement: &22302000 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *16251740
46
+ version_requirements: *22302000
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sprockets
49
- requirement: &16250780 !ruby/object:Gem::Requirement
49
+ requirement: &22301580 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *16250780
57
+ version_requirements: *22301580
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard
60
- requirement: &16249200 !ruby/object:Gem::Requirement
60
+ requirement: &22301160 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *16249200
68
+ version_requirements: *22301160
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard-coffeescript
71
- requirement: &16262620 !ruby/object:Gem::Requirement
71
+ requirement: &22317100 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *16262620
79
+ version_requirements: *22317100
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-jasmine
82
- requirement: &16261560 !ruby/object:Gem::Requirement
82
+ requirement: &22316680 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *16261560
90
+ version_requirements: *22316680
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: guard-sass
93
- requirement: &16260020 !ruby/object:Gem::Requirement
93
+ requirement: &22316260 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *16260020
101
+ version_requirements: *22316260
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: guard-rake
104
- requirement: &16258640 !ruby/object:Gem::Requirement
104
+ requirement: &22315840 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *16258640
112
+ version_requirements: *22315840
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: guard-livereload
115
- requirement: &16257540 !ruby/object:Gem::Requirement
115
+ requirement: &22315420 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *16257540
123
+ version_requirements: *22315420
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: guard-shell
126
- requirement: &16255780 !ruby/object:Gem::Requirement
126
+ requirement: &22315000 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *16255780
134
+ version_requirements: *22315000
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: jasmine
137
- requirement: &16284840 !ruby/object:Gem::Requirement
137
+ requirement: &22314580 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *16284840
145
+ version_requirements: *22314580
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: yui-compressor
148
- requirement: &16281600 !ruby/object:Gem::Requirement
148
+ requirement: &22314160 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *16281600
156
+ version_requirements: *22314160
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: uglifier
159
- requirement: &16280260 !ruby/object:Gem::Requirement
159
+ requirement: &22313740 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *16280260
167
+ version_requirements: *22313740
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: bundler
170
- requirement: &16278840 !ruby/object:Gem::Requirement
170
+ requirement: &22313240 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,7 +175,7 @@ dependencies:
175
175
  version: 1.0.0
176
176
  type: :runtime
177
177
  prerelease: false
178
- version_requirements: *16278840
178
+ version_requirements: *22313240
179
179
  description: Combination of tooks which will make developing webapps using go easier. The
180
180
  gokart gem by default combines SASS, Coffee Script, Rake, and Sprokets with Go to
181
181
  provide a great development environment. This environment supports test driven
@@ -194,14 +194,22 @@ files:
194
194
  - lib/gokart/environment.rb
195
195
  - lib/gokart/version.rb
196
196
  - assets/Guardfile
197
+ - assets/pkg/linux_amd64/server/view.a
198
+ - assets/pkg/linux_amd64/server/config.a
199
+ - assets/pkg/linux_amd64/server/controller.a
197
200
  - assets/config/config-debug.json
198
201
  - assets/config/config-release.json
199
202
  - assets/config.rb
203
+ - assets/src/server/server
200
204
  - assets/src/server/controller/static_assets.go
205
+ - assets/src/server/controller/presentation.go
201
206
  - assets/src/server/controller/home.go
202
207
  - assets/src/server/config/config.go
203
208
  - assets/src/server/main.go
209
+ - assets/src/server/view/presentation.go
204
210
  - assets/src/server/view/home.go
211
+ - assets/src/www/vendor/css/github.css
212
+ - assets/src/www/vendor/js/highlight-min.js
205
213
  - assets/src/www/vendor/js/backbone-min.js
206
214
  - assets/src/www/vendor/js/underscore-min.js
207
215
  - assets/src/www/vendor/js/backbone.js
@@ -217,12 +225,16 @@ files:
217
225
  - assets/src/www/spec/support/jasmine_config.rb
218
226
  - assets/src/www/app/erb_helpers/erb_helper.rb
219
227
  - assets/src/www/app/scripts/vendor_wrapper.js
228
+ - assets/src/www/app/scripts/views/presentation_slide_view.js
229
+ - assets/src/www/app/scripts/views/presentation_view.js
230
+ - assets/src/www/app/scripts/controllers/presentation_slides_controller.js
220
231
  - assets/src/www/app/scripts/application.js.coffee
221
232
  - assets/src/www/app/scripts/utilities/properties.js.coffee
222
233
  - assets/src/www/app/scripts/utilities/logger.js.coffee
223
234
  - assets/src/www/app/scripts/utilities/deferred.js.coffee
224
235
  - assets/src/www/app/scripts/utilities/require.js
225
236
  - assets/src/www/app/scripts/pages/home.js
237
+ - assets/src/www/app/scripts/pages/presentation.js
226
238
  - assets/src/www/app/templates/base.gotmpl.erb
227
239
  - assets/src/www/app/templates/partials/test.gotmpl
228
240
  - assets/src/www/app/templates/partials/test2.gotmpl
@@ -230,7 +242,10 @@ files:
230
242
  - assets/src/www/app/templates/partials_end.gotmpl
231
243
  - assets/src/www/app/templates/application.gotmpl
232
244
  - assets/src/www/app/templates/pages/home.gotmpl
245
+ - assets/src/www/app/templates/pages/presentation.gotmpl
246
+ - assets/src/www/app/sass/presentation.css.scss
233
247
  - assets/src/www/app/sass/application.css.scss
248
+ - assets/src/www/app/sass/utils.scss
234
249
  - assets/tasks/app.rake
235
250
  - assets/tasks/server.rake
236
251
  - assets/tasks/www.rake