alert_message 1.1.7 → 1.1.8

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: 6f662e9fb15afd92b34c7ccabdc4207d65fbe215
4
- data.tar.gz: 355460d4f7e54f89a7c4dc52edfdc902bd3514d4
3
+ metadata.gz: 84a0a20779b2284425988b7a61f25ad967fff42a
4
+ data.tar.gz: af2ebede33ec49acddd523213a9ab3cd41e7e7bc
5
5
  SHA512:
6
- metadata.gz: 9bd53297b8031430008aa21144a36189f53023ad33f9a50db5a56574cf0d16aab22c244c94fc50f8e9ea1d62836ecf289facb9687b6848c50b7e1d0379c85426
7
- data.tar.gz: 14af6403093458e0d489461f03fee37c20d7f84ed7ec14ffca0388cd2cff18086e0514e5ed0a7d61691538f498b2f929876d584e3dfbd3741e7b1fe4303b95ff
6
+ metadata.gz: f99859365a8cf991776a6e8fb2e5967fa05d6a56b10d8ae3c11905135ab2625f433bdded164cbfbe725ca3f3180c0fcb39758f95682c71c062cc84884adf6a08
7
+ data.tar.gz: 9e35a7e4f433e720988e6138c22c5f41db4bf5945b9c1ce6b992267997dbc5b71d5e2c98002ecdcf51461db9e1084a8f893ea85f498588a4f1688fdf2538ab18
data/.rspec CHANGED
@@ -1,4 +1,4 @@
1
1
  --color
2
2
  --order=random
3
3
  --drb
4
- --format Fuubar
4
+ --format Fuubar
@@ -1,10 +1,10 @@
1
1
  <% flash.each do |key, value| %>
2
2
  <%
3
- if key != 'success' && key != 'error' && key != 'notice'
4
- key = 'error'
3
+ unless ['success', 'danger', 'error'].include?(key)
4
+ key = 'notice'
5
5
  end
6
6
  %>
7
- <div class="alert-message alert-message-<%= key %>">
8
- <%= value.html_safe %>
9
- </div>
7
+ <div class="alert-message alert-message-<%= key %>">
8
+ <%= value.html_safe %>
9
+ </div>
10
10
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module AlertMessage
2
2
  module Version
3
- VERSION = '1.1.7'
3
+ VERSION = '1.1.8'
4
4
  end
5
5
  end
@@ -5,6 +5,6 @@ describe AlertMessage do
5
5
 
6
6
  it "should return version correctly" do
7
7
  expect(AlertMessage::Version::VERSION).to be_a_kind_of(String)
8
- expect(AlertMessage::Version::VERSION).to eq '1.1.7'
8
+ expect(AlertMessage::Version::VERSION).to eq '1.1.8'
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  class HomeController < ApplicationController
2
2
  def index
3
- flash[:"#{params[:message]}"] = "test #{params[:message]} message"
3
+ flash.now[:"#{params[:message]}"] = "test #{params[:message]} message"
4
4
  end
5
5
  end
@@ -1,10 +1,10 @@
1
1
  <% flash.each do |key, value| %>
2
2
  <%
3
- if key != 'success' && key != 'error' && key != 'notice'
4
- key = 'error'
3
+ unless ['success', 'danger', 'error'].include?(key)
4
+ key = 'notice'
5
5
  end
6
6
  %>
7
- <div class="alert-message alert-message-<%= key %>">
8
- <%= value.html_safe %>
9
- </div>
7
+ <div class="alert-message alert-message-<%= key %>">
8
+ <%= value.html_safe %>
9
+ </div>
10
10
  <% end %>
@@ -2,13 +2,19 @@ require 'spec_helper'
2
2
 
3
3
  feature 'show message', type: :feature do
4
4
 
5
- selectors = %w(error notice success)
5
+ selectors = %w(error danger notice success)
6
6
 
7
7
  selectors.each do |selector|
8
- scenario selector, js: false do
8
+ scenario "with valid selector" do
9
9
  visit home_path(message: selector)
10
10
  expect(page).to have_selector(".alert-message-#{selector}")
11
11
  expect(page).to have_text("test #{selector} message")
12
12
  end
13
13
  end
14
- end
14
+
15
+ scenario "with invalid selector" do
16
+ visit home_path(message: "wrong_selector")
17
+ expect(page).to have_selector(".alert-message-notice")
18
+ expect(page).to have_text("test wrong_selector message")
19
+ end
20
+ end
@@ -13,4 +13,4 @@ RSpec.configure do |config|
13
13
  config.use_transactional_fixtures = true
14
14
  config.infer_base_class_for_anonymous_controllers = false
15
15
  config.order = "random"
16
- end
16
+ end
@@ -30,7 +30,7 @@
30
30
  transform: translateY(0);
31
31
  }
32
32
 
33
- .alert-message-error {
33
+ .alert-message-error, .alert-message-danger {
34
34
  background-color: #D33D3D;
35
35
  }
36
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alert_message
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Picolo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-10 00:00:00.000000000 Z
12
+ date: 2017-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -198,35 +198,37 @@ files:
198
198
  - spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/2/center_example.jpg
199
199
  - spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/2/example.jpg
200
200
  - spec/dummy/public/uploads/rails_admin_content_builder/content_builder_image/image/2/left_or_right_example.jpg
201
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/-8/-8phVIGLXWulhkDuRCGQ-544n89XyNUBGZagLIFkWF8.cache
202
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/0K/0KKl0_pHdv8K_w7ercL4aWkD5BNDrj9Ud_LORSXb3wM.cache
203
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/1H/1H5_oR2jCpLjYJZcsn22Ki95d707wqA_KjFOJurOIfc.cache
204
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/1u/1uabmzhIssfK8bEAgnwdCRUsTiOXOFbbn3nOgkuxW48.cache
205
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/4L/4L9CHGXjmHtLofRMoUiejhpxFm2D6uGDQ80XS-h3IOs.cache
206
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/BK/BKZlJT7M_KuAoZ1wSopHeaZ4_qsu1GFheBPTwr5XPNc.cache
207
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/C9/C9XqWJz0C4bovFDScIyh0GynNMKPYE2b__U3fh1qMfk.cache
208
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/CN/CNSEWeB2ewXvnFxaAOieVQ2-NhdxBYiynOTdOBuJIpU.cache
209
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/CN/cn4NO6Gpi1TmzJzXlwqsSz0R_aQisv0stPI82Fv3Y0g.cache
210
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/LS/LSFfDJ5-koMS4YIGbiJ2h4uZA8F3NgtcI9anatJ37xg.cache
211
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/Mu/MuaSo_KOoOey-8Pj9B5wGtvJ-1MRk66inANspWfEkkQ.cache
212
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/N2/N2YuSs7IthN8uqOrFuCcPatO-kdSZ-nxfibmFMsJevQ.cache
201
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/24/24xLphksiFLkOJsNwjhHV8csV6xjgF72clahZzIS4hs.cache
202
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/2z/2zM3lL3ceuU8VahfOf15kLsspMRnaYCs7ejP2P71SDs.cache
203
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/3J/3J0IbqeWz6vo8nTxgPT9skUj2WgUknFgJFFHc-V3upw.cache
204
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/50/50iYoNv12ReM_w6xVbQKsSDK9ILti1w4w-DWFOmMo3U.cache
205
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/7B/7BFuxkgWdAuT7fJ-9zF9Z5AAwaoOEpPMnAOAgUzFWgk.cache
206
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/7s/7sIGdxVor9_hYnOaA5MsQTvAkMBqVb0mnwDqfHin8BQ.cache
207
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/A7/A7pQdEMOtj5SXh1CGogj07Uhgq7DJqaW2uTN8LSqj90.cache
208
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/AR/ARvDmPtLpytxl-oaQFi4zo7PUQ0M1vsWzwrsGVAdLdA.cache
209
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Lv/LvcZnMjHRHhPjy4ba5Z_I34ZEwus1CK1DvtGM3g4paE.cache
213
210
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/Ok/OkDlaZcN8rrgBMIS-sjrleLMHmfwGb7uytdHFGAKyKQ.cache
214
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/PV/PVBO46Q1_CamxNf7kjGRA8f1WlYCGGMVYGrHrW6VBMI.cache
215
211
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/QM/QMUiivRdxFCeRM9TCF9MnYVpBJyvo0QfR_98E2Wze2M.cache
216
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/YH/YHiMs1cfCu8eG2afEJsHosFQ7nRvvxDmwAVCXkHs_lI.cache
217
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/_o/_osAIJs8OgKZlscKswxMQMdcqaaXW_SKELEpgfhlsAA.cache
218
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/aS/aS5EVRpqcbWegeMfUdwol8yNlFOLhLrf3XhKxuuAvH0.cache
219
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/fT/fTeeEDXiEpwXc5bSyRFPGEc5o4WpgmezFrzZHsv3MgI.cache
220
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/ga/gaiV5l-cBidm1mFQvd_0VoFprJvxsNFlIkR3V8omtqY.cache
212
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Re/Re5aR2FiIBFbBE_tFfGqee_uuQsoI2O8SbZY-0swAWA.cache
213
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Sj/SjYUiVTO21rvsC2Wk1uTyrvMaH1lSii72KCgDh3oFFA.cache
214
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/V7/V79OBKLVX2bmlpKPN2YLwOsGDPr6cRt9WdOJUwH7ncA.cache
215
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/YU/YUa76ekTtQ6dWPwKqmrcMeibOKUfQSIeWx5yToMlNG4.cache
216
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/Yb/YbOBfsETECc5r2nn8awEIbkKPQd6qfjRwNCunHltQq8.cache
217
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/b2/b2nJHha5aJQMqkkhFtuROJ9CPdFavlKhoRZIi5YPWKQ.cache
218
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/fk/fkpgVsum7tjoVBQMAPu3LkaVyHz4W3VOgWaxubmoaqE.cache
219
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/fs/fs7UtD-RagBAjYlWZ-uBqnwIUDu_QEdQKta4p5NXIy4.cache
220
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/gg/gg7w9SedEy74i9oqWzT1DjvHCqc47TQn7RoHMpZDCz0.cache
221
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/iq/iqcmKKFxT36XZf4y3HEoh-lfDpi4-KS1wBvmeZAXL6Q.cache
222
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/j5/j5ZVbh-c6hBVVWk1VbqmErGzGi0PFPzLd_W3vONiOQo.cache
221
223
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/jL/jL7k7-KgU6sqvTphO9-yQX2mRkMFBufpP-czffkYEQs.cache
222
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/kI/kIvf6fU_BflUil2OG0roV9Qww6gdJ97nGA0HmUWLpgs.cache
223
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/n0/n06xMvqGzkJGIrhqav7E1JhWDUiyP1FHrjvZuUmAEDk.cache
224
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/oE/oEFYMOrUHGAWiuMVpQWA1kwtc9m85W0vSD_92OmsVVs.cache
225
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/sq/sqRJAPp3sYS_wtbY5j5nvpJlCEYuA8wu4e00sMtGEu8.cache
224
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/lr/lrFP_NZVK9ZYVOgV3BbpeO1OQcLXvwFv-RBcAyPoU48.cache
225
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/oj/ojUgQLquokxySsZqytKH-pK2HaAFR0A9t5xGuWK8jW4.cache
226
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/qg/qgpC_xrU51RsOVAHIaO4xZsG-696XRFsZZRGvN0becM.cache
227
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/sk/sk9hFWtm2AAMA9-HPf8rtY-sMY8_eIf2PoxuTdRoD4k.cache
228
+ - spec/dummy/tmp/cache/assets/sprockets/v3.0/tx/txbdH4JWN0amnpKHa8ayZuhBJ1c-qKTEOyoiWpkXME8.cache
226
229
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/wt/wtVa2jY11sapQGYQt6tZloSC7fC6DgJQI5WUq5aa-Yg.cache
227
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/yM/yMaZ1oYUjl9amUE5Q_unMTTVOYonwGo5dc0aY3U3djA.cache
228
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/zs/ZS8pSPfsWwaSDTn84yULigPhELkVQctO1qHfXohl9bM.cache
229
- - spec/dummy/tmp/cache/assets/sprockets/v3.0/zs/zsuKM_d03om6Co0SxgPgtInvOk6S5phfhDR4WvgqZR4.cache
230
+ - spec/dummy/tmp/capybara/capybara-20170515133334721551764.html
231
+ - spec/dummy/tmp/capybara/capybara-201705151334549309224818.html
230
232
  - spec/features/alert_message_spec.rb
231
233
  - spec/spec_helper.rb
232
234
  - vendor/assets/javascripts/alert_message.coffee
@@ -251,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
253
  version: '0'
252
254
  requirements: []
253
255
  rubyforge_project:
254
- rubygems_version: 2.5.1
256
+ rubygems_version: 2.6.12
255
257
  signing_key:
256
258
  specification_version: 4
257
259
  summary: Alert Message