rails-timeago 2.10.2 → 2.11.0

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: 38553111d1124e813ed48f6024f78f5be18501b7
4
- data.tar.gz: a5d103f68de9da459b6023a12d513dfe1e9b3814
3
+ metadata.gz: 8841a7ca807fb33145adfbb910cb5dbc221bcf3a
4
+ data.tar.gz: 6d730621d28c06a4bf4a3af5dd2080273212b18d
5
5
  SHA512:
6
- metadata.gz: 76067d2dec2d175767b9d6ff197a3ad42116898365aafdab42f65c6033af45a32fdcd4065f1f48274f24f344873912c63a748267d883a777fb485cd8504ee96e
7
- data.tar.gz: e44cc2a67e8c787366dbb1b6e30995381516dd93c92a63cb6cd3e72938640916ad01666fecab93090e198e1fee4aa52510b4339e5a13682f03809714036f135d
6
+ metadata.gz: 62d6118ca83e848201c5c869baa4a6b906206ffa139a6096978ad5042aee612104fd6c32df5ef75aecc7b327452f7b8d6c51e0e6ad5112f69bf5754640f73b02
7
+ data.tar.gz: 144a4839e9a6fdecd2a51efc4b8c2b5e39cb86cb2150f4b170c897e2b07071e35801c0d3f598c7449bb2eb382b8b4a8d6504172e483656d91af735e572374066
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.0
4
- - rbx
5
- - 2.0.0
3
+ - 2.1
4
+ - rbx-2
5
+ - '2.0'
6
6
  - jruby
7
7
  - 1.9.3
8
8
  matrix:
@@ -2,8 +2,8 @@ module Rails
2
2
  module Timeago
3
3
  module VERSION
4
4
  MAJOR = 2
5
- MINOR = 10
6
- PATCH = 2
5
+ MINOR = 11
6
+ PATCH = 0
7
7
  STAGE = nil
8
8
 
9
9
  def self.to_s
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
-
1
+ require 'active_support'
2
2
  require 'active_support/core_ext'
3
3
  require File.dirname(__FILE__) + '/../lib/rails-timeago.rb'
4
4
  require File.dirname(__FILE__) + '/support/stub.rb'
@@ -1,18 +1,24 @@
1
1
  // Czech
2
- jQuery.timeago.settings.strings["cs"] = {
3
- prefixAgo: "před",
4
- prefixFromNow: null,
5
- suffixAgo: null,
6
- suffixFromNow: null,
7
- seconds: "méně než minutou",
8
- minute: "minutou",
9
- minutes: "%d minutami",
10
- hour: "hodinou",
11
- hours: "%d hodinami",
12
- day: "1 dnem",
13
- days: "%d dny",
14
- month: "1 měsícem",
15
- months: "%d měsíci",
16
- year: "1 rokem",
17
- years: "%d roky"
18
- };
2
+ (function() {
3
+ function f(n, d, a) {
4
+ return a[d>=0 ? 0 : a.length==2 || n<5 ? 1 : 2];
5
+ }
6
+
7
+ jQuery.timeago.settings.strings["cs"] = {
8
+ prefixAgo: 'před',
9
+ prefixFromNow: 'za',
10
+ suffixAgo: null,
11
+ suffixFromNow: null,
12
+ seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu'])},
13
+ minute: function(n, d) {return f(n, d, ['minutou', 'minutu'])},
14
+ minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut'])},
15
+ hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu'])},
16
+ hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin'])},
17
+ day: function(n, d) {return f(n, d, ['%d dnem', '%d den'])},
18
+ days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní'])},
19
+ month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc'])},
20
+ months: function(n, d) {return f(n, d, ['%d měsící', '%d měsíce', '%d měsíců'])},
21
+ year: function(n, d) {return f(n, d, ['%d rokem', '%d rok'])},
22
+ years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let'])}
23
+ };
24
+ })();
@@ -39,7 +39,7 @@
39
39
  months: function (value) {
40
40
  return numpf(value, "%d mesec", "%d meseca", "%d meseci");
41
41
  },
42
- year: "pre godinu dana",
42
+ year: "godinu dana",
43
43
  years: function (value) {
44
44
  return numpf(value, "%d godinu", "%d godine", "%d godina");
45
45
  },
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.2
4
+ version: 2.11.0
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-05-13 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -149,4 +149,3 @@ signing_key:
149
149
  specification_version: 4
150
150
  summary: A Rails Helper to create time tags usable for jQuery Timeago plugin
151
151
  test_files: []
152
- has_rdoc: