flash_rails_messages 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +4 -2
- data/Gemfile +1 -1
- data/README.md +1 -3
- data/flash_rails_messages.gemspec +6 -4
- data/lib/flash_rails_messages/version.rb +1 -1
- data/spec/flash_rails_messages_spec.rb +6 -6
- data/spec/spec_helper.rb +3 -7
- metadata +28 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8603c470dc8f95fa2d1fd5fc9707c0ea17040014
|
4
|
+
data.tar.gz: 5b1509828656606cbf327c89e71e194019d43c53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00f1934f251be26ff0e2c4f0867a5e16d6336e72d607cd57292d42b5bea0a9fab4b9a391ea9cf7df5ab8e291dcaf99b39f03e43ebcf5f274697ffa56e702e2b0
|
7
|
+
data.tar.gz: a71dd98fc3dfda40d47254de64554af30e5bf89128053e62d22815d07e66b7d148a5d48a6b24113be133db333b1f2d111c96ee27c025fc6c42baf4e02df899b6
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# FlashRailsMessages
|
2
|
-
|
3
|
-
[![Build Status](https://travis-ci.org/alejandrogutierrez/flash_rails_messages.png?branch=master)](https://travis-ci.org/alejandrogutierrez/flash_rails_messages)
|
4
|
-
[![Coverage Status](https://coveralls.io/repos/alejandrogutierrez/flash_rails_messages/badge.png)](https://coveralls.io/r/alejandrogutierrez/flash_rails_messages)
|
2
|
+
[![Build Status](https://travis-ci.org/alejandrodevs/flash_rails_messages.png?branch=master)](https://travis-ci.org/alejandrodevs/flash_rails_messages) [![Coverage Status](https://coveralls.io/repos/github/alejandrodevs/flash_rails_messages/badge.svg?branch=master)](https://coveralls.io/github/alejandrodevs/flash_rails_messages?branch=master)
|
5
3
|
|
6
4
|
|
7
5
|
This gem provides an easy and simple way to display flash rails messages.
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['alejandrodevs@gmail.com']
|
11
11
|
spec.description = 'A simple helper to display flash rails messages'
|
12
12
|
spec.summary = 'This gems provides an easy way to display flash rails messages'
|
13
|
-
spec.homepage = 'https://github.com/
|
13
|
+
spec.homepage = 'https://github.com/alejandrodevs/flash_rails_messages'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -18,8 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.
|
21
|
+
spec.required_ruby_version = '>= 2.0.0'
|
22
|
+
|
23
|
+
spec.add_dependency 'rails', '>= 4.0'
|
22
24
|
spec.add_development_dependency 'rake'
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency '
|
25
|
+
spec.add_development_dependency 'bundler'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.4.0'
|
25
27
|
end
|
@@ -6,7 +6,7 @@ describe FlashRailsMessages::Helper do
|
|
6
6
|
describe '#render_flash_messages' do
|
7
7
|
context 'when flash does not have messages' do
|
8
8
|
it 'returns nothing' do
|
9
|
-
subject.
|
9
|
+
allow(subject).to receive(:flash).and_return({})
|
10
10
|
expect(subject.render_flash_messages).to eql('')
|
11
11
|
end
|
12
12
|
end
|
@@ -14,7 +14,7 @@ describe FlashRailsMessages::Helper do
|
|
14
14
|
context 'when flash has messages' do
|
15
15
|
context 'when flash type is notice' do
|
16
16
|
it 'returns the correct message' do
|
17
|
-
subject.
|
17
|
+
allow(subject).to receive(:flash).and_return({ notice: 'notice' })
|
18
18
|
alert_expected = alert_element('notice', 'info')
|
19
19
|
expect(subject.render_flash_messages).to eql(alert_expected)
|
20
20
|
end
|
@@ -22,7 +22,7 @@ describe FlashRailsMessages::Helper do
|
|
22
22
|
|
23
23
|
context 'when flash type is success' do
|
24
24
|
it 'returns the correct message' do
|
25
|
-
subject.
|
25
|
+
allow(subject).to receive(:flash).and_return({ success: 'success' })
|
26
26
|
alert_expected = alert_element('success', 'success')
|
27
27
|
expect(subject.render_flash_messages).to eql(alert_expected)
|
28
28
|
end
|
@@ -30,7 +30,7 @@ describe FlashRailsMessages::Helper do
|
|
30
30
|
|
31
31
|
context 'when flash type is alert' do
|
32
32
|
it 'returns the correct message' do
|
33
|
-
subject.
|
33
|
+
allow(subject).to receive(:flash).and_return({ alert: 'alert' })
|
34
34
|
alert_expected = alert_element('alert', 'error')
|
35
35
|
expect(subject.render_flash_messages).to eql(alert_expected)
|
36
36
|
end
|
@@ -38,7 +38,7 @@ describe FlashRailsMessages::Helper do
|
|
38
38
|
|
39
39
|
context 'when flash type is error' do
|
40
40
|
it 'returns the correct message' do
|
41
|
-
subject.
|
41
|
+
allow(subject).to receive(:flash).and_return({ error: 'error' })
|
42
42
|
alert_expected = alert_element('error', 'error')
|
43
43
|
expect(subject.render_flash_messages).to eql(alert_expected)
|
44
44
|
end
|
@@ -46,7 +46,7 @@ describe FlashRailsMessages::Helper do
|
|
46
46
|
|
47
47
|
context 'when has more than one message' do
|
48
48
|
it 'returns all the correct messages' do
|
49
|
-
subject.
|
49
|
+
allow(subject).to receive(:flash).and_return({ alert: 'alert', notice: 'notice' })
|
50
50
|
alerts_expected = alert_element('alert', 'error') +
|
51
51
|
alert_element('notice', 'info')
|
52
52
|
expect(subject.render_flash_messages).to eql(alerts_expected)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
1
|
require 'coveralls'
|
3
2
|
Coveralls.wear!
|
4
|
-
|
3
|
+
|
4
|
+
require 'simplecov'
|
5
|
+
SimpleCov.start
|
5
6
|
|
6
7
|
require 'action_view'
|
7
8
|
require 'flash_rails_messages'
|
8
9
|
require 'rails/all'
|
9
|
-
require 'simplecov'
|
10
|
-
|
11
|
-
SimpleCov.start do
|
12
|
-
minimum_coverage 90
|
13
|
-
end
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flash_rails_messages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Gutiérrez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '4.0'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.4.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 3.4.0
|
69
69
|
description: A simple helper to display flash rails messages
|
70
70
|
email:
|
71
71
|
- alejandrodevs@gmail.com
|
@@ -73,9 +73,9 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .rspec
|
78
|
-
- .travis.yml
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".travis.yml"
|
79
79
|
- Gemfile
|
80
80
|
- LICENSE.txt
|
81
81
|
- README.md
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
- lib/generators/flash_rails_messages/templates/config/initializers/flash_rails_messages_foundation.rb
|
91
91
|
- spec/flash_rails_messages_spec.rb
|
92
92
|
- spec/spec_helper.rb
|
93
|
-
homepage: https://github.com/
|
93
|
+
homepage: https://github.com/alejandrodevs/flash_rails_messages
|
94
94
|
licenses:
|
95
95
|
- MIT
|
96
96
|
metadata: {}
|
@@ -100,17 +100,17 @@ require_paths:
|
|
100
100
|
- lib
|
101
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
105
|
+
version: 2.0.0
|
106
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.5.1
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: This gems provides an easy way to display flash rails messages
|