rails-timeago 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rails-timeago.gemspec
4
4
  gemspec
5
+
6
+ group :development do
7
+ gem "rake"
8
+ end
data/README.md CHANGED
@@ -66,7 +66,7 @@ String that will be returned if time is nil.
66
66
 
67
67
  **title**
68
68
  A string or block that will be used to create a title attribute for timeago tags. It set to nil or false no title attribute will be set.
69
- (default: proc { |time, options| I18n.l time, :format => options[:format] })
69
+ (default: `proc { |time, options| I18n.l time, :format => options[:format] }`)
70
70
 
71
71
  All other options will be given as options to the time tag helper.
72
72
  The above options can be assigned globally as defaults using
data/Rakefile CHANGED
@@ -1,2 +1,7 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
@@ -12,6 +12,7 @@
12
12
  //= require locales/jquery.timeago.es.js
13
13
  //= require locales/jquery.timeago.uk.js
14
14
  //= require locales/jquery.timeago.zh-TW.js
15
+ //= require locales/jquery.timeago.sk.js
15
16
  //= require locales/jquery.timeago.hy.js
16
17
  //= require locales/jquery.timeago.ca.js
17
18
  //= require locales/jquery.timeago.pt.js
@@ -33,6 +34,8 @@
33
34
  //= require locales/jquery.timeago.hr.js
34
35
  //= require locales/jquery.timeago.ru.js
35
36
  //= require locales/jquery.timeago.nl.js
37
+ //= require locales/jquery.timeago.fr-short.js
36
38
  //= require locales/jquery.timeago.da.js
37
39
  //= require locales/jquery.timeago.ja.js
38
40
  //= require locales/jquery.timeago.ro.js
41
+ //= require locales/jquery.timeago.th.js
@@ -3,7 +3,7 @@ module Rails
3
3
  module VERSION
4
4
  MAJOR = 2
5
5
  MINOR = 1
6
- PATCH = 0
6
+ PATCH = 1
7
7
  STAGE = nil
8
8
 
9
9
  def self.to_s
@@ -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.4
6
+ * @version 1.0.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
@@ -11,9 +11,18 @@
11
11
  * For usage and examples, visit:
12
12
  * http://timeago.yarp.com/
13
13
  *
14
- * Copyright (c) 2008-2012, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
14
+ * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
15
15
  */
16
- (function($) {
16
+
17
+ (function (factory) {
18
+ if (typeof define === 'function' && define.amd) {
19
+ // AMD. Register as an anonymous module.
20
+ define(['jquery'], factory);
21
+ } else {
22
+ // Browser globals
23
+ factory(jQuery);
24
+ }
25
+ }(function ($) {
17
26
  $.timeago = function(timestamp) {
18
27
  if (timestamp instanceof Date) {
19
28
  return inWords(timestamp);
@@ -87,7 +96,8 @@
87
96
  years < 1.5 && substitute($l.year, 1) ||
88
97
  substitute($l.years, Math.round(years));
89
98
 
90
- var separator = $l.wordSeparator === undefined ? " " : $l.wordSeparator;
99
+ var separator = $l.wordSeparator || "";
100
+ if ($l.wordSeparator === undefined) { separator = " "; }
91
101
  return $.trim([prefix, words, suffix].join(separator));
92
102
  },
93
103
  parse: function(iso8601) {
@@ -150,4 +160,4 @@
150
160
  // fix for IE6 suckage
151
161
  document.createElement("abbr");
152
162
  document.createElement("time");
153
- }(jQuery));
163
+ }));
@@ -0,0 +1,16 @@
1
+ // French shortened
2
+ jQuery.timeago.settings.strings["fr-short"] = {
3
+ prefixAgo: "il y a",
4
+ prefixFromNow: "d'ici",
5
+ seconds: "moins d'une minute",
6
+ minute: "une minute",
7
+ minutes: "%d minutes",
8
+ hour: "une heure",
9
+ hours: "%d heures",
10
+ day: "un jour",
11
+ days: "%d jours",
12
+ month: "un mois",
13
+ months: "%d mois",
14
+ year: "un an",
15
+ years: "%d ans"
16
+ };
@@ -13,7 +13,7 @@ jQuery.timeago.settings.strings["ja"] = {
13
13
  days: "%d 日ほど",
14
14
  month: "大体一ヶ月",
15
15
  months: "%d ヶ月ほど",
16
- year: "丁度一年(虎舞流w)",
16
+ year: "1年前",
17
17
  years: "%d 年",
18
18
  wordSeparator: ""
19
19
  };
@@ -0,0 +1,18 @@
1
+ // Slovak
2
+ jQuery.timeago.settings.strings["sk"] = {
3
+ prefixAgo: "pred",
4
+ prefixFromNow: null,
5
+ suffixAgo: null,
6
+ suffixFromNow: null,
7
+ seconds: "menej než minútou",
8
+ minute: "minútou",
9
+ minutes: "%d minútami",
10
+ hour: "hodinou",
11
+ hours: "%d hodinami",
12
+ day: "1 dňom",
13
+ days: "%d dňami",
14
+ month: "1 mesiacom",
15
+ months: "%d mesiacmi",
16
+ year: "1 rokom",
17
+ years: "%d rokmi"
18
+ };
@@ -0,0 +1,20 @@
1
+ // Thai
2
+ jQuery.timeago.settings.strings["th"] = {
3
+ prefixAgo: null,
4
+ prefixFromNow: null,
5
+ suffixAgo: "ที่แล้ว",
6
+ suffixFromNow: "จากตอนนี้",
7
+ seconds: "น้อยกว่าหนึ่งนาที",
8
+ minute: "ประมาณหนึ่งนาที",
9
+ minutes: "%d นาที",
10
+ hour: "ประมาณหนึ่งชั่วโมง",
11
+ hours: "ประมาณ %d ชั่วโมง",
12
+ day: "หนึ่งวัน",
13
+ days: "%d วัน",
14
+ month: "ประมาณหนึ่งเดือน",
15
+ months: "%d เดือน",
16
+ year: "ประมาณหนึ่งปี",
17
+ years: "%d ปี",
18
+ wordSeparator: "",
19
+ numbers: []
20
+ };
@@ -8,13 +8,13 @@ jQuery.timeago.settings.strings["zh-TW"] = {
8
8
  minute: "大約 1 分鐘",
9
9
  minutes: "%d 分鐘",
10
10
  hour: "大約 1 小時",
11
- hours: "大約 %d 小時",
12
- day: "1 天",
11
+ hours: "%d 小時",
12
+ day: "大約 1 天",
13
13
  days: "%d 天",
14
14
  month: "大約 1 個月",
15
- months: "%d ",
15
+ months: "%d 個月",
16
16
  year: "大約 1 年",
17
17
  years: "%d 年",
18
18
  numbers: [],
19
19
  wordSeparator: ""
20
- };
20
+ };
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: 2.1.0
4
+ version: 2.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -94,6 +94,7 @@ files:
94
94
  - vendor/assets/javascripts/locales/jquery.timeago.es.js
95
95
  - vendor/assets/javascripts/locales/jquery.timeago.fa.js
96
96
  - vendor/assets/javascripts/locales/jquery.timeago.fi.js
97
+ - vendor/assets/javascripts/locales/jquery.timeago.fr-short.js
97
98
  - vendor/assets/javascripts/locales/jquery.timeago.fr.js
98
99
  - vendor/assets/javascripts/locales/jquery.timeago.he.js
99
100
  - vendor/assets/javascripts/locales/jquery.timeago.hr.js
@@ -111,7 +112,9 @@ files:
111
112
  - vendor/assets/javascripts/locales/jquery.timeago.pt.js
112
113
  - vendor/assets/javascripts/locales/jquery.timeago.ro.js
113
114
  - vendor/assets/javascripts/locales/jquery.timeago.ru.js
115
+ - vendor/assets/javascripts/locales/jquery.timeago.sk.js
114
116
  - vendor/assets/javascripts/locales/jquery.timeago.sv.js
117
+ - vendor/assets/javascripts/locales/jquery.timeago.th.js
115
118
  - vendor/assets/javascripts/locales/jquery.timeago.tr.js
116
119
  - vendor/assets/javascripts/locales/jquery.timeago.uk.js
117
120
  - vendor/assets/javascripts/locales/jquery.timeago.uz.js
@@ -129,17 +132,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
132
  - - ! '>='
130
133
  - !ruby/object:Gem::Version
131
134
  version: '0'
135
+ segments:
136
+ - 0
137
+ hash: 804248579506933132
132
138
  required_rubygems_version: !ruby/object:Gem::Requirement
133
139
  none: false
134
140
  requirements:
135
141
  - - ! '>='
136
142
  - !ruby/object:Gem::Version
137
143
  version: '0'
144
+ segments:
145
+ - 0
146
+ hash: 804248579506933132
138
147
  requirements: []
139
148
  rubyforge_project:
140
- rubygems_version: 1.8.24
149
+ rubygems_version: 1.8.25
141
150
  signing_key:
142
151
  specification_version: 3
143
152
  summary: A Rails Helper to create time tags usable for jQuery Timeago plugin
144
153
  test_files: []
145
- has_rdoc: