puffly 0.1.1 → 0.1.2

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: fed6dcae36053dd13252af5f0eb11b4619bd0748
4
- data.tar.gz: 592c715e54b35d3a07661b33ebd82477ad7b3529
3
+ metadata.gz: 72e42ab3c37d98c100a77db12a78b0304dea8888
4
+ data.tar.gz: 94c8bb3a6c5898d75387c22fe6c1df06cad81916
5
5
  SHA512:
6
- metadata.gz: 62c9fd0a1e880e92cf6006dcc3aeaa6b104b25ab40d414a262195f1b0916c7eb662231787eb302ec064931fe757661f32fc973756c5aca708e315df5c5e96e6d
7
- data.tar.gz: 475bafbacd5ff42980221af71f6a5988526d8a30a6b8f02a589e33e6fc565599c9866bdba296fdfa6bdd1d5b94fa3fba2357034068aba34286342d17f6d860d0
6
+ metadata.gz: 9ca3d0812797905a1a32051396166b7bd853003fe06fd2a01ae6af82e21bd600208fbf68f18917a95af217662cd79b70f11bf2158391f73446f40807f7c97154
7
+ data.tar.gz: 8cd4621853f96e13e0db3f8236bbc9d57e11210c29355c29b90152d4d9625294a11d99bdf9210552edf975eb512722781a23ea7b152a9e957722d2e8a81c6828
data/README.md CHANGED
@@ -1,41 +1,71 @@
1
- # Puffly
1
+ [![Gem Version](https://badge.fury.io/rb/puffly.svg)](https://badge.fury.io/rb/puffly)
2
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bbf2d676a27842eab590d8dac0cda3ca)](https://www.codacy.com/app/Kevyder/puffly?utm_source=github.com&utm_medium=referral&utm_content=kevyder/puffly&utm_campaign=Badge_Grade)
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/puffly`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+ # Puffly
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ Fun and cute flash messages for your Ruby on Rails application.
6
7
 
7
8
  ## Installation
8
9
 
9
10
  Add this line to your application's Gemfile:
10
11
 
11
- ```ruby
12
- gem 'puffly'
13
- ```
12
+ ```ruby
13
+ gem 'puffly'
14
+ ```
14
15
 
15
16
  And then execute:
16
17
 
17
- $ bundle
18
+ $ bundle install
18
19
 
19
20
  Or install it yourself as:
20
21
 
21
22
  $ gem install puffly
22
23
 
24
+ Once installed, add the following to your `application.scss`:
25
+
26
+ ```scss
27
+ @import "puffly";
28
+ ```
29
+
30
+ and your `application.js`:
31
+
32
+ ```js
33
+ //= require jquery
34
+ //= require puffly
35
+ ```
36
+
23
37
  ## Usage
24
38
 
25
- TODO: Write usage instructions here
39
+ Add this lines to your `application.erb` or the main layout of your application:
40
+
41
+ ```erb
42
+ <% flash.each do |type, msg| %>
43
+ <%= content_tag :span, msg, class: "#{type}", id: "puffly" %>
44
+ <% end %>
45
+ ```
46
+
47
+ And add the flash message to the action of your controller:
26
48
 
27
- ## Development
49
+ ```ruby
50
+ flash[OPTION] = "Your message"
51
+ ```
28
52
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
+ You can set some options when creating a flash message.
30
54
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
55
+ ####`flash[OPTION]`
56
+
57
+ OPTION | SASS Variable | HEX Color
58
+ ------------ | ------------- | -------------
59
+ :success | $color-sucess | `#3DC763`
60
+ :error | $color-error | `#ED3D3D`
61
+ :warning | $color-warning | `#FF9800`
62
+ :notice | $color-notice | `#2B5C7F`
32
63
 
33
64
  ## Contributing
34
65
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/puffly.
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kevyder/puffly.
36
67
 
37
68
 
38
69
  ## License
39
70
 
40
71
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -1,3 +1,3 @@
1
1
  module Puffly
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  $(document).ready ->
2
- $('#notification').fadeIn 2000
3
- $('#notification').delay(10000).fadeOut 2000
2
+ $('#puffly').fadeIn 1000
3
+ $('#puffly').delay(4000).fadeOut 1000
4
4
  return
@@ -0,0 +1,6 @@
1
+ $color-sucess: #3dc763
2
+ $color-error: #ed3d3d
3
+ $color-warning: #ff9800
4
+ $color-notice: #2B5C7F
5
+ $white: #fff
6
+ $font: Helvetica, sans-serif
@@ -1,32 +1,28 @@
1
- $color-sucess: #4CAF50
2
- $color-error: #f44336
3
- $color-warning: #ff9800
4
- $color-notice: #2196F3
5
- $font: sans-serif
1
+ @import "puffly-colors"
6
2
 
7
- #notification
3
+ #puffly
8
4
  display: none
9
5
  position: fixed
10
6
  min-width: 5%
11
7
  max-width: 15%
12
- text-align: justify
8
+ text-align: left
13
9
  left: 80%
14
- top: 75%
10
+ bottom: 5%
15
11
  z-index: 0
16
12
  font-size: 1rem
17
- color: white
18
- padding: 15px
19
- opacity: 0.75
13
+ color: $white
14
+ padding: 15px 20px
15
+ opacity: 0.7
20
16
  font-family: $font
21
17
 
22
- #notification.success
18
+ #puffly.success
23
19
  background-color: $color-sucess
24
20
 
25
- #notification.error
21
+ #puffly.error
26
22
  background-color: $color-error
27
23
 
28
- #notification.warning
24
+ #puffly.warning
29
25
  background-color: $color-warning
30
26
 
31
- #notification.notice
27
+ #puffly.notice
32
28
  background-color: $color-notice
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puffly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rodríguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2016-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -57,6 +57,7 @@ files:
57
57
  - lib/puffly/version.rb
58
58
  - puffly.gemspec
59
59
  - vendor/assets/javascripts/puffly.coffee
60
+ - vendor/assets/stylesheets/_puffy-colors.sass
60
61
  - vendor/assets/stylesheets/puffly.sass
61
62
  homepage: https://github.com/kevyder/puffly
62
63
  licenses: