rails-timeago 2.10.1 → 2.10.2
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/CHANGELOG.md +124 -0
- data/README.md +1 -1
- data/Rakefile +38 -0
- data/lib/assets/javascripts/rails-timeago-all.js +1 -0
- data/lib/rails-timeago/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.timeago.js +2 -2
- data/vendor/assets/javascripts/locales/jquery.timeago.es-short.js +20 -0
- data/vendor/assets/javascripts/locales/jquery.timeago.he.js +2 -2
- data/vendor/assets/javascripts/locales/jquery.timeago.ro.js +2 -2
- data/vendor/assets/javascripts/locales/jquery.timeago.tr.js +2 -2
- data/vendor/assets/javascripts/locales/jquery.timeago.zh-CN.js +12 -12
- data/vendor/assets/javascripts/locales/jquery.timeago.zh-TW.js +11 -11
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38553111d1124e813ed48f6024f78f5be18501b7
|
4
|
+
data.tar.gz: a5d103f68de9da459b6023a12d513dfe1e9b3814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76067d2dec2d175767b9d6ff197a3ad42116898365aafdab42f65c6033af45a32fdcd4065f1f48274f24f344873912c63a748267d883a777fb485cd8504ee96e
|
7
|
+
data.tar.gz: e44cc2a67e8c787366dbb1b6e30995381516dd93c92a63cb6cd3e72938640916ad01666fecab93090e198e1fee4aa52510b4339e5a13682f03809714036f135d
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 2.10.2
|
4
|
+
|
5
|
+
* Update jquery-timeago from upstream (1.4.1)
|
6
|
+
|
7
|
+
## 2.10.1
|
8
|
+
|
9
|
+
* Fix localization bug with inPast (#27)
|
10
|
+
|
11
|
+
## 2.10.0
|
12
|
+
|
13
|
+
* Allow future times in limit (#25)
|
14
|
+
|
15
|
+
## 2.9.0
|
16
|
+
|
17
|
+
* Update jquery-timeago from upstream (1.4.0)
|
18
|
+
* Instead of using each use the jquery method on the selector (#23)
|
19
|
+
|
20
|
+
## 2.8.1
|
21
|
+
|
22
|
+
* Update jquery-timeago from upstream (1.3.1)
|
23
|
+
|
24
|
+
## 2.8.0
|
25
|
+
|
26
|
+
* Update jquery-timeago from upstream
|
27
|
+
|
28
|
+
## 2.7.1
|
29
|
+
|
30
|
+
* Fix syntax issue from upstream locale (#22)
|
31
|
+
|
32
|
+
## 2.7.0
|
33
|
+
|
34
|
+
* Update jquery-timeago from upstream
|
35
|
+
|
36
|
+
## 2.6.0
|
37
|
+
|
38
|
+
* Update Timeago with new locales + Fix update script for Mac (#20)
|
39
|
+
* README Markdown code blocks (#19)
|
40
|
+
|
41
|
+
## 2.5.1
|
42
|
+
|
43
|
+
* Add license to gemspec
|
44
|
+
|
45
|
+
## 2.5.0
|
46
|
+
|
47
|
+
* Add rails turbolinks compatibility.
|
48
|
+
|
49
|
+
## 2.4.0
|
50
|
+
|
51
|
+
* Support procs for :format argument (#15)
|
52
|
+
|
53
|
+
## 2.3.0
|
54
|
+
|
55
|
+
* Update jquery-timeago from upstream
|
56
|
+
|
57
|
+
## 2.2.3
|
58
|
+
|
59
|
+
* Respect :limit options for static :nojs conversion. fixed #13
|
60
|
+
|
61
|
+
## 2.2.2
|
62
|
+
|
63
|
+
* Update jquery-timeago from upstream
|
64
|
+
|
65
|
+
## 2.2.1
|
66
|
+
|
67
|
+
* Update jquery-timeago from upstream
|
68
|
+
|
69
|
+
## 2.2.0
|
70
|
+
|
71
|
+
* Update jquery-timeago from upstream
|
72
|
+
|
73
|
+
## 2.1.1
|
74
|
+
|
75
|
+
* Update jquery-timeago from upstream
|
76
|
+
|
77
|
+
## 2.1.0
|
78
|
+
|
79
|
+
* Add option to set, define a block or disable title attribute.
|
80
|
+
* #10, #9
|
81
|
+
|
82
|
+
## 2.0.0 (beta1)
|
83
|
+
|
84
|
+
* Add i18n patches to jquery-timeago
|
85
|
+
* Update jquery-timeago from upstream
|
86
|
+
|
87
|
+
## 1.4.3
|
88
|
+
|
89
|
+
* Run initializer on asset precompilation as well (#8)
|
90
|
+
|
91
|
+
## 1.4.2
|
92
|
+
|
93
|
+
* Update jquery-timeago from upstream
|
94
|
+
|
95
|
+
## 1.4.1
|
96
|
+
|
97
|
+
* fix precomplie locales empty error (#6)
|
98
|
+
|
99
|
+
## 1.4.0
|
100
|
+
|
101
|
+
* Add support for custom locale file mappings.
|
102
|
+
|
103
|
+
## 1.3.0
|
104
|
+
|
105
|
+
* Locale support
|
106
|
+
|
107
|
+
## 1.2.0 (rc1-rc3)
|
108
|
+
|
109
|
+
* Update jquery-timeago from upstream
|
110
|
+
* Try to style README
|
111
|
+
|
112
|
+
## 1.1.1
|
113
|
+
|
114
|
+
* Fix default string if time is nil
|
115
|
+
|
116
|
+
## 1.1.0
|
117
|
+
|
118
|
+
* Update jquery-timeago from upstream
|
119
|
+
* Add global default options
|
120
|
+
* Add default text if time is nil
|
121
|
+
|
122
|
+
## 1.0.0
|
123
|
+
|
124
|
+
* An apple fell down
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -5,3 +5,41 @@ require 'rspec/core/rake_task'
|
|
5
5
|
RSpec::Core::RakeTask.new(:spec)
|
6
6
|
|
7
7
|
task :default => :spec
|
8
|
+
|
9
|
+
desc 'Update jquery-timeago from upstream'
|
10
|
+
task :update do
|
11
|
+
puts "Clone repository.."
|
12
|
+
puts `mkdir ./tmp`
|
13
|
+
puts `git clone https://github.com/rmm5t/jquery-timeago.git ./tmp`
|
14
|
+
|
15
|
+
puts "Patch jquery timeago..."
|
16
|
+
puts `cd ./tmp && patch -p1 < ../scripts/jquery.timeago.js.patch`
|
17
|
+
|
18
|
+
print 'Patch locale files ... '
|
19
|
+
`rm ./tmp/locales/jquery.timeago.en.js`
|
20
|
+
|
21
|
+
is_mac = RUBY_PLATFORM.downcase.include?("darwin")
|
22
|
+
|
23
|
+
Dir["./tmp/locales/*.js"].each do |file|
|
24
|
+
if file =~ /jquery\.timeago\.(.+)\.js$/
|
25
|
+
`sed -i#{(is_mac)? " ''": nil} "s/timeago.settings.strings/timeago.settings.strings[\\"#{$1}\\"]/" #{file}`
|
26
|
+
print "#{$1} "
|
27
|
+
end
|
28
|
+
end
|
29
|
+
puts
|
30
|
+
|
31
|
+
puts "Copying asset files..."
|
32
|
+
puts `cp ./tmp/jquery.timeago.js ./vendor/assets/javascripts/`
|
33
|
+
puts `rm ./vendor/assets/javascripts/locales/*`
|
34
|
+
puts `cp ./tmp/locales/*.js ./vendor/assets/javascripts/locales`
|
35
|
+
|
36
|
+
puts "Generate rails-timeago-all.js..."
|
37
|
+
`echo "// Rails timeago bootstrap with all locales" > ./lib/assets/javascripts/rails-timeago-all.js`
|
38
|
+
`echo "//= require rails-timeago" >> ./lib/assets/javascripts/rails-timeago-all.js`
|
39
|
+
Dir["./vendor/assets/javascripts/locales/*.js"].sort.each do |file|
|
40
|
+
`echo "//= require locales/#{File.basename(file)}" >> ./lib/assets/javascripts/rails-timeago-all.js`
|
41
|
+
end
|
42
|
+
|
43
|
+
puts "Clean up..."
|
44
|
+
puts `rm -rf ./tmp`
|
45
|
+
end
|
@@ -10,6 +10,7 @@
|
|
10
10
|
//= require locales/jquery.timeago.de.js
|
11
11
|
//= require locales/jquery.timeago.el.js
|
12
12
|
//= require locales/jquery.timeago.en-short.js
|
13
|
+
//= require locales/jquery.timeago.es-short.js
|
13
14
|
//= require locales/jquery.timeago.es.js
|
14
15
|
//= require locales/jquery.timeago.et.js
|
15
16
|
//= require locales/jquery.timeago.fa.js
|
@@ -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 1.4.
|
6
|
+
* @version 1.4.1
|
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
|
@@ -182,7 +182,7 @@
|
|
182
182
|
var $s = $t.settings;
|
183
183
|
|
184
184
|
if (!isNaN(data.datetime)) {
|
185
|
-
if ( $s.cutoff == 0 || distance(data.datetime) < $s.cutoff) {
|
185
|
+
if ( $s.cutoff == 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
|
186
186
|
$(this).text(inWords(data.datetime, ($(this).attr('lang')) ? $(this).attr('lang') : $t.settings.lang));
|
187
187
|
}
|
188
188
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// Spanish shortened
|
2
|
+
jQuery.timeago.settings.strings["es-short"] = {
|
3
|
+
prefixAgo: null,
|
4
|
+
prefixFromNow: null,
|
5
|
+
suffixAgo: "",
|
6
|
+
suffixFromNow: "",
|
7
|
+
seconds: "1m",
|
8
|
+
minute: "1m",
|
9
|
+
minutes: "%dm",
|
10
|
+
hour: "1h",
|
11
|
+
hours: "%dh",
|
12
|
+
day: "1d",
|
13
|
+
days: "%dd",
|
14
|
+
month: "1me",
|
15
|
+
months: "%dme",
|
16
|
+
year: "1a",
|
17
|
+
years: "%da",
|
18
|
+
wordSeparator: " ",
|
19
|
+
numbers: []
|
20
|
+
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// Hebrew
|
2
2
|
jQuery.timeago.settings.strings["he"] = {
|
3
3
|
prefixAgo: "לפני",
|
4
|
-
prefixFromNow: "
|
4
|
+
prefixFromNow: "עוד",
|
5
5
|
suffixAgo: "",
|
6
6
|
suffixFromNow: "",
|
7
7
|
seconds: "פחות מדקה",
|
@@ -15,4 +15,4 @@ jQuery.timeago.settings.strings["he"] = {
|
|
15
15
|
months: "%d חודשים",
|
16
16
|
year: "שנה",
|
17
17
|
years: "%d שנים"
|
18
|
-
};
|
18
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Romanian
|
2
|
-
|
2
|
+
jQuery.timeago.settings.strings["ro"] = {
|
3
3
|
prefixAgo: "acum",
|
4
4
|
prefixFromNow: "in timp de",
|
5
5
|
suffixAgo: "",
|
@@ -15,4 +15,4 @@ $.timeago.settings.strings["ro"] = {
|
|
15
15
|
months: "%d luni",
|
16
16
|
year: "un an",
|
17
17
|
years: "%d ani"
|
18
|
-
};
|
18
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Turkish
|
2
|
-
jQuery.
|
2
|
+
jQuery.timeago.settings.strings["tr"] = {
|
3
3
|
suffixAgo: 'önce',
|
4
4
|
suffixFromNow: null,
|
5
5
|
seconds: '1 dakikadan',
|
@@ -13,4 +13,4 @@ jQuery.extend($.timeago.settings.strings["tr"], {
|
|
13
13
|
months: '%d ay',
|
14
14
|
year: '1 yıl',
|
15
15
|
years: '%d yıl'
|
16
|
-
}
|
16
|
+
};
|
@@ -4,17 +4,17 @@ jQuery.timeago.settings.strings["zh-CN"] = {
|
|
4
4
|
prefixFromNow: "从现在开始",
|
5
5
|
suffixAgo: "之前",
|
6
6
|
suffixFromNow: null,
|
7
|
-
seconds: "不到
|
8
|
-
minute: "大约
|
9
|
-
minutes: "%d
|
10
|
-
hour: "大约
|
11
|
-
hours: "
|
12
|
-
day: "1
|
13
|
-
days: "%d
|
14
|
-
month: "大约
|
15
|
-
months: "%d
|
16
|
-
year: "大约
|
17
|
-
years: "%d
|
7
|
+
seconds: "不到1分钟",
|
8
|
+
minute: "大约1分钟",
|
9
|
+
minutes: "%d分钟",
|
10
|
+
hour: "大约1小时",
|
11
|
+
hours: "大约%d小时",
|
12
|
+
day: "1天",
|
13
|
+
days: "%d天",
|
14
|
+
month: "大约1个月",
|
15
|
+
months: "%d月",
|
16
|
+
year: "大约1年",
|
17
|
+
years: "%d年",
|
18
18
|
numbers: [],
|
19
19
|
wordSeparator: ""
|
20
|
-
};
|
20
|
+
};
|
@@ -4,17 +4,17 @@ jQuery.timeago.settings.strings["zh-TW"] = {
|
|
4
4
|
prefixFromNow: "從現在開始",
|
5
5
|
suffixAgo: "之前",
|
6
6
|
suffixFromNow: null,
|
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
|
7
|
+
seconds: "不到1分鐘",
|
8
|
+
minute: "大約1分鐘",
|
9
|
+
minutes: "%d分鐘",
|
10
|
+
hour: "大約1小時",
|
11
|
+
hours: "%d小時",
|
12
|
+
day: "大約1天",
|
13
|
+
days: "%d天",
|
14
|
+
month: "大約1個月",
|
15
|
+
months: "%d個月",
|
16
|
+
year: "大約1年",
|
17
|
+
years: "%d年",
|
18
18
|
numbers: [],
|
19
19
|
wordSeparator: ""
|
20
20
|
};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-timeago
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- ".travis.yml"
|
64
|
+
- CHANGELOG.md
|
64
65
|
- Gemfile
|
65
66
|
- LICENSE
|
66
67
|
- README.md
|
@@ -85,6 +86,7 @@ files:
|
|
85
86
|
- vendor/assets/javascripts/locales/jquery.timeago.de.js
|
86
87
|
- vendor/assets/javascripts/locales/jquery.timeago.el.js
|
87
88
|
- vendor/assets/javascripts/locales/jquery.timeago.en-short.js
|
89
|
+
- vendor/assets/javascripts/locales/jquery.timeago.es-short.js
|
88
90
|
- vendor/assets/javascripts/locales/jquery.timeago.es.js
|
89
91
|
- vendor/assets/javascripts/locales/jquery.timeago.et.js
|
90
92
|
- vendor/assets/javascripts/locales/jquery.timeago.fa.js
|
@@ -147,3 +149,4 @@ signing_key:
|
|
147
149
|
specification_version: 4
|
148
150
|
summary: A Rails Helper to create time tags usable for jQuery Timeago plugin
|
149
151
|
test_files: []
|
152
|
+
has_rdoc:
|