flash_notifier 1.1.0 → 1.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
  SHA256:
3
- metadata.gz: 396ef0affcaddb843573904223bc64c6f2ad16848524d7bddf402d2faa25359e
4
- data.tar.gz: 66382515b6f271bb0d64f5c3dff8534e0fd48c628b9b04e58a3b87f315e22eb7
3
+ metadata.gz: 75944ca872c8b6fc662849cbb654b593915623492328075bf2205dd1ea8702b6
4
+ data.tar.gz: e5f1862f429f308aad8bf011e7184c9c4ee1972f06fd02e4dd64844456220888
5
5
  SHA512:
6
- metadata.gz: 16f66f9eb7b9b71ebd4ddce16f2af183e15a72b3f41af20f22f5faaa7158ba01fded2cfed7e3ff348243a517cb9b640f4a3303d80cad89950a4526e52a11158d
7
- data.tar.gz: 8984a1f1e63e51a6ad02c6ab42e8d902d032407109e9dec99c71630f8e9e9c9dd0320fca8d8ea7d27d7716c451603dbf36f4aea934af4e0b399fb289bdc93dd2
6
+ metadata.gz: 23e9fda1af08594e39b09d77428a91a38b7284e25a0763a6fe308d349fc2e6790c05a8f4a1fa63c530f212a18e379f969299fbeec3c46eaff98a69075716fd20
7
+ data.tar.gz: e92df230689dfe367b9d9fdb8ba11aaa336bfb62beef52634e21e8122aac4c0775046bde77e633e270b22e917c4e5f6e31b4763a231faa40bb446a38bfa386b2
data/README.md CHANGED
@@ -31,6 +31,10 @@ You can make the flash dismissible by passing following optional options to the
31
31
  <%= build_bootstrap_flash dismiss: true, timeout: 5000 %>
32
32
 
33
33
  ##### default timeout duration is 5000, ignore this option if you want to use default timeout duration
34
+
35
+ You can add your own wrapper class by passing following parameter
36
+
37
+ <%= build_bootstrap_flash wrapper_class: 'my-flash-notification' %>
34
38
 
35
39
  ### For other two libraries follow following steps
36
40
 
@@ -4,16 +4,15 @@ module FlashHelper
4
4
  html = append_options_to_dom options
5
5
  flash.each do |type, message|
6
6
  flash_type = (%w(notice success).include?(type)) ? 'success' : (( %w(alert error).include?(type)) ? 'error' : (%w(warning info).include?(type) ? type : 'info' ))
7
- html += content_tag(:div, '' , data: { flash_notifier: 'inside gem', flash_type: flash_type, flash_msg: message })
7
+ html += content_tag(:div, '' , data: { flash_notifier: 'inside gem', flash_type: flash_type, flash_msg: escape_javascript(message) })
8
8
  end
9
9
  html.html_safe
10
10
  end
11
11
 
12
12
  def build_bootstrap_flash *args
13
- options = extract_args args
14
- append_options_to_dom options
13
+ options = extract_args args
15
14
  dismissible = options.has_key?(:dismiss) && options[:dismiss]
16
- timeout = options.has_key?(:timeout) ? options[:timeout] : 5000
15
+ timeout = options.has_key?(:timeout) ? options[:timeout] : 5000
17
16
  alert_klasses = {
18
17
  success: 'alert-success',
19
18
  error: 'alert-danger',
@@ -46,4 +45,4 @@ module FlashHelper
46
45
  def append_options_to_dom options
47
46
  content_tag(:div, '', data: { flash_notifier_options: options })
48
47
  end
49
- end
48
+ end
@@ -1,3 +1,3 @@
1
1
  module FlashNotifier
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flash_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fakhir Shad
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-08-16 00:00:00.000000000 Z
12
+ date: 2018-08-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler