chronic_ping 0.3.0 → 0.3.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: a7ef30a52fd5e6ac7e45d031a475d61a4a56c542
4
- data.tar.gz: 3c635924d910005d98219772f42bfc9bfcedce4f
3
+ metadata.gz: 99264f302680c552343a1f7e59068f37dc455064
4
+ data.tar.gz: c4ea59c1ffe1e553d5c0aed3ca8eeebc0ccb1dde
5
5
  SHA512:
6
- metadata.gz: 8da49042ec359c492c78bbe5d665b9f3bafcf7ecd84ff4499ed2888e46c226f4dfcb7258649838f2199de9bb9df0358f07bc350c6fc54cd5cf79165c2bc7951f
7
- data.tar.gz: 2a75c329caf41d2523101ae15dfbe6cae374b78393c8b03a6a38ff8cf2ba7f9b132ca35e6898c470216ff4b7c6f2c31d301f281f5e34dd9072b84cedc428be78
6
+ metadata.gz: 538604098f5c09149e0b7e37dc87b382d0c8c9e5e8d1d69226ee1dd7b479c11e4586de6339e50045953918fa5148178b377396e8314f8011a51360c861982c0b
7
+ data.tar.gz: 33a7b5f065d708d18724150a435cba5bc936dc6f86397fa92195b1dce5787c7bb6ad4aa536bae0863e51999f724c114801cf36cd5ee996e825eda7cd2441c956
@@ -34,7 +34,7 @@ Customize
34
34
  The following values are already set by default, but if you want to customize them, create a file called `config/initializers/chronic_ping.rb` that should look something like this:
35
35
 
36
36
  ChronicPing.configure do |config|
37
- config.format = {
37
+ config.formats = {
38
38
  default: '%B %d, %Y at %I:%M%p',
39
39
  datetime: '%B %d, %Y at %I:%M%p',
40
40
  date: '%B %d, %Y',
@@ -1,14 +1,25 @@
1
1
  // Place all the behaviors and hooks related to the matching controller here.
2
2
  // All this logic will automatically be available in application.js.
3
3
 
4
- $('.chronic_ping').focusout(function() {
5
- input_field = this
4
+ var parseField = function(input_field) {
6
5
  $.ajax({
7
6
  type: "POST",
8
7
  url: "<%= ENV['RAILS_RELATIVE_URL_ROOT'] %>/chronic_ping/parse",
9
- data: { q: this.value, f: $(this).data('format') },
8
+ data: { q: input_field.value, f: $(input_field).data('format') },
10
9
  dataType: "json"
11
10
  }).done(function( msg ) {
12
11
  input_field.value = msg.response;
13
12
  });
13
+ }
14
+
15
+ $('.chronic_ping').change(function() {
16
+ parseField(this);
17
+ });
18
+
19
+ $('.chronic_ping').keydown(function(e) {
20
+ if (e.keyCode == 13) {
21
+ parseField(this);
22
+ e.preventDefault();
23
+ e.stopPropagation();
24
+ }
14
25
  });
@@ -1,3 +1,3 @@
1
1
  module ChronicPing
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronic_ping
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-01 00:00:00.000000000 Z
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - '>'
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - '>'
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
@@ -63,11 +63,11 @@ files:
63
63
  - app/assets/javascripts/chronic_ping.js.erb
64
64
  - app/controllers/chronic_ping_controller.rb
65
65
  - config/routes.rb
66
- - lib/tasks/chronic_ping_tasks.rake
67
- - lib/chronic_ping.rb
68
- - lib/chronic_ping/version.rb
69
- - lib/chronic_ping/engine.rb
70
66
  - lib/chronic_ping/configuration.rb
67
+ - lib/chronic_ping/engine.rb
68
+ - lib/chronic_ping/version.rb
69
+ - lib/chronic_ping.rb
70
+ - lib/tasks/chronic_ping_tasks.rake
71
71
  - MIT-LICENSE
72
72
  - Rakefile
73
73
  - README.markdown