Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Devise updates:

* Add dm-validations for compatibility with devise
* Copy over devise views for customization
* Add a sanity spec to prove that the app at least boots
* Update roadmap with TODOS in other projects
  • Loading branch information...
commit e8e0b68fdfb094e2cb519ae5e03fa41f12bb7498 1 parent 7a95ca0
Carl Lerche authored wycats committed
View
7 ROADMAP.md
@@ -1,3 +1,8 @@
# 0.1
- - Grow the beard
+ - Grow the beard
+
+# 0.2
+ - Update rspec-rails to start with commented out initializer
+ - Update rspec-rails to support a mode where only integration tests are generated
+ - Hide install-time generators
View
23 beard.gemspec
@@ -11,17 +11,18 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "beard"
- s.add_dependency "railties", "3.0.0.beta3"
- s.add_dependency "actionpack", "3.0.0.beta3"
- s.add_dependency "actionmailer", "3.0.0.beta3"
- s.add_dependency "astaire", "0.2.0"
- s.add_dependency "rspec-rails", "2.0.0.beta.8"
- s.add_dependency "capybara", "0.3.7"
- s.add_dependency "haml", "3.0.0.rc.2"
- s.add_dependency "dm-rails", "0.10.2"
- s.add_dependency "mail_form", "1.2.1"
- s.add_dependency "devise", "1.1.rc1"
- s.add_dependency "will_paginate", "3.0.pre"
+ s.add_dependency "railties", "3.0.0.beta3"
+ s.add_dependency "actionpack", "3.0.0.beta3"
+ s.add_dependency "actionmailer", "3.0.0.beta3"
+ s.add_dependency "astaire", "0.2.0"
+ s.add_dependency "rspec-rails", "2.0.0.beta.8"
+ s.add_dependency "capybara", "0.3.7"
+ s.add_dependency "haml", "3.0.0.rc.2"
+ s.add_dependency "dm-rails", "0.10.2"
+ s.add_dependency "dm-validations", "0.10.3"
+ s.add_dependency "mail_form", "1.2.1"
+ s.add_dependency "devise", "1.1.rc1"
+ s.add_dependency "will_paginate", "3.0.pre"
# depend on dm-migrations because dm-rails forgot to
s.add_dependency "dm-migrations", "0.10.3"
View
1  lib/beard.rb
@@ -2,6 +2,7 @@
require 'action_mailer/railtie'
require 'dm-rails'
require 'dm-migrations'
+require 'dm-validations'
require 'rspec-rails'
require 'devise'
require 'haml'
View
3  lib/beard/app_builder.rb
@@ -6,7 +6,7 @@ def gemfile
end
repos = %w(dm-rails dm-core dm-migrations dm-active_model
- dm-sqlite-adapter dm-do-adapter
+ dm-sqlite-adapter dm-do-adapter dm-validations
rspec-rails rails)
if repos_root = ENV["BEARD_REPO_ROOT"]
@@ -17,6 +17,7 @@ def gemfile
git "http://github.com/datamapper/dm-rails.git"
git "http://github.com/datamapper/dm-core.git"
git "http://github.com/datamapper/dm-migrations.git"
+ git "http://github.com/datamapper/dm-validations.git"
git "http://github.com/datamapper/dm-active_model.git"
git "http://github.com/datamapper/dm-sqlite-adapter.git"
git "http://github.com/datamapper/dm-do-adapter.git"
View
5 lib/generators/beard/install/install_generator.rb
@@ -42,5 +42,10 @@ def user_model
say_status :creating, "User model", :white
with_padding { invoke "devise", %w(user) }
end
+
+ def copy_devise_views
+ say_status :copying, "Devise views for customization", :white
+ with_padding { invoke "devise_views" }
+ end
end
end
View
2  spec/build_spec.rb
@@ -48,6 +48,8 @@
end
directory "views" do
+ directory "devise"
+
directory "layouts" do
file "application.html.haml"
end
View
8 spec/sanity_spec.rb
@@ -0,0 +1,8 @@
+require "spec_helper"
+
+describe "An app after beard generation" do
+ it "boots" do
+ out = run_command("script/rails runner 'puts Rails.root'", false)
+ out.should =~ %r{beard/tmp/temp_app}
+ end
+end
View
17 spec/support/runner.rb
@@ -23,12 +23,23 @@ def run_command(*args)
open_without_dm(*args)
end
- def open_without_dm(*args)
- IO.popen(*args) do |io|
+ def open_without_dm(command, should_output = true)
+ output = ""
+
+ IO.popen(command) do |io|
while string = io.gets
- puts string unless string =~ /^\[datamapper\]/
+ next if string =~ /^\[datamapper\]/
+
+ if block_given?
+ yield string
+ elsif should_output
+ puts string
+ end
+ output << string
end
end
+
+ output
end
def generate_beard(location = "temp_app")
Please sign in to comment.
Something went wrong with that request. Please try again.