chronic_ping 0.3.0 → 0.3.1
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 +4 -4
- data/README.markdown +1 -1
- data/app/assets/javascripts/chronic_ping.js.erb +14 -3
- data/lib/chronic_ping/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99264f302680c552343a1f7e59068f37dc455064
|
4
|
+
data.tar.gz: c4ea59c1ffe1e553d5c0aed3ca8eeebc0ccb1dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 538604098f5c09149e0b7e37dc87b382d0c8c9e5e8d1d69226ee1dd7b479c11e4586de6339e50045953918fa5148178b377396e8314f8011a51360c861982c0b
|
7
|
+
data.tar.gz: 33a7b5f065d708d18724150a435cba5bc936dc6f86397fa92195b1dce5787c7bb6ad4aa536bae0863e51999f724c114801cf36cd5ee996e825eda7cd2441c956
|
data/README.markdown
CHANGED
@@ -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.
|
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
|
-
|
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:
|
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
|
});
|
data/lib/chronic_ping/version.rb
CHANGED
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.
|
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-
|
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
|