tempatra 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Tempatra
2
2
  ========
3
3
 
4
- A RubiGen Sinatra application generator providing Blueprint CSS, jQuery, Haml, Sass, Compass, RSpec, Cucumber, and Capybara.
4
+ A RubiGen Sinatra application template generator providing Blueprint CSS, jQuery, Haml, Sass, Compass, RSpec, Cucumber, and Capybara.
5
5
 
6
6
  Installation
7
7
  ------------
@@ -12,28 +12,36 @@ Installation
12
12
  Basic Usage
13
13
  -----------
14
14
 
15
- To generate a new application:
15
+ Generate a new application
16
16
 
17
17
  $ tempatra your-app-name
18
18
 
19
- Move into your new application:
19
+ Move into your new application
20
20
 
21
21
  $ cd your-app-name
22
22
 
23
- Run your application:
23
+ To run your application locally
24
24
 
25
25
  $ shotgun --server=thin -p 4567 config.ru
26
26
 
27
- Then go to [http://localhost:4567/](http://localhost:4567/) with your browser.
27
+ Then go to [http://localhost:4567/](http://localhost:4567/) with your browser)
28
28
 
29
- You can continuously compile your Sass stylesheets with Compass (in another terminal):
29
+ To compile your Sass stylesheets with Compass on demand
30
30
 
31
- $ compass --watch
31
+ $ compass compile
32
32
 
33
- And of course, use autospec (in yet another terminal)
33
+ To monitor your project for changes and automatically recompile
34
+
35
+ $ compass watch
36
+
37
+ Use autospec
34
38
 
35
39
  $ autospec
36
40
 
41
+ Run RSpec and Cucumber tests
42
+
43
+ $ rake
44
+
37
45
 
38
46
  Options
39
47
  -------
@@ -46,9 +54,13 @@ Display Tempatra version number
46
54
 
47
55
  $ tempatra -v
48
56
 
49
- Create git repository
57
+ Don't create git repository
58
+
59
+ $ tempatra your-app-name -N
60
+
61
+ Don't run Compass as a standalone project
50
62
 
51
- $ tempatra your-app-name -G
63
+ $ tempatra your-app-name -C
52
64
 
53
65
  Create and push to Heroku (requires heroku gem and Heroku account)
54
66
 
@@ -71,4 +83,4 @@ Olivier Lauzon (olauzon)
71
83
  Copyright
72
84
  ---------
73
85
 
74
- Copyright (c) 2009 Olivier Lauzon. See LICENSE for details.
86
+ Copyright (c) 2009-2010 Olivier Lauzon. See LICENSE for details.
data/Rakefile CHANGED
@@ -11,24 +11,24 @@ begin
11
11
  gem.homepage = "http://github.com/olauzon/tempatra"
12
12
  gem.authors = ["Olivier Lauzon", "Stewart Laufer"]
13
13
 
14
- gem.add_dependency('compass', '~> 0.10.2')
15
- gem.add_dependency('cucumber', '~> 0.7.3')
16
- gem.add_dependency('haml', '~> 3.0.9')
17
- gem.add_dependency('rack-test', '~> 0.5.3')
18
- gem.add_dependency('rdiscount', '~> 1.6.3.2')
19
- gem.add_dependency('rspec', '>= 1.2.6')
14
+ gem.add_dependency('compass', '~> 0.10.5')
15
+ gem.add_dependency('cucumber', '~> 0.8.5')
16
+ gem.add_dependency('haml', '~> 3.0.18')
17
+ gem.add_dependency('rack-test', '~> 0.5.4')
18
+ gem.add_dependency('rdiscount', '~> 1.6.5')
19
+ gem.add_dependency('rspec', '~> 1.3.0')
20
20
  gem.add_dependency('rubigen', '~> 1.5.5')
21
21
  gem.add_dependency('sinatra', '~> 1.0')
22
- gem.add_dependency('shotgun', '>= 0.6')
23
- gem.add_dependency('thin', '>= 1.2.3')
24
- gem.add_dependency('capybara', '~> 0.3.8')
22
+ gem.add_dependency('shotgun', '~> 0.8')
23
+ gem.add_dependency('thin', '~> 1.2.7')
24
+ gem.add_dependency('capybara', '~> 0.3.9')
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/**/*',
28
28
  'bin/*',
29
29
  'lib/**/*.rb',
30
30
  '[A-Z]*',
31
- 'spec/**/*'].to_a.reject { |f| f =~ /^spec\/tmp/ }
31
+ 'spec/**/*'].to_a.reject { |f| f =~ /^spec\/tmp|^Gemfile/ }
32
32
  gem.test_files = FileList['spec/**/*'].to_a.reject { |f| f =~ /^spec\/tmp/ }
