operator_recordable 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: 22c581a6ae6ddeb9369818a631861d56b3575df72e3f426ce6a25624dc293d15
4
- data.tar.gz: b4a05d37ff0e899da55158e3dc0fd6695a09aed4bc9c62d5e637f39d7b469cf2
3
+ metadata.gz: 7a738b794ff45332a5df918bcec227d8c22683cefca6505b4127d53ca664ae78
4
+ data.tar.gz: 2d895a62c309fc3b45d5b1dc8c9c31eeadf43e580e0fbea8ccb1b565beb50887
5
5
  SHA512:
6
- metadata.gz: a72f3ebda5df303a2971819f53796eac9e7d04f2409ae72c367ab5f4ec3016a6c3d852e308f17188eb1737fe2eb3831e9c633c0e11227a84e2a4a26d139896f7
7
- data.tar.gz: 53bfd57f4e883ca9fcaee71b6339d25847d9474949dd0aada34d2370f1400121531232a4d4c1da2bc03eec681e74b1795abacd7620cfabeebdd6005ab059a964
6
+ metadata.gz: df72ca9f3c177e9f237bd8af23bbb9ac03df004dfc46a4db268cae137a91a9a80cbcc04c564406d04cb3ae92e51c050ba92ca94d8ebf6ebb7be38e52b03ea4c3
7
+ data.tar.gz: cb82594ea68b88414faf85d8ab556f6e58b44ee971b9886d1d34617c0618c290163761309b5e279fd8f4e589f8a7acca0397ef566215f391ea5697d0de94bf32
@@ -0,0 +1,94 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Build
9
+
10
+ on: [push, pull_request]
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ ruby: ['2.5', '2.6', '2.7', '3.0', '3.1']
18
+ activerecord: ['5.2', '6.0', '6.1', '7.0']
19
+ plugin: ['', '_with_request_store']
20
+ experimental: [false]
21
+ exclude:
22
+ - ruby: '2.5'
23
+ activerecord: '7.0'
24
+ plugin: ''
25
+ experimental: false
26
+ - ruby: '2.5'
27
+ activerecord: '7.0'
28
+ plugin: '_with_request_store'
29
+ experimental: false
30
+ - ruby: '2.6'
31
+ activerecord: '7.0'
32
+ plugin: ''
33
+ experimental: false
34
+ - ruby: '2.6'
35
+ activerecord: '7.0'
36
+ plugin: '_with_request_store'
37
+ experimental: false
38
+ - ruby: '2.7'
39
+ activerecord: '5.2'
40
+ plugin: ''
41
+ experimental: false
42
+ - ruby: '2.7'
43
+ activerecord: '5.2'
44
+ plugin: '_with_request_store'
45
+ experimental: false
46
+ - ruby: '3.0'
47
+ activerecord: '5.2'
48
+ plugin: ''
49
+ experimental: false
50
+ - ruby: '3.0'
51
+ activerecord: '5.2'
52
+ plugin: '_with_request_store'
53
+ experimental: false
54
+ - ruby: '3.1'
55
+ activerecord: '5.2'
56
+ plugin: ''
57
+ experimental: false
58
+ - ruby: '3.1'
59
+ activerecord: '5.2'
60
+ plugin: '_with_request_store'
61
+ experimental: false
62
+ # Rails 7.0.1 will start supporting Ruby 3.1, but Rails 7.0.1 has not been released yet
63
+ - ruby: '3.1'
64
+ activerecord: '7.0'
65
+ plugin: ''
66
+ experimental: false
67
+ - ruby: '3.1'
68
+ activerecord: '7.0'
69
+ plugin: '_with_request_store'
70
+ experimental: false
71
+ include:
72
+ - ruby: '2.7'
73
+ activerecord: '5.2'
74
+ plugin: ''
75
+ experimental: true
76
+ - ruby: '2.7'
77
+ activerecord: '5.2'
78
+ plugin: '_with_request_store'
79
+ experimental: true
80
+ continue-on-error: ${{ matrix.experimental }}
81
+ env:
82
+ APPRAISAL: activerecord_${{ matrix.activerecord }}${{ matrix.plugin }}
83
+ steps:
84
+ - uses: actions/checkout@v2
85
+ - name: Set up Ruby
86
+ uses: ruby/setup-ruby@v1
87
+ with:
88
+ ruby-version: ${{ matrix.ruby }}
89
+ - name: Install dependencies
90
+ run: |
91
+ bundle install
92
+ bundle exec appraisal $APPRAISAL bundle install
93
+ - name: Run tests
94
+ run: bundle exec appraisal $APPRAISAL rake
data/.gitignore CHANGED
@@ -4,6 +4,7 @@
4
4
  /Gemfile.lock
