tempatra 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG ADDED
File without changes
data/README.md CHANGED
@@ -6,7 +6,8 @@ A RubiGen Sinatra application generator providing Blueprint CSS, jQuery, Haml, S
6
6
  Installation
7
7
  ------------
8
8
 
9
- $ sudo gem install olauzon-tempatra -s http://gems.github.com/
9
+ $ gem sources -a http://gemcutter.org/ # If you do not have gemcutter as a source, add it!
10
+ $ sudo gem install tempatra
10
11
 
11
12
  Basic Usage
12
13
  -----------
@@ -49,7 +50,7 @@ Create git repository
49
50
 
50
51
  $ tempatra your-app-name -G
51
52
 
52
- Create and push to Heroku
53
+ Create and push to Heroku (requires heroku gem and Heroku account)
53
54
 
54
55
  $ tempatra your-app-name -H
55
56
 
data/Rakefile CHANGED
@@ -11,17 +11,17 @@ begin
11
11
  gem.homepage = "http://github.com/olauzon/tempatra"
12
12
  gem.authors = ["Olivier Lauzon"]
13
13
 
14
- gem.add_dependency('chriseppstein-compass', '>= 0.8.12')
15
- gem.add_dependency('cucumber', '>= 0.3.98')
16
- gem.add_dependency('haml', '>= 2.2.3')
17
- gem.add_dependency('rack-test', '>= 0.4.1')
14
+ gem.add_dependency('compass', '>= 0.8.17')
15
+ gem.add_dependency('cucumber', '>= 0.4.4')
16
+ gem.add_dependency('haml', '>= 2.2.13')
17
+ gem.add_dependency('rack-test', '>= 0.5.2')
18
18
  gem.add_dependency('rake', '>= 0.8.7')
19
- gem.add_dependency('rdiscount', '>= 1.3.5')
19
+ gem.add_dependency('rdiscount', '>= 1.5.5')
20
20
  gem.add_dependency('rspec')
21
21
  gem.add_dependency('rubigen', '>= 1.5.2')
22
22
  gem.add_dependency('sinatra', '>= 0.9.4')
23
- gem.add_dependency('thin', '>= 1.2.2')
24
- gem.add_dependency('webrat', '>= 0.5.1')
23
+ gem.add_dependency('thin', '>= 1.2.3')
24
+ gem.add_dependency('webrat', '>= 0.5.3')
25
25
 
