growlyflash 0.8.4.1 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/growlyflash/alert.coffee +2 -2
- data/growlyflash.gemspec +1 -1
- data/lib/growlyflash/controller_additions.rb +6 -4
- data/lib/growlyflash/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d862dbb8bed801ec3ed62d9dabfa0280b5539f2d
|
4
|
+
data.tar.gz: 10028e8123cf9a073242e21946c5bab10ef37aa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5d05be92a05c84afdb8948c219b551e68b20e2741190dbd960155df78d994ab4c4a60e19812074d740f7e36a70da59e9729e0f5149868ddf9100ee5c1124ce1
|
7
|
+
data.tar.gz: e70a3b83079b1fa6096051ee55d7821edd5c6d3df3c6af2f237c6562c140cab8b3dbf3f5e0c6e1b6232c9d980e058f639af018b6c58ca78ea92b1be9dd182d95
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ Import Growlyflash style in `app/assets/stylesheets/application.css.scss` after
|
|
38
38
|
@import "growlyflash";
|
39
39
|
```
|
40
40
|
|
41
|
-
To use text flash messages as growl notifications with XHR request, add `use_growlyflash` to your controllers (usually `application_controller.rb`). This is a shorthand for `
|
41
|
+
To use text flash messages as growl notifications with XHR request, add `use_growlyflash` to your controllers (usually `application_controller.rb`). This is a shorthand for `append_after_action :flash_to_header, if: "request.xhr?"` and takes callback parameters like `only`, `except`, `if` or `unless`:
|
42
42
|
|
43
43
|
```ruby
|
44
44
|
use_growlyflash # except: %i[actions without growlyflash]
|
@@ -44,7 +44,7 @@ class Growlyflash
|
|
44
44
|
|
45
45
|
html = ""
|
46
46
|
html += h.dismiss() if dismiss
|
47
|
-
html += h.title(@opts) if title
|
47
|
+
html += h.title(@opts.type) if title? and @opts.type?
|
48
48
|
html += @flash.msg
|
49
49
|
|
50
50
|
@el = ($ '<div>', html: html, class: @class_list().join(' '), role: "alert")
|
@@ -96,4 +96,4 @@ class Growlyflash
|
|
96
96
|
return
|
97
97
|
|
98
98
|
window.Growlyflash = Growlyflash
|
99
|
-
jQuery.growlyflash = Growlyflash.growl
|
99
|
+
jQuery.growlyflash = Growlyflash.growl
|
data/growlyflash.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.required_ruby_version = ">= 1.9.3"
|
21
21
|
|
22
|
-
spec.add_dependency 'railties', '>= 3.2', '< 5.
|
22
|
+
spec.add_dependency 'railties', '>= 3.2', '< 5.1'
|
23
23
|
spec.add_dependency 'coffee-rails', '>= 3.2.1'
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake"
|
@@ -3,7 +3,9 @@ module Growlyflash
|
|
3
3
|
def self.included(base)
|
4
4
|
base.module_eval do
|
5
5
|
extend ClassMethods
|
6
|
-
|
6
|
+
if respond_to?(:helper_method)
|
7
|
+
helper_method :growlyflash_static_notices, :growlyhash
|
8
|
+
end
|
7
9
|
end
|
8
10
|
end
|
9
11
|
|
@@ -11,11 +13,11 @@ module Growlyflash
|
|
11
13
|
private
|
12
14
|
|
13
15
|
def use_growlyflash(options = {})
|
14
|
-
|
16
|
+
append_after_action :flash_to_headers, options.reverse_merge(if: "request.xhr?")
|
15
17
|
end
|
16
18
|
|
17
19
|
def skip_growlyflash(options = {})
|
18
|
-
|
20
|
+
skip_after_action :flash_to_headers, options
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
@@ -42,4 +44,4 @@ module Growlyflash
|
|
42
44
|
@growlyhash ||= flash.to_hash.select { |k, v| v.is_a? String }
|
43
45
|
end
|
44
46
|
end
|
45
|
-
end
|
47
|
+
end
|
data/lib/growlyflash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: growlyflash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tõnis Simo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5.
|
22
|
+
version: '5.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5.
|
32
|
+
version: '5.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: coffee-rails
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.6.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Popup ActionDispatch::Flash within Bootstrap alert in Rails app like a growl
|