Permalink
Browse files

Add project core

  • Loading branch information...
chischaschos committed Feb 17, 2014
0 parents commit 20f0e893d19eaa8e9b60a00924f7cd320072725d
@@ -0,0 +1 @@
+.bundle
16 Gemfile
@@ -0,0 +1,16 @@
+source 'https://rubygems.org'
+
+gem 'coffee-script'
+gem 'ejs'
+gem 'haml'
+gem 'sinatra'
+gem 'sprockets'
+
+group 'development' do
+ gem 'shotgun'
+end
+
+group :development, :test do
+ gem 'capybara-webkit'
+ gem 'cucumber'
+end
@@ -0,0 +1,70 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ builder (3.2.2)
+ capybara (2.1.0)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ xpath (~> 2.0)
+ capybara-webkit (1.1.1)
+ capybara (>= 2.0.2, < 2.2.0)
+ json
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.7.0)
+ cucumber (1.3.10)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.3)
+ gherkin (~> 2.12)
+ multi_json (>= 1.7.5, < 2.0)
+ multi_test (>= 0.0.2)
+ diff-lcs (1.2.5)
+ ejs (1.1.1)
+ execjs (2.0.2)
+ gherkin (2.12.2)
+ multi_json (~> 1.3)
+ haml (4.0.5)
+ tilt
+ hike (1.2.3)
+ json (1.8.1)
+ mime-types (2.1)
+ mini_portile (0.5.2)
+ multi_json (1.8.4)
+ multi_test (0.0.3)
+ nokogiri (1.6.1)
+ mini_portile (~> 0.5.0)
+ rack (1.5.2)
+ rack-protection (1.5.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ shotgun (0.9)
+ rack (>= 1.0)
+ sinatra (1.3.6)
+ rack (~> 1.4)
+ rack-protection (~> 1.3)
+ tilt (~> 1.3, >= 1.3.3)
+ sprockets (2.10.1)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ tilt (1.4.1)
+ xpath (2.0.0)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ capybara-webkit
+ coffee-script
+ cucumber
+ ejs
+ haml
+ shotgun
+ sinatra
+ sprockets
@@ -0,0 +1,8 @@
+//= require jquery-1.11.0
+//= require underscore
+//= require backbone
+//= require backbone
+
+//= require_tree ./todo/templates
+//= require_tree ./todo/views
+//= require_tree ./todo/routers
@@ -0,0 +1,7 @@
+@App ||= {}
+class App.TodoRouter extends Backbone.Router
+ routes:
+ '' : 'index'
+
+ index: ->
+ (new App.IndexView el: $('#container')).render()
@@ -0,0 +1,4 @@
+sdfsfjkashdfljkdshaf
+<ul>
+ <li>sadasd</li>
+</ul>
@@ -0,0 +1,7 @@
+@App ||= {}
+class App.IndexView extends Backbone.View
+ template: JST['todo/templates/index']
+
+ render: ->
+ @$el.html(@template())
+
@@ -0,0 +1,16 @@
+$LOAD_PATH << File.expand_path('lib')
+
+require 'todo'
+
+
+Todo::Application.root = File.realpath(File.dirname(__FILE__))
+
+map '/assets' do
+ environment = Sprockets::Environment.new Todo::Application.root
+ environment.append_path 'vendor/js'
+ environment.append_path 'assets/js'
+ run environment
+end
+
+
+run Todo::Application
@@ -0,0 +1,15 @@
+Feature: A user can create a todo list
+ As an anonymous user
+ I want to create a todo list
+ So I can manage my todo items
+
+ Scenario: Successfully create a todo list
+ Given I go to the home page
+ And I create a list
+ And I add the "buy milk" item
+ And I add the "buy beer" item
+ And I add the "get new clothes" item
+ When I go to manage my list
+ Then I can delete the "buy milk item"
+ And I can add the "buy beans" item
+ And I can edit the "buy beer" to "buy a lot of beer"
@@ -0,0 +1,7 @@
+require 'bundler'
+
+Bundler.require :default
+
+module Todo
+ autoload :Application, 'todo/application'
+end
@@ -0,0 +1,11 @@
+require 'sinatra/base'
+
+module Todo
+ class Application < Sinatra::Base
+
+ get '/' do
+ haml :index
+ end
+
+ end
+end
Oops, something went wrong.

0 comments on commit 20f0e89

Please sign in to comment.