imyou 1.4.2 → 1.4.3

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: 895224d01d27525ee70e4258e8cb72fe464d7c67e4f8dd89963338390531068c
4
- data.tar.gz: 489c95849694b08a8a8debf28ea3a82e84ab396394e5d6e1321844b61657832f
3
+ metadata.gz: '048993f98ad779b76fdad79e1351535bc3b4cdbd8e58e0d6738ddd9ed9e37515'
4
+ data.tar.gz: e4adc9af4260f8beab5cdbd96ce2431ba95ead58ec3598a43b5257055dabec01
5
5
  SHA512:
6
- metadata.gz: 4cc1d616d1b96b4421c11ae15855fac651153448dd53a6287ff26a35f5cdddd7aa33da57480c6d68642deb1219ef504b02bd732afc97e05cceafdca88e2f4b29
7
- data.tar.gz: 55090d4bfa282ff8a1c79a470b8f06c9bc74740a7b8bc6b72b3d15961c9ca41a9e635205bd8022cb7ae266690519519d1a6baa397b3d61ec68961cd370c88def
6
+ metadata.gz: 5faaecf9a109d262654d04aa8fe2ce40a3fcbd33efbc2e80eb33accd1a0f8a22ea5cf49b5c8d1e60be7f32a79ddfac60a5ef0edb5b6bd079b43c88c986385915
7
+ data.tar.gz: 56ec59c6399031166898b14be1c1442f06afaff159c0bbd0d5d28db9e512b24dc5e63867c914495a58389e35f1567825b09e09357f288e3098e10af674089d52
@@ -0,0 +1,30 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ build:
8
+ name: Build + Publish
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ packages: write
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby 2.6
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: 2.6.x
20
+
21
+ - name: Publish to RubyGems
22
+ run: |
23
+ mkdir -p $HOME/.gem
24
+ touch $HOME/.gem/credentials
25
+ chmod 0600 $HOME/.gem/credentials
26
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27
+ gem build *.gemspec
28
+ gem push *.gem
29
+ env:
30
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,42 @@
1
+ name: Ruby
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', 'rails_7.0']
16
+ exclude:
17
+ - ruby: '2.6'
18
+ gemfile: 'rails_7.0'
19
+ - ruby: '3.0'
20
+ gemfile: 'rails_5.0'
21
+ - ruby: '3.0'
22
+ gemfile: 'rails_5.1'
23
+ - ruby: '3.0'
24
+ gemfile: 'rails_5.2'
25
+ - ruby: '3.1'
26
+ gemfile: 'rails_5.0'
27
+ - ruby: '3.1'
28
+ gemfile: 'rails_5.1'
29
+ - ruby: '3.1'
30
+ gemfile: 'rails_5.2'
31
+ env:
32
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
33
+
34
+ steps:
35
+ - uses: actions/checkout@v2
36
+ - name: Set up Ruby
37
+ uses: ruby/setup-ruby@v1
38
+ with:
39
+ ruby-version: ${{ matrix.ruby }}
40
+ bundler-cache: true
41
+ - name: Run tests
42
+ run: bundle exec rake
data/Gemfile CHANGED
@@ -4,6 +4,3 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in imyou.gemspec
6
6
  gemspec
7
-
8
- gem 'rails'
9
- gem 'sqlite3'
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Imyou
2
2
 
