Permalink
Browse files

update

  • Loading branch information...
1 parent e4cb889 commit e4864a903a282c2e366f9930dbbed623bf6ef683 @seyhunak seyhunak committed Feb 6, 2012
View
@@ -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
View
@@ -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;
@@ -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:
@@ -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>
@@ -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+")
View
@@ -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
@@ -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
@@ -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>
@@ -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
@@ -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.