rails_utils 3.1.1 → 3.1.2

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: 1cb7b4766d19222f121ae51face9907e4ce5c0d8
4
- data.tar.gz: 44d0c644bd4f4b3a8c44a23eed51d729d1b60c51
3
+ metadata.gz: 575576983b143a63084e04cfc17aaf964bce0b1f
4
+ data.tar.gz: 60e890dd30557ea66e3d6c4fc8b5ed42610f7269
5
5
  SHA512:
6
- metadata.gz: 57dca4a59d9c9dbdb0330673fd6336a353255826c707185cf33fecfb5ccd4bf7075974f0949a0fca35e6081096ff08ddf9c8dc88d955a932014c55b65237f071
7
- data.tar.gz: 0a3f99547f52742ed8cae3224e268193229e42da0d5bb1fa56cb0b9713e983b7aadf7b8b041fb6afda1fc289fe1ac9ecb3c7a0c098bb2a58dfe3d85c1f7e72eb
6
+ metadata.gz: 9149e4e80dbbdb9c0c136d01facdfa732add09dc195a4f07cefd94574b2773dd253b566b3ac8aad219af974288c2de7812ec93a143a7744ccaa9428924ceba25
7
+ data.tar.gz: 2c488bf0acf4ebd3760cd2d4ca91a93b76936fffba7507a9892e180d4ca2f52fa54b611ab37426482288a86396885e3549435cb96b2d8b5cfdb57823680af3a3
data/README.markdown CHANGED
@@ -95,6 +95,16 @@ Minitest-ed. To run all tests, just run `rake` or `rake test`.
95
95
 
96
96
  ## Changelog
97
97
 
98
+ _Version 3.1.2_
99
+
100
+ - Add `alert-danger` class to flash error messages for Bootstrap 3 support.
101
+
102
+
103
+ _Version 3.1.1_
104
+
105
+ - [Pull Request 1](https://github.com/winston/rails_utils/pull/2) Support for Rails 4.1.
106
+
107
+
98
108
  _Version 3.1.0_
99
109
 
100
110
  - Drop string `controller` from `page_class` and `javascript_initialization`.
@@ -1,3 +1,3 @@
1
1
  module RailsUtils
2
- VERSION = "3.1.1"
2
+ VERSION = "3.1.2"
3
3
  end
data/lib/rails_utils.rb CHANGED
@@ -50,9 +50,9 @@ module RailsUtils
50
50
  when :notice
51
51
  "alert alert-info"
52
52
  when :error
53
- "alert alert-error"
53
+ "alert alert-danger alert-error"
54
54
  when :alert
55
- "alert alert-error"
55
+ "alert alert-danger alert-error"
56
56
  else
57
57
  "alert alert-#{key}"
58
58
  end
@@ -114,15 +114,18 @@ describe "RailsUtils::ActionViewExtensions" do
114
114
  controller.flash[key] = message
115
115
  end
116
116
 
117
+ # TODO: Remove support for Bootstrap v2.3.2
118
+ # alert-danger is for Bootstrap 3
119
+ # alert-error is for Bootstrap 2.3.2
117
120
  [
118
- [ :success , /alert alert-success/, "flash is success" ],
119
- [ :notice , /alert alert-info/ , "flash is notice" ],
120
- [ "notice" , /alert alert-info/ , "flash is notice" ],
121
- [ :error , /alert alert-error/ , "flash is error" ],
122
- [ :alert , /alert alert-error/ , "flash is alert" ],
123
- [ "alert" , /alert alert-error/ , "flash is alert" ],
124
- [ :custom , /alert alert-custom/ , "flash is custom" ],
125
- [ "custom" , /alert alert-custom/ , "flash is custom" ]
121
+ [ :success , /alert alert-success/ , "flash is success" ],
122
+ [ :notice , /alert alert-info/ , "flash is notice" ],
123
+ [ "notice" , /alert alert-info/ , "flash is notice" ],
124
+ [ :error , /alert alert-danger alert-error/ , "flash is error" ],
125
+ [ :alert , /alert alert-danger alert-error/ , "flash is alert" ],
126
+ [ "alert" , /alert alert-danger alert-error/ , "flash is alert" ],
127
+ [ :custom , /alert alert-custom/ , "flash is custom" ],
128
+ [ "custom" , /alert alert-custom/ , "flash is custom" ]
126
129
  ].each do |key, expected_class, expected_message|
127
130
  describe "when flash contains #{key} key" do
128
131
  before { set_flash key, expected_message }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winston Teo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-22 00:00:00.000000000 Z
11
+ date: 2014-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.1.9
132
+ rubygems_version: 2.0.6
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Rails helpers based on opinionated project practices.