autosize-rails 1.18.4 → 1.18.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d75b0e47370e822905a556f8ef790571f42378a
4
- data.tar.gz: b6c68179bd7dd0377234ccbd8c49229b2910b868
3
+ metadata.gz: 6321574b79af5e01dfcd3282bf575bd92745ddab
4
+ data.tar.gz: 416b719a653054c3fe3b119706e66b52d84601a6
5
5
  SHA512:
6
- metadata.gz: f9ae2ee9c44334a9c3ec6e823c05eaef22e13c2b80fc8162a76c61b27e32f1cfbaef6ac4710a3cfb066eb59f527df4572c8d1be32d3927ad4bf4a487445324a9
7
- data.tar.gz: 6ecb5613567af78815c9643ad6aec6e1ea56e65cefe1d99bf80cbf70e10718e44d2f9422bb1a8ca06f8e8561277d120e1c68cfe282636d9c1370222b8b7a5e70
6
+ metadata.gz: 5251ab29df5b786c923e8d1c8cef73332c4c4bc78595c0f76f66dd73435dcf50a8205dfa1850a74a57d0c0cfe194f0f68cf459fcf365660e76e03a02df8a0c52
7
+ data.tar.gz: 15f512b7173425ee86a67040869449cb07c2f38a9e43f99b15615143b1fded1a59a7a0bfa0fd79c11c8acda31ebd707ee0baf0acae3afeff5f09448d228d2dbb
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Autosize::Rails
2
2
 
3
- TODO: Write a gem description
3
+ This gem packages `jquery-autosize` plugin for jQuery for the Rails 3.1+ asset pipeline.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,9 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ $(document).ready(function(){
22
+ $('textarea').autosize();
23
+ });
22
24
 
23
25
  ## Contributing
24
26
 
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ task :update do
17
17
  resp = http.get(upstream_location)
18
18
  File.open(file_location, 'w') { |file| file.write(resp.body) }
19
19
  end
20
- puts "Please bump the version.rv, commit and open a pull request with the new version. (#{latest_tag['name']})"
20
+ puts "Please bump the version.rb, commit and open a pull request with the new version. (#{latest_tag['name']})"
21
21
  else
22
22
  puts "Already up to date. (#{latest_tag['name']})"
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module Autosize
2
2
  module Rails
3
- VERSION = "1.18.4"
3
+ VERSION = "1.18.6"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Autosize v1.18.4 - 2014-01-11
2
+ Autosize v1.18.6 - 2014-03-13
3
3
  Automatically adjust textarea height based on user input.
4
4
  (c) 2014 Jack Moore - http://www.jacklmoore.com/autosize
5
5
  license: http://www.opensource.org/licenses/mit-license.php
@@ -8,6 +8,7 @@
8
8
  var
9
9
  defaults = {
10
10
  className: 'autosizejs',
11
+ id: 'autosizejs',
11
12
  append: '',
12
13
  callback: false,
13
14
  resizeDelay: 10,
@@ -120,6 +121,7 @@
120
121
 
121
122
  mirrored = ta;
122
123
  mirror.className = options.className;
124
+ mirror.id = options.id;
123
125
  maxHeight = parseInt($ta.css('maxHeight'), 10);
124
126
 
125
127
  // mirror is a duplicate textarea located off-screen that
@@ -130,7 +132,8 @@
130
132
  $.each(typographyStyles, function(i,val){
131
133
  styles[val] = $ta.css(val);
132
134
  });
133
- $(mirror).css(styles);
135
+
136
+ $(mirror).css(styles).attr('wrap', $ta.attr('wrap'));
134
137
 
135
138
  setWidth();
136
139
 
@@ -160,7 +163,7 @@
160
163
  // If the textarea is empty, copy the placeholder text into
161
164
  // the mirror control and use that for sizing so that we
162
165
  // don't end up with placeholder getting trimmed.
163
- mirror.value = ($(ta).attr("placeholder") || '') + options.append;
166
+ mirror.value = ($ta.attr("placeholder") || '') + options.append;
164
167
  } else {
165
168
  mirror.value = ta.value + options.append;
166
169
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autosize-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.4
4
+ version: 1.18.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -89,9 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.2.1
92
+ rubygems_version: 2.2.2
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: A plugin to enable automatic height for textarea elements.
96
96
  test_files: []
97
- has_rdoc: