Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seyhunak committed Feb 6, 2012
1 parent e4cb889 commit e4864a9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 44 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -4,3 +4,6 @@ source "http://rubygems.org"
gemspec
gem 'less-rails', :path => ENV['LESS_RAILS_SOURCE'] if ENV['LESS_RAILS_SOURCE']

group :test do
gem 'rake'
end
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -10,7 +10,7 @@ twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 A

Include Bootstrap in Gemfile;

gem 'twitter-bootstrap-rails', :group => :assets
gem 'twitter-bootstrap-rails'

or you can install from latest build;

Expand All @@ -35,7 +35,7 @@ Usage:
rails g bootstrap:install


Layout (generates Twitter Bootstrap compatible layout with flash messages) - (Haml and Slim supported)
Layout (generates Twitter Bootstrap compatible layout) - (Haml and Slim supported)


Usage:
Expand Down Expand Up @@ -155,7 +155,6 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
<li>Transitioning to 2.0</li>
<li>Released gem v.2.0rc0</li>
<li>Added Haml and Slim support</li>
<li>Added Twitter Bootstrap compatible flash messages</li>
<li>Added Responsive layout support</li>
<li>Fixes and release 2.0.0</li>
</ul>
Expand Down Expand Up @@ -188,6 +187,7 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
Seyhun Akyürek - seyhunak [at] gmail com

[Follow me on Twitter](http://twitter.com/seyhunak "Twitter")

[Follow me on Google+](http://plus.ly/seyhunak "Google+")


Expand Down
11 changes: 11 additions & 0 deletions Rakefile
@@ -1,3 +1,14 @@
#!/usr/bin/env rake
require 'bundler'
Bundler::GemHelper.install_tasks

desc "Bundle the gem"
task :bundle do
sh('bundle install')
sh 'gem build *.gemspec'
sh 'gem install *.gem'
sh 'rm *.gem'
end

task(:default).clear
task :default => :bundle
10 changes: 0 additions & 10 deletions lib/generators/bootstrap/layout/layout_generator.rb
Expand Up @@ -11,16 +11,6 @@ class LayoutGenerator < ::Rails::Generators::Base

attr_reader :app_name, :container_class

def add_helper
if File.exists?(::Rails.root.join("app/helpers/application_helper.rb"))
say "Bootstrap helpers installs to application_helper..."
insert_into_file "app/helpers/application_helper.rb",
" def flash_class(level)\n case level\n when :notice then 'info'\n when :error then 'error'\n when :alert then 'warning'\n end\n end\n", :after => "module ApplicationHelper\n"
else
say "Already installed"
end
end

def generate_layout
app = ::Rails.application
@app_name = app.class.to_s.split("::").first
Expand Down
16 changes: 0 additions & 16 deletions lib/generators/bootstrap/layout/templates/layout.html.erb
Expand Up @@ -64,29 +64,13 @@
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<%% [:notice, :error, :alert].each do |level| %>
<%% unless flash[level].blank? %>
<div data-alert="alert" class="alert alert-<%%= flash_class(level) %> fade in">
<a class="close" data-dismiss="alert" href="#">&times;</a>
<%%= content_tag :p, flash[level] %>
</div>
<%% end %>
<%% end %>
<%%= yield %>
</div>
</div><!--/row-->
<%- else -%>
<div class="content">
<div class="row">
<div class="span9">
<%% [:notice, :error, :alert].each do |level| %>
<%% unless flash[level].blank? %>
<div data-alert="alert" class="alert alert-<%%= flash_class(level) %> fade in">
<a class="close" data-dismiss="alert" href="#">&times;</a>
<%%= content_tag :p, flash[level] %>
</div>
<%% end %>
<%% end %>
<%%= yield %>
</div>
<div class="span1">&nbsp;</div>
Expand Down
14 changes: 0 additions & 14 deletions lib/generators/bootstrap/layout/templates/layout.html.haml
Expand Up @@ -51,25 +51,11 @@
%li= link_to "Link 2", "/path2"
%li= link_to "Link 3", "/path3"
.span9
<% [:notice, :error, :alert].each do |level| %>
<% unless flash[level].blank? %>
.alert.fade.in{:class => "alert-<%= flash_class(level) %>", "data-alert" => "alert"}
%a.close{"data-dismiss" => "alert", :href => "#"} ×
<%= content_tag :p, flash[level] %>
<% end %>
<% end %>
= yield
<% else %>
.content
.row
.span9
<% [:notice, :error, :alert].each do |level| %>
<% unless flash[level].blank? %>
.alert.fade.in{:class => "alert-<%= flash_class(level) %>", "data-alert" => "alert"}
%a.close{"data-dismiss" => "alert", :href => "#"} ×
<%= content_tag :p, flash[level] %>
<% end %>
<% end %>
= yield
.span1 &nbsp;
.span3
Expand Down
2 changes: 1 addition & 1 deletion lib/twitter/bootstrap/rails/version.rb
@@ -1,7 +1,7 @@
module Twitter
module Bootstrap
module Rails
VERSION = "2.0.1"
VERSION = "2.0.2"
end
end
end

0 comments on commit e4864a9

Please sign in to comment.