rocket_pants-pagination 0.1.1 → 0.2.1

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: 90447b7060633aa0cd198397ffa2dc1611d089cd
4
- data.tar.gz: 533cf1193d86837aba62fc4ad605629843f7df22
3
+ metadata.gz: ef0098f446c644254cb53894790bfa8a5842a0fc
4
+ data.tar.gz: d2870ffad776050808b0c793d1f3f55289ebb359
5
5
  SHA512:
6
- metadata.gz: a4c8b848484104ff635dd9b22d0986c3606ac1933b01c80bae169d63f362652bec69417f15d21ce73c3d93b33f99d668e7b9246b901d57f7f748c5ddc8e6f218
7
- data.tar.gz: 43e1478dc87e0852c6398d345861672de0acf820ec9bc8f22fc532e0dd550e7e2ca0735a9f5da2ea33727d0181293c521d6f94b43c5448844507d56ea248b70e
6
+ metadata.gz: baafface1ac12d8904d5a1743af6d4cdd6fdd3295281cb7f9641060779b07a6d229bd686fee03460141ddab2da01a69fea9775670f71d41bb8df1b11bc11d334
7
+ data.tar.gz: f7642485f63caa05a3e78ec164a2e333ead3df2169f1db6b23d4a7f9f5f7b831548e5067e0bfb0b09f02f54a09c743f2349b8b41ec8afce95573bb71c8b322b6
@@ -0,0 +1,53 @@
1
+ module RocketPants
2
+ module Pagination
3
+ module Swagger
4
+ include ::Swagger::Blocks
5
+
6
+ swagger_schema :RocketPants_Pagination do
7
+ key :required, [:pages, :current, :count, :per_page]
8
+
9
+ property :pages do
10
+ key :type, :integer
11
+ key :format, :int64
12
+ key :description, 'the number of pages'
13
+ key :default, 1
14
+ end
15
+
16
+ property :current do
17
+ key :type, :integer
18
+ key :format, :int64
19
+ key :description, 'the number of the current page'
20
+ key :default, 1
21
+ end
22
+
23
+ property :count do
24
+ key :type, :integer
25
+ key :format, :int64
26
+ key :description, 'the number of total items'
27
+ key :default, 1
28
+ end
29
+
30
+ property :per_page do
31
+ key :type, :integer
32
+ key :format, :int64
33
+ key :description, 'the number of items per page'
34
+ key :default, 1
35
+ end
36
+
37
+ property :previous do
38
+ key :type, :integer
39
+ key :format, :int64
40
+ key :description, 'the number of the previous page (if available)'
41
+ key :default, 1
42
+ end
43
+
44
+ property :next do
45
+ key :type, :integer
46
+ key :format, :int64
47
+ key :description, 'the number of the next page (if available)'
48
+ key :default, 1
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -1,5 +1,5 @@
1
1
  module RocketPants
2
2
  module Pagination
3
- VERSION = '0.1.1'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ require 'active_model_serializers'
3
3
  require 'will_paginate'
4
4
 
5
5
  require 'rocket_pants/pagination/version'
6
+ require 'rocket_pants/pagination/swagger' if defined?(::Swagger::Blocks)
6
7
 
7
8
  module RocketPants
8
9
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_pants-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rocket_pants
@@ -125,6 +125,7 @@ files:
125
125
  - bin/console
126
126
  - bin/setup
127
127
  - lib/rocket_pants/pagination.rb
128
+ - lib/rocket_pants/pagination/swagger.rb
128
129
  - lib/rocket_pants/pagination/version.rb
129
130
  - rocket_pants-pagination.gemspec
130
131
  homepage: https://github.com/alessandro1997/rocket_pants-pagination