33
33
  end
34
34
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -39,12 +39,14 @@ class TempatraGenerator < RubiGen::Base
39
39
  # Root
40
40
  m.template "_gems" , ".gems"
41
41
  m.template "_gitignore" , ".gitignore"
42
- m.template "compass.config.erb" , "compass.config"
43
42
  m.template "config.ru.erb" , "config.ru"
44
43
  m.template "config.yml.erb" , "config.yml"
45
44
  m.template "Rakefile.erb" , "Rakefile"
46
45
  m.template "README.md.erb" , "README.md"
47
46
 
47
+ # Config
48
+ m.template "config/compass.rb.erb" , "config/compass.rb"
49
+
48
50
  # Sinatra
49
51
  m.template "lib/tempatra.rb.erb" , "lib/#{app_file_name}.rb"
50
52
 
@@ -103,7 +105,7 @@ class TempatraGenerator < RubiGen::Base
103
105
  unless File.exist?(File.expand_path(@destination_root) + '/public/images/grid.png')
104
106
  m.run("#{compass} grid-img 30+10x22 public/images/grid.png --force")
105
107
  end
106
- m.run("#{compass} --trace compile") if compile
108
+ m.run("#{compass} compile") if compile
107
109
 
108
110
  # Git
109
111
  if heroku || git_init
@@ -131,16 +133,22 @@ class TempatraGenerator < RubiGen::Base
131
133
  Move into your new application
132
134
  $ cd #{app_name}
133
135
 
134
- To run your application
136
+ To run your application locally
135
137
  $ shotgun --server=thin -p 4567 config.ru
