crouton 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 547d77e7d2b5efcaac506b282fa5572bc0989fd3
4
- data.tar.gz: 81e881ab0ef92b2c4dca9d7fefc209e55dbf7eac
3
+ metadata.gz: 270fa904e61d67d98e3ba458605cd2fa1aae2346
4
+ data.tar.gz: e1318b4373eed18633d0eb3bacc58bb43b50c9b5
5
5
  SHA512:
6
- metadata.gz: c3a8841f50d17158041be5e3dee63697856df8659f9336fe54e1e0a803f4afdb5e848fecd32517825ba573acd9a8f2a0894acad241356534de52281deaaadb47
7
- data.tar.gz: e9e177e8dedf83704121d7a3962b876f82e254215067fc239a2b1535cdb92a2fa86b7db12e5b4f42199d82bfc96a935141c836c0feb94eef6da0f0111cb29462
6
+ metadata.gz: 1ea4c5d62a4800e2fe3e5289a19c0602faa778595a7e743c81e39d883d932f39f7cef869968b2745c725a464c997163782e957ad454903c64e4243569126537f
7
+ data.tar.gz: 95b3789bde8ebf8c9a93f18574059f54ce3e9f249690e293495efd4e8f81744995f445dcf061d1a3a3bf8b266b34f202c80370a3354b095756d1949a6d3887e1
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
- Crouton
1
+ Crouton [![Gem Version](https://badge.fury.io/rb/crouton.svg)](http://badge.fury.io/rb/crouton) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ElMassimo/queryable/blob/master/LICENSE.txt)
2
2
  =====================
3
- [![Gem Version](https://badge.fury.io/rb/crouton.svg)](http://badge.fury.io/rb/crouton)
4
3
 
5
4
  Context sensitive notifications for Rails && XHR.
6
5
 
@@ -17,11 +16,11 @@ Simply require `crouton` in your javascript and css:
17
16
  ```
18
17
 
19
18
  ``` sass
20
- @import crouton
19
+ @import 'crouton';
21
20
  ```
22
21
 
23
- Now, use the `render_crouton` method in your controllers, any option you pass
24
- will be converted to a message, and displayed in the browser.
22
+ Then, use the `render_crouton` method in your controllers, any option you pass
23
+ will be converted to a message.
25
24
 
26
25
  ``` ruby
27
26
  class PostsController < ActionController::Base
@@ -36,6 +35,14 @@ class PostsController < ActionController::Base
36
35
  end
37
36
  ```
38
37
 
38
+ Finally, find a good spot in your HTML for the Crouton, and add the
39
+ `.crouton-placeholder` CSS class in the container of choice.
40
+
41
+ ```html
42
+ <div class="content crouton-placeholder">
43
+ ...
44
+ ```
45
+
39
46
  ## Customization
40
47
  Three styles are supported out of the box: __info__, __warning__ and __danger__.
41
48
  The duration of each message is 1500, 2000 and 3000 respectively.
@@ -52,7 +59,7 @@ You can customize the colours for this three styles by defining the following SA
52
59
  You can also create your custom messages:
53
60
 
54
61
  ```ruby
55
- render_crouton Crouton::Message.new(:hint, 'You can double tap for more info.', duration: 5000)
62
+ render_crouton Crouton::Message.new(:hint, 'You can double tap for more info.', duration: 5000), placeholder: '.custom-crouton-placeholder'
56
63
  ```
57
64
 
58
65
  License
data/crouton.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "crouton"
6
- s.version = '0.1.0'
6
+ s.version = '0.1.1'
7
7
  s.description = "Context sensitive notifications for Rails."
8
8
  s.summary = "Context sensitive notifications for Rails, the name and idea originated in a blog article written by Cyril Mottier on Android notifications."
9
9
  s.licenses = ['MIT']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crouton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2015-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -96,7 +96,7 @@ files:
96
96
  - app/views/crouton/_message.html.erb
97
97
  - crouton.gemspec
98
98
  - lib/assets/javascripts/crouton.js
99
- - lib/assets/stylesheets/crouton.css.scss
99
+ - lib/assets/stylesheets/crouton.scss
100
100
  - lib/crouton.rb
101
101
  - lib/crouton/crouton.rb
102
102
  - lib/crouton/message.rb
@@ -122,10 +122,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.2.2
125
+ rubygems_version: 2.4.3
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Context sensitive notifications for Rails, the name and idea originated in
129
129
  a blog article written by Cyril Mottier on Android notifications.
130
130
  test_files: []
131
- has_rdoc: