jsonb_accessor 1.3.7-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ce484d9aeee21dc13a5af013a9621e95d83b56304b6c8f12ff889e4a198ed4a3
4
+ data.tar.gz: 10da9efa55604838e84f1741885b64cfb4cb958d1f6c1ca49b8e4bb44c028764
5
+ SHA512:
6
+ metadata.gz: cde3cd949401ce97e08e44549a4d1053bd5560bbd6b3b9f6ac42fab160c4d631510501a26933e6b7fc2e43ef5ab31fbc67393253c0358c41dbd4902b20c13cb3
7
+ data.tar.gz: 74f273a9462b9abf39e1e0f97e04d411a6f3549c803faab600583585168246df199a93fa520bca5967a54aa6865d549098d029e91acdad79c2ea8877477ca4f9
@@ -0,0 +1,153 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: ['**']
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: 2.7.2
19
+ bundler-cache: true
20
+
21
+ - name: Rubocop
22
+ run: bundle exec rubocop
23
+
24
+ tests:
25
+ needs: lint
26
+ services:
27
+ db:
28
+ image: postgres:9.4
29
+ env:
30
+ POSTGRES_HOST_AUTH_METHOD: trust
31
+ POSTGRES_DB: jsonb_accessor
32
+ ports: ['5432:5432']
33
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
34
+
35
+ runs-on: ubuntu-latest
36
+ strategy:
37
+ fail-fast: false
38
+ matrix:
39
+ include:
40
+ - gemfile: activerecord_5.0.0
41
+ ruby: '2.4'
42
+
43
+ - gemfile: activerecord_5.1.0
44
+ ruby: '2.4'
45
+
46
+ - gemfile: activerecord_5.2.0
47
+ ruby: '2.4'
48
+
49
+ - gemfile: activerecord_5.0.0
50
+ ruby: '2.5'
51
+
52
+ - gemfile: activerecord_5.1.0
53
+ ruby: '2.5'
54
+
55
+ - gemfile: activerecord_5.2.0
56
+ ruby: '2.5'
57
+
58
+ - gemfile: activerecord_6.0.0
59
+ ruby: '2.5'
60
+
61
+ - gemfile: activerecord_6.1.0
62
+ ruby: '2.5'
63
+
64
+ - gemfile: activerecord_5.0.0
65
+ ruby: '2.6'
66
+
67
+ - gemfile: activerecord_5.1.0
68
+ ruby: '2.6'
69
+
70
+ - gemfile: activerecord_5.2.0
71
+ ruby: '2.6'
72
+
73
+ - gemfile: activerecord_6.0.0
74
+ ruby: '2.6'
75
+
76
+ - gemfile: activerecord_6.1.0
77
+ ruby: '2.6'
78
+
79
+ - gemfile: activerecord_5.0.0
80
+ ruby: '2.7'
81
+
82
+ - gemfile: activerecord_5.1.0
83
+ ruby: '2.7'
84
+
85
+ - gemfile: activerecord_5.2.0
86
+ ruby: '2.7'
87
+
88
+ - gemfile: activerecord_6.0.0
89
+ ruby: '2.7'
90
+
91
+ - gemfile: activerecord_6.1.0
92
+ ruby: '2.7'
93
+
94
+ - gemfile: activerecord_7.0.1
95
+ ruby: '2.7'
96
+
97
+ - gemfile: activerecord_6.1.0
98
+ ruby: '3.0'
99
+
100
+ - gemfile: activerecord_6.1.0
101
+ ruby: '3.1'
102
+
103
+ - gemfile: activerecord_6.1.0
104
+ ruby: '3.2'
105
+
106
+ - gemfile: activerecord_7.0.1
107
+ ruby: '3.0'
108
+
109
+ - gemfile: activerecord_7.0.1
110
+ ruby: '3.1'
111
+
112
+ - gemfile: activerecord_7.0.1
113
+ ruby: '3.2'
114
+
115
+ - gemfile: activerecord_5.1.0
116
+ ruby: 'jruby-9.3'
117
+
118
+ - gemfile: activerecord_5.2.0
119
+ ruby: 'jruby-9.3'
120
+
121
+ - gemfile: activerecord_6.0.0
122
+ ruby: 'jruby-9.3'
123
+
124
+ - gemfile: activerecord_6.1.0
125
+ ruby: 'jruby-9.3'
126
+
127
+ # waiting for https://github.com/jruby/activerecord-jdbc-adapter/issues/1125 to be addressed
128
+ # - gemfile: activerecord_7.0.1
129
+ # ruby: 'jruby-9.4'
130
+
131
+ name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }}
132
+
133
+ steps:
134
+ - uses: actions/checkout@v2
135
+
136
+ - name: Set up Ruby
137
+ uses: ruby/setup-ruby@v1
138
+ with:
139
+ ruby-version: ${{ matrix.ruby }}
140
+ bundler-cache: true
141
+
142
+ - name: Bundle install
143
+ run: |
144
+ bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}.gemfile"
145
+ bundle install --jobs 4 --retry 3
146
+
147
+ - name: Setup DB
148
+ run: |
149
+ bundle exec rake db:schema:load
150
+
151
+ - name: Run tests
152
+ run: |
153
+ bundle exec rake spec
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ gemfiles/.bundle
11
+ gemfiles/*.gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format progress
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,62 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.7.2
4
+ SuggestExtensions: false
5
+ Exclude:
6
+ - "db/**/*"
7
+ - "gemfiles/**/*"
8
+ - "vendor/**/*"
9
+ Layout/SpaceBeforeFirstArg:
10
+ Enabled: false
11
+ Layout/LineLength:
12
+ Enabled: false
13
+ Layout/SpaceAroundEqualsInParameterDefault:
14
+ Enabled: false
15
+ Lint/UnusedBlockArgument:
16
+ Enabled: false
17
+ Lint/UnusedMethodArgument:
18
+ Enabled: false
19
+ Metrics/AbcSize:
20
+ Enabled: false
21
+ Metrics/ClassLength:
22
+ Enabled: false
23
+ Metrics/CyclomaticComplexity:
24
+ Enabled: false
25
+ Metrics/MethodLength:
26
+ Enabled: false
27
+ Metrics/ModuleLength:
28
+ Enabled: false
29
+ Metrics/PerceivedComplexity:
30
+ Enabled: false
31
+ Metrics/BlockLength:
32
+ Enabled: false
33
+ Style/ClassAndModuleChildren:
34
+ Enabled: false
35
+ Style/ClassVars:
36
+ Enabled: false
37
+ Style/Documentation:
38
+ Enabled: false
39
+ Style/DoubleNegation:
40
+ Enabled: false
41
+ Naming/FileName:
42
+ Enabled: false
43
+ Style/GuardClause:
44
+ Enabled: false
45
+ Style/NilComparison:
46
+ Enabled: false
47
+ Style/RescueModifier:
48
+ Enabled: false
49
+ Style/SignalException:
50
+ Enabled: false
51
+ Style/SingleLineMethods:
52
+ Enabled: false
53
+ Style/StringLiterals:
54
+ EnforcedStyle: double_quotes
55
+ Naming/BinaryOperatorParameterName:
56
+ Enabled: false
57
+ Naming/VariableNumber:
58
+ Enabled: false
59
+ Gemspec/RequiredRubyVersion:
60
+ Enabled: false
61
+ Gemspec/RequireMFA:
62
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ jruby-9.3.9.0
data/Appraisals ADDED
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "activerecord-5.0.0" do
4
+ gem "activerecord", "~> 5.0.0"
5
+ end
6
+
7
+ appraise "activerecord-5.1.0" do
8
+ gem "activerecord", "~> 5.1.3"
9
+ end
10
+
11
+ appraise "activerecord-5.2.0" do
12
+ gem "activerecord", "~> 5.2.8"
13
+ end
14
+
15
+ appraise "activerecord-6.0.0" do
16
+ gem "activerecord", "~> 6.0.6"
17
+ end
18
+
19
+ appraise "activerecord-6.1.0" do
20
+ gem "activerecord", "~> 6.1"
21
+ end
22
+
23
+ appraise "activerecord-7.0.1" do
24
+ gem "activerecord", "~> 7.0.1"
25
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+ ## [Unreleased]
3
+
4
+ ## [1.3.7] - 2022-12-29
5
+
6
+ - jruby support. jsonb_accessor now depends on `activerecord-jdbcpostgresql-adapter` instead of `pg` when the RUBY_PLATFORM is java. [#157](https://github.com/madeintandem/jsonb_accessor/pull/157)
7
+
8
+ ## [1.3.6] - 2022-09-23
9
+ ### Fixed
10
+
11
+ - Bug fix: Datetime values were not properly deserialized [#155](https://github.com/madeintandem/jsonb_accessor/pull/155)
12
+
13
+ ## [1.3.5] - 2022-07-23
14
+ ### Fixed
15
+
16
+ - Bug fix: Attributes defined outside of jsonb_accessor are not written [#149](https://github.com/madeintandem/jsonb_accessor/pull/149)
17
+
18
+ ## [1.3.4] - 2022-02-02
19
+ ### Fixed
20
+
21
+ - Bug fix: Raised ActiveModel::MissingAttributeError when model was initialized without the jsonb_accessor field [#145](https://github.com/madeintandem/jsonb_accessor/issues/145)
22
+
23
+ ## [1.3.3] - 2022-01-29
24
+ ### Fixed
25
+
26
+ - Bug fix: DateTime objects are now correctly written without timezone
27
+ information [#137](https://github.com/madeintandem/jsonb_accessor/pull/137).
28
+ Thanks @caiohsramos
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Dockerfile ADDED
@@ -0,0 +1,12 @@
1
+ ARG RUBY_VERSION=latest
2
+ FROM ruby:${RUBY_VERSION}
3
+
4
+ WORKDIR /usr/src/app
5
+
6
+ RUN mkdir -p lib/jsonb_accessor
7
+ COPY lib/jsonb_accessor/version.rb ./lib/jsonb_accessor/
8
+ COPY *.gemspec Gemfile* ./
9
+
10
+ RUN bundle install
11
+
12
+ COPY . .
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in jsonb_accessor.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Michael Crismali
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.