136
138
  (Then go to http://localhost:4567/ with your browser)
137
139
 
138
- You can continuously compile your Sass stylesheets with Compass
139
- $ compass --watch
140
+ To compile your Sass stylesheets with Compass on demand
141
+ $ compass compile
142
+
143
+ To monitor your project for changes and automatically recompile
144
+ $ compass watch
140
145
 
141
146
  Use autospec
142
147
  $ autospec
143
148
 
149
+ Run RSpec and Cucumber tests
150
+ $ rake
151
+
144
152
 
145
153
  "
146
154
  end
@@ -164,12 +172,13 @@ protected
164
172
  opts.separator ''
165
173
  opts.separator "Tempatra options:"
166
174
  opts.on("-v", "--version" , "Show the Tempatra version number and quit")
167
- opts.on("-C", "--compile" , "Compile Compass stylesheets") {|o| options[:compile] = o}
175
+ opts.on("-C", "--no-compile" , "Don't compile Compass stylesheets") {|o| options[:no_compile] = o}
168
176
  opts.on("-N", "--no-git" , "Don't create a git repository") {|o| options[:no_git] = o}
169
177
  opts.on("-H", "--heroku" , "Create and push to Heroku") {|o| options[:heroku] = o}
170
178
  end
171
179
 
172
180
  BASEDIRS = %w(
181
+ config
173
182
  features
174
183
  features/step_definitions
175
184
  features/support
@@ -183,9 +192,9 @@ protected
183
192
  )
184
193
 
185
194
  def extract_options
186
- @compile = options[:compile].nil? ? false : true
187
- @git_init = options[:no_git].nil? ? true : false
188
- @heroku = options[:heroku].nil? ? false : true
195
+ @compile = options[:no_compile].nil? ? true : false
196
+ @git_init = options[:no_git].nil? ? true : false
197
+ @heroku = options[:heroku].nil? ? false : true
189
198
  end
190
199
 
191
200
  def which(bin)
@@ -2,16 +2,24 @@
2
2
 
3
3
  ## Usage ##
4
4
 
5
- Run your application:
5
+ To run your application locally
6
6
 
7
7
  $ shotgun --server=thin -p 4567 config.ru
8
8
 
9
- Then go to [http://localhost:4567/](http://localhost:4567/) with your browser.
9
+ Then go to [http://localhost:4567/](http://localhost:4567/) with your browser)
10
10
 
11
- You can continuously compile your Sass stylesheets with Compass (in another terminal or screen):
11
+ To compile your Sass stylesheets with Compass on demand
12
12
 
13
- $ compass --watch
13
+ $ compass compile
14
14
 
15
- And of course, use autospec (in yet another terminal or screen):
15
+ To monitor your project for changes and automatically recompile
16
+
17
+ $ compass watch
18
+
19
+ Use autospec
16
20
 
17
21
  $ autospec
22
+
23
+ Run RSpec and Cucumber tests
24
+
25
+ $ rake
@@ -1,4 +1,4 @@
1
- rdiscount --version '~> 1.6.3.2'
1
+ rdiscount --version '~> 1.6.5'
2
2
  sinatra --version '~> 1.0'
3
- haml --version '~> 3.0.9'
4
- compass --version '~> 0.10.2'
3
+ haml --version '~> 3.0.18'
4
+ compass --version '~> 0.10.5'
@@ -2,16 +2,17 @@ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
2
2
 
3
3
  require 'rubygems'
4
4
 
5
- gem 'compass', '~> 0.10.2'
6
- require 'compass' # must be loaded before sinatra
5
+ # <%= compile ? 'Unc' : 'C' %>omment to compile your stylesheets <%= 'without ' if compile %>using 'compass compile' or 'compass watch'
6
+ <%= '#' if compile %>gem 'compass', '~> 0.10.5'
7
+ <%= '#' if compile %>require 'compass' # must be loaded before sinatra
7
8
 
8
9
  gem 'sinatra', '~> 1.0'
9
10
  require 'sinatra'
10
11
 
11
- gem 'haml', '~> 3.0.9'
12
+ gem 'haml', '~> 3.0.18'
12
13
  require 'haml' # must be loaded after sinatra
13
14
 
14
- gem 'rdiscount', '~> 1.6.3.2'
15
+ gem 'rdiscount', '~> 1.6.5'
15
16
  require 'rdiscount'
16
17
 
17
18
  class <%= module_name %> < Sinatra::Application
@@ -19,15 +20,16 @@ class <%= module_name %> < Sinatra::Application
19
20
  set :root, APP_ROOT
20
21
  set :haml, { :format => :html5 } # default Haml format is :xhtml
21
22
 
22
- configure do
23
- Compass.add_project_configuration(File.join(APP_ROOT, 'compass.config'))
24
- end
23
+ # <%= compile ? 'Unc' : 'C' %>omment to compile your stylesheets <%= 'without ' if compile %>using 'compass compile' or 'compass watch'
24
+ <%= '#' if compile %> configure do
25
+ <%= '#' if compile %> Compass.add_project_configuration(File.join(APP_ROOT, 'config/compass.rb'))
26
+ <%= '#' if compile %> end
25
27
 
26
28
  get '/' do
27
29
  haml :index
28
30
  end
29
31
 
30
- # <%= compile ? 'Unc' : 'C' %>omment to compile your stylesheets with<%= compile ? 'out' : '' %> the compass utility
32
+ # <%= compile ? 'Unc' : 'C' %>omment to compile your stylesheets <%= 'without ' if compile %>using 'compass compile' or 'compass watch'
31
33
  <%= '#' if compile %> get '/stylesheets/:name.css' do
32
34
  <%= '#' if compile %> content_type 'text/css', :charset => 'utf-8'
33
35
  <%= '#' if compile %> sass(:"stylesheets/#{params[:name]}", Compass.sass_engine_options )
@@ -3,10 +3,10 @@
3
3
  A [Sinatra](http://www.sinatrarb.com/ "Sinatra") application template built with [Blueprint CSS](http://www.blueprintcss.org/ "Blueprint CSS"), [jQuery](http://jquery.com/ "jQuery"), [Haml](http://haml-lang.com/ "Haml"), [Sass](http://sass-lang.com/ "Sass"), [Compass](http://compass-style.org/ "Compass"), [RSpec](http://rspec.info/), [Cucumber](http://cukes.info/), and [Capybara](http://github.com/jnicklas/capybara).
4
4
  %article
5
5
  :markdown
6
- This is a Sinatra application generated with [Tempatra](http://github.com/olauzon/tempatra). It is intended for designers and developers who Sinatra, Haml, Sass, Compass, and jQuery. Tempatra provides a quick & dirty template to make design mock-ups.
6
+ This is a Sinatra application generated with [Tempatra](http://github.com/olauzon/tempatra). It is intended for designers and developers who are learning to use Sinatra, Haml, Sass, Compass, and jQuery. Tempatra provides a quick & dirty template to make design mock-ups.
7
7
 
8
8
  A common workflow is to start by writing Cucumber features that describe the important elements and interactions of the interface.
9
9
 
10
10
  Using [Heroku](http://heroku.com) for deployment, you can quickly share a design idea with your clients and colleagues.
11
11
 
12
- Writing generators is fun and easy, thanks to the excellent [RubiGen gem](http://drnic.github.com/rubigen/).
12
+ Writing generators with [RubiGen](http://drnic.github.com/rubigen/) is easy.
@@ -52,7 +52,7 @@ body
52
52
  +column($blueprint_grid_columns)
53
53
 
54
54
  body
55
- :font-family "Garamond", "Georgia", "Times", "serif"
55
+ :font-family "Georgia", "Times", "serif"
56
56
  :font-size 16px
57
57
  :line-height 1.375
58
58
  p
@@ -91,7 +91,7 @@ body
91
91
 
92
92
  =alt
93
93
  :color #666
94
- :font-family "Warnock Pro", "Goudy Old Style", "Palatino", "Book Antiqua", "Georgia", "serif"
94
+ :font-family "Palatino", "Georgia", "serif"
95
95
  :font-style italic
96
96
  :font-weight normal
97
97
  a
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tempatra
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Olivier Lauzon
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-06-04 00:00:00 -04:00
19
+ date: 2010-08-31 00:00:00 -04:00
20
20
  default_executable: tempatra
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -27,12 +27,12 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- hash: 51
30
+ hash: 61
31
31
  segments:
32
32
  - 0
33
33
  - 10
34
- - 2
35
- version: 0.10.2
34
+ - 5
35
+ version: 0.10.5
36
36
  type: :runtime
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency
@@ -43,12 +43,12 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- hash: 5
46
+ hash: 53
47
47
  segments:
48
48
  - 0
49
- - 7
50
- - 3
51
- version: 0.7.3
49
+ - 8
50
+ - 5
51
+ version: 0.8.5
52
52
  type: :runtime
53
53
  version_requirements: *id002
54
54
  - !ruby/object:Gem::Dependency
@@ -59,12 +59,12 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- hash: 21
62
+ hash: 35
63
63
  segments:
64
64
  - 3
65
65
  - 0
66
- - 9
67
- version: 3.0.9
66
+ - 18
67
+ version: 3.0.18
68
68
  type: :runtime
69
69
  version_requirements: *id003
70
70
  - !ruby/object:Gem::Dependency
@@ -75,12 +75,12 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- hash: 13
78
+ hash: 3
79
79
  segments:
80
80
  - 0
81
81
  - 5
82
- - 3
83
- version: 0.5.3
82
+ - 4
83
+ version: 0.5.4
84
84
  type: :runtime
85
85
  version_requirements: *id004
86
86
  - !ruby/object:Gem::Dependency
@@ -91,13 +91,12 @@ dependencies:
91
91
  requirements:
92
92
  - - ~>
93
93
  - !ruby/object:Gem::Version
94
- hash: 103
94
+ hash: 5
95
95
  segments:
96
96
  - 1
97
97
  - 6
98
- - 3
99
- - 2
100
- version: 1.6.3.2
98
+ - 5
99
+ version: 1.6.5
101
100
  type: :runtime
102
101
  version_requirements: *id005
103
102
  - !ruby/object:Gem::Dependency
@@ -106,14 +105,14 @@ dependencies:
106
105
  requirement: &id006 !ruby/object:Gem::Requirement
107
106
  none: false
108
107
  requirements:
109
- - - ">="
108
+ - - ~>
110
109
  - !ruby/object:Gem::Version
111
- hash: 19
110
+ hash: 27
112
111
  segments:
113
112
  - 1
114
- - 2
115
- - 6
116
- version: 1.2.6
113
+ - 3
114
+ - 0
115
+ version: 1.3.0
117
116
  type: :runtime
118
117
  version_requirements: *id006
119
118
  - !ruby/object:Gem::Dependency
@@ -153,13 +152,13 @@ dependencies:
153
152
  requirement: &id009 !ruby/object:Gem::Requirement
154
153
  none: false
155
154
  requirements:
156
- - - ">="
155
+ - - ~>
157
156
  - !ruby/object:Gem::Version
158
- hash: 7
157
+ hash: 27
159
158
  segments:
160
159
  - 0
161
- - 6
162
- version: "0.6"
160
+ - 8
161
+ version: "0.8"
163
162
  type: :runtime
164
163
  version_requirements: *id009
165
164
  - !ruby/object:Gem::Dependency
@@ -168,14 +167,14 @@ dependencies:
168
167
  requirement: &id010 !ruby/object:Gem::Requirement
169
168
  none: false
170
169
  requirements:
171
- - - ">="
170
+ - - ~>
172
171
  - !ruby/object:Gem::Version
173
- hash: 25
172
+ hash: 17
174
173
  segments:
175
174
  - 1
176
175
  - 2
177
- - 3
178
- version: 1.2.3
176
+ - 7
177
+ version: 1.2.7
179
178
  type: :runtime
180
179
  version_requirements: *id010
181
180
  - !ruby/object:Gem::Dependency
@@ -186,12 +185,12 @@ dependencies:
186
185
  requirements:
187
186
  - - ~>
188
187
  - !ruby/object:Gem::Version
189
- hash: 3
188
+ hash: 1
190
189
  segments:
191
190
  - 0
192
191
  - 3
193
- - 8
194
- version: 0.3.8
192
+ - 9
193
+ version: 0.3.9
195
194
  type: :runtime
196
195
  version_requirements: *id011
197
196
  description: A basic Sinatra application generator providing Blueprint CSS, jQuery, Haml, Sass, Compass, RSpec, Cucumber, and Capybara.
@@ -214,9 +213,9 @@ files:
214
213
  - app_generators/tempatra/templates/Rakefile.erb
215
214
  - app_generators/tempatra/templates/_gems
216
215
  - app_generators/tempatra/templates/_gitignore
217
- - app_generators/tempatra/templates/compass.config.erb
218
216
  - app_generators/tempatra/templates/config.ru.erb
219
217
  - app_generators/tempatra/templates/config.yml.erb
218
+ - app_generators/tempatra/templates/config/compass.rb.erb
220
219
  - app_generators/tempatra/templates/features/homepage.feature.erb
221
220
  - app_generators/tempatra/templates/features/step_definitions/web_steps.rb
222
221
  - app_generators/tempatra/templates/features/support/env.rb.erb