26
26
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
27
27
  gem.files = FileList[ 'app_generators/**/*',
data/TODO ADDED
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -16,7 +16,8 @@ class TempatraGenerator < RubiGen::Base
16
16
  :app_full_name,
17
17
  :module_name,
18
18
  :git_init,
19
- :heroku
19
+ :heroku,
20
+ :compile
20
21
 
21
22
  def initialize(runtime_args, runtime_options = {})
22
23
  super
@@ -36,13 +37,13 @@ class TempatraGenerator < RubiGen::Base
36
37
  BASEDIRS.each { |path| m.directory path }
37
38
 
38
39
  # Root
39
- m.template "_gems" , ".gems"
40
- m.template "_gitignore" , ".gitignore"
41
- m.template "config.rb.erb" , "config.rb"
42
- m.template "config.ru.erb" , "config.ru"
43
- m.template "config.yml.erb", "config.yml"
44
- m.template "Rakefile.erb" , "Rakefile"
45
- m.template "README.md.erb" , "README.md"
40
+ m.template "_gems" , ".gems"
41
+ m.template "_gitignore" , ".gitignore"
42
+ m.template "config.rb.erb" , "config.rb"
43
+ m.template "config.ru.erb" , "config.ru"
44
+ m.template "config.yml.erb", "config.yml"
45
+ m.template "Rakefile.erb" , "Rakefile"
46
+ m.template "README.md.erb" , "README.md"
46
47
 
47
48
  # Sinatra
48
49
  m.template "lib/tempatra.rb.erb" , "lib/#{app_file_name}.rb"
@@ -102,10 +103,10 @@ class TempatraGenerator < RubiGen::Base
102
103
  unless File.exist?(File.expand_path(@destination_root) + '/public/images/grid.png')
103
104
  m.run("#{compass} --force --grid-img --images-dir public/images")
104
105
  end
105
- m.run("#{compass}")
106
+ m.run("#{compass}") if compile
106
107
 
107
108
  # Git
108
- if git_init || heroku
109
+ if heroku || git_init
109
110
  git = which "git"
110
111
  unless File.exist?(File.expand_path(@destination_root) + '/.git/config')
111
112
  m.run("#{git} init")
@@ -134,10 +135,10 @@ class TempatraGenerator < RubiGen::Base
134
135
  $ thin start -p 4567 -R config.ru
135
136
  (Then go to http://localhost:4567/ with your browser)
136
137
 
137
- While you develop, continuously compile your Sass stylesheets with Compass (in another terminal)
138
+ You can continuously compile your Sass stylesheets with Compass
138
139
  $ compass --watch
139
140
 
140
- And of course, use autospec (in yet another terminal)
141
+ And of course, use autospec
141
142
  $ autospec
142
143
 
143
144
 
@@ -162,9 +163,10 @@ protected
162
163
  def add_options!(opts)
163
164
  opts.separator ''
164
165
  opts.separator "Tempatra options:"
165
- opts.on("-v", "--version", "Show the Tempatra version number and quit")
166
- opts.on("-G", "--git-init", "Create a git repository") {|o| options[:git] = o}
167
- opts.on("-H", "--heroku", "Create and push to Heroku") {|o| options[:heroku] = o}
166
+ opts.on("-v", "--version" , "Show the Tempatra version number and quit")
167
+ opts.on("-C", "--compile" , "Compile Compass stylesheets") {|o| options[:compile] = o}
168
+ opts.on("-N", "--no-git" , "Don't create a git repository") {|o| options[:no_git] = o}
169
+ opts.on("-H", "--heroku" , "Create and push to Heroku") {|o| options[:heroku] = o}
168
170
  end
169
171
 
170
172
  BASEDIRS = %w(
@@ -181,8 +183,9 @@ protected
181
183
  )
182
184
 
183
185
  def extract_options
184
- @git_init = options[:git] ? true : false
185
- @heroku = options[:heroku] ? true : false
186
+ @compile = options[:compile].nil? ? false : true
187
+ @git_init = options[:no_git].nil? ? true : false
188
+ @heroku = options[:heroku].nil? ? false : true
186
189
  end
187
190
 
188
191
  def which(bin)
@@ -4,7 +4,6 @@ require 'rake/rdoctask'
4
4
 
5
5
  require 'spec/rake/spectask'
6
6
 
7
-
8
7
  task :default => [ :spec, :cucumber ]
9
8
 
10
9
  desc "Run the code examples in spec/"
@@ -1,2 +1,3 @@
1
1
  rdiscount
2
2
  haml --version '>= 2.2.3'
3
+ compass --version '>= 0.8.17'
@@ -1,14 +1,26 @@
1
1
  # Compass configuration
2
2
 
3
+ if defined?(Sinatra)
4
+ # This is the configuration to use when running within sinatra
5
+ project_path = Sinatra::Application.root
6
+ environment = :development
7
+ images_dir = File.join '..', 'public', 'images'
8
+ else
9
+ # this is the configuration to use when running within the compass command line tool.
10
+ css_dir = File.join 'public', 'stylesheets'
11
+ relative_assets = true
12
+ environment = :production
13
+ images_dir = File.join 'public', 'images'
14
+ end
15
+
16
+ # This is common configuration
17
+ sass_dir = File.join 'views', 'stylesheets'
18
+ http_path = "/"
19
+ http_images_path = "/images"
20
+ http_stylesheets_path = "/stylesheets"
21
+
3
22
  # Require any additional compass plugins here.
4
- project_type = :stand_alone
5
-
6
- # Set this to the root of your project when deployed:
7
- http_path = "/"
8
- css_dir = "public/stylesheets"
9
- sass_dir = "views/stylesheets"
10
- images_dir = "public/images"
11
- http_images_path = http_path + 'images'
23
+ project_type = :stand_alone
12
24
  output_style = :compact
13
25
 
14
26
  # To enable relative paths to assets via compass helper functions. Uncomment:
@@ -1,17 +1,27 @@
1
1
  APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
2
2
 
3
3
  require 'rubygems'
4
+ require 'compass'
4
5
  require 'sinatra'
5
6
  require 'haml'
6
- require 'sass'
7
7
  require 'rdiscount'
8
8
 
9
9
  class <%= module_name %> < Sinatra::Application
10
10
 
11
11
  set :root, APP_ROOT
12
12
 
13
+ configure do
14
+ Compass.configuration.parse(File.join(APP_ROOT, 'config.rb'))
15
+ end
16
+
13
17
  get '/' do
14
18
  haml :index
15
19
  end
16
20
 
21
+ # <%= compile ? 'Unc' : 'C' %>omment to compile your stylesheets with<%= compile ? 'out' : '' %> the compass utility
22
+ <%= '#' if compile %> get '/stylesheets/:name.css' do
23
+ <%= '#' if compile %> content_type 'text/css', :charset => 'utf-8'
24
+ <%= '#' if compile %> sass(:"stylesheets/#{params[:name]}", Compass.sass_engine_options )
25
+ <%= '#' if compile %> end
26
+
17
27
  end
@@ -11,7 +11,7 @@ describe "Tempatra" do
11
11
  end
12
12
 
13
13
  it "generates a new sinatra project" do
14
- `ruby #{TEMPATRA_ROOT}/bin/tempatra spec/tmp`
14
+ `ruby #{TEMPATRA_ROOT}/bin/tempatra -N spec/tmp`
15
15
  end
16
16
 
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tempatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Lauzon
@@ -9,18 +9,18 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-29 00:00:00 -04:00
12
+ date: 2009-11-29 00:00:00 -05:00
13
13
  default_executable: tempatra
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: chriseppstein-compass
16
+ name: compass
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.8.12
23
+ version: 0.8.17
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: cucumber
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.98
33
+ version: 0.4.4
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: haml
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.2.3
43
+ version: 2.2.13
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: rack-test
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 0.4.1
53
+ version: 0.5.2
54
54
  version:
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
@@ -70,7 +70,7 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: 1.3.5
73
+ version: 1.5.5
74
74
  version:
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rspec
@@ -110,7 +110,7 @@ dependencies:
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: 1.2.2
113
+ version: 1.2.3
114
114
  version:
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: webrat
@@ -120,7 +120,7 @@ dependencies:
120
120
  requirements:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: 0.5.1
123
+ version: 0.5.3
124
124
  version:
125
125
  description: A Sinatra application generator using Blueprint CSS, jQuery, Haml, Sass, Compass, RSpec, Cucumber, and Webrat.
126
126
  email: olauzon@gmail.com
@@ -132,9 +132,11 @@ extra_rdoc_files:
132
132
  - LICENSE
133
133
  - README.md
134
134
  files:
135
+ - CHANGELOG
135
136
  - LICENSE
136
137
  - README.md
137
138
  - Rakefile
139
+ - TODO
138
140
  - VERSION
139
141
  - app_generators/tempatra/tempatra_generator.rb
140
142
  - app_generators/tempatra/templates/README.md.erb