5
5
  /coverage/
6
6
  /doc/
7
+ /gemfiles/.bundle/
7
8
  /gemfiles/*.gemfile.lock
8
9
  /pkg/
9
10
  /spec/reports/
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ Exclude:
3
+ - gemfiles/**/*
4
+ TargetRubyVersion: 2.5
3
5
 
4
6
  Style/AsciiComments:
5
7
  Enabled: false
data/Appraisals ADDED
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "activerecord_5.2" do
4
+ gem "activerecord", "~> 5.2.0"
5
+ end
6
+
7
+ appraise "activerecord_5.2_with_request_store" do
8
+ gem "activerecord", "~> 5.2.0"
9
+ gem "request_store"
10
+ end
11
+
12
+ appraise "activerecord_6.0" do
13
+ gem "activerecord", "~> 6.0.0"
14
+ gem "sqlite3", "~> 1.4"
15
+ end
16
+
17
+ appraise "activerecord_6.0_with_request_store" do
18
+ gem "activerecord", "~> 6.0.0"
19
+ gem "request_store"
20
+ gem "sqlite3", "~> 1.4"
21
+ end
22
+
23
+ appraise "activerecord_6.1" do
24
+ gem "activerecord", "~> 6.1.0"
25
+ gem "sqlite3", "~> 1.4"
26
+ end
27
+
28
+ appraise "activerecord_6.1_with_request_store" do
29
+ gem "activerecord", "~> 6.1.0"
30
+ gem "request_store"
31
+ gem "sqlite3", "~> 1.4"
32
+ end
33
+
34
+ appraise "activerecord_7.0" do
35
+ gem "activerecord", "~> 7.0.0"
36
+ gem "sqlite3", "~> 1.4"
37
+ end
38
+
39
+ appraise "activerecord_7.0_with_request_store" do
40
+ gem "activerecord", "~> 7.0.0"
41
+ gem "request_store"
42
+ gem "sqlite3", "~> 1.4"
43
+ end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 1.1.0 (2022-01-07)
4
+
5
+ ### Changes
6
+
7
+ * Add gem metadata
8
+ * Drop Ruby 2.4 support
9
+ * Drop ActiveRecord 5.0 and 5.1 support
10
+
11
+ ### Misc
12
+
13
+ * Introduce Appraisal
14
+ * CI against for ActiveRecord 6.1 and 7.0
15
+ * Use GitHub Actions and stop using Travis CI
16
+ * CI against for Ruby 3.0 and 3.1
17
+ * Require MFA to release gem
18
+
3
19
 
4
20
  ## 1.0.0 (2020-10-16)
5
21
 
data/Gemfile CHANGED
@@ -6,7 +6,3 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in operator_recordable.gemspec
8
8
  gemspec
9
-
10
- gem "activerecord", ENV.fetch("AR_VERSION", "~> 6.0.0")
11
- gem "request_store" unless ENV["WITHOUT_REQUEST_STORE"]
12
- gem "sqlite3", ENV.fetch("SQLITE3_VERSION", ">= 1.4.0")
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OperatorRecordable
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/operator_recordable.svg)](https://badge.fury.io/rb/operator_recordable)
4
- [![Build Status](https://travis-ci.org/yujideveloper/operator_recordable.svg?branch=master)](https://travis-ci.org/yujideveloper/operator_recordable)
4
+ [![Build](https://github.com/yujideveloper/operator_recordable/workflows/Build/badge.svg)](https://github.com/yujideveloper/operator_recordable/actions?query=workflow%3ABuild)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/aaa0fcd567da9232a847/maintainability)](https://codeclimate.com/github/yujideveloper/operator_recordable/maintainability)
6
6
 
7
7
  OperatorRecordable is a Rails plugin gem that makes your ActiveRecord models to be saved or logically deleted with automatically set `created_by`, `updated_by`, and `deleted_by`.
@@ -1,6 +1,6 @@
1
- # frozen_string_literal: true
1
+ # This file was generated by Appraisal
2
2
 
3
- source "https://rubygems.org/"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 5.2.0"
6
6
 
@@ -1,6 +1,6 @@
1
- # frozen_string_literal: true
1
+ # This file was generated by Appraisal
2
2
 
3
- source "https://rubygems.org/"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 5.2.0"
6
6
  gem "request_store"
@@ -1,6 +1,6 @@
1
- # frozen_string_literal: true
1
+ # This file was generated by Appraisal
2
2
 
3
- source "https://rubygems.org/"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 6.0.0"
6
6
  gem "sqlite3", "~> 1.4"
@@ -1,6 +1,6 @@
1
- # frozen_string_literal: true
1
+ # This file was generated by Appraisal
2
2
 
3
- source "https://rubygems.org/"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 6.0.0"
6
6
  gem "request_store"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.1.0"
6
+ gem "sqlite3", "~> 1.4"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.1.0"
6
+ gem "request_store"
7
+ gem "sqlite3", "~> 1.4"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.0.0"
6
+ gem "sqlite3", "~> 1.4"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.0.0"
6
+ gem "request_store"
7
+ gem "sqlite3", "~> 1.4"
8
+
9
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OperatorRecordable
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -24,6 +24,14 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
24
24
  spec.homepage = "https://github.com/yujideveloper/operator_recordable"
25
25
  spec.license = "MIT"
26
26
 
27
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
28
+
29
+ spec.metadata["homepage_uri"] = spec.homepage
30
+ spec.metadata["source_code_uri"] = spec.homepage
31
+ spec.metadata["changelog_uri"] = "https://github.com/yujideveloper/operator_recordable/tree/master/CHANGELOG.md"
32
+
33
+ spec.metadata["rubygems_mfa_required"] = "true"
34
+
27
35
  # Specify which files should be added to the gem when it is released.
28
36
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
29
37
  spec.files = Dir.chdir(__dir__) do
@@ -33,7 +41,10 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
33
41
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
42
  spec.require_paths = ["lib"]
35
43
 
36
- spec.add_dependency "activerecord", ">= 5.0"
44
+ spec.required_ruby_version = ">= 2.5"
45
+
46
+ spec.add_dependency "activerecord", ">= 5.2"
47
+ spec.add_development_dependency "appraisal", ">= 2.3.0"
37
48
  spec.add_development_dependency "bundler", ">= 1.16"
38
49
  spec.add_development_dependency "pry", ">= 0.10.0"
39
50
  spec.add_development_dependency "rake", ">= 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: operator_recordable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Hanamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-16 00:00:00.000000000 Z
11
+ date: 2022-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '5.2'
20
20
  type: :runtime
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: '5.0'
26
+ version: '5.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: appraisal
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.3.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.3.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -118,10 +132,11 @@ executables: []
118
132
  extensions: []
119
133
  extra_rdoc_files: []
120
134
  files:
135
+ - ".github/workflows/ruby.yml"
121
136
  - ".gitignore"
122
137
  - ".rspec"
123
138
  - ".rubocop.yml"
124
- - ".travis.yml"
139
+ - Appraisals
125
140
  - CHANGELOG.md
126
141
  - Gemfile
127
142
  - LICENSE.txt
@@ -129,14 +144,14 @@ files:
129
144
  - Rakefile
130
145
  - bin/console
131
146
  - bin/setup
132
- - gemfiles/activerecord_5.0.gemfile
133
- - gemfiles/activerecord_5.0_with_request_store.gemfile
134
- - gemfiles/activerecord_5.1.gemfile
135
- - gemfiles/activerecord_5.1_with_request_store.gemfile
136
147
  - gemfiles/activerecord_5.2.gemfile
137
148
  - gemfiles/activerecord_5.2_with_request_store.gemfile
138
149
  - gemfiles/activerecord_6.0.gemfile
139
150
  - gemfiles/activerecord_6.0_with_request_store.gemfile
151
+ - gemfiles/activerecord_6.1.gemfile
152
+ - gemfiles/activerecord_6.1_with_request_store.gemfile
153
+ - gemfiles/activerecord_7.0.gemfile
154
+ - gemfiles/activerecord_7.0_with_request_store.gemfile
140
155
  - lib/operator_recordable.rb
141
156
  - lib/operator_recordable/configuration.rb
142
157
  - lib/operator_recordable/extension.rb
@@ -150,7 +165,12 @@ files:
150
165
  homepage: https://github.com/yujideveloper/operator_recordable
151
166
  licenses:
152
167
  - MIT
153
- metadata: {}
168
+ metadata:
169
+ allowed_push_host: https://rubygems.org
170
+ homepage_uri: https://github.com/yujideveloper/operator_recordable
171
+ source_code_uri: https://github.com/yujideveloper/operator_recordable
172
+ changelog_uri: https://github.com/yujideveloper/operator_recordable/tree/master/CHANGELOG.md
173
+ rubygems_mfa_required: 'true'
154
174
  post_install_message:
155
175
  rdoc_options: []
156
176
  require_paths:
@@ -159,14 +179,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
179
  requirements:
160
180
  - - ">="
161
181
  - !ruby/object:Gem::Version
162
- version: '0'
182
+ version: '2.5'
163
183
  required_rubygems_version: !ruby/object:Gem::Requirement
164
184
  requirements:
165
185
  - - ">="
166
186
  - !ruby/object:Gem::Version
167
187
  version: '0'
168
188
  requirements: []
169
- rubygems_version: 3.1.4
189
+ rubygems_version: 3.2.21
170
190
  signing_key:
171
191
  specification_version: 4
172
192
  summary: OperatorRecordable is a Rails plugin to set created_by, updated_by, and deleted_by
data/.travis.yml DELETED
@@ -1,37 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.4
7
- - 2.5
8
- - 2.6
9
- - 2.7
10
- gemfile:
11
- - gemfiles/activerecord_5.0.gemfile
12
- - gemfiles/activerecord_5.0_with_request_store.gemfile
13
- - gemfiles/activerecord_5.1.gemfile
14
- - gemfiles/activerecord_5.1_with_request_store.gemfile
15
- - gemfiles/activerecord_5.2.gemfile
16
- - gemfiles/activerecord_5.2_with_request_store.gemfile
17
- - gemfiles/activerecord_6.0.gemfile
18
- - gemfiles/activerecord_6.0_with_request_store.gemfile
19
- matrix:
20
- exclude:
21
- - rvm: 2.4
22
- gemfile: gemfiles/activerecord_6.0.gemfile
23
- - rvm: 2.4
24
- gemfile: gemfiles/activerecord_6.0_with_request_store.gemfile
25
- allow_failures:
26
- - rvm: 2.7
27
- gemfile: gemfiles/activerecord_5.0.gemfile
28
- - rvm: 2.7
29
- gemfile: gemfiles/activerecord_5.0_with_request_store.gemfile
30
- - rvm: 2.7
31
- gemfile: gemfiles/activerecord_5.1.gemfile
32
- - rvm: 2.7
33
- gemfile: gemfiles/activerecord_5.1_with_request_store.gemfile
34
- - rvm: 2.7
35
- gemfile: gemfiles/activerecord_5.2.gemfile
36
- - rvm: 2.7
37
- gemfile: gemfiles/activerecord_5.2_with_request_store.gemfile
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org/"
4
-
5
- gem "activerecord", "~> 5.0.0"
6
- gem "sqlite3", "~> 1.3.13"
7
-
8
- gemspec path: "../"
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org/"
4
-
5
- gem "activerecord", "~> 5.0.0"
6
- gem "request_store"
7
- gem "sqlite3", "~> 1.3.13"
8
-
9
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org/"
4
-
5
- gem "activerecord", "~> 5.1.0"
6
-
7
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org/"
4
-
5
- gem "activerecord", "~> 5.1.0"
6
- gem "request_store"
7
-
8
- gemspec path: "../"