Permalink
Browse files

Merge branch 'master' into sinatra

Conflicts:
	.gitignore
	Gemfile
	Gemfile.lock
	Rakefile
	lib/gem_template.rb
  • Loading branch information...
2 parents d9cb7f5 + 5e2dd99 commit 1b6cb3b4385e3b4fa0e08396e774fb15f3d24bee @winton committed Oct 8, 2011
Showing with 31 additions and 89 deletions.
  1. +1 −0 .gitignore
  2. +1 −9 Gemfile
  3. +12 −7 Gemfile.lock
  4. +1 −68 Rakefile
  5. +9 −0 gem_template.gemspec
  6. +5 −3 lib/application/log.rb
  7. +1 −1 spec/gem_template_spec.rb
  8. +1 −1 spec/spec_helper.rb
View
@@ -1,3 +1,4 @@
+.bundle
.DS_Store
*.gem
*.log
View
10 Gemfile
@@ -1,11 +1,3 @@
source "http://rubygems.org"
-gem 'rake', '>=0.8.7', :group => :rakefile
-gem 'rspec', '~>1.0', :group => [ :rakefile, :spec ]
-
-gem 'rack-test', '=0.6.1', :group => :spec
-
-gem 'haml', '=3.1.2'
-gem 'lilypad', '=0.3.1'
-gem 'redis', '=2.2.2'
-gem 'sinatra', '=1.2.6'
+gemspec
View
@@ -1,3 +1,13 @@
+PATH
+ remote: .
+ specs:
+ gem_template (0.1.0)
+ bundler
+ haml (= 3.1.2)
+ lilypad (= 0.3.1)
+ redis (= 2.2.2)
+ sinatra (= 1.2.6)
+
GEM
remote: http://rubygems.org/
specs:
@@ -9,23 +19,18 @@ GEM
rack (1.3.3)
rack-test (0.6.1)
rack (>= 1.0)
- rake (0.9.2)
redis (2.2.2)
require (0.2.6)
rspec (1.3.2)
sinatra (1.2.6)
rack (~> 1.1)
- tilt (>= 1.2.2, < 2.0)
+ tilt (< 2.0, >= 1.2.2)
tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
- haml (= 3.1.2)
- lilypad (= 0.3.1)
+ gem_template!
rack-test (= 0.6.1)
- rake (>= 0.8.7)
- redis (= 2.2.2)
rspec (~> 1.0)
- sinatra (= 1.2.6)
View
@@ -1,71 +1,4 @@
-require 'rubygems'
-require 'bundler'
-
-Bundler.require(:rakefile)
-
-require 'rake'
-
-begin
- require 'spec/rake/spectask'
-rescue Exception => e
-end
-
-def gemspec
- @gemspec ||= begin
- file = File.expand_path('../gem_template.gemspec', __FILE__)
- eval(File.read(file), binding, file)
- end
-end
-
-if defined?(ActiveWrapper::Tasks)
- ActiveWrapper::Tasks.new(
- :base => File.dirname(__FILE__),
- :env => ENV['ENV']
- )
-end
-
-if defined?(Spec::Rake::SpecTask)
- desc "Run specs"
- Spec::Rake::SpecTask.new do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.spec_opts = %w(-fs --color)
- t.warning = true
- end
- task :spec
- task :default => :spec
-end
-
-desc "Build gem(s)"
-task :gem do
- root = File.expand_path('../', __FILE__)
- pkg = "#{root}/pkg"
- system "rm -Rf #{pkg}"
- system "cd #{root} && gem build gem_template.gemspec"
- system "mkdir -p #{pkg} && mv *.gem pkg"
-end
-
-namespace :gem do
- desc "Install gem(s)"
- task :install do
- Rake::Task['gem'].invoke
- Dir["#{File.dirname(__FILE__)}/pkg/*.gem"].each do |pkg|
- system "gem install #{pkg} --no-ri --no-rdoc"
- end
- end
-
- desc "Push gem(s)"
- task :push do
- Rake::Task['gem'].invoke
- Dir["#{File.dirname(__FILE__)}/pkg/*.gem"].each do |pkg|
- system "gem push #{pkg}"
- end
- end
-end
-
-desc "Validate the gemspec"
-task :gemspec do
- gemspec.validate
-end
+require 'bundler/gem_tasks'
# DELETE AFTER USING
desc "Rename project"
View
@@ -18,4 +18,13 @@ Gem::Specification.new do |s|
s.files = `cd #{root} && git ls-files`.split("\n")
s.require_paths = %w(lib)
s.test_files = `cd #{root} && git ls-files -- {features,test,spec}/*`.split("\n")
+
+ s.add_development_dependency "rack-test", "= 0.6.1"
+ s.add_development_dependency "rspec", "~> 1.0"
+
+ s.add_dependency "bundler"
+ s.add_dependency "haml", "= 3.1.2"
+ s.add_dependency "lilypad", "= 0.3.1"
+ s.add_dependency "redis", "= 2.2.2"
+ s.add_dependency "sinatra", "= 1.2.6"
end
View
@@ -1,6 +1,8 @@
Application.class_eval do
- log = File.new("#{root}/log/#{environment}.log", "a")
- STDOUT.reopen(log)
- STDERR.reopen(log)
+ unless File.basename($0) == 'spec'
+ log = File.new("#{root}/log/#{environment}.log", "a")
+ STDOUT.reopen(log)
+ STDERR.reopen(log)
+ end
end
@@ -1,4 +1,4 @@
require 'spec_helper'
-describe GemTemplate do
+describe Application do
end
View
@@ -1,7 +1,7 @@
require "pp"
require "bundler"
-Bundler.require(:spec)
+Bundler.require(:development)
$root = File.expand_path('../../', __FILE__)

0 comments on commit 1b6cb3b

Please sign in to comment.