simple_paginate 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +39 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +22 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +77 -0
  7. data/Rakefile +50 -0
  8. data/app/views/simple_paginate/_next_page.html.erb +9 -0
  9. data/app/views/simple_paginate/_next_page.html.haml +7 -0
  10. data/app/views/simple_paginate/_next_page.html.slim +7 -0
  11. data/app/views/simple_paginate/_paginator.html.erb +12 -0
  12. data/app/views/simple_paginate/_paginator.html.haml +9 -0
  13. data/app/views/simple_paginate/_paginator.html.slim +9 -0
  14. data/app/views/simple_paginate/_prev_page.html.erb +9 -0
  15. data/app/views/simple_paginate/_prev_page.html.haml +7 -0
  16. data/app/views/simple_paginate/_prev_page.html.slim +7 -0
  17. data/config/locales/simple_paginate.yml +5 -0
  18. data/gemfiles/.bundle/config +2 -0
  19. data/gemfiles/active_record_42.gemfile +24 -0
  20. data/gemfiles/active_record_42.gemfile.lock +319 -0
  21. data/lib/generators/simple_paginate/config_generator.rb +16 -0
  22. data/lib/generators/simple_paginate/templates/simple_paginate_config.rb +3 -0
  23. data/lib/generators/simple_paginate/views_generator.rb +31 -0
  24. data/lib/simple_paginate/config.rb +21 -0
  25. data/lib/simple_paginate/engine.rb +4 -0
  26. data/lib/simple_paginate/helpers/action_view_extension.rb +19 -0
  27. data/lib/simple_paginate/helpers/paginator.rb +70 -0
  28. data/lib/simple_paginate/helpers/tags.rb +84 -0
  29. data/lib/simple_paginate/models/active_record_extension.rb +27 -0
  30. data/lib/simple_paginate/railtie.rb +16 -0
  31. data/lib/simple_paginate/version.rb +3 -0
  32. data/lib/simple_paginate.rb +9 -0
  33. data/simple_paginate.gemspec +28 -0
  34. data/spec/fake_app/active_record/config.rb +3 -0
  35. data/spec/fake_app/active_record/models.rb +12 -0
  36. data/spec/fake_app/log/development.log +0 -0
  37. data/spec/fake_app/rails_app.rb +38 -0
  38. data/spec/simple_paginate/config_spec.rb +27 -0
  39. data/spec/simple_paginate/helpers/action_view_extension_spec.rb +43 -0
  40. data/spec/simple_paginate/helpers/tags_spec.rb +57 -0
  41. data/spec/simple_paginate/models/active_record_extension_spec.rb +71 -0
  42. data/spec/simple_paginate/version_spec.rb +8 -0
  43. data/spec/spec_helper.rb +19 -0
  44. data/spec/support/database_cleaner.rb +12 -0
  45. metadata +182 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 52213695afadde9c4e6914a10e89a69e3172fd50
