growlyflash 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d12bc303a0c41195d27a4910d072c32d4b9f9a84
4
- data.tar.gz: 1edc80496a2088dd5c949f2bf07483c9f60d4d9f
3
+ metadata.gz: 6c2b65d4339015dc5f1d4eaeba00cd62d605b6de
4
+ data.tar.gz: f1e675787a7c0828753e0da35fd4eb34f38f825b
5
5
  SHA512:
6
- metadata.gz: 83eab26a207e8c5f5e789a1c2ef6af8ea771a6b18ca780577c8152d909c71216e11b281b531e44659e4e7d287b33f18de96859c6c7dca06e39e5f9ce2f06077f
7
- data.tar.gz: 7718c4410ab59f621a1a28d2110d687bf0cd880558bb08161aa7bf89194f6936682a1c563e139073f2aed2cf61ffa1ba4510d393efdbfdf617c8fd409704c8c3
6
+ metadata.gz: f3e411e22e09bb13adc07df4158b6caec7fa607859f65670aa79b75b5bf6f217a606df961ee25ec4327831baa510541442514a10fc24043b5a7941e069874c2f
7
+ data.tar.gz: c998924dc572e8c3e13c0c9320c40c76040b3ed322558c009d209a23cd30bb4c636c253eb0b66e28bdf4c45d7cd2983af6030d5cc94e85702fc49e02bfac9da3
data/README.md CHANGED
@@ -45,14 +45,16 @@ $.bootstrapGrowl.defaults = $.extend on, $.bootstrapGrowl.defaults,
45
45
  # Show close button
46
46
  dismiss: true
47
47
 
48
- # Default class suffix for alert boxes.
49
- # Use the following mapping (Flash key => Bootstrap Alert)
50
- # warning: null
51
- # error: "error"
52
- # notice: "info"
53
- # success: "success"
48
+ # Default class suffix for alert boxes.
54
49
  type: null
55
50
 
51
+ # Use the following mapping (Flash key => Bootstrap Alert)
52
+ type_mapping:
53
+ warning: null
54
+ error : 'error'
55
+ notice : 'info'
56
+ success: 'success'
57
+
56
58
  # Horizontal aligning (left, right or center)
57
59
  align: 'right'
58
60
 
@@ -1,3 +1,3 @@
1
1
  module Growlyflash
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
@@ -67,13 +67,15 @@ do ($ = jQuery) ->
67
67
  dismiss: true
68
68
 
69
69
  # Default class suffix for alert boxes.
70
- # Use the following mapping (Flash key => Bootstrap Alert)
71
- # warning: null
72
- # error: "error"
73
- # notice: "info"
74
- # success: "success"
75
70
  type: null
76
71
 
72
+ # Use the following mapping (Flash key => Bootstrap Alert)
73
+ type_mapping:
74
+ warning: null
75
+ error : 'error'
76
+ notice : 'info'
77
+ success: 'success'
78
+
77
79
  # Horizontal aligning (left, right or center)
78
80
  align: 'right'
79
81
 
@@ -2,13 +2,7 @@
2
2
 
3
3
  root = window ? this
4
4
 
5
- class Growlyflash
6
- TYPE_MAPPING =
7
- warning: null
8
- error : 'error'
9
- notice : 'info'
10
- success: 'success'
11
-
5
+ class Growlyflash
12
6
  constructor: (@context) ->
13
7
  @flash_log = []
14
8
  if window.flashes?
@@ -22,7 +16,7 @@ class Growlyflash
22
16
  growl: (flashes) ->
23
17
  for type, msg of flashes when msg?
24
18
  @log type: type, msg: msg
25
- $.bootstrapGrowl msg, type: TYPE_MAPPING[type]
19
+ $.bootstrapGrowl msg, type: $.bootstrapGrowl.defaults.type_mapping[type]
26
20
 
27
21
  log: (xmessage) -> @flash_log.push(xmessage)
28
22
  log_isnt_empty: -> @flash_log.length > 0
@@ -65,4 +59,4 @@ class Growlyflash
65
59
  root.Growlyflash = Growlyflash
66
60
 
67
61
  $ ->
68
- new Growlyflash document
62
+ root.growly = new Growlyflash document unless root.growly
metadata CHANGED
@@ -1,47 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growlyflash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
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: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '5.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.2'
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: coffee-rails
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: 3.2.1
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 3.2.1
47
47
  description: Tiny gem which provides growl-styled flash messages for Ruby on Rails
@@ -53,7 +53,7 @@ executables: []
53
53
  extensions: []
54
54
  extra_rdoc_files: []
55
55
  files:
56
- - .gitignore
56
+ - ".gitignore"
57
57
  - Gemfile
58
58
  - README.md
59
59
  - Rakefile
@@ -72,20 +72,19 @@ require_paths:
72
72
  - vendor
73
73
  required_ruby_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.0.5
85
+ rubygems_version: 2.2.2
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Tiny gem which provides growl-styled flash messages for Ruby on Rails with
89
89
  Bootstrap.
90
90
  test_files: []
91
- has_rdoc: