alert_message 1.1.4 → 1.1.5

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
  SHA1:
3
- metadata.gz: b1f554275b26f56a3e6058ba0cb5b515397a0d8d
4
- data.tar.gz: 3c035a7641cf8bc9d7f537f80b4665d7a1658084
3
+ metadata.gz: 78138dda31a042e09fe034b061f1d815c431ffb0
4
+ data.tar.gz: ae2a00cd0a854863270aeb07d1ff64c2eef63161
5
5
  SHA512:
6
- metadata.gz: e960b83f6c272a438875becea122c2da2729af7341aeb404b1e3fb00f45a03c29b66139b621617a2e0665f112de116d81d75abf68d2b320a56875a508d15242f
7
- data.tar.gz: 29006bd8f2fc700899993ca316ccf83e5e5546e3ba8af6e3e27f3d2c94443a36572a38358bdb178a95a5ce26ad50d3f79a237eb7ad14e5ff08cfc9b2d99f7cd8
6
+ metadata.gz: 0951e12225be89932266d1b982bce85fe68db030151b7590e964facc1a24712675cb4dad9bfcc9080371f6d316130968f60a0b6a5323069c7f2999e6554928bf
7
+ data.tar.gz: 4f9a37d8c14f03c9395a25fcd2134f7a7ce94c71405712e0a64cdef708d9c4fb27b9960c73757b9814e6290abde427811e7b4560536b9eeacfe2714c25a3c23e
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # [Alert Message](http://rubygems.org/gems/alert_message)
1
+ # Alert Message
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/alert_message.svg)](http://badge.fury.io/rb/alert_message)
4
4
 
5
- This is a simple gem for alerts messages.
5
+ This is a simple gem for [alerts messages](http://rubygems.org/gems/alert_message).
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add to your Gemfile:
10
10
 
11
- gem 'alert_message'
11
+ gem 'alert_message'
12
12
 
13
13
  Then run:
14
14
 
@@ -18,17 +18,18 @@ Run install script:
18
18
 
19
19
  $ rails g alert_message:install
20
20
 
21
- Rename *app/assets/application.css* to *app/assets/application.css.scss* and add in app/assets/application.css.scss
21
+ Add styles in app/assets/application.css
22
22
 
23
23
  *= require alert_message
24
24
 
25
- and in app/assets/application.js
25
+ Add scripts in app/assets/application.js
26
26
 
27
27
  //= require alert_message
28
28
 
29
+
29
30
  ## How to use
30
31
 
31
- Add in *application.html.erb*
32
+ Add in app/views/layouts/application.html.erb
32
33
 
33
34
  <%= render "layouts/alerts" %>
34
35
 
@@ -38,7 +39,7 @@ To show your alerts, use:
38
39
  flash[:notice] = "YOUR MESSAGE"
39
40
  flash[:success] = "YOUR MESSAGE"
40
41
 
41
- ## Example
42
+ #### Example
42
43
 
43
44
  class HomeController < ApplicationController
44
45
  def index
@@ -62,7 +63,6 @@ Create helper alert_message_helper.rb
62
63
  messages = resource.errors.full_messages
63
64
  html = <<-HTML
64
65
  <div class="alert alert-danger">
65
- <button type="button" class="close">&times;</button>
66
66
  #{messages.first}
67
67
  </div>
68
68
  HTML
@@ -72,7 +72,7 @@ Create helper alert_message_helper.rb
72
72
 
73
73
  ## Demo
74
74
 
75
- [https://alert-message.herokuapp.com/](https://alert-message.herokuapp.com/)
75
+ [alert-message.herokuapp.com](https://alert-message.herokuapp.com/)
76
76
 
77
77
 
78
78
  ## Contributing
@@ -80,9 +80,9 @@ Create helper alert_message_helper.rb
80
80
  **Welcome to contribute**
81
81
 
82
82
  1. Fork it
83
- 2. Create your feature branch (git checkout -b my-new-feature)
84
- 3. Commit your changes (git commit -am 'Added some feature')
85
- 4. Push to the branch (git push origin my-new-feature)
83
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
84
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
85
+ 4. Push to the branch (`git push origin my-new-feature`)
86
86
  5. Create new Pull Request
87
87
 
88
88
  ## License
@@ -5,7 +5,6 @@
5
5
  end
6
6
  %>
7
7
  <div class="alert-message alert-message-<%= key %>">
8
- <button type="button" class="close">&times;</button>
9
8
  <%= value.html_safe %>
10
9
  </div>
11
10
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module AlertMessage
2
2
  module Version
3
- VERSION = '1.1.4'
3
+ VERSION = '1.1.5'
4
4
  end
5
5
  end
@@ -5,6 +5,6 @@ describe AlertMessage do
5
5
 
6
6
  it "should return version correctly" do
7
7
  expect(AlertMessage::Version::VERSION).to be_a_kind_of(String)
8
- expect(AlertMessage::Version::VERSION).to eq '1.1.4'
8
+ expect(AlertMessage::Version::VERSION).to eq '1.1.3.1'
9
9
  end
10
10
  end
@@ -1,13 +1,13 @@
1
1
  // alerts
2
2
 
3
- $(document).ready(function(){
3
+ $(function(){
4
4
  var alerts = $('.alert-message');
5
5
 
6
- setTimeout(function(){
6
+ setTimeout(function() {
7
7
  alerts.fadeOut(400);
8
- }, 3000);
8
+ }, 4000);
9
9
 
10
- alerts.on('click', function(){
11
- alerts.fadeOut(400);
10
+ alerts.click(function() {
11
+ alerts.fadeOut(400);
12
12
  });
13
13
  })
@@ -0,0 +1,25 @@
1
+ .alert-message {
2
+ cursor: pointer;
3
+
4
+ position: fixed;
5
+ z-index: 9999;
6
+ top: 0;
7
+ left: 0;
8
+
9
+ width: 100%;
10
+
11
+ color: #fff;
12
+ font-size: 1em;
13
+ text-align: center;
14
+
15
+ padding: 10px;
16
+ }
17
+
18
+ .alert-message-danger {
19
+ background: #e74c3c;
20
+ }
21
+
22
+ .alert-message-notice,
23
+ .alert-message-success {
24
+ background: #27ae60;
25
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alert_message
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Picolo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-18 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,7 +81,7 @@ files:
81
81
  - spec/alert_message/version_spec.rb
82
82
  - spec/spec_helper.rb
83
83
  - vendor/assets/javascripts/alert_message.js
84
- - vendor/assets/stylesheets/alert_message.css.scss
84
+ - vendor/assets/stylesheets/alert_message.css
85
85
  homepage: https://github.com/luizpicolo/alert_message
86
86
  licenses:
87
87
  - MIT
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.4.6
105
+ rubygems_version: 2.4.8
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Alert Message
@@ -1,60 +0,0 @@
1
- // alert
2
- $text-1: #FFFFFF; // branco
3
- $alert-success: #27ae60; // verde
4
- $alert-danger: #e74c3c; // vermelho
5
- $alert-notice: #2980b9; // azul
6
-
7
- // box sizing
8
- @mixin box-sizing($boxmodel){
9
- -webkit-box-sizing: $boxmodel;
10
- -moz-box-sizing: $boxmodel;
11
- box-sizing: $boxmodel;
12
- }
13
-
14
- .alert-message {
15
- cursor: pointer;
16
- @include box-sizing(border-box);
17
-
18
- position: fixed;
19
- z-index: 9999;
20
- top: 0;
21
- left: 0;
22
-
23
- width: 100%;
24
-
25
- color: $text-1;
26
- font-size: 16px !important;
27
- text-align: center;
28
-
29
- padding: 10px 0 13px;
30
-
31
- .close {
32
- outline: none;
33
- @include box-sizing(border-box);
34
-
35
- position: absolute;
36
- right: 0;
37
- top: -3px;
38
-
39
- width: 42px;
40
- height: 42px;
41
- line-height: 42px;
42
-
43
- font-size: 1.4em;
44
-
45
- border: 0;
46
- background: none;
47
- }
48
- }
49
-
50
- .alert-message-success {
51
- background: $alert-success;
52
- }
53
-
54
- .alert-message-danger {
55
- background: $alert-danger;
56
- }
57
-
58
- .alert-message-notice {
59
- background: $alert-success;
60
- }