maj-text-counter-rails 0.0.15 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDVmZTIwOTZmZmY3OTgwMzc3MTFkNmQ4OWUyODEwZTI2NDJjMDY2Zg==
4
+ ZGM1MDQ1ODg1ODZkMmVmMThjZDhlYWJhZDY4YzI2OWY4ZDFjNWZlNA==
5
5
  data.tar.gz: !binary |-
6
- YWMxMDBjOWYzODVhYjNlZjdkYWQ5YjVkMDFjMmZlOGJkM2M4Yzk1NA==
6
+ YjBjNDYyYjM3MWNmYjdmMjE2MmQ5ZDFmYTAxNmU5MTdmMzljNTNmNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTE5M2ZiNWI0MzVhYmMzMDhiNDQ2OTNiOTNiNTU3ZGM1NTVkYzQ4NmNlN2Mz
10
- YTA0OWJjNjY2MDQ5NzM2OGU2MGZiYmUwNmI0MThlN2U5Yzg3ZTFhZGFiZjhh
11
- ZDRkOWY0NmNjNWMwZjBiYTExODNmMzBmZGU3ZTQ2MjUxNGI4ZjI=
9
+ NzM5ZWFhYjhmNjRmZjAyNjgzZjJjMjY1MmNkYTg0NDJiZmNmNGViNTVlNGVj
10
+ ZDg1NDMxYzkzN2MxMWNhYzFlODJiMmYzNTQyODkxZTY3MTRmY2I0Zjg3ZTFl
11
+ YzhkMmZiZjBkZGMxZDNlMDUzZDc4NzRlYjEwOWE5NzU4YTViN2Q=
12
12
  data.tar.gz: !binary |-
13
- MjEwMTg5MWQ3NGRiZjE5ODM2MjcyZDRiZDQxYjI1NWMwNmZhYjc0N2ZiZGY4
14
- N2RlMzgyOTc5ZTM5NzA4MmM4ZGJjNWZjZGYwYjJlNzUzM2U4NDQ4YzdmYzJi
15
- NzVhMTkwZjhkYWJkZmNmMzI5N2E4Nzc4NTMzOGEzNWI1N2VhOTQ=
13
+ YjJlZTExZWQ5ZGNhNDNkNGJjN2Y4OTMwMzBlYjhlZjlkNTFmYjFjNDk3ODRh
14
+ YTE4ZDYyNTM0YTBiN2E4NWYxZDFiMjg5ZGI2ZTkxZDM1YjNiMjU5NDQ5ZWEw
15
+ MTMyMTQwNjZjOWFiZDM2OTY4MGNiZDkwN2I0NmFjYmIxMTZiYzE=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maj-text-counter-rails (0.0.15)
4
+ maj-text-counter-rails (1.0.0)
5
5
  coffee-rails (~> 4.0)
6
6
  compass-rails (~> 2.0)
7
7
  railties (~> 4.0)
@@ -38,7 +38,7 @@ GEM
38
38
  tzinfo (~> 1.1)
39
39
  arel (5.0.1.20140414130214)
40
40
  builder (3.2.2)
41
- chunky_png (1.3.2)
41
+ chunky_png (1.3.3)
42
42
  coffee-rails (4.0.1)
43
43
  coffee-script (>= 2.2.0)
44
44
  railties (>= 4.0.0, < 5.0)
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Administrator
1
+ Copyright (c) 2014 Miseajour.net
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,24 +1,65 @@
1
- # MajTextCounter::Rails
1
+ # MajTextCounter for rails asset pipeline
2
2
 
3
- TODO: Write a gem description
3
+ [MajTextCounter](https://github.com/supernini/majTextCounter) is a library for counting and limiting characters/words on text input, or textarea, elements (using .val()).
4
+
5
+ The `maj-text-counter-rails` gem integrates the `MajTextCounter` with the Rails asset pipeline.
4
6
 
5
7
  ## Installation
6
8
 
7
- Add this line to your application's Gemfile:
9
+ Include `chosen-rails` in Gemefile
10
+
11
+ ```rb
12
+ gem 'majTextCounter-rails'
13
+ ```
8
14
 
9
- gem 'majTextCounter-rails'
15
+ Then run `bundle install`
10
16
 
11
- And then execute:
17
+ ## Usage
12
18
 
13
- $ bundle
19
+ Add to your `app/assets/javascripts/application.js` if use with jQuery
14
20
 
15
- Or install it yourself as:
21
+ ```coffee
22
+ //= require maj-text-counter
23
+ ```
16
24
 
17
- $ gem install majTextCounter-rails
25
+ Add to your `app/assets/stylesheets/application.css`
18
26
 
19
- ## Usage
27
+ ```scss
28
+ *= require maj-text-counter
29
+ ```
30
+
31
+ Basic usage:
32
+
33
+ ```javascript
34
+ $('input').majTextCounter();
35
+ ```
36
+
37
+ Limit to a maximum words count:
20
38
 
21
- TODO: Write usage instructions here
39
+ ```javascript
40
+ $('input').majTextCounter({
41
+ wordLimit: 10,
42
+ });
43
+ ```
44
+
45
+ Limit to a maximum caracters count:
46
+
47
+ ```javascript
48
+ $('input').majTextCounter({
49
+ carLimit: 10,
50
+ });
51
+ ```
52
+
53
+ Speak french ?:
54
+
55
+ ```javascript
56
+ $('input').majTextCounter({
57
+ words: "mots",
58
+ letters: "lettres",
59
+ separator: " & ",
60
+ maximum: "MAX :",
61
+ });
62
+ ```
22
63
 
23
64
  ## Contributing
24
65
 
@@ -27,3 +68,8 @@ TODO: Write usage instructions here
27
68
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
69
  4. Push to the branch (`git push origin my-new-feature`)
29
70
  5. Create new Pull Request
71
+
72
+
73
+ ## Authors
74
+
75
+ [miseajour.net](http://www.miseajour.net)
@@ -1,5 +1,5 @@
1
1
  module MajTextCounter
2
2
  module Rails
3
- VERSION = "0.0.15"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -65,7 +65,4 @@ $.fn.extend
65
65
  return
66
66
 
67
67
  return @each ()->
68
- generateContent this
69
-
70
- $ ->
71
- $(".text-counter").majTextCounter { wordLimit: 3}
68
+ generateContent this
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maj-text-counter-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Supernini
@@ -122,7 +122,6 @@ files:
122
122
  - README.md
123
123
  - Rakefile
124
124
  - lib/maj-text-counter-rails.rb
125
- - lib/maj-text-counter-rails/engine.rb
126
125
  - lib/maj-text-counter-rails/version.rb
127
126
  - maj-text-counter-rails-0.0.2.gem
128
127
  - maj-text-counter-rails.gemspec
@@ -1,9 +0,0 @@
1
- module MajTextCounter
2
- module Rails
3
- class Engine < ::Rails::Engine
4
- initializer 'MajTextCounter precompile hook', :group => :all do |app|
5
- app.config.assets.precompile += ['maj-text-counter.coffee' 'test.js']
6
- end
7
- end
8
- end
9
- end