rails-timeago 1.2.0.rc2 → 1.2.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module Rails
4
4
  MAJOR = 1
5
5
  MINOR = 2
6
6
  PATCH = 0
7
- STAGE = 'rc2'
7
+ STAGE = 'rc3'
8
8
 
9
9
  def self.to_s
10
10
  [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join '.'
@@ -3,7 +3,7 @@
3
3
  * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
4
4
  *
5
5
  * @name timeago
6
- * @version 0.11.1
6
+ * @version 0.11.2
7
7
  * @requires jQuery v1.2.3+
8
8
  * @author Ryan McGeary
9
9
  * @license MIT License - http://www.opensource.org/licenses/mit-license.php
@@ -96,10 +96,12 @@
96
96
  return new Date(s);
97
97
  },
98
98
  datetime: function(elem) {
99
- // jQuery's `is()` doesn't play well with HTML5 in IE
100
- var isTime = $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
101
- var iso8601 = isTime ? $(elem).attr("datetime") : $(elem).attr("title");
99
+ var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
102
100
  return $t.parse(iso8601);
101
+ },
102
+ isTime: function(elem) {
103
+ // jQuery's `is()` doesn't play well with HTML5 in IE
104
+ return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
103
105
  }
104
106
  });
105
107
 
@@ -127,7 +129,7 @@
127
129
  if (!element.data("timeago")) {
128
130
  element.data("timeago", { datetime: $t.datetime(element) });
129
131
  var text = $.trim(element.text());
130
- if (text.length > 0) {
132
+ if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
131
133
  element.attr("title", text);
132
134
  }
133
135
  }
@@ -9,9 +9,9 @@ jQuery.timeago.settings.strings = {
9
9
  hours: "%d시간",
10
10
  day: "하루",
11
11
  days: "%d일",
12
- month: "한달",
12
+ month: "한 달",
13
13
  months: "%d달",
14
14
  year: "1년",
15
15
  years: "%d년",
16
- wordSeparator: ""
16
+ wordSeparator: " "
17
17
  };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-timeago
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.rc2
4
+ version: 1.2.0.rc3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-02 00:00:00.000000000 Z
12
+ date: 2012-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &5410740 !ruby/object:Gem::Requirement
16
+ requirement: &4970440 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *5410740
24
+ version_requirements: *4970440
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &5410120 !ruby/object:Gem::Requirement
27
+ requirement: &4969820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *5410120
35
+ version_requirements: *4969820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &5409600 !ruby/object:Gem::Requirement
38
+ requirement: &4969300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *5409600
46
+ version_requirements: *4969300
47
47
  description: jQuery Timeago helper for Rails 3
48
48
  email:
49
49
  - jan.graichen@altimos.de