tyrone 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.10.0
data/lib/tyrone/app.rb CHANGED
@@ -2,6 +2,7 @@ configure do
2
2
  set :app_file => 'app.rb'
3
3
  set :views => 'mockups'
4
4
  set :haml => {:format => :html5}
5
+ set :sass => {:cache => false, :output => :expanded}
5
6
  enable :inline_templates
6
7
  end
7
8
 
@@ -9,6 +10,11 @@ helpers do
9
10
  def mockup_path(mockup)
10
11
  "/mockups/#{mockup.to_s.gsub(' ','_')}"
11
12
  end
13
+
14
+ def coffee(file)
15
+ `coffee --print #{File.join(options.views, "#{file}.coffee")}`
16
+ end
17
+
12
18
  end
13
19
 
14
20
  # Please override me
data/lib/tyrone/cli.rb CHANGED
@@ -16,16 +16,12 @@ class Tyrone::Cli < Thor
16
16
  copy_file 'app.rb', 'app.rb'
17
17
 
18
18
  empty_directory 'mockups'
19
+ copy_file 'screen.sass', 'mockups/screen.sass'
20
+ copy_file 'app.coffee', 'mockups/app.coffee'
19
21
 
20
22
  empty_directory 'public'
21
23
  template 'layout.haml.erb', 'mockups/layout.haml'
22
-
23
- empty_directory 'public/css'
24
- get 'http://html5resetcss.googlecode.com/files/html5reset-1.4.1.css', 'public/css/reset.css'
25
-
26
- empty_directory 'public/js'
27
- get 'http://github.com/toolmantim/states.js/raw/master/states.js', 'public/js/jquery.states.js'
28
- get 'http://github.com/quackingduck/jquery.grid.js/raw/master/jquery.grid.js', 'public/js/jquery.grid.js'
24
+ get 'http://html5resetcss.googlecode.com/files/html5reset-1.4.1.css', 'public/reset.css'
29
25
 
30
26
  empty_directory 'features'
31
27
 
data/templates/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
- source :gemcutter
2
-
3
1
  gem 'sinatra'
4
2
  gem 'haml'
5
3
  gem 'tyrone'
@@ -0,0 +1 @@
1
+ $ ->
data/templates/app.rb CHANGED
@@ -1,7 +1,15 @@
1
- # Tyrone cares the shit out of you
2
-
3
1
  helpers do
4
2
  def hidden
5
3
  {:style => 'display:none'}
6
4
  end
7
5
  end
6
+
7
+ get '/app.js' do
8
+ content_type :js
9
+ coffee :app
10
+ end
11
+
12
+ get '/screen.css' do
13
+ content_type :css
14
+ sass :screen
15
+ end
data/templates/config.ru CHANGED
@@ -1,2 +1,3 @@
1
+ require 'init'
1
2
  require 'app'
2
3
  run Sinatra::Application
data/templates/init.rb CHANGED
@@ -1,9 +1,8 @@
1
- begin
2
- require File.join(File.dirname(__FILE__), '.bundle', 'environment')
3
- rescue LoadError
4
- require 'bundler'
5
- Bundler.setup
6
- end
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ Bundler.setup
7
4
 
8
- Bundler.require
5
+ require 'sinatra'
6
+ require 'haml'
7
+ require 'sass'
9
8
  require 'tyrone/app'
@@ -3,10 +3,9 @@
3
3
  %head
4
4
  %meta{:charset => 'utf-8'}
5
5
  %title <%= @project %>
6
- %link{:rel => 'stylesheet', :type => 'text/css', :href => '/css/reset.css'}
6
+ %link{:rel => 'stylesheet', :type => 'text/css', :href => '/reset.css'}
7
+ %link{:rel => 'stylesheet', :type => 'text/css', :href => '/screen.css'}
7
8
  %script{:src => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js', :type => 'text/javascript'}
8
-
9
- %script{:src => '/js/jquery.states.js', :type => 'text/javascript'}
10
- %script{:src => '/js/jquery.grid.js', :type => 'text/javascript'}
9
+ %script{:src => '/app.js', :type => 'text/javascript', :encoding => 'utf-8'}
11
10
  %body
12
11
  = yield
@@ -0,0 +1,3 @@
1
+ body
2
+ font-size: 62.5%
3
+ line-height: 2em
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 9
7
+ - 10
8
8
  - 0
9
- version: 0.9.0
9
+ version: 0.10.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Chris Lloyd
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-27 00:00:00 +11:00
17
+ date: 2010-05-14 00:00:00 +10:00
18
18
  default_executable: tyrone
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -92,10 +92,12 @@ files:
92
92
  - logo.png
93
93
  - templates/Gemfile
94
94
  - templates/Rakefile
95
+ - templates/app.coffee
95
96
  - templates/app.rb
96
97
  - templates/config.ru
97
98
  - templates/init.rb
98
99
  - templates/layout.haml.erb
100
+ - templates/screen.sass
99
101
  has_rdoc: true
100
102
  homepage: http://github.com/chrislloyd/tyrone
101
103
  licenses: []