README.md in with_model-2.1.4 vs README.md in with_model-2.1.5
- old
+ new
@@ -2,11 +2,11 @@
[![Gem Version](https://img.shields.io/gem/v/with_model.svg?style=flat)](https://rubygems.org/gems/with_model)
[![Build Status](https://secure.travis-ci.org/Casecommons/with_model.svg?branch=master)](https://travis-ci.org/Casecommons/with_model)
[![API Documentation](https://img.shields.io/badge/yard-api%20docs-lightgrey.svg)](https://www.rubydoc.info/gems/with_model)
-`with_model` dynamically builds an ActiveRecord model (with table) before each test in a group and destroys it afterwards.
+`with_model` dynamically builds an Active Record model (with table) before each test in a group and destroys it afterwards.
## Development status
`with_model` is actively maintained. It is quite stable, so while updates may appear infrequent, it is only because none are needed.
@@ -47,17 +47,17 @@
describe "A blog post" do
module MyModule; end
with_model :BlogPost do
- # The table block (and an options hash) is passed to ActiveRecord migration’s `create_table`.
+ # The table block (and an options hash) is passed to Active Record migration’s `create_table`.
table do |t|
t.string :title
t.timestamps null: false
end
- # The model block is the ActiveRecord model’s class body.
+ # The model block is the Active Record model’s class body.
model do
include MyModule
has_many :comments
validates_presence_of :title
@@ -100,11 +100,11 @@
expect(BlogPost.new.some_instance_method).to eq 'bacon'
end
it "can do all the things a regular model can" do
record = BlogPost.new
- expect(record).to_not be_valid
+ expect(record).not_to be_valid
record.title = "foo"
expect(record).to be_valid
expect(record.save).to eq true
expect(record.reload).to eq record
record.comments.create!(:text => "Lorem ipsum")
@@ -153,11 +153,11 @@
t.timestamps null: false
end
end
it "respects the additional options" do
- expect(WithOptions.columns.map(&:name)).to_not include("id")
+ expect(WithOptions.columns.map(&:name)).not_to include("id")
end
end
```
## Requirements
@@ -167,19 +167,19 @@
## Thread-safety
- A unique table name is used for tables generated via `with_model`/`WithModel::Model.new`. This allows `with_model` (when limited to this API) to run concurrently (in processes or threads) with a single database schema. While there is a possibility of collision, it is very small.
- A user-supplied table name is used for tables generated via `with_table`/`WithModel::Table.new`. This may cause collisions at runtime if tests are run concurrently against a single database schema, unless the caller takes care to ensure the table names passed as arguments are unique across threads/processes.
- Generated models are created in stubbed constants, which are global; no guarantee is made to the uniqueness of a constant, and this may be unsafe.
-- Generated classes are ActiveRecord subclasses:
- - This library makes no guarantee as to the thread-safety of creating ActiveRecord subclasses concurrently.
- - This library makes no guarantee as to the thread-safety of cleaning up ActiveRecord/ActiveSupport’s internals which are polluted upon class creation.
+- Generated classes are Active Record subclasses:
+ - This library makes no guarantee as to the thread-safety of creating Active Record subclasses concurrently.
+ - This library makes no guarantee as to the thread-safety of cleaning up Active Record/Active Support’s internals which are polluted upon class creation.
In general, `with_model` is not guaranteed to be thread-safe, but is, in certain usages, safe to use concurrently across multiple processes with a single database schema.
## Versioning
`with_model` uses [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
## License
-Copyright © 2010–2018 [Casebook PBC](https://www.casebook.net).
+Copyright © 2010–2020 [Casebook PBC](https://www.casebook.net).
Licensed under the MIT license, see [LICENSE](/LICENSE) file.