Skip to content

Commit

Permalink
small README changes, minor code restyling
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 12, 2021
1 parent 49153b6 commit d7fe0df
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# encoding: utf-8
# frozen_string_literal: true

SimpleCov.start do
if ENV['RUN_CODECOV'] == 'true'
require 'codecov'
Expand Down
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
source "https://rubygems.org"
# encoding: utf-8
# frozen_string_literal: true

source 'https://rubygems.org'

# gemspec

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
[![Gem Version](https://img.shields.io/gem/v/pagy.svg?label=pagy&colorA=99004d&colorB=cc0066)](https://rubygems.org/gems/pagy)
![ruby](https://img.shields.io/badge/ruby-1.9+-ruby.svg?colorA=99004d&colorB=cc0066)
![jruby](https://img.shields.io/badge/jruby-1.7+-jruby.svg?colorA=99004d&colorB=cc0066)
[![CodeCov](https://img.shields.io/codecov/c/github/ddnexus/pagy.svg?colorA=1f7a1f&colorB=2aa22a)](https://codecov.io/gh/ddnexus/pagy)
[![Build Status](https://img.shields.io/travis/ddnexus/pagy/master.svg?colorA=1f7a1f&colorB=2aa22a)](https://travis-ci.org/ddnexus/pagy/branches)
[![CodeCov](https://img.shields.io/codecov/c/github/ddnexus/pagy.svg?colorA=1f7a1f&colorB=2aa22a)](https://codecov.io/gh/ddnexus/pagy)
[![MIT license](https://img.shields.io/badge/license-MIT-mit.svg?colorA=1f7a1f&colorB=2aa22a)](http://opensource.org/licenses/MIT)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4329/badge)](https://bestpractices.coreinfrastructure.org/projects/4329)
![Commits](https://img.shields.io/github/commit-activity/y/ddnexus/pagy.svg?label=commits&colorA=004d99&colorB=0073e6)
![Downloads](https://img.shields.io/gem/dt/pagy.svg?colorA=004d99&colorB=0073e6)
[![Chat](http://img.shields.io/badge/gitter-ruby--pagy-purple.svg?colorA=800080&colorB=b300b3)](https://gitter.im/ruby-pagy/Lobby)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4329/badge)](https://bestpractices.coreinfrastructure.org/projects/4329)

Pagy is the ultimate pagination gem that outperforms the others in each and every benchmark and comparison.

Expand Down Expand Up @@ -212,6 +212,8 @@ Pagy follows the [Semantic Versioning 2.0.0](https://semver.org/). Please, check

Pull Requests are welcome!

Setting up a development environment for Pagy is very simple if you use the [docker environment](https://github.com/ddnexus/pagy/tree/pagy3/pagy3-on-docker).

Before spending time creating a (potentially complex) Pull Request, you can [Confirm on Gitter](https://gitter.im/ruby-pagy/Lobby) whether your proposed changes are going to be useful for most users.

If you Create A Pull Request, please ensure that the "All checks have passed" indicator gets green light on the Pull Request page. That means that the tests passed and Codecov and Rubocop are happy.
Expand Down
3 changes: 3 additions & 0 deletions pagy.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# encoding: utf-8
# frozen_string_literal: true

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'pagy'
Expand Down
8 changes: 5 additions & 3 deletions pagy3-on-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ You can also specify a few other variables used in the `docker-compose.yml` file
If you already set the variables:

```sh
cd pagy-on-docker
cd pagy3-on-docker
docker-compose build pagy pagy-jekyll
```

or just set them with the command. For example:

```sh
cd pagy-on-docker
cd pagy3-on-docker
GROUP=$(id -gn) UID=$(id -u) GID=$(id -g) docker-compose build pagy pagy-jekyll
```

You need to run this only once, when you build the images. After that you just run th containers (see below).

## Use it

Run the containers from the docker dir:
Run the containers from the pagy3-on-docker dir:

```sh
docker-compose up
Expand All @@ -59,6 +59,8 @@ Then you can run `irb -I lib -r pagy` from the container in order to have `pagy`

Run all the tests by simply running `rake` without arguments.

Notice: The rake taks is needed because certain tests must run in an isolated ruby process. For example, certain extras override the core pagy methods and we need to test how pagy works with or without the extra, or with many extras at the same time. You can get the full list of of all the test tasks (and test files that each task run) with `rake -D test_*`

Check the coverage at `http://0.0.0.0:63342/pagy/coverage`

The `pagy-jekyll` service runs the jekyll server so you can edit the docs files from the local `pagy` dir and have a real-time preview of your changes at `http://localhost:4000`. You don't even need to reload the page in the browser to see the change you do in the `*.md` page file.
Expand Down

0 comments on commit d7fe0df

Please sign in to comment.