Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readme #273

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,19 @@ All timestamps are _forcibly_ stored in as UTC, bypassing the
* PostgreSQL >= 9.4
* The `btree_gist` PostgreSQL extension

With Homebrew:

brew install postgres

With apt:

apt-get install postgresql-11

## Installation

Add this line to your application's Gemfile:

gem 'chrono_model'
```ruby
gem 'chrono_model'
```

And then execute:

$ bundle

```sh
$ bundle
```

## Configuration

Expand All @@ -99,7 +94,7 @@ development:
Configure Active Record in your `config/application.rb` to use the `:sql` schema
format:

```rb
```ruby
config.active_record.schema_format = :sql
```

Expand Down Expand Up @@ -192,10 +187,12 @@ occur (see https://github.com/ifad/chronomodel/issues/71).
In such cases, ensure to add `no_journal: %w( your_counter_cache_column_name )`
to your `create_table`. Example:

create_table 'sections', temporal: true, no_journal: %w( articles_count ) do |t|
t.string :name
t.integer :articles_count, default: 0
end
```ruby
create_table 'sections', temporal: true, no_journal: %w[articles_count] do |t|
t.string :name
t.integer :articles_count, default: 0
end
```

## Data querying

Expand Down Expand Up @@ -304,7 +301,9 @@ You need to connect as a database superuser, because specs need to create the

To run the full test suite, use

rake
```sh
$ rake
```

SQL queries are logged to `spec/debug.log`. If you want to see them in your
output, set the `VERBOSE=true` environment variable.
Expand All @@ -313,7 +312,9 @@ Some tests check the nominal execution of rake tasks within a test Rails app,
and those are quite time consuming. You can run the full ChronoModel tests
only against ActiveRecord by using

rspec spec/chrono_model
```sh
$ rspec spec/chrono_model
```

Ensure to run the full test suite before pushing.

Expand Down Expand Up @@ -347,7 +348,7 @@ Ensure to run the full test suite before pushing.
* Foreign keys are not supported. [See issue #174][gh-issue-174]

* There may be unexpected results when combining eager loading and joins.
[See issue #186][gh-issue-186]
[See issue #186][gh-issue-186]

* Global ID ignores historical objects. [See issue #192][gh-issue-192]

Expand Down