twitter-bootswatch-rails-helpers 3.0.0.0 → 3.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eece481656e01db53270de26415bfb9c972fb3ea
4
- data.tar.gz: 886ee71461094ffabc70c97655b1cf84fbfbdaa3
3
+ metadata.gz: 22b893bd4ac6fdd38135497dc5aa01c9b4523fa4
4
+ data.tar.gz: 1b98faa33e4b8460d9df01013afb06eb3a67aaf5
5
5
  SHA512:
6
- metadata.gz: 8eb42146f647eec5da4cee2c54a03f29b94d0ade375f38fd28bfb9a75c924a794d39104cf39394e20c8e5d987060410ff0b8ad48c1a8a61e5d3b70e870f8c3c8
7
- data.tar.gz: 5a1d29df6f19d692d231affa5d0086f49f28cba2cd3740ad2b1cd72f061970722b1072c1e45b4bac1207d13e8299b4c8c4dd4cb145134d9fbc1aff46ec86c98e
6
+ metadata.gz: b168fe5a2ee3ff2a82051dd92ced0528cb4a2e6f94919af110f2368153135f5b9383bd9362c33e53302adaf8eeebdd9613418ea007ef116b64420d8ee77946f8
7
+ data.tar.gz: d79f888d1c128bdfb01db2698e2f8ccb8b6cb2f54603723709a83a8f00cceb2fc9b700a3f677b5deb9e18ee974520b1a91ffaeca9628c1af4a7c674d039238e3
File without changes
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Bootswatch Rails 3.0.0 Helpers gem
2
2
 
3
+ [![Build Status](https://www.travis-ci.org/scottvrosenthal/twitter-bootswatch-rails-helpers.png?branch=master)](https://www.travis-ci.org/scottvrosenthal/twitter-bootswatch-rails-helpers)
4
+
3
5
  - Requires [twitter-bootswatch-rails](https://github.com/scottvrosenthal/twitter-bootswatch-rails/)
4
6
  - Provides rails view helpers for [Twitter Bootstrap](http://getbootstrap.com/) alerts and breadcrumbs
5
7
 
@@ -7,7 +7,11 @@ module Twitter
7
7
  flash_messages = ''
8
8
  flash.each do |type, message|
9
9
  alert_type_class = bootswatch_alert_types(type)
10
+ if alert_dismissable
10
11
  alert_div = content_tag(:div, raw('<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>') + message, :class => "alert #{alert_type_class}#{alert_dismissable_class}")
12
+ else
13
+ alert_div = content_tag(:div, raw(message), :class => "alert #{alert_type_class}")
14
+ end
11
15
  flash_messages << alert_div if message
12
16
  end
13
17
  raw(flash_messages)
@@ -27,9 +31,15 @@ module Twitter
27
31
  def bootswatch_flash_container(type, alert_dismissable=true, &message)
28
32
  alert_dismissable_class = alert_dismissable ? ' alert-dismissable' : ''
29
33
  alert_type_class = bootswatch_alert_types(type)
30
- message_text = capture(&message)
31
- output = content_tag(:div, :class => "alert #{alert_type_class}#{alert_dismissable_class}") do
32
- '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'.html_safe.safe_concat(message_text)
34
+ message_html = capture(&message)
35
+ if alert_dismissable
36
+ output = content_tag(:div, :class => "alert #{alert_type_class}#{alert_dismissable_class}") do
37
+ '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'.html_safe.safe_concat(message_html)
38
+ end
39
+ else
40
+ output = content_tag(:div, :class => "alert #{alert_type_class}") do
41
+ message_html.html_safe
42
+ end
33
43
  end
34
44
 
35
45
  raw(output)
@@ -2,7 +2,7 @@ module Twitter
2
2
  module Bootswatch
3
3
  module Rails
4
4
  module Helpers
5
- VERSION = '3.0.0.0'
5
+ VERSION = '3.0.0.1'
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootswatch-rails-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.0
4
+ version: 3.0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott V. Rosenthal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-09 00:00:00.000000000 Z
11
+ date: 2013-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter-bootswatch-rails
@@ -35,6 +35,7 @@ files:
35
35
  - .gitignore
36
36
  - .ruby-gemset
37
37
  - .ruby-version
38
+ - .travis.yml
38
39
  - Gemfile
39
40
  - LICENSE.txt
40
41
  - README.md
@@ -47,7 +48,6 @@ files:
47
48
  - lib/twitter/bootswatch/rails/helpers/breadcrumbs.rb
48
49
  - lib/twitter/bootswatch/rails/helpers/engine.rb
49
50
  - lib/twitter/bootswatch/rails/helpers/version.rb
50
- - travis.yml
51
51
  - twitter-bootswatch-rails-helpers.gemspec
52
52
  homepage: https://github.com/scottvrosenthal/twitter-bootswatch-rails-helpers
53
53
  licenses: