Skip to content

Commit

Permalink
add bulk_api + todos SC app
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Jun 7, 2011
1 parent 5b9d52c commit e750722
Show file tree
Hide file tree
Showing 9 changed files with 491 additions and 23 deletions.
24 changes: 1 addition & 23 deletions Gemfile
Expand Up @@ -6,26 +6,4 @@ gem 'rails', '3.0.7'
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
gem 'bulk_api'
102 changes: 102 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,102 @@
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (= 3.0.7)
mail (~> 2.2.15)
actionpack (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
activesupport (3.0.7)
arel (2.0.10)
builder (2.1.2)
bulk_api (0.0.8)
rails (~> 3.0)
sproutcore (~> 1.6.0.rc.1)
chunky_png (1.2.0)
compass (0.11.1)
chunky_png (~> 1.1)
fssm (>= 0.2.7)
sass (~> 3.1)
daemons (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
eventmachine (0.12.10)
extlib (0.9.15)
fssm (0.2.7)
haml (3.1.1)
i18n (0.5.0)
json_pure (1.4.6)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.7)
actionmailer (= 3.0.7)
actionpack (= 3.0.7)
activerecord (= 3.0.7)
activeresource (= 3.0.7)
activesupport (= 3.0.7)
bundler (~> 1.0)
railties (= 3.0.7)
railties (3.0.7)
actionpack (= 3.0.7)
activesupport (= 3.0.7)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.9.2)
sass (3.1.2)
sproutcore (1.6.0.rc.2)
compass (~> 0.11.1)
erubis (~> 2.6)
extlib (~> 0.9.15)
haml (~> 3.1.1)
json_pure (~> 1.4.6)
rack (~> 1.2)
thin (~> 1.2.11)
thor (~> 0.14.3)
sqlite3 (1.3.3)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.27)

PLATFORMS
ruby

DEPENDENCIES
bulk_api
rails (= 3.0.7)
sqlite3
8 changes: 8 additions & 0 deletions app/sproutcore/Buildfile
@@ -0,0 +1,8 @@
# ==========================================================================
# Project: Todos
# Copyright: @2011 My Company, Inc.
# ==========================================================================

# Add initial buildfile information here
config :all, :required => ["sproutcore/core_foundation", "sproutcore/datastore"], :theme => "sproutcore/empty_theme"

7 changes: 7 additions & 0 deletions app/sproutcore/README
@@ -0,0 +1,7 @@
==========================================================================
Project: Todos
Copyright: @2011 My Company, Inc.
==========================================================================

TODO: Describe Your Project

12 changes: 12 additions & 0 deletions app/sproutcore/apps/todos/fixtures/todo.js
@@ -0,0 +1,12 @@
Todos.Todo.FIXTURES = [
    { "guid": "todo-1",
      "title": "Build my first SproutCore app",
      "isDone": false },
    { "guid": "todo-2",
      "title": "Build a really awesome SproutCore app",
      "isDone": false },
    { "guid": "todo-3",
      "title": "Next, the world!",
      "isDone": false }
];

149 changes: 149 additions & 0 deletions app/sproutcore/apps/todos/resources/stylesheets/todos.css
@@ -0,0 +1,149 @@
@import "compass/css3";
@import "compass/reset";

/* CSS Reset */
@include global-reset;

body {
line-height: 1;
font-family: "Lucida Grande", sans-serif;
font-size: 13px;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

/* App CSS */
body, html {
color: #777;
background-color: #F2F4F5;
}

.sc-view {
position: relative;
overflow: visible;
}

$width: 600px;
$border: 1px solid #bbb;

#todos {
@include box-shadow(rgba(0,0,0,0.6) 0 0 1px);
@include border-radius(8px);

$padding: 10px;
$header-height: 20px;

position: absolute;
width: $width;
left: 50%;
margin-top: 38px;
border: $border;
margin-left: -300px;
background-color: #fff;
padding: ($header-height + $padding * 2) $padding $padding;

.mark-all-done label {
margin-left: 5px;
font-weight: bold;
}

#stats {
overflow: hidden;
width: 100%;
padding: 5px $padding;
margin: $padding ($padding * -1);
background-color: #eee;
border-top: 1px solid #aaa;
border-bottom: 1px solid #aaa;
line-height: 25px;

.remaining {
float: left;
}

.sc-button {
@include background-image(linear-gradient(#F9F9F9 1%, #DDD, #F2F2F2, #F7F7F7));
border: 1px solid #828282;
color: #000;
float: right;
padding: 0 5px;

&:hover {
@include background-image(linear-gradient(#FFF 1%, #E2E2E2, #F7F7F7, #FCFCFC));
}

&.is-active {
@include background-image(linear-gradient(#EFEFEF 1%, #D3D3D3, #E8E8E8, #EDEDED));
}
}
}

input[type='text'] {
@include border-radius(5px);
@include single-box-shadow(rgba(0,0,0,0.6), 0, 0, 10px, -2px);
color: #999;
background-color: rgb(240,240,240);
width: $width - ($padding) - 2px;
font-size: 30px;
font-family: Helvetica, sans-serif;
padding: 5px;
border: $border;
font-weight: 500;

&::-webkit-input-placeholder {
color: #aaa;
}
}

h1 {
@include border-top-radius(8px);
@include background-image(linear-gradient(color-stops(white, rgb(244,244,244) 49%, rgb(237,237,237) 51%, #dedede)));
@include single-text-shadow(white, 0, 1px, 1px);

font-size: 15px;
position: absolute;
width: $width;
height: $header-height;
color: rgb(83,86,94);
top: 0;
left: 0;
padding: ($padding / 2) $padding;
border-bottom: $border;
}

.sc-checkbox {
input[type="checkbox"] {
margin-right: 7px;
}
}

ul {
margin: 10px 0 2px 0;

li {
padding: 5px;

&.is-done {
color: #B7B7B7;
text-decoration: line-through;
}
}

li:nth-child(odd) {
background-color: #F7F7F7;
}
}
}

0 comments on commit e750722

Please sign in to comment.