alert_message 1.1.5 → 1.1.5.1

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: 78138dda31a042e09fe034b061f1d815c431ffb0
4
- data.tar.gz: ae2a00cd0a854863270aeb07d1ff64c2eef63161
3
+ metadata.gz: 7c8edd001c11ba01273126f11e1db9557db5f975
4
+ data.tar.gz: 91f82a0a254ce3ed46b9d73f559c705b59a2158d
5
5
  SHA512:
6
- metadata.gz: 0951e12225be89932266d1b982bce85fe68db030151b7590e964facc1a24712675cb4dad9bfcc9080371f6d316130968f60a0b6a5323069c7f2999e6554928bf
7
- data.tar.gz: 4f9a37d8c14f03c9395a25fcd2134f7a7ce94c71405712e0a64cdef708d9c4fb27b9960c73757b9814e6290abde427811e7b4560536b9eeacfe2714c25a3c23e
6
+ metadata.gz: 016c13f939971f41cfc29b03f4f82efe000cad69f73ba3849d5e03e6e5b821f1c05f9fc6e0753f8a58bb2673e3011055a2a2e70b9084df78ea113fea0700e9d9
7
+ data.tar.gz: 954a0b5a0aa11e8b15d1f8aa6888bb8fd77c5ec3e696c91810665e11c8144372d8d38e7c9051aa02f44de0dc413a55a0828ce9781464f8c6327d30f821d4230f
data/README.md CHANGED
@@ -8,7 +8,9 @@ This is a simple gem for [alerts messages](http://rubygems.org/gems/alert_messag
8
8
 
9
9
  Add to your Gemfile:
10
10
 
11
- gem 'alert_message'
11
+ ```ruby
12
+ gem 'alert_message'
13
+ ```
12
14
 
13
15
  Then run:
14
16
 
@@ -35,17 +37,21 @@ Add in app/views/layouts/application.html.erb
35
37
 
36
38
  To show your alerts, use:
37
39
 
38
- flash[:error] = "YOUR MESSAGE"
39
- flash[:notice] = "YOUR MESSAGE"
40
- flash[:success] = "YOUR MESSAGE"
40
+ ```ruby
41
+ flash[:error] = "YOUR MESSAGE"
42
+ flash[:notice] = "YOUR MESSAGE"
43
+ flash[:success] = "YOUR MESSAGE"
44
+ ```
41
45
 
42
46
  #### Example
43
47
 
44
- class HomeController < ApplicationController
45
- def index
46
- flash[:error] = "YOUR MESSAGE"
47
- end
48
- end
48
+ ```ruby
49
+ class HomeController < ApplicationController
50
+ def index
51
+ flash[:error] = "YOUR MESSAGE"
52
+ end
53
+ end
54
+ ```
49
55
 
50
56
  ## Custom message to Devise
51
57
 
@@ -57,18 +63,20 @@ Add in your app/views/layouts/_alerts.html.erb
57
63
 
58
64
  Create helper alert_message_helper.rb
59
65
 
60
- module AlertMessageHelper
61
- def show_messages
62
- return "" if resource.errors.empty?
63
- messages = resource.errors.full_messages
64
- html = <<-HTML
65
- <div class="alert alert-danger">
66
- #{messages.first}
67
- </div>
68
- HTML
69
- html.html_safe
70
- end
71
- end
66
+ ```ruby
67
+ module AlertMessageHelper
68
+ def show_messages
69
+ return "" if resource.errors.empty?
70
+ messages = resource.errors.full_messages
71
+ html = <<-HTML
72
+ <div class="alert alert-danger">
73
+ #{messages.first}
74
+ </div>
75
+ HTML
76
+ html.html_safe
77
+ end
78
+ end
79
+ ```
72
80
 
73
81
  ## Demo
74
82
 
@@ -8,8 +8,8 @@ require 'version/version'
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "alert_message"
10
10
  s.version = AlertMessage::Version::VERSION
11
- s.authors = ["Luiz Picolo"]
12
- s.email = ["luizpicolo@gmail.com"]
11
+ s.authors = ["Luiz Picolo", "Gabriel Medina"]
12
+ s.email = ["luizpicolo@gmail.com", "gmedina.santos@gmail.com"]
13
13
  s.summary = "Alert Message"
14
14
  s.description = "Simple gem for alerts messages"
15
15
  s.homepage = "https://github.com/luizpicolo/alert_message"
data/lib/alert_message.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "alert_message/engine"
2
2
 
3
3
  module AlertMessage
4
- # Yor code goes here...
5
4
  end
@@ -1,5 +1,5 @@
1
1
  module AlertMessage
2
2
  module Version
3
- VERSION = '1.1.5'
3
+ VERSION = '1.1.5.1'
4
4
  end
5
5
  end
@@ -2,9 +2,9 @@ require 'spec_helper'
2
2
 
3
3
  describe AlertMessage do
4
4
 
5
- path = '../../lib/generators/alert_message/templates/'
5
+ path = 'lib/generators/alert_message/templates/'
6
6
 
7
7
  it 'should return true if template exist' do
8
- expect(File.exist?("#{path}_alerts.html.erb")).to be_true
8
+ expect(File.exist?("#{path}_alerts.html.erb")).to be_truthy
9
9
  end
10
10
  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.3.1'
8
+ expect(AlertMessage::Version::VERSION).to eq '1.1.5.1'
9
9
  end
10
10
  end
@@ -0,0 +1,10 @@
1
+ $ ->
2
+ alerts = $('.alert-message')
3
+ setTimeout (->
4
+ alerts.fadeOut 400
5
+ return
6
+ ), 4000
7
+ alerts.click ->
8
+ alerts.fadeOut 400
9
+ return
10
+ return
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alert_message
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Picolo
8
+ - Gabriel Medina
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
12
+ date: 2016-03-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -61,6 +62,7 @@ dependencies:
61
62
  description: Simple gem for alerts messages
62
63
  email:
63
64
  - luizpicolo@gmail.com
65
+ - gmedina.santos@gmail.com
64
66
  executables: []
65
67
  extensions: []
66
68
  extra_rdoc_files: []
@@ -80,8 +82,8 @@ files:
80
82
  - spec/alert_message/alert_message_spec.rb
81
83
  - spec/alert_message/version_spec.rb
82
84
  - spec/spec_helper.rb
83
- - vendor/assets/javascripts/alert_message.js
84
- - vendor/assets/stylesheets/alert_message.css
85
+ - vendor/assets/javascripts/alert_message.coffee
86
+ - vendor/assets/stylesheets/alert_message.scss
85
87
  homepage: https://github.com/luizpicolo/alert_message
86
88
  licenses:
87
89
  - MIT
@@ -1,13 +0,0 @@
1
- // alerts
2
-
3
- $(function(){
4
- var alerts = $('.alert-message');
5
-
6
- setTimeout(function() {
7
- alerts.fadeOut(400);
8
- }, 4000);
9
-
10
- alerts.click(function() {
11
- alerts.fadeOut(400);
12
- });
13
- })