simple_group 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +36 -0
- data/.github/workflows/test.yml +40 -0
- data/.gitignore +10 -2
- data/README.md +3 -2
- data/lib/simple_group/version.rb +1 -1
- data/simple_group.gemspec +2 -2
- metadata +18 -25
- data/.circleci/config.yml +0 -217
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99c388cd219d0001fa2c7e33013b51a3ba24346a9c748e728bb44be52174d6ac
|
4
|
+
data.tar.gz: 1cf746bb40e9a4838a14ce0241cb18af6f25ef1f52d50af32bde3c4f3f20ec66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 485f5245ed799c4303e69489051a6e399866825875bc87269171c247fe95f79b8ef809d55679fc19ddc247461e709b119285c3cf99c18a1165750ce0e8f18b8f
|
7
|
+
data.tar.gz: 90273e9b1cf697a42d7a03b98f3f6ebdc2750f38c7c07d733e434173651fb5b611787ca6bae108b5544f71dc0886522f5c8c8316b4f3cfeccf32e0958c0a6cef
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_run:
|
5
|
+
workflows:
|
6
|
+
- Test
|
7
|
+
types:
|
8
|
+
- completed
|
9
|
+
branches: [ master ]
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
name: Build + Publish
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
permissions:
|
16
|
+
contents: read
|
17
|
+
packages: write
|
18
|
+
|
19
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- name: Set up Ruby 2.6
|
23
|
+
uses: actions/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: 2.6.x
|
26
|
+
|
27
|
+
- name: Publish to RubyGems
|
28
|
+
run: |
|
29
|
+
mkdir -p $HOME/.gem
|
30
|
+
touch $HOME/.gem/credentials
|
31
|
+
chmod 0600 $HOME/.gem/credentials
|
32
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
33
|
+
gem build *.gemspec
|
34
|
+
gem push *.gem
|
35
|
+
env:
|
36
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby: [2.6, 2.7, 3.0, 3.1]
|
15
|
+
gemfile: [rails_5.0, rails_5.1, rails_5.2, rails_6.0, rails_6.1]
|
16
|
+
exclude:
|
17
|
+
- ruby: 3.0
|
18
|
+
gemfile: rails_5.0
|
19
|
+
- ruby: 3.0
|
20
|
+
gemfile: rails_5.1
|
21
|
+
- ruby: 3.0
|
22
|
+
gemfile: rails_5.2
|
23
|
+
- ruby: 3.1
|
24
|
+
gemfile: rails_5.0
|
25
|
+
- ruby: 3.1
|
26
|
+
gemfile: rails_5.1
|
27
|
+
- ruby: 3.1
|
28
|
+
gemfile: rails_5.2
|
29
|
+
env:
|
30
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
31
|
+
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
- name: Set up Ruby
|
35
|
+
uses: ruby/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
ruby-version: ${{ matrix.ruby }}
|
38
|
+
bundler-cache: true
|
39
|
+
- name: Run tests
|
40
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
@@ -8,6 +8,14 @@
|
|
8
8
|
/spec/reports/
|
9
9
|
/spec/internal/log/
|
10
10
|
/tmp/
|
11
|
-
|
11
|
+
/log/
|
12
|
+
|
13
|
+
# rspec failure tracking
|
12
14
|
.rspec_status
|
13
|
-
|
15
|
+
.ruby-version
|
16
|
+
Gemfile.lock
|
17
|
+
.circleci/config.processed.yml
|
18
|
+
|
19
|
+
/gemfiles/*.gemfile.lock
|
20
|
+
/gemfiles/.bundle
|
21
|
+
*.sqlite3
|
data/README.md
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
simple_group gem is able to add group function to ActiveRecord.
|
4
4
|
|
5
|
-
[![
|
5
|
+
[![Test](https://github.com/patorash/simple_group/actions/workflows/test.yml/badge.svg)](https://github.com/patorash/simple_group/actions/workflows/test.yml)
|
6
|
+
|
6
7
|
[![Code Climate](https://codeclimate.com/github/patorash/simple_group/badges/gpa.svg)](https://codeclimate.com/github/patorash/simple_group)
|
7
8
|
[![Test Coverage](https://codeclimate.com/github/patorash/simple_group/badges/coverage.svg)](https://codeclimate.com/github/patorash/simple_group)
|
8
9
|
|
9
10
|
## Installation
|
10
11
|
|
11
|
-
### Rails
|
12
|
+
### Rails 5.0+
|
12
13
|
|
13
14
|
Add this line to your application's Gemfile:
|
14
15
|
|
data/lib/simple_group/version.rb
CHANGED
data/simple_group.gemspec
CHANGED
@@ -12,17 +12,17 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = %q{simple_group is able to add group function to ActiveRecord.}
|
13
13
|
spec.homepage = "https://github.com/patorash/simple_group"
|
14
14
|
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
19
|
spec.require_paths = ["lib"]
|
19
20
|
|
20
|
-
spec.
|
21
|
+
spec.add_dependency 'rails', '< 7.0.0', '>= 5.0.0'
|
21
22
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
22
23
|
spec.add_development_dependency "pry"
|
23
24
|
spec.add_development_dependency "rspec", ">= 3.0.0"
|
24
25
|
spec.add_development_dependency "sqlite3"
|
25
26
|
spec.add_development_dependency 'combustion', '~> 1.3'
|
26
27
|
spec.add_development_dependency 'database_cleaner', '~> 2.0'
|
27
|
-
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
|
28
28
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_group
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toyoaki Oko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
|
19
|
+
version: 5.0.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 7.0.0
|
23
|
+
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 5.0.0
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 7.0.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rake
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +114,6 @@ dependencies:
|
|
108
114
|
- - "~>"
|
109
115
|
- !ruby/object:Gem::Version
|
110
116
|
version: '2.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rspec_junit_formatter
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.4.1
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.4.1
|
125
117
|
description: simple_group is able to add group function to ActiveRecord.
|
126
118
|
email:
|
127
119
|
- chariderpato@gmail.com
|
@@ -129,7 +121,8 @@ executables: []
|
|
129
121
|
extensions: []
|
130
122
|
extra_rdoc_files: []
|
131
123
|
files:
|
132
|
-
- ".
|
124
|
+
- ".github/workflows/gem-push.yml"
|
125
|
+
- ".github/workflows/test.yml"
|
133
126
|
- ".gitignore"
|
134
127
|
- ".rspec"
|
135
128
|
- Gemfile
|
@@ -166,14 +159,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
159
|
requirements:
|
167
160
|
- - ">="
|
168
161
|
- !ruby/object:Gem::Version
|
169
|
-
version:
|
162
|
+
version: 2.6.0
|
170
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
164
|
requirements:
|
172
165
|
- - ">="
|
173
166
|
- !ruby/object:Gem::Version
|
174
167
|
version: '0'
|
175
168
|
requirements: []
|
176
|
-
rubygems_version: 3.1
|
169
|
+
rubygems_version: 3.0.3.1
|
177
170
|
signing_key:
|
178
171
|
specification_version: 4
|
179
172
|
summary: simple_group is able to add group function to ActiveRecord.
|
data/.circleci/config.yml
DELETED
@@ -1,217 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
executors:
|
4
|
-
ruby:
|
5
|
-
parameters:
|
6
|
-
ruby_version:
|
7
|
-
default: '2.7.2'
|
8
|
-
type: enum
|
9
|
-
enum: ['2.5.8', '2.6.6', '2.7.2']
|
10
|
-
working_directory: ~/repo
|
11
|
-
docker:
|
12
|
-
- image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
|
13
|
-
|
14
|
-
commands:
|
15
|
-
bundle_install:
|
16
|
-
parameters:
|
17
|
-
rails_version:
|
18
|
-
default: '6.1'
|
19
|
-
type: enum
|
20
|
-
enum: ['5.0', '5.1', '5.2', '6.0', '6.1']
|
21
|
-
steps:
|
22
|
-
- run: gem install bundler --version=2.1.4 -N
|
23
|
-
- run:
|
24
|
-
name: bundle install
|
25
|
-
command: |
|
26
|
-
export BUNDLE_GEMFILE=$PWD/gemfiles/rails_<< parameters.rails_version >>.gemfile
|
27
|
-
bundle check || bundle install --jobs=4 --retry=3
|
28
|
-
|
29
|
-
rspec:
|
30
|
-
parameters:
|
31
|
-
rails_version:
|
32
|
-
default: '6.1'
|
33
|
-
type: enum
|
34
|
-
enum: ['5.0', '5.1', '5.2', '6.0', '6.1']
|
35
|
-
steps:
|
36
|
-
- run:
|
37
|
-
name: run tests
|
38
|
-
command: |
|
39
|
-
export BUNDLE_GEMFILE=$PWD/gemfiles/rails_<< parameters.rails_version >>.gemfile
|
40
|
-
mkdir /tmp/test-results
|
41
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
42
|
-
circleci tests split --split-by=timings)"
|
43
|
-
|
44
|
-
bundle exec rspec \
|
45
|
-
--format progress \
|
46
|
-
--format RspecJunitFormatter \
|
47
|
-
--out /tmp/test-results/rspec.xml \
|
48
|
-
--format progress \
|
49
|
-
$TEST_FILES
|
50
|
-
|
51
|
-
run_test:
|
52
|
-
parameters:
|
53
|
-
rails_version:
|
54
|
-
default: '6.1'
|
55
|
-
type: enum
|
56
|
-
enum: ['5.0', '5.1', '5.2', '6.0', '6.1']
|
57
|
-
steps:
|
58
|
-
- checkout
|
59
|
-
- bundle_install:
|
60
|
-
rails_version: << parameters.rails_version >>
|
61
|
-
- rspec:
|
62
|
-
rails_version: << parameters.rails_version >>
|
63
|
-
# collect reports
|
64
|
-
- store_test_results:
|
65
|
-
path: /tmp/test-results
|
66
|
-
- store_artifacts:
|
67
|
-
path: /tmp/test-results
|
68
|
-
destination: test-results
|
69
|
-
|
70
|
-
jobs:
|
71
|
-
test:
|
72
|
-
parameters:
|
73
|
-
ruby_version:
|
74
|
-
type: enum
|
75
|
-
enum: ['2.5.8', '2.6.6', '2.7.2']
|
76
|
-
rails_version:
|
77
|
-
type: enum
|
78
|
-
enum: ['5.0', '5.1', '5.2', '6.0', '6.1']
|
79
|
-
executor:
|
80
|
-
name: ruby
|
81
|
-
ruby_version: << parameters.ruby_version >>
|
82
|
-
parallelism: 1
|
83
|
-
steps:
|
84
|
-
- run_test:
|
85
|
-
rails_version: << parameters.rails_version >>
|
86
|
-
|
87
|
-
release:
|
88
|
-
executor:
|
89
|
-
name: ruby
|
90
|
-
parallelism: 1
|
91
|
-
steps:
|
92
|
-
- checkout
|
93
|
-
- add_ssh_keys:
|
94
|
-
fingerprints:
|
95
|
-
- "09:10:3f:c9:1a:86:ab:0a:9c:b2:37:3a:1b:10:40:08"
|
96
|
-
- run: gem install bundler --version=2.1.4 -N
|
97
|
-
- run:
|
98
|
-
name: bundle install
|
99
|
-
command: bundle check || bundle install --jobs=4 --retry=3
|
100
|
-
- run:
|
101
|
-
name: RubyGems.org | Set credential
|
102
|
-
command: |
|
103
|
-
mkdir -p ~/.gem
|
104
|
-
echo ":rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
|
105
|
-
chmod 0600 ~/.gem/credentials
|
106
|
-
- run:
|
107
|
-
name: Setup git
|
108
|
-
command: |
|
109
|
-
git config push.default current
|
110
|
-
git config user.email "chariderpato@gmail.com"
|
111
|
-
git config user.name "patorash"
|
112
|
-
- run:
|
113
|
-
name: rake release
|
114
|
-
command: |
|
115
|
-
set +e
|
116
|
-
filename=$(for n in *; do printf '%s\n' "$n"; done | grep gemspec)
|
117
|
-
gem_name=`ruby -e "require 'rubygems'; spec = Gem::Specification::load('${filename}'); puts spec.name"`
|
118
|
-
gem_version=`ruby -e "require 'rubygems'; spec = Gem::Specification::load('${filename}'); puts spec.version"`
|
119
|
-
gem list --prerelease --all --remote $gem_name \
|
120
|
-
| grep -E "^${gem_name}" \
|
121
|
-
| sed -e "s/^.*(\(.*\)).*\$/\1/" \
|
122
|
-
| grep -q -v $gem_version
|
123
|
-
result=$?
|
124
|
-
if [ $result = 0 ]; then
|
125
|
-
bundle exec rake build
|
126
|
-
bundle exec rake release
|
127
|
-
fi
|
128
|
-
- run:
|
129
|
-
name: Delete credentials
|
130
|
-
command: |
|
131
|
-
shred -u ~/.gem/credentials
|
132
|
-
|
133
|
-
workflows:
|
134
|
-
build:
|
135
|
-
jobs:
|
136
|
-
- test:
|
137
|
-
name: 'Ruby 2.5.8-Rails 5.0'
|
138
|
-
ruby_version: '2.5.8'
|
139
|
-
rails_version: '5.0'
|
140
|
-
- test:
|
141
|
-
name: 'Ruby 2.6.6-Rails 5.0'
|
142
|
-
ruby_version: '2.6.6'
|
143
|
-
rails_version: '5.0'
|
144
|
-
- test:
|
145
|
-
name: 'Ruby 2.7.2-Rails 5.0'
|
146
|
-
ruby_version: '2.7.2'
|
147
|
-
rails_version: '5.0'
|
148
|
-
- test:
|
149
|
-
name: 'Ruby 2.5.8-Rails 5.1'
|
150
|
-
ruby_version: '2.5.8'
|
151
|
-
rails_version: '5.1'
|
152
|
-
- test:
|
153
|
-
name: 'Ruby 2.6.6-Rails 5.1'
|
154
|
-
ruby_version: '2.6.6'
|
155
|
-
rails_version: '5.1'
|
156
|
-
- test:
|
157
|
-
name: 'Ruby 2.7.2-Rails 5.1'
|
158
|
-
ruby_version: '2.7.2'
|
159
|
-
rails_version: '5.1'
|
160
|
-
- test:
|
161
|
-
name: 'Ruby 2.5.8-Rails 5.2'
|
162
|
-
ruby_version: '2.5.8'
|
163
|
-
rails_version: '5.2'
|
164
|
-
- test:
|
165
|
-
name: 'Ruby 2.6.6-Rails 5.2'
|
166
|
-
ruby_version: '2.6.6'
|
167
|
-
rails_version: '5.2'
|
168
|
-
- test:
|
169
|
-
name: 'Ruby 2.7.2-Rails 5.2'
|
170
|
-
ruby_version: '2.7.2'
|
171
|
-
rails_version: '5.2'
|
172
|
-
- test:
|
173
|
-
name: 'Ruby 2.5.8-Rails 6.0'
|
174
|
-
ruby_version: '2.5.8'
|
175
|
-
rails_version: '6.0'
|
176
|
-
- test:
|
177
|
-
name: 'Ruby 2.6.6-Rails 6.0'
|
178
|
-
ruby_version: '2.6.6'
|
179
|
-
rails_version: '6.0'
|
180
|
-
- test:
|
181
|
-
name: 'Ruby 2.7.2-Rails 6.0'
|
182
|
-
ruby_version: '2.7.2'
|
183
|
-
rails_version: '6.1'
|
184
|
-
- test:
|
185
|
-
name: 'Ruby 2.5.8-Rails 6.1'
|
186
|
-
ruby_version: '2.5.8'
|
187
|
-
rails_version: '6.1'
|
188
|
-
- test:
|
189
|
-
name: 'Ruby 2.6.6-Rails 6.1'
|
190
|
-
ruby_version: '2.6.6'
|
191
|
-
rails_version: '6.1'
|
192
|
-
- test:
|
193
|
-
name: 'Ruby 2.7.2-Rails 6.1'
|
194
|
-
ruby_version: '2.7.2'
|
195
|
-
rails_version: '6.1'
|
196
|
-
- release:
|
197
|
-
context:
|
198
|
-
- rubygems.org
|
199
|
-
requires:
|
200
|
-
- 'Ruby 2.5.8-Rails 5.0'
|
201
|
-
- 'Ruby 2.6.6-Rails 5.0'
|
202
|
-
- 'Ruby 2.7.2-Rails 5.0'
|
203
|
-
- 'Ruby 2.5.8-Rails 5.1'
|
204
|
-
- 'Ruby 2.6.6-Rails 5.1'
|
205
|
-
- 'Ruby 2.7.2-Rails 5.1'
|
206
|
-
- 'Ruby 2.5.8-Rails 5.2'
|
207
|
-
- 'Ruby 2.6.6-Rails 5.2'
|
208
|
-
- 'Ruby 2.7.2-Rails 5.2'
|
209
|
-
- 'Ruby 2.5.8-Rails 6.0'
|
210
|
-
- 'Ruby 2.6.6-Rails 6.0'
|
211
|
-
- 'Ruby 2.7.2-Rails 6.0'
|
212
|
-
- 'Ruby 2.5.8-Rails 6.1'
|
213
|
-
- 'Ruby 2.6.6-Rails 6.1'
|
214
|
-
- 'Ruby 2.7.2-Rails 6.1'
|
215
|
-
filters:
|
216
|
-
branches:
|
217
|
-
only: master
|