4
+ data.tar.gz: 843b0371f94a788fd2d66c697e3ea39d0a83bfab
5
+ SHA512:
6
+ metadata.gz: 2d87801708e54fa73201e6216c0aa79b95c661b29d06ff76627a1544a1f65cd30dc77eec7f1147e54e338aa337cf99924bc766ba69450c95e9826971e0405d3c
7
+ data.tar.gz: 21527728172629e242b9118b61b8cecf08246af18b453eaa151407ccb43ceb81701db74604d64679be04a290070db1cb6d516af239ba0454729453ff64872ae9
data/.gitignore ADDED
@@ -0,0 +1,39 @@
1
+ *.gem
2
+ *.rbc
3
+ Gemfile.lock
4
+ /.config
5
+ /coverage/
6
+ /InstalledFiles
7
+ /pkg/
8
+ /spec/reports/
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+ gemsfiles/*
13
+
14
+ ## Specific to RubyMotion:
15
+ .dat*
16
+ .repl_history
17
+ build/
18
+
19
+ ## Documentation cache and generated files:
20
+ /.yardoc/
21
+ /_yardoc/
22
+ /doc/
23
+ /rdoc/
24
+
25
+ ## Environment normalisation:
26
+ /.bundle/
27
+ /lib/bundler/man/
28
+
29
+ # for a library or gem, you might want to ignore these files since the code is
30
+ # intended to run in multiple environments; otherwise, check them in:
31
+ # Gemfile.lock
32
+ # .ruby-version
33
+ # .ruby-gemset
34
+
35
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
36
+ .rvmrc
37
+
38
+ doc
39
+ log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in simple_paginate.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Xinmin Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Yong Gu
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # simple_paginate
2
+
3
+ Simple pagination solution for previous and next page navigation.
4
+
5
+ ## Why simple_paginate
6
+
7
+ We saw some websites using `will_paginate` or `kaminari` for pagination, but they just need previous and next page navigation, `will_paginate` or `kaminari` is overqualified.
8
+
9
+ Pagination in databae sometimes is slow because
10
+
11
+ 1. it sends a sql with OFFSET to get collection
12
+ 2. it sends additional sql with COUNT to get total number of record.
13
+
14
+ `simple_paginate` eliminates the additional COUNT sql, make your pagination faster.
15
+
16
+ ## How simple_paginate works
17
+
18
+ `will_paginate` and `kaminari` uses `page` and `per_page` to calculate offset and limit, then send 2 sqls
19
+
20
+ ```
21
+ SELECT * FROM posts OFFSET 20 LIMIT 10;
22
+ SELECT COUNT(*) FROM posts;
23
+ ```
24
+
25
+ after getting total count, they can calculate total pages, then render page numbers, prev, next, first and last page links.
26
+
27
+ `simple_paginate` also uses `page` and `per_page` to calculate offset and limit, but it only sends 1 sql
28
+
29
+ ```
30
+ SELECT * FROM posts OFFSET 20 LIMIT 11;
31
+ ```
32
+
33
+ it fetches one more record (11 = 10 + 1) to calculate if there is a next page records, so it doesn't need to send COUNT sql.
34
+
35
+ ## Usage
36
+
37
+ ### Query Basics
38
+
39
+ ```
40
+ ## perform a paginate query:
41
+ @users = User.paginate(:page => params[:page])
42
+ ```
43
+
44
+ ### Helpers
45
+
46
+ ```
47
+ ## render previous page link:
48
+ <%= link_to_previous_page @users, 'Previous' %>
49
+
50
+ ## render next page link:
51
+ <%= link_to_next_page @users, 'Next' %>
52
+
53
+ ## render previous page link and next page link
54
+ <%= simple_paginate @users
55
+ ```
56
+
57
+ ### General configuration options
58
+
59
+ You can configure the following default values by overriding these values using SimplePaginate.configure method.
60
+
61
+ ```
62
+ default_per_page # 25 by default
63
+ ```
64
+
65
+ There's a handy generator that generates the default configuration file into config/initializers directory. Run the following generator command, then edit the generated file.
66
+
67
+ ```
68
+ % rails g simple_paginate:config
69
+ ```
70
+
71
+ ### Customizing the pagination helper
72
+
73
+ SimplePaginate includes a handy template generator, To edit your paginator, run the generator first:
74
+
75
+ ```
76
+ % rails g simple_paginate:views
77
+ ```
data/Rakefile ADDED
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require 'bundler'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ require 'rspec/core'
7
+ require 'rspec/core/rake_task'
8
+
9
+ RSpec::Core::RakeTask.new(:spec) do |spec|
10
+ spec.pattern = FileList['spec/**/*_spec.rb']
11
+ end
12
+
13
+ task :default => "spec:all"
14
+
15
+ namespace :spec do
16
+ mappers = %w(
17
+ active_record_42
18
+ )
19
+
20
+ mappers.each do |gemfile|
21
+ desc "Run Tests against #{gemfile}"
22
+ task gemfile do
23
+ sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
24
+ sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake -t spec"
25
+ end
26
+ end
27
+
28
+ desc "Run Tests against all ORMs"
29
+ task :all do
30
+ mappers.each do |gemfile|
31
+ sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
32
+ sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake spec"
33
+ end
34
+ end
35
+ end
36
+
37
+ begin
38
+ require 'rdoc/task'
39
+
40
+ Rake::RDocTask.new do |rdoc|
41
+ require 'simple_paginate/version'
42
+
43
+ rdoc.rdoc_dir = 'rdoc'
44
+ rdoc.title = "simple_paginate #{SimplePaginate::VERSION}"
45
+ rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ end
48
+ rescue LoadError
49
+ puts 'RDocTask is not supported on this VM and platform combination.'
50
+ end
@@ -0,0 +1,9 @@
1
+ <%# Link to the 'Next' page
2
+ - avaliable local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ per_page: number of items to fetch per page
6
+ - %>
7
+ <span class='next'>
8
+ <%= link_to_unless current_page.last?, t('views.simple_paginate.next').html_safe, url %>
9
+ </span>
@@ -0,0 +1,7 @@
1
+ -# Link to the 'Next' page
2
+ -# avaliable local variables
3
+ -# url: url to the next page
4
+ -# current_page: a page object for the currently displayed page
5
+ -# per_page: number of items to fetch per page
6
+ %span.next
7
+ = link_to_unless current_page.last?, t('views.simple_paginate.next').html_safe, url
@@ -0,0 +1,7 @@
1
+ / Link to the 'Next' page
2
+ - avaliable local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ per_page: number of items to fetch per page
6
+ span.next
7
+ = link_to_unless current_page.last?, t('views.simple_paginate.next').html_safe, url
@@ -0,0 +1,12 @@
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently display page
4
+ per_page: number of items to fetch per page
5
+ paginator: the paginator that renders the pagination tags inside
6
+ -%>
7
+ <%= paginator.render do %>
8
+ <div class='simple_paginate'>
9
+ <%= prev_page_tag unless current_page.first? %>
10
+ <%= next_page_tag unless current_page.last? %>
11
+ </div>
12
+ <% end %>
@@ -0,0 +1,9 @@
1
+ -# The container tag
2
+ -# available local variables
3
+ -# current_page: a page object for the currently display page
4
+ -# per_page: number of items to fetch per page
5
+ -# paginator: the paginator that renders the pagination tags inside
6
+ = paginator.render do
7
+ .simple_paginate
8
+ = prev_page_tag unless current_page.first?
9
+ = next_page_tag unless current_page.last?
@@ -0,0 +1,9 @@
1
+ / The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently display page
4
+ per_page: number of items to fetch per page
5
+ paginator: the paginator that renders the pagination tags inside
6
+ = paginator.render do
7
+ .simple_paginate
8
+ == prev_page_tag unless current_page.first?
9
+ == next_page_tag unless current_page.last?
@@ -0,0 +1,9 @@
1
+ <%# Link to the 'Previous' page
2
+ - avaliable local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ per_page: number of items to fetch per page
6
+ - %>
7
+ <span class='prev'>
8
+ <%= link_to_unless current_page.first?, t('views.simple_paginate.previous').html_safe, url %>
9
+ </span>
@@ -0,0 +1,7 @@
1
+ -# Link to the 'Previous' page
2
+ -# avaliable local variables
3
+ -# url: url to the previous page
4
+ -# current_page: a page object for the currently displayed page
5
+ -# per_page: number of items to fetch per page
6
+ %span.prev
7
+ = link_to_unless current_page.first?, t('views.simple_paginate.previous').html_safe, url
@@ -0,0 +1,7 @@
1
+ / Link to the 'Previous' page
2
+ - avaliable local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ per_page: number of items to fetch per page
6
+ %span.prev
7
+ = link_to_unless current_page.first?, t('views.simple_paginate.previous').html_safe, url
@@ -0,0 +1,5 @@
1
+ en:
2
+ views:
3
+ simple_paginate:
4
+ next: 'Next'
5
+ previous: 'Previous'
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_JOBS: 8
@@ -0,0 +1,24 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.2.0'
4
+ gem 'activerecord', '~> 4.2.0', :require => 'active_record'
5
+ gem 'rspec-rails', '~> 3.2.1'
6
+
7
+ platforms :ruby do
8
+ if RUBY_VERSION > "2.1.0"
9
+ gem 'sqlite3'
10
+ else
11
+ gem 'sqlite3', '1.3.8'
12
+ end
13
+ end
14
+ platforms :jruby do
15
+ gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
16
+ end
17
+ platforms :rbx do
18
+ gem 'rubysl', '~> 2.0'
19
+ gem 'racc'
20
+ gem 'minitest'
21
+ gem 'rubinius-developer_tools'
22
+ end
23
+
24
+ gemspec :path => '../'
@@ -0,0 +1,319 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ simple_paginate (0.0.1)
5
+ actionpack (>= 3.0.0)
6
+ activesupport (>= 3.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (4.2.0)
12
+ actionview (= 4.2.0)
13
+ activesupport (= 4.2.0)
14
+ rack (~> 1.6.0)
15
+ rack-test (~> 0.6.2)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
18
+ actionview (4.2.0)
19
+ activesupport (= 4.2.0)
20
+ builder (~> 3.1)
21
+ erubis (~> 2.7.0)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
24
+ activemodel (4.2.0)
25
+ activesupport (= 4.2.0)
26
+ builder (~> 3.1)
27
+ activerecord (4.2.0)
28
+ activemodel (= 4.2.0)
29
+ activesupport (= 4.2.0)
30
+ arel (~> 6.0)
31
+ activesupport (4.2.0)
32
+ i18n (~> 0.7)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.3, >= 0.3.4)
36
+ tzinfo (~> 1.1)
37
+ arel (6.0.0)
38
+ builder (3.2.2)
39
+ database_cleaner (1.4.0)
40
+ diff-lcs (1.2.5)
41
+ erubis (2.7.0)
42
+ ffi2-generators (0.1.1)
43
+ i18n (0.7.0)
44
+ json (1.8.2)
45
+ loofah (2.0.1)
46
+ nokogiri (>= 1.5.9)
47
+ mini_portile (0.6.2)
48
+ minitest (5.5.1)
49
+ nokogiri (1.6.6.2)
50
+ mini_portile (~> 0.6.0)
51
+ racc (1.4.12)
52
+ rack (1.6.0)
53
+ rack-test (0.6.3)
54
+ rack (>= 1.0)
55
+ rails-deprecated_sanitizer (1.0.3)
56
+ activesupport (>= 4.2.0.alpha)
57
+ rails-dom-testing (1.0.5)
58
+ activesupport (>= 4.2.0.beta, < 5.0)
59
+ nokogiri (~> 1.6.0)
60
+ rails-deprecated_sanitizer (>= 1.0.1)
61
+ rails-html-sanitizer (1.0.1)
62
+ loofah (~> 2.0)
63
+ railties (4.2.0)
64
+ actionpack (= 4.2.0)
65
+ activesupport (= 4.2.0)
66
+ rake (>= 0.8.7)
67
+ thor (>= 0.18.1, < 2.0)
68
+ rake (10.4.2)
69
+ rspec (3.2.0)
70
+ rspec-core (~> 3.2.0)
71
+ rspec-expectations (~> 3.2.0)
72
+ rspec-mocks (~> 3.2.0)
73
+ rspec-core (3.2.1)
74
+ rspec-support (~> 3.2.0)
75
+ rspec-expectations (3.2.0)
76
+ diff-lcs (>= 1.2.0, < 2.0)
77
+ rspec-support (~> 3.2.0)
78
+ rspec-mocks (3.2.1)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.2.0)
81
+ rspec-rails (3.2.1)
82
+ actionpack (>= 3.0, < 4.3)
83
+ activesupport (>= 3.0, < 4.3)
84
+ railties (>= 3.0, < 4.3)
85
+ rspec-core (~> 3.2.0)
86
+ rspec-expectations (~> 3.2.0)
87
+ rspec-mocks (~> 3.2.0)
88
+ rspec-support (~> 3.2.0)
89
+ rspec-support (3.2.2)
90
+ rubinius-coverage (2.0.3)
91
+ rubinius-debugger (2.2.1)
92
+ rubinius-developer_tools (2.0.0)
93
+ rubinius-coverage (~> 2.0)
94
+ rubinius-debugger (~> 2.0)
95
+ rubinius-profiler (~> 2.0)
96
+ rubinius-profiler (2.0.1)
97
+ rubysl (2.1.0)
98
+ rubysl-abbrev (~> 2.0)
99
+ rubysl-base64 (~> 2.0)
100
+ rubysl-benchmark (~> 2.0)
101
+ rubysl-bigdecimal (~> 2.0)
102
+ rubysl-cgi (~> 2.0)
103
+ rubysl-cgi-session (~> 2.0)
104
+ rubysl-cmath (~> 2.0)
105
+ rubysl-complex (~> 2.0)
106
+ rubysl-continuation (~> 2.0)
107
+ rubysl-coverage (~> 2.0)
108
+ rubysl-csv (~> 2.0)
109
+ rubysl-curses (~> 2.0)
110
+ rubysl-date (~> 2.0)
111
+ rubysl-delegate (~> 2.0)
112
+ rubysl-digest (~> 2.0)
113
+ rubysl-drb (~> 2.0)
114
+ rubysl-e2mmap (~> 2.0)
115
+ rubysl-english (~> 2.0)
116
+ rubysl-enumerator (~> 2.0)
117
+ rubysl-erb (~> 2.0)
118
+ rubysl-etc (~> 2.0)
119
+ rubysl-expect (~> 2.0)
120
+ rubysl-fcntl (~> 2.0)
121
+ rubysl-fiber (~> 2.0)
122
+ rubysl-fileutils (~> 2.0)
123
+ rubysl-find (~> 2.0)
124
+ rubysl-forwardable (~> 2.0)
125
+ rubysl-getoptlong (~> 2.0)
126
+ rubysl-gserver (~> 2.0)
127
+ rubysl-io-console (~> 2.0)
128
+ rubysl-io-nonblock (~> 2.0)
129
+ rubysl-io-wait (~> 2.0)
130
+ rubysl-ipaddr (~> 2.0)
131
+ rubysl-irb (~> 2.1)
132
+ rubysl-logger (~> 2.0)
133
+ rubysl-mathn (~> 2.0)
134
+ rubysl-matrix (~> 2.0)
135
+ rubysl-mkmf (~> 2.0)
136
+ rubysl-monitor (~> 2.0)
137
+ rubysl-mutex_m (~> 2.0)
138
+ rubysl-net-ftp (~> 2.0)
139
+ rubysl-net-http (~> 2.0)
140
+ rubysl-net-imap (~> 2.0)
141
+ rubysl-net-pop (~> 2.0)
142
+ rubysl-net-protocol (~> 2.0)
143
+ rubysl-net-smtp (~> 2.0)
144
+ rubysl-net-telnet (~> 2.0)
145
+ rubysl-nkf (~> 2.0)
146
+ rubysl-observer (~> 2.0)
147
+ rubysl-open-uri (~> 2.0)
148
+ rubysl-open3 (~> 2.0)
149
+ rubysl-openssl (~> 2.0)
150
+ rubysl-optparse (~> 2.0)
151
+ rubysl-ostruct (~> 2.0)
152
+ rubysl-pathname (~> 2.0)
153
+ rubysl-prettyprint (~> 2.0)
154
+ rubysl-prime (~> 2.0)
155
+ rubysl-profile (~> 2.0)
156
+ rubysl-profiler (~> 2.0)
157
+ rubysl-pstore (~> 2.0)
158
+ rubysl-pty (~> 2.0)
159
+ rubysl-rational (~> 2.0)
160
+ rubysl-resolv (~> 2.0)
161
+ rubysl-rexml (~> 2.0)
162
+ rubysl-rinda (~> 2.0)
163
+ rubysl-rss (~> 2.0)
164
+ rubysl-scanf (~> 2.0)
165
+ rubysl-securerandom (~> 2.0)
166
+ rubysl-set (~> 2.0)
167
+ rubysl-shellwords (~> 2.0)
168
+ rubysl-singleton (~> 2.0)
169
+ rubysl-socket (~> 2.0)
170
+ rubysl-stringio (~> 2.0)
171
+ rubysl-strscan (~> 2.0)
172
+ rubysl-sync (~> 2.0)
173
+ rubysl-syslog (~> 2.0)
174
+ rubysl-tempfile (~> 2.0)
175
+ rubysl-thread (~> 2.0)
176
+ rubysl-thwait (~> 2.0)
177
+ rubysl-time (~> 2.0)
178
+ rubysl-timeout (~> 2.0)
179
+ rubysl-tmpdir (~> 2.0)
180
+ rubysl-tsort (~> 2.0)
181
+ rubysl-un (~> 2.0)
182
+ rubysl-uri (~> 2.0)
183
+ rubysl-weakref (~> 2.0)
184
+ rubysl-webrick (~> 2.0)
185
+ rubysl-xmlrpc (~> 2.0)
186
+ rubysl-yaml (~> 2.0)
187
+ rubysl-zlib (~> 2.0)
188
+ rubysl-abbrev (2.0.4)
189
+ rubysl-base64 (2.0.0)
190
+ rubysl-benchmark (2.0.1)
191
+ rubysl-bigdecimal (2.0.2)
192
+ rubysl-cgi (2.0.1)
193
+ rubysl-cgi-session (2.0.1)
194
+ rubysl-cmath (2.0.0)
195
+ rubysl-complex (2.0.0)
196
+ rubysl-continuation (2.0.0)
197
+ rubysl-coverage (2.0.3)
198
+ rubysl-csv (2.0.2)
199
+ rubysl-english (~> 2.0)
200
+ rubysl-curses (2.0.1)
201
+ rubysl-date (2.0.9)
202
+ rubysl-delegate (2.0.1)
203
+ rubysl-digest (2.0.3)
204
+ rubysl-drb (2.0.1)
205
+ rubysl-e2mmap (2.0.0)
206
+ rubysl-english (2.0.0)
207
+ rubysl-enumerator (2.0.0)
208
+ rubysl-erb (2.0.2)
209
+ rubysl-etc (2.0.3)
210
+ ffi2-generators (~> 0.1)
211
+ rubysl-expect (2.0.0)
212
+ rubysl-fcntl (2.0.4)
213
+ ffi2-generators (~> 0.1)
214
+ rubysl-fiber (2.0.0)
215
+ rubysl-fileutils (2.0.3)
216
+ rubysl-find (2.0.1)
217
+ rubysl-forwardable (2.0.1)
218
+ rubysl-getoptlong (2.0.0)
219
+ rubysl-gserver (2.0.0)
220
+ rubysl-socket (~> 2.0)
221
+ rubysl-thread (~> 2.0)
222
+ rubysl-io-console (2.0.0)
223
+ rubysl-io-nonblock (2.0.0)
224
+ rubysl-io-wait (2.0.0)
225
+ rubysl-ipaddr (2.0.0)
226
+ rubysl-irb (2.1.1)
227
+ rubysl-e2mmap (~> 2.0)
228
+ rubysl-mathn (~> 2.0)
229
+ rubysl-thread (~> 2.0)
230
+ rubysl-logger (2.1.0)
231
+ rubysl-mathn (2.0.0)
232
+ rubysl-matrix (2.1.0)
233
+ rubysl-e2mmap (~> 2.0)
234
+ rubysl-mkmf (2.0.1)
235
+ rubysl-fileutils (~> 2.0)
236
+ rubysl-shellwords (~> 2.0)
237
+ rubysl-monitor (2.0.0)
238
+ rubysl-mutex_m (2.0.0)
239
+ rubysl-net-ftp (2.0.1)
240
+ rubysl-net-http (2.0.4)
241
+ rubysl-cgi (~> 2.0)
242
+ rubysl-erb (~> 2.0)
243
+ rubysl-singleton (~> 2.0)
244
+ rubysl-net-imap (2.0.1)
245
+ rubysl-net-pop (2.0.1)
246
+ rubysl-net-protocol (2.0.1)
247
+ rubysl-net-smtp (2.0.1)
248
+ rubysl-net-telnet (2.0.0)
249
+ rubysl-nkf (2.0.1)
250
+ rubysl-observer (2.0.0)
251
+ rubysl-open-uri (2.0.0)
252
+ rubysl-open3 (2.0.0)
253
+ rubysl-openssl (2.2.1)
254
+ rubysl-optparse (2.0.1)
255
+ rubysl-shellwords (~> 2.0)
256
+ rubysl-ostruct (2.0.4)
257
+ rubysl-pathname (2.1.0)
258
+ rubysl-prettyprint (2.0.3)
259
+ rubysl-prime (2.0.1)
260
+ rubysl-profile (2.0.0)
261
+ rubysl-profiler (2.0.1)
262
+ rubysl-pstore (2.0.0)
263
+ rubysl-pty (2.0.3)
264
+ rubysl-rational (2.0.1)
265
+ rubysl-resolv (2.1.2)
266
+ rubysl-rexml (2.0.4)
267
+ rubysl-rinda (2.0.1)
268
+ rubysl-rss (2.0.0)
269
+ rubysl-scanf (2.0.0)
270
+ rubysl-securerandom (2.0.0)
271
+ rubysl-set (2.0.1)
272
+ rubysl-shellwords (2.0.0)
273
+ rubysl-singleton (2.0.0)
274
+ rubysl-socket (2.0.1)
275
+ rubysl-stringio (2.0.0)
276
+ rubysl-strscan (2.0.0)
277
+ rubysl-sync (2.0.0)
278
+ rubysl-syslog (2.1.0)
279
+ ffi2-generators (~> 0.1)
280
+ rubysl-tempfile (2.0.1)
281
+ rubysl-thread (2.0.3)
282
+ rubysl-thwait (2.0.0)
283
+ rubysl-time (2.0.3)
284
+ rubysl-timeout (2.0.0)
285
+ rubysl-tmpdir (2.0.1)
286
+ rubysl-tsort (2.0.1)
287
+ rubysl-un (2.0.0)
288
+ rubysl-fileutils (~> 2.0)
289
+ rubysl-optparse (~> 2.0)
290
+ rubysl-uri (2.0.0)
291
+ rubysl-weakref (2.0.0)
292
+ rubysl-webrick (2.0.0)
293
+ rubysl-xmlrpc (2.0.0)
294
+ rubysl-yaml (2.1.0)
295
+ rubysl-zlib (2.0.1)
296
+ sqlite3 (1.3.10)
297
+ thor (0.19.1)
298
+ thread_safe (0.3.4)
299
+ tzinfo (1.2.2)
300
+ thread_safe (~> 0.1)
301
+
302
+ PLATFORMS
303
+ ruby
304
+
305
+ DEPENDENCIES
306
+ activerecord (~> 4.2.0)
307
+ activerecord-jdbcsqlite3-adapter (>= 1.3.0)
308
+ bundler (~> 1.6)
309
+ database_cleaner (~> 1.4.0)
310
+ minitest
311
+ racc
312
+ railties (~> 4.2.0)
313
+ rake
314
+ rspec (~> 3.2)
315
+ rspec-rails (~> 3.2.1)
316
+ rubinius-developer_tools
317
+ rubysl (~> 2.0)
318
+ simple_paginate!
319
+ sqlite3
@@ -0,0 +1,16 @@
1
+ module SimplePaginate
2
+ module Generators
3
+ class ConfigGenerator < Rails::Generators::Base
4
+ source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
5
+
6
+ desc <<DESC
7
+ Description:
8
+ Copies SimplePaginate configuration file to your application's initializer directory.
9
+ DESC
10
+
11
+ def copy_config_file
12
+ template 'simple_paginate_config.rb', 'config/initializers/simple_paginate_config.rb'
13
+ end
14
+ end
15
+ end
16
+ end