growlyflash 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/growlyflash.gemspec +1 -1
- data/lib/growlyflash/controller_additions.rb +8 -6
- data/lib/growlyflash/version.rb +1 -1
- metadata +2 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b201b5a5ccc108d1274a6f182f8ca32d2fb92ec
|
4
|
+
data.tar.gz: b0c3d3d5110256a30a937e7e5450fcfb41360886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b03185b6db44bab8dabf114f2910f73218b082cf3edc0da8c24fbb66c4ef08572a7dba35bb76588c28e3a49463be4de074d86083dd9faab4b0cab604f769a26c
|
7
|
+
data.tar.gz: 7c3f54d6ec0ff6a6006679aae025e9a8c0b994b076728b53be421b5865fe5896be8f9c843e07827c438db752df1f6640162190c88be346291402de4085c2ec75
|
data/Gemfile
CHANGED
@@ -3,10 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in growlyflash.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem 'rails', '>= 3.2.0'
|
6
|
+
gem 'rails', '>= 3.2.0'
|
7
7
|
|
8
8
|
group :test do
|
9
9
|
gem 'minitest'
|
10
10
|
gem 'minitest-reporters'
|
11
11
|
gem 'minitest-spec-rails'
|
12
|
-
end
|
12
|
+
end
|
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'
|
22
|
+
spec.add_dependency 'railties', '>= 3.2'
|
23
23
|
spec.add_dependency 'coffee-rails', '>= 3.2.1'
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake"
|
@@ -12,12 +12,12 @@ module Growlyflash
|
|
12
12
|
module ClassMethods
|
13
13
|
private
|
14
14
|
|
15
|
-
def use_growlyflash(
|
16
|
-
append_after_action :flash_to_headers,
|
15
|
+
def use_growlyflash(*args)
|
16
|
+
append_after_action :flash_to_headers, *args
|
17
17
|
end
|
18
18
|
|
19
|
-
def skip_growlyflash(
|
20
|
-
skip_after_action :flash_to_headers,
|
19
|
+
def skip_growlyflash(*args)
|
20
|
+
skip_after_action :flash_to_headers, *args
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -26,8 +26,10 @@ module Growlyflash
|
|
26
26
|
# Dumps available messages to headers and discards them to prevent appear
|
27
27
|
# it again after refreshing a page
|
28
28
|
def flash_to_headers
|
29
|
-
|
30
|
-
|
29
|
+
if request.xhr? && growlyhash(true).size > 0
|
30
|
+
response.headers['X-Message'] = URI.escape(growlyhash.to_json)
|
31
|
+
growlyhash.each_key { |k| flash.discard(k) }
|
32
|
+
end
|
31
33
|
end
|
32
34
|
|
33
35
|
# View helper method which renders flash messages to js variable if they
|
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.10.
|
4
|
+
version: 0.10.1
|
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:
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '5.2'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '5.2'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: coffee-rails
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|