webapp 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,19 @@
1
+ ENV['RACK_ENV'] = 'test'
2
+
3
+ require 'test/unit'
4
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'project')
5
+
6
+ # Rollbacks db commits after each test. Fast and no need to clean up the test db
7
+ #
8
+ # class Test::Unit::TestCase
9
+ # alias run_orig run
10
+ # def run(result, &block)
11
+ # Project.db.transaction do
12
+ # begin
13
+ # run_orig(result, &block)
14
+ # ensure
15
+ # raise Sequel::Rollback
16
+ # end
17
+ # end
18
+ # end
19
+ # end
data/lib/webapp.rb CHANGED
@@ -8,7 +8,7 @@ module Webapp
8
8
 
9
9
  %w[lib test config views lib/migrations].each { |dir| mkdir_p "#{application}/#{dir}" }
10
10
 
11
- files = %w[lib/project.rb lib/server.rb Rakefile config.ru config/nginx.conf config/geminstaller.yml]
11
+ files = %w[lib/project.rb lib/server.rb Rakefile config.ru config/nginx.conf config/geminstaller.yml test/test_helper.rb]
12
12
 
13
13
  files.each do |tmpl|
14
14
  template = ERB.new(File.read(File.join(File.dirname(__FILE__), 'templates', tmpl)))
data/webapp.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'webapp'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary, s.description = 'Cmd that generates a webapp skeleton'
6
6
  s.author = 'George Malamidis'
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
  'lib/templates/config.ru',
16
16
  'lib/templates/lib/server.rb',
17
17
  'lib/templates/lib/project.rb',
18
+ 'lib/templates/test/test_helper.rb',
18
19
  'lib/templates/Rakefile',
19
20
  'lib/webapp.rb',
20
21
  'webapp.gemspec',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webapp
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
  - George Malamidis
@@ -67,6 +67,7 @@ files:
67
67
  - lib/templates/config.ru
68
68
  - lib/templates/lib/server.rb
69
69
  - lib/templates/lib/project.rb
70
+ - lib/templates/test/test_helper.rb
70
71
  - lib/templates/Rakefile
71
72
  - lib/webapp.rb
72
73
  - webapp.gemspec