3
- [![CircleCI](https://circleci.com/gh/patorash/imyou.svg?style=svg)](https://circleci.com/gh/patorash/imyou)
3
+ [![Test](https://github.com/patorash/imyou/actions/workflows/test.yml/badge.svg)](https://github.com/patorash/imyou/actions/workflows/test.yml)
4
4
 
5
5
  Imyou has feature of attaching popular name to ActiveRecord model.
6
6
 
7
- Imyou mean nickname in japanease.
7
+ Imyou mean nickname in japanese.
8
8
 
9
9
  ## Installation
10
10
 
11
- ### Rails 4.x, 5.x and 6.x
11
+ ### Rails 5.x, 6.x and 7.0.x
12
12
 
13
13
  Add this line to your application's Gemfile:
14
14
 
data/Rakefile CHANGED
@@ -1,6 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
2
+ require 'rake/testtask'
3
3
 
4
- RSpec::Core::RakeTask.new(:spec)
4
+ task :default => [:test]
5
5
 
6
- task :default => :spec
6
+ Rake::TestTask.new do |test|
7
+ test.libs << 'lib'
8
+ test.libs << 'test'
9
+ test.test_files = Dir['test/**/*_test.rb']
10
+ test.warning = false
11
+ # test.verbose = true
12
+ end
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 5.0.0'
3
+ gem 'activerecord', '~> 5.0.0'
4
4
  gem 'sqlite3', '~> 1.3.0'
5
5
 
6
6
  gemspec path: '../'
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 5.1.0'
3
+ gem 'activerecord', '~> 5.1.0'
4
4
  gem 'sqlite3', '~> 1.3.0'
5
5
 
6
6
  gemspec path: '../'
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 5.2.0'
3
+ gem 'activerecord', '~> 5.2.0'
4
4
  gem 'sqlite3', '~> 1.4'
5
5
 
6
6
  gemspec path: '../'
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 6.0.0'
3
+ gem 'activerecord', '~> 6.0.0'
4
4
  gem 'sqlite3', '~> 1.4'
5
5
 
6
6
  gemspec path: '../'
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 6.1.0'
3
+ gem 'activerecord', '~> 6.1.0'
4
4
  gem 'sqlite3', '~> 1.4'
5
5
 
6
6
  gemspec path: '../'
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~> 7.0.1'
4
+ gem 'sqlite3', '~> 1.4'
5
+
6
+ gemspec path: '../'
data/imyou.gemspec CHANGED
@@ -23,13 +23,10 @@ Gem::Specification.new do |spec|
23
23
  spec.bindir = "exe"
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
- spec.required_ruby_version = Gem::Requirement.new("< 3".freeze)
26
+ spec.required_ruby_version = '>= 2.5'
27
27
 
28
- spec.add_development_dependency "bundler", "~> 2.1"
28
+ spec.add_dependency 'activerecord', '< 7.1.0', '>= 5.0.0'
29
29
  spec.add_development_dependency "rake", "~> 13.0"
30
- spec.add_development_dependency "rspec", "~> 3.0"
31
- spec.add_development_dependency 'pry', '~> 0'
32
- spec.add_development_dependency 'database_cleaner', '~> 1.7'
33
- spec.add_development_dependency 'combustion', '~> 1.0'
34
- spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
30
+ spec.add_development_dependency "sqlite3", '~> 1.3'
31
+ spec.add_development_dependency 'database_cleaner', '~> 2.0'
35
32
  end
data/lib/imyou/models.rb CHANGED
@@ -114,10 +114,10 @@ module Imyou
114
114
  imyou_nickname.name == nickname
115
115
  end
116
116
  self.imyou_nicknames.replace(array)
117
- true
118
117
  else
119
118
  self.imyou_nicknames.find_by(name: nickname)&.destroy!
120
119
  end
120
+ true
121
121
  end
122
122
 
123
123
  def nicknames=(new_nicknames)
data/lib/imyou/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Imyou
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imyou
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - patorash
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-01 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
20
- type: :development
19
+ version: 5.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 7.1.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: '2.1'
32
+ version: 7.1.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rake
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,75 +45,33 @@ dependencies:
39
45
  - !ruby/object:Gem::Version
40
46
  version: '13.0'
41
47
  - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: pry
48
+ name: sqlite3
57
49
  requirement: !ruby/object:Gem::Requirement
58
50
  requirements:
59
51
  - - "~>"
60
52
  - !ruby/object:Gem::Version
61
- version: '0'
53
+ version: '1.3'
62
54
  type: :development
63
55
  prerelease: false
64
56
  version_requirements: !ruby/object:Gem::Requirement
65
57
  requirements:
66
58
  - - "~>"
67
59
  - !ruby/object:Gem::Version
68
- version: '0'
60
+ version: '1.3'
69
61
  - !ruby/object:Gem::Dependency
70
62
  name: database_cleaner
71
63
  requirement: !ruby/object:Gem::Requirement
72
64
  requirements:
73
65
  - - "~>"
74
66
  - !ruby/object:Gem::Version
75
- version: '1.7'
67
+ version: '2.0'
76
68
  type: :development
77
69
  prerelease: false
78
70
  version_requirements: !ruby/object:Gem::Requirement
79
71
  requirements:
80
72
  - - "~>"
81
73
  - !ruby/object:Gem::Version
82
- version: '1.7'
83
- - !ruby/object:Gem::Dependency
84
- name: combustion
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.0'
97
- - !ruby/object:Gem::Dependency
98
- name: rspec_junit_formatter
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.4.1
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.4.1
74
+ version: '2.0'
111
75
  description: Imyou has feature of attaching popular name to ActiveRecord model.
112
76
  email:
113
77
  - chariderpato@gmail.com
@@ -115,9 +79,9 @@ executables: []
115
79
  extensions: []
116
80
  extra_rdoc_files: []
117
81
  files:
118
- - ".circleci/config.yml"
82
+ - ".github/workflows/gem-push.yml"
83
+ - ".github/workflows/test.yml"
119
84
  - ".gitignore"
120
- - ".rspec"
121
85
  - CODE_OF_CONDUCT.md
122
86
  - Gemfile
123
87
  - LICENSE.txt
@@ -130,6 +94,7 @@ files:
130
94
  - gemfiles/rails_5.2.gemfile
131
95
  - gemfiles/rails_6.0.gemfile
132
96
  - gemfiles/rails_6.1.gemfile
97
+ - gemfiles/rails_7.0.gemfile
133
98
  - imyou.gemspec
134
99
  - lib/generators/imyou/migration/migration_generator.rb
135
100
  - lib/generators/imyou/migration/templates/active_record/migration.rb
@@ -147,16 +112,16 @@ require_paths:
147
112
  - lib
148
113
  required_ruby_version: !ruby/object:Gem::Requirement
149
114
  requirements:
150
- - - "<"
115
+ - - ">="
151
116
  - !ruby/object:Gem::Version
152
- version: '3'
117
+ version: '2.5'
153
118
  required_rubygems_version: !ruby/object:Gem::Requirement
154
119
  requirements:
155
120
  - - ">="
156
121
  - !ruby/object:Gem::Version
157
122
  version: '0'
158
123
  requirements: []
159
- rubygems_version: 3.1.4
124
+ rubygems_version: 3.0.3.1
160
125
  signing_key:
161
126
  specification_version: 4
162
127
  summary: Imyou has feature of attaching popular name to ActiveRecord model.
data/.circleci/config.yml DELETED
@@ -1,199 +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
- rspec:
16
- steps:
17
- - run:
18
- name: run tests
19
- command: |
20
- mkdir /tmp/test-results
21
- TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
22
- circleci tests split --split-by=timings)"
23
-
24
- bundle exec rspec \
25
- --format progress \
26
- --format RspecJunitFormatter \
27
- --out /tmp/test-results/rspec.xml \
28
- --format progress \
29
- $TEST_FILES
30
- run_test:
31
- parameters:
32
- rails_version:
33
- default: '6.1'
34
- type: enum
35
- enum: ['5.0', '5.1', '5.2', '6.0', '6.1']
36
- steps:
37
- - checkout
38
- - run: gem install bundler --version=2.1.4 -N
39
- - run:
40
- name: bundle install
41
- command: |
42
- export BUNDLE_GEMFILE=$PWD/gemfiles/rails_<< parameters.rails_version >>.gemfile
43
- bundle check || bundle install --jobs=4 --retry=3
44
- - rspec
45
- # collect reports
46
- - store_test_results:
47
- path: /tmp/test-results
48
- - store_artifacts:
49
- path: /tmp/test-results
50
- destination: test-results
51
-
52
- jobs:
53
- test:
54
- parameters:
55
- ruby_version:
56
- type: enum
57
- enum: ['2.5.8', '2.6.6', '2.7.2']
58
- rails_version:
59
- type: enum
60
- enum: ['5.0', '5.1', '5.2', '6.0', '6.1']
61
- executor:
62
- name: ruby
63
- ruby_version: << parameters.ruby_version >>
64
- parallelism: 1
65
- steps:
66
- - run_test:
67
- rails_version: << parameters.rails_version >>
68
-
69
- release:
70
- executor:
71
- name: ruby
72
- parallelism: 1
73
- steps:
74
- - checkout
75
- - add_ssh_keys:
76
- fingerprints:
77
- - "e7:e8:17:c5:03:05:fd:0c:0e:9b:3b:d3:90:53:c6:5c"
78
- - run: gem install bundler --version=2.1.4 -N
79
- - run:
80
- name: bundle install
81
- command: bundle check || bundle install --jobs=4 --retry=3
82
- - run:
83
- name: RubyGems.org | Set credential
84
- command: |
85
- mkdir -p ~/.gem
86
- echo ":rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
87
- chmod 0600 ~/.gem/credentials
88
- - run:
89
- name: Setup git
90
- command: |
91
- git config push.default current
92
- git config user.email "chariderpato@gmail.com"
93
- git config user.name "patorash"
94
- - run:
95
- name: rake release
96
- command: |
97
- set +e
98
- filename=$(for n in *; do printf '%s\n' "$n"; done | grep gemspec)
99
- gem_name=`ruby -e "require 'rubygems'; spec = Gem::Specification::load('${filename}'); puts spec.name"`
100
- gem_version=`ruby -e "require 'rubygems'; spec = Gem::Specification::load('${filename}'); puts spec.version"`
101
- gem list --prerelease --all --remote $gem_name \
102
- | grep -E "^${gem_name}" \
103
- | sed -e "s/^.*(\(.*\)).*\$/\1/" \
104
- | grep -q -v $gem_version
105
- result=$?
106
- if [ $result = 0 ]; then
107
- bundle exec rake build
108
- bundle exec rake release
109
- fi
110
- - run:
111
- name: Delete credentials
112
- command: |
113
- shred -u ~/.gem/credentials
114
-
115
- workflows:
116
- build:
117
- jobs:
118
- - test:
119
- name: 'Ruby 2.5.8-Rails 5.0'
120
- ruby_version: '2.5.8'
121
- rails_version: '5.0'
122
- - test:
123
- name: 'Ruby 2.6.6-Rails 5.0'
124
- ruby_version: '2.6.6'
125
- rails_version: '5.0'
126
- - test:
127
- name: 'Ruby 2.7.2-Rails 5.0'
128
- ruby_version: '2.7.2'
129
- rails_version: '5.0'
130
- - test:
131
- name: 'Ruby 2.5.8-Rails 5.1'
132
- ruby_version: '2.5.8'
133
- rails_version: '5.1'
134
- - test:
135
- name: 'Ruby 2.6.6-Rails 5.1'
136
- ruby_version: '2.6.6'
137
- rails_version: '5.1'
138
- - test:
139
- name: 'Ruby 2.7.2-Rails 5.1'
140
- ruby_version: '2.7.2'
141
- rails_version: '5.1'
142
- - test:
143
- name: 'Ruby 2.5.8-Rails 5.2'
144
- ruby_version: '2.5.8'
145
- rails_version: '5.2'
146
- - test:
147
- name: 'Ruby 2.6.6-Rails 5.2'
148
- ruby_version: '2.6.6'
149
- rails_version: '5.2'
150
- - test:
151
- name: 'Ruby 2.7.2-Rails 5.2'
152
- ruby_version: '2.7.2'
153
- rails_version: '5.2'
154
- - test:
155
- name: 'Ruby 2.5.8-Rails 6.0'
156
- ruby_version: '2.5.8'
157
- rails_version: '6.0'
158
- - test:
159
- name: 'Ruby 2.6.6-Rails 6.0'
160
- ruby_version: '2.6.6'
161
- rails_version: '6.0'
162
- - test:
163
- name: 'Ruby 2.7.2-Rails 6.0'
164
- ruby_version: '2.7.2'
165
- rails_version: '6.0'
166
- - test:
167
- name: 'Ruby 2.5.8-Rails 6.1'
168
- ruby_version: '2.5.8'
169
- rails_version: '6.1'
170
- - test:
171
- name: 'Ruby 2.6.6-Rails 6.1'
172
- ruby_version: '2.6.6'
173
- rails_version: '6.1'
174
- - test:
175
- name: 'Ruby 2.7.2-Rails 6.1'
176
- ruby_version: '2.7.2'
177
- rails_version: '6.1'
178
- - release:
179
- context:
180
- - rubygems.org
181
- requires:
182
- - 'Ruby 2.5.8-Rails 5.0'
183
- - 'Ruby 2.6.6-Rails 5.0'
184
- - 'Ruby 2.7.2-Rails 5.0'
185
- - 'Ruby 2.5.8-Rails 5.1'
186
- - 'Ruby 2.6.6-Rails 5.1'
187
- - 'Ruby 2.7.2-Rails 5.1'
188
- - 'Ruby 2.5.8-Rails 5.2'
189
- - 'Ruby 2.6.6-Rails 5.2'
190
- - 'Ruby 2.7.2-Rails 5.2'
191
- - 'Ruby 2.5.8-Rails 6.0'
192
- - 'Ruby 2.6.6-Rails 6.0'
193
- - 'Ruby 2.7.2-Rails 6.0'
194
- - 'Ruby 2.5.8-Rails 6.1'
195
- - 'Ruby 2.6.6-Rails 6.1'
196
- - 'Ruby 2.7.2-Rails 6.1'
197
- filters:
198
- branches:
199
- only: master
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper