will_paginate_semantic_ui 1.0.0 → 2.0.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: 0490b858bd58ac6cd222124bcce8af03985b216f
4
- data.tar.gz: 1cb249aaccb321b430404854b5fa1c36bd5a9cc7
3
+ metadata.gz: 8b7169b9752d757220ec53b05398a8948cd19504
4
+ data.tar.gz: 9b6e9553fefcdff20e7030fded86376f054e054e
5
5
  SHA512:
6
- metadata.gz: c7d3b67fb236fc7e616e3965e355a71d825bd6fddfce511399fec97c2c719244616768e7ffacf77d2c5507f44c65bfea34a5cce75a278bbde9c72622bc919d33
7
- data.tar.gz: 35d24caa054d9c792cb7f0d9aa0fe8b9abfeca3f2edcf9ae474cd6ea96e5504b3daf2396625168f8d73b35b3521c52fd6529f2d46f29991efb15f1805bd4337e
6
+ metadata.gz: 7dbd511658ed2edec0eac772ce0b0ceb6619ba7c3d6f802f84eec45c7796f6abec1b68b7f9669fcd448df5d2e452e6425d36e74352d06aa153911153b04a5c1a
7
+ data.tar.gz: 6e018daf1e61fc7bc7b2ab49a41002ee6130a5055b88282f1ca1553cf1fbf38509e2f11b8a4a9101c6321d0d8df4a942454c81f679dcf4c14863bf48a6d7fc06
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0
4
+
5
+ - Sinatra support
6
+ - Sinatra example app
7
+
3
8
  ## 1.0.0
4
9
 
5
10
  - Release first version with Rails support.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- will_paginate_semantic_ui (1.0.0)
4
+ will_paginate_semantic_ui (2.0.0)
5
5
  will_paginate (> 3.0.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -23,10 +23,30 @@ As easy as `gem install will_paginate_semantic_ui` or add `gem "will_paginate_se
23
23
 
24
24
  ### Rails
25
25
 
26
- You need to use another render in the will paginate command:
26
+ In your paginated view, you need to use another render in the will paginate command:
27
27
 
28
28
  `<%= will_paginate @collection, renderer: WillPaginateSemanticUi::Renderer %>`
29
29
 
30
+ ### Sinatra
31
+
32
+ `require "will_paginate_semantic_ui"` in your Sinatra app.
33
+
34
+ In your paginated view, you need to use another render in the will paginate command:
35
+
36
+ `<%= will_paginate @collection, renderer: WillPaginateSemanticUi::Renderer %>`
37
+
38
+ **Look the example implementation at** `docs/sinatra_example`
39
+
40
+ ![Example](https://raw.githubusercontent.com/rafaelbiriba/will_paginate_semantic_ui/master/docs/example_sinatra.png)
41
+
42
+ To run the example:
43
+
44
+ ```
45
+ cd docs/sinatra_example
46
+ bundle install
47
+ rackup
48
+ ```
49
+
30
50
  ## Tuning
31
51
 
32
52
  You can also use some will_pagination options to customize your component:
@@ -0,0 +1,8 @@
1
+ require "will_paginate/view_helpers/sinatra"
2
+ require "will_paginate_semantic_ui/generic_renderer"
3
+
4
+ module WillPaginateSemanticUi
5
+ class Renderer < WillPaginate::Sinatra::LinkRenderer
6
+ include WillPaginateSemanticUi::GenericRenderer
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module WillPaginateSemanticUi
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -4,3 +4,7 @@ require "will_paginate"
4
4
  if defined?(ActionView)
5
5
  require "will_paginate_semantic_ui/rails"
6
6
  end
7
+
8
+ if defined?(Sinatra)
9
+ require "will_paginate_semantic_ui/sinatra"
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate_semantic_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Biriba
@@ -128,6 +128,7 @@ files:
128
128
  - lib/will_paginate_semantic_ui.rb
129
129
  - lib/will_paginate_semantic_ui/generic_renderer.rb
130
130
  - lib/will_paginate_semantic_ui/rails.rb
131
+ - lib/will_paginate_semantic_ui/sinatra.rb
131
132
  - lib/will_paginate_semantic_ui/version.rb
132
133
  - spec/lib/will_paginate_semantic_ui/generic_renderer_spec.rb
133
134
  - spec/spec_helper.rb