pagy 2.1.2 → 2.1.3

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
  SHA256:
3
- metadata.gz: cb2ad8b0a66d5a1d73d3e9424e7cf24982bd8afe30a19d9ecb4b128900045785
4
- data.tar.gz: 185999aba7ea86b9db281ea40895c73825db1468800b64f27bdae7490a7e789e
3
+ metadata.gz: 52910775222a48757dc11693abdddf545286075c466c1df557cb37cf14374099
4
+ data.tar.gz: 61c3495ce8cebbd44f9bf77e9ccb722aec0967523909b5543754561318cebf42
5
5
  SHA512:
6
- metadata.gz: fe5a44fb9a9f0c6d6ea55cfa1ac88af5001ef9fbdb9b6093a63c8d1ab70f4cde3d38c451d9ea8d697c077a02e339d20e901fd80dd51d0d7b9fde508c0841f071
7
- data.tar.gz: b3e76636525450e4dcb91abd60db0c466cdeae202b5590a2238adb55aa60df53646b75d958251c1428bccc4e171011a288500f61a7b787a442d9addff0937e25
6
+ metadata.gz: 3c521f55be0d8177cfd4b3c7235b2f79ebd888033f0018fa4031f59e731340560ea744b2a952203256cce7e0c8cff40a3b4c6279840a3dad3ff5c18696bcfeec
7
+ data.tar.gz: e8c836e90b051c9330c1771e1b31bc82ca40e672bb379e89d6c58d8953429b8818e1f08f2704ce5cb8fc94a3468631a0a0c8d83bdc0de284775bfa5c8c427e06
data/lib/config/pagy.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- # Pagy initializer file
4
+ # Pagy initializer file (v2.1.3)
5
5
  # Customize only what you really need and notice that Pagy works also without any of the following lines.
6
6
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
7
7
 
@@ -0,0 +1,20 @@
1
+ se:
2
+ pagy:
3
+ nav:
4
+ prev: "‹ Föregående"
5
+ next: "Nästa ›"
6
+ gap: "…"
7
+ info:
8
+ single_page:
9
+ zero: "Inga %{item_name} hittade"
10
+ one: "Visar <b>1</b> %{item_name}"
11
+ other: "Visar <b>alla %{count}</b> %{item_name}"
12
+ multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
13
+ item_name:
14
+ zero: "resultat"
15
+ one: "resultat"
16
+ other: "resultat"
17
+ compact: "Sida %{page_input} av %{pages}"
18
+ items:
19
+ one: "Visa %{items_input} resultat per sida"
20
+ other: "Visa %{items_input} resultat per sida"
data/lib/pagy.rb CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  require 'pathname'
6
6
 
7
- class Pagy ; VERSION = '2.1.2'
7
+ class Pagy ; VERSION = '2.1.3'
8
8
 
9
9
  class OverflowError < StandardError; attr_reader :pagy; def initialize(pagy) @pagy = pagy end; end
10
10
 
@@ -44,7 +44,7 @@ class Pagy ; VERSION = '2.1.2'
44
44
  else series.push(a, :gap) # n page gap -> add :gap
45
45
  end # skip the end boundary (last+1)
46
46
  end # shift the start boundary (0) and
47
- series.tap{|s| s.shift; s[s.index(@page)] = @page.to_s} # convert the current page to String
47
+ series.shift; series[series.index(@page)] = @page.to_s; series # convert the current page to String
48
48
  end
49
49
 
50
50
  end
data/lib/pagy/frontend.rb CHANGED
@@ -27,7 +27,7 @@ class Pagy
27
27
 
28
28
  include Helpers
29
29
 
30
- # We use EMPTY + 'whatever' that is almost as fast as +'whatever' but is also 1.9 compatible
30
+ # EMPTY + 'string' is almost as fast as +'string' but is also 1.9 compatible
31
31
  EMPTY = ''
32
32
 
33
33
  # Generic pagination: it returns the html with the series of links to the pages
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-15 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
14
14
  and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
@@ -32,6 +32,7 @@ files:
32
32
  - lib/locales/nl.yml
33
33
  - lib/locales/pt-br.yml
34
34
  - lib/locales/ru.yml
35
+ - lib/locales/se.yml
35
36
  - lib/locales/tr.yml
36
37
  - lib/locales/utils/i18n.rb
37
38
  - lib/locales/utils/loader.rb