batch-loader 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5518ce90e0c03eda9c5717a9fb50ac7c159f551
4
- data.tar.gz: 3081111f1bcaf9311d4de1769a3d8ce38f5f6552
3
+ metadata.gz: db5859fbd35a95890bfe66bddeb67fd540575186
4
+ data.tar.gz: ab0ed01e82d34f997970d6b73d6f0953a8640bb2
5
5
  SHA512:
6
- metadata.gz: 658b9c3bb6e606f86aa5caa1b89d75e52445d6d227f0d7dd0ca91373144885c29f5a64ced62c602b4f61f816b65b87770bb82ef5ad8cb9314cb75a8baeab5ace
7
- data.tar.gz: 394300f8a32614af28f17483485dc09efb1246d6f366c7458f3154bffac65660135811e2dee01e74330c1c0b928328037e48f8dbf674e3bda1b3c6d7e182f400
6
+ metadata.gz: 2a18ca320ffb58e0e7f696c204bb070da418560e2a3c42621259532fb23ea364fc38bf148e95dfa49281892b47d3cbd8f00fa6800df9c213faf1e9ff7fd4d8ad
7
+ data.tar.gz: b6d1aedc6ea85f6dd40959350b55f8267e3ab4a80dfe61f8ed4aa3710144a14d0f434858d77c428653dba4c1243a92bedd6ed84c75cff90b200c1d6d348ea0e9
@@ -8,10 +8,14 @@ one of the following labels: `Added`, `Changed`, `Deprecated`,
8
8
  to manage the versions of this gem so
9
9
  that you can set version constraints properly.
10
10
 
11
- #### [Unreleased](https://github.com/exAspArk/batch-loader/compare/v1.4.0...HEAD)
11
+ #### [Unreleased](https://github.com/exAspArk/batch-loader/compare/v1.4.1...HEAD)
12
12
 
13
13
  * WIP
14
14
 
15
+ #### [v1.4.1](https://github.com/exAspArk/batch-loader/compare/v1.4.0...v1.4.1)
16
+
17
+ * `Fixes`: Does not allow mutating and corrupting a list of items in a `batch` block. [#46](https://github.com/exAspArk/batch-loader/pull/46)
18
+
15
19
  #### [v1.4.0](https://github.com/exAspArk/batch-loader/compare/v1.3.0...v1.4.0)
16
20
 
17
21
  * `Added`: new `replace_methods` argument to `BatchLoader#batch` to allow control over `define_method` calls. [#45](https://github.com/exAspArk/batch-loader/pull/45)
data/README.md CHANGED
@@ -8,6 +8,20 @@
8
8
 
9
9
  This gem provides a generic lazy batching mechanism to avoid N+1 DB queries, HTTP queries, etc.
10
10
 
11
+ Developers from these companies use `BatchLoader`:
12
+
13
+ <a href="https://about.gitlab.com/"><img src="images/gitlab.png" height="35" width="114" alt="GitLab" style="max-width:100%;"></a>
14
+ <img src="images/space.png" height="35" width="10" alt="" style="max-width:100%;">
15
+ <a href="https://www.netflix.com/"><img src="images/netflix.png" height="35" width="110" alt="Netflix" style="max-width:100%;"></a>
16
+ <img src="images/space.png" height="35" width="10" alt="" style="max-width:100%;">
17
+ <a href="https://www.alibaba.com/"><img src="images/alibaba.png" height="35" width="86" alt="Alibaba" style="max-width:100%;"></a>
18
+ <img src="images/space.png" height="35" width="10" alt="" style="max-width:100%;">
19
+ <a href="https://www.universe.com/"><img src="images/universe.png" height="35" width="137" alt="Universe" style="max-width:100%;"></a>
20
+ <img src="images/space.png" height="35" width="10" alt="" style="max-width:100%;">
21
+ <a href="https://www.wealthsimple.com/"><img src="images/wealthsimple.png" height="35" width="150" alt="Wealthsimple" style="max-width:100%;"></a>
22
+ <img src="images/space.png" height="35" width="10" alt="" style="max-width:100%;">
23
+ <a href="https://decidim.org/"><img src="images/decidim.png" height="35" width="94" alt="Decidim" style="max-width:100%;"></a>
24
+
11
25
  ## Contents
12
26
 
13
27
  * [Highlights](#highlights)
@@ -25,15 +39,12 @@ This gem provides a generic lazy batching mechanism to avoid N+1 DB queries, HTT
25
39
  * [API](#api)
26
40
  * [Implementation details](#implementation-details)
27
41
  * [Development](#development)
42
+ * [Related gems](#related-gems)
28
43
  * [Contributing](#contributing)
29
44
  * [Alternatives](#alternatives)
30
45
  * [License](#license)
31
46
  * [Code of Conduct](#code-of-conduct)
32
47
 
33
- <a href="https://www.universe.com/" target="_blank" rel="noopener noreferrer">
34
- <img src="images/universe.png" height="41" width="153" alt="Sponsored by Universe" style="max-width:100%;">
35
- </a>
36
-
37
48
  ## Highlights
38
49
 
39
50
  * Generic utility to avoid N+1 DB queries, HTTP requests, etc.
@@ -440,6 +451,14 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
440
451
 
441
452
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
442
453
 
454
+ ## Related gems
455
+
456
+ These gems are built by using `BatchLoader`:
457
+
458
+ * [decidim-core](https://github.com/decidim/decidim/) – participatory democracy framework made with Ruby on Rails.
459
+ * [ams_lazy_relationships](https://github.com/Bajena/ams_lazy_relationships/) – ActiveModel Serializers add-on for eliminating N+1 queries.
460
+ * [batch-loader-active-record](https://github.com/mathieul/batch-loader-active-record/) – ActiveRecord lazy association generator to avoid N+1 DB queries.
461
+
443
462
  ## Contributing
444
463
 
445
464
  Bug reports and pull requests are welcome on GitHub at https://github.com/exAspArk/batch-loader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.required_ruby_version = '>= 2.1.0' # keyword args
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.15"
24
+ spec.add_development_dependency "bundler", "~> 2.0"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "graphql", "~> 1.6"
@@ -18,7 +18,7 @@ class BatchLoader
18
18
  end
19
19
 
20
20
  def list_items
21
- items_to_load.to_a
21
+ items_to_load.to_a.freeze
22
22
  end
23
23
 
24
24
  def delete(items:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class BatchLoader
4
- VERSION = "1.4.0"
4
+ VERSION = "1.4.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batch-loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - exAspArk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-29 00:00:00.000000000 Z
11
+ date: 2019-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.15'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.15'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement