normalizr 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ad46e009a59073eae3f65cfd60449c60fbc1570c5dde582de56f04a449416fa
4
- data.tar.gz: 4b83cf27a15fcf5b1d2087dbada0ecad50a4d807be26e2fb6a2c91c6705adef6
3
+ metadata.gz: 071f5233a61eca74bcc0cf721bb21438c4d3fe4ecf1f6c798d3bf6ed42cac726
4
+ data.tar.gz: 251c887f7329e9948679b9418f525790d97863daa815065f3cb85eb4fe722014
5
5
  SHA512:
6
- metadata.gz: 76b3b482de58da7f8af729c3d8392f0ef074ae9a7a05bbea55e3cd19d02c4297c6fa1bf01e924ec14aaa9666ad8689c1d91076e5588647b77341a39554e106d9
7
- data.tar.gz: 1e8a7051bf44e55fbc1a81459670c4ec6b4d463adaa04b5a5179a40727cc17a3365c222c0bd8a657562d0f3d133ab442464a95787d0dc49ef1b877d02d6365d2
6
+ metadata.gz: d1bcc6d23dd83744c97dadcf8b5087f8d63645554bb76b7a305b71fd99350134116c773e417856210d2b0a874959d933c023d2ac7066e6207e8674cb5dd7c696
7
+ data.tar.gz: 22ccaffe54bb4d7786a9f383f4cc0adcde679e64bc8de4b09ecfc32f902f14fe2692e70bd28e111af36685f63fc9ef28739423b4e91883ef0c087d7a486a1513
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: RSpec
3
+
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+ branches:
10
+ - main
11
+
12
+ jobs:
13
+ rspec:
14
+ runs-on: ubuntu-latest
15
+
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby-version:
20
+ - '2.7'
21
+ - '3.0'
22
+ - '3.1'
23
+ - '3.2'
24
+ gemfile:
25
+ - activerecord-5.2.x
26
+ - activerecord-6.0.x
27
+ - activerecord-6.1.x
28
+ - activerecord-7.0.x
29
+ exclude:
30
+ - ruby-version: '3.0'
31
+ gemfile: activerecord-5.2.x
32
+ - ruby-version: '3.1'
33
+ gemfile: activerecord-5.2.x
34
+ - ruby-version: '3.2'
35
+ gemfile: activerecord-5.2.x
36
+ - ruby-version: '3.0'
37
+ gemfile: activerecord-6.0.x
38
+ - ruby-version: '3.1'
39
+ gemfile: activerecord-6.0.x
40
+ - ruby-version: '3.2'
41
+ gemfile: activerecord-6.0.x
42
+
43
+ env:
44
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
45
+
46
+ steps:
47
+ - name: Checkout
48
+ uses: actions/checkout@v3
49
+
50
+ - name: Set up Ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: ${{ matrix.ruby-version }}
54
+ bundler-cache: true
55
+
56
+ - name: Run RSpec
57
+ run: bundle exec rake
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.7.6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.6.1 / 2023-02-21
2
+
3
+ * Support pass through multiple arguments in assignment operator (@cbillen)
4
+ * Move to Github Actions
5
+
1
6
  ### 0.6.0 / 2021-07-29
2
7
 
3
8
  * Use on_load hook for integration with ActiveRecord (@sikachu)
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ## Normalizr
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/normalizr.svg)](https://badge.fury.io/rb/normalizr)
4
- [![Build Status](https://travis-ci.org/dmeremyanin/normalizr.svg?branch=master)](https://travis-ci.org/dmeremyanin/normalizr)
4
+ [![Build Status](https://github.com/dmeremyanin/normalizr/actions/workflows/rspec.yml/badge.svg?branch=main)](https://github.com/dmeremyanin/normalizr/actions/workflows/rspec.yml)
5
5
  [![Code Climate](https://codeclimate.com/github/dmeremyanin/normalizr/badges/gpa.svg)](https://codeclimate.com/github/dmeremyanin/normalizr)
6
6
  [![Test Coverage](https://codeclimate.com/github/dmeremyanin/normalizr/badges/coverage.svg)](https://codeclimate.com/github/dmeremyanin/normalizr/coverage)
7
7
 
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~> 6.1.0'
4
+ gem 'mongoid', '~> 7.0'
5
+ gem 'codeclimate-test-reporter', require: false
6
+
7
+ gemspec path: '../'
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~> 7.0.0'
4
+ gem 'mongoid', '~> 8.0'
5
+ gem 'codeclimate-test-reporter', require: false
6
+
7
+ gemspec path: '../'
@@ -10,7 +10,7 @@ module Normalizr
10
10
 
11
11
  prepend Module.new {
12
12
  options.attributes.each do |method|
13
- define_method :"#{method}=" do |value|
13
+ define_method :"#{method}=" do |value, *method_args|
14
14
  condition_lambda = -> condition { Proc === condition ? instance_exec(&condition) : send(condition) }
15
15
 
16
16
  positive = options.positive_condition.all?(&condition_lambda)
@@ -21,7 +21,7 @@ module Normalizr
21
21
  value = Normalizr.normalize(value, *options.after) if options.after.any?
22
22
  end
23
23
 
24
- super(value)
24
+ super(value, *method_args)
25
25
  end
26
26
  end
27
27
  }
@@ -1,3 +1,3 @@
1
1
  module Normalizr
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: normalizr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Meremyanin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-28 00:00:00.000000000 Z
11
+ date: 2023-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -143,9 +143,10 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
+ - ".github/workflows/rspec.yml"
146
147
  - ".gitignore"
147
148
  - ".rspec"
148
- - ".travis.yml"
149
+ - ".tool-versions"
149
150
  - CHANGELOG.md
150
151
  - Gemfile
151
152
  - LICENSE.txt
@@ -153,6 +154,8 @@ files:
153
154
  - Rakefile
154
155
  - gemfiles/activerecord-5.2.x.gemfile
155
156
  - gemfiles/activerecord-6.0.x.gemfile
157
+ - gemfiles/activerecord-6.1.x.gemfile
158
+ - gemfiles/activerecord-7.0.x.gemfile
156
159
  - lib/normalizr.rb
157
160
  - lib/normalizr/concern.rb
158
161
  - lib/normalizr/configuration.rb
@@ -195,7 +198,7 @@ homepage: https://github.com/dmeremyanin/normalizr
195
198
  licenses:
196
199
  - MIT
197
200
  metadata: {}
198
- post_install_message:
201
+ post_install_message:
199
202
  rdoc_options: []
200
203
  require_paths:
201
204
  - lib
@@ -211,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
214
  version: '0'
212
215
  requirements: []
213
216
  rubygems_version: 3.1.6
214
- signing_key:
217
+ signing_key:
215
218
  specification_version: 4
216
219
  summary: Writer methods parameters normalization
217
220
  test_files:
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.5.7
5
- - 2.6.5
6
- - 2.7.0
7
- gemfile:
8
- - gemfiles/activerecord-5.2.x.gemfile
9
- - gemfiles/activerecord-6.0.x.gemfile
10
- addons:
11
- code_climate:
12
- repo_token:
13
- secure: Dn+nXUOFHTRUhYqYM1NYSxYSyoDhFaB2EHvlhBJ/FK3QxCy4a0beSLhs+YnDl8kI1DOrZQMl7HDrh9AHlfYvu5fX4zADD5g7JkTA2mIx1Rk3yazAUuy1j1ftX/UaowzoUAR5t0qwYm344Nnqoh+O1FujvWbiGVuZvWa6vfjFbXA=
14
- matrix:
15
- fast_finish: true
16
- before_install:
17
- - gem install bundler
18
- sudo: false