zyra 1.1.0 → 1.2.0

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: 62a10b511a268b79401186b32fb0c25fe60cfbe062770f8d6de2d97a6dfee4ea
4
- data.tar.gz: 9f5a45fc0216b1e65a7d2f5482a05087ef78787accf8c5e940bf26794e5ca7bb
3
+ metadata.gz: 1729f498f526f9d3ad8308bf4d342832c54d3159793642b45c063196bc9946e0
4
+ data.tar.gz: faf627cf21058bde26d0ae14e785b3fa9a200ba0db5e190b1308feae25d5f28f
5
5
  SHA512:
6
- metadata.gz: 0c63b3d56aec07eacdc683fb8c8084ddb1a5f8c45011bcd8f85ce43a08df85c7d412482256075539038b266d7678dfe36a019dd36267402b8bc625ec4c821a71
7
- data.tar.gz: bc6e5d3e3a3d3695716b048c40ea29bfeb43e62f3ffd192fb94f5887526acba84b28dcabaed422d1dd9c9e8caaa9a4b5d51528ac0504a5146b1cb79b8816c548
6
+ metadata.gz: a95247d9bdc6ba44a72a302e1ae75c5df5d765df5677182212efb386286ddae78d08a46da070b5331e0475bc690f3e57856e36e9782c17468897125d303ec767
7
+ data.tar.gz: 7340e55d077b958be1015d9636f33643e3817787467e357925173ae0d3cb42f2290383cb19d875981ae55437af2c43a0ebf91e9452124cc3e836c7ff0e4dc4f5
data/.circleci/config.yml CHANGED
@@ -22,7 +22,7 @@ workflows:
22
22
  jobs:
23
23
  test:
24
24
  docker:
25
- - image: darthjee/circleci_rails_gems:1.1.0
25
+ - image: darthjee/circleci_rails_gems:1.3.0
26
26
  environment:
27
27
  PROJECT: zyra
28
28
  steps:
@@ -41,7 +41,7 @@ jobs:
41
41
  command: cc-test-reporter after-build --exit-code $?
42
42
  checks:
43
43
  docker:
44
- - image: darthjee/circleci_rails_gems:1.1.0
44
+ - image: darthjee/circleci_rails_gems:1.3.0
45
45
  environment:
46
46
  PROJECT: zyra
47
47
  steps:
@@ -66,7 +66,7 @@ jobs:
66
66
  command: check_specs
67
67
  build-and-release:
68
68
  docker:
69
- - image: darthjee/circleci_rails_gems:1.1.0
69
+ - image: darthjee/circleci_rails_gems:1.3.0
70
70
  environment:
71
71
  PROJECT: zyra
72
72
  steps:
data/.rubocop.yml CHANGED
@@ -2,7 +2,8 @@ require: rubocop-rspec
2
2
  inherit_from: .rubocop_todo.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.5
5
+ TargetRubyVersion: 2.7
6
+ NewCops: enable
6
7
 
7
8
  Metrics/BlockLength:
8
9
  Exclude:
@@ -45,3 +46,8 @@ Style/HashTransformKeys:
45
46
 
46
47
  Style/HashTransformValues:
47
48
  Enabled: true
49
+
50
+ Lint/EmptyBlock: # new in 1.1
51
+ Enabled: true
52
+ Exclude:
53
+ - spec/**/*.rb
data/.rubocop_todo.yml CHANGED
@@ -0,0 +1,12 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-06-02 22:47:39 UTC using RuboCop version 1.51.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 26
10
+ # Configuration parameters: AllowSubject.
11
+ RSpec/MultipleMemoizedHelpers:
12
+ Max: 7
data/Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
1
  FROM darthjee/scripts:0.3.1 as scripts
2
2
 
3
- FROM darthjee/rails_gems:1.1.0 as base
3
+ FROM darthjee/rails_gems:1.3.0 as base
4
4
 
5
5
  COPY --chown=app:app ./ /home/app/app/
6
6
 
data/Gemfile CHANGED
@@ -3,3 +3,24 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ gem 'activerecord', '7.0.4.3'
8
+ gem 'bundler', '>= 2.3.20'
9
+ gem 'database_cleaner', '2.0.2'
10
+ gem 'factory_bot', '6.2.1'
11
+ gem 'pry', '0.14.2'
12
+ gem 'pry-nav', '1.0.0'
13
+ gem 'rake', '13.0.6'
14
+ gem 'reek', '6.1.4'
15
+ gem 'rspec', '3.12.0'
16
+ gem 'rspec-core', '3.12.2'
17
+ gem 'rspec-expectations', '3.12.3'
18
+ gem 'rspec-mocks', '3.12.5'
19
+ gem 'rspec-support', '3.12.0'
20
+ gem 'rubocop', '1.51.0'
21
+ gem 'rubocop-rspec', '2.22.0'
22
+ gem 'rubycritic', '4.8.0'
23
+ gem 'simplecov', '0.22.0'
24
+ gem 'sqlite3', '1.4.2'
25
+ gem 'yard', '0.9.27'
26
+ gem 'yardstick', '0.9.9'
data/README.md CHANGED
@@ -4,7 +4,7 @@ Zyra
4
4
  [![Test Coverage](https://codeclimate.com/github/darthjee/zyra/badges/coverage.svg)](https://codeclimate.com/github/darthjee/zyra/coverage)
5
5
  [![Issue Count](https://codeclimate.com/github/darthjee/zyra/badges/issue_count.svg)](https://codeclimate.com/github/darthjee/zyra)
6
6
  [![Gem Version](https://badge.fury.io/rb/zyra.svg)](https://badge.fury.io/rb/zyra)
7
- [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9836de08612e46b889c7978be2b72a14)](https://www.codacy.com/manual/darthjee/zyra?utm_source=github.com&utm_medium=referral&utm_content=darthjee/zyra&utm_campaign=Badge_Grade)
7
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/fe2da1c4711d4774bd7c46acd578da05)](https://www.codacy.com/gh/darthjee/zyra/dashboard?utm_source=github.com&utm_medium=referral&utm_content=darthjee/zyra&utm_campaign=Badge_Grade)
8
8
  [![Inline docs](http://inch-ci.org/github/darthjee/zyra.svg?branch=master)](http://inch-ci.org/github/darthjee/zyra)
9
9
 
10
10
  ![zyra](https://raw.githubusercontent.com/darthjee/zyra/master/zyra.jpg)
@@ -15,9 +15,13 @@ entity exists without having to reinsert it every time in the database
15
15
  The process is done by registering a model class, then performing
16
16
  a creation in case of missing the entry
17
17
 
18
+ Current Release: [1.2.0](https://github.com/darthjee/zyra/tree/1.2.0)
19
+
20
+ [Next release](https://github.com/darthjee/zyra/compare/1.2.0...master)
21
+
18
22
  Yard Documentation
19
23
  -------------------
20
- [https://www.rubydoc.info/gems/zyra/1.1.0](https://www.rubydoc.info/gems/zyra/1.1.0)
24
+ [https://www.rubydoc.info/gems/zyra/1.2.0](https://www.rubydoc.info/gems/zyra/1.2.0)
21
25
 
22
26
  Installation
23
27
  ---------------
data/lib/zyra/creator.rb CHANGED
@@ -23,10 +23,10 @@ module Zyra
23
23
  # @yield [Object] Instance of the model class
24
24
  #
25
25
  # @return [Object] an instance of model class
26
- def create(**attributes, &block)
26
+ def create(attributes = {}, &block)
27
27
  block ||= proc {}
28
28
 
29
- model = build(**attributes)
29
+ model = build(attributes)
30
30
 
31
31
  event_registry.trigger(:create, model) do
32
32
  model.tap(&:save).tap(&block)
@@ -41,7 +41,7 @@ module Zyra
41
41
  # @param (see #create)
42
42
  # @yield (see #create)
43
43
  # @return (see #create)
44
- def build(**attributes)
44
+ def build(attributes)
45
45
  model_class.new(attributes).tap do |model|
46
46
  event_registry.trigger(:build, model)
47
47
  end
data/lib/zyra/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zyra
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
data/zyra.gemspec CHANGED
@@ -12,34 +12,14 @@ Gem::Specification.new do |gem|
12
12
  gem.homepage = 'https://github.com/darthjee/zyra'
13
13
  gem.description = 'Gem for seeding data in the database'
14
14
  gem.summary = gem.description
15
- gem.required_ruby_version = '>= 2.5.0'
15
+ gem.required_ruby_version = '>= 2.7.0'
16
16
 
17
17
  gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
18
  gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- gem.test_files = gem.files.grep(%r{^(test|gem|features)/})
20
19
  gem.require_paths = ['lib']
21
20
 
22
- gem.add_runtime_dependency 'activesupport', '~> 5.2.0'
23
- gem.add_runtime_dependency 'jace', '>= 0.1.1'
21
+ gem.add_runtime_dependency 'activesupport', '>= 7.0.4'
22
+ gem.add_runtime_dependency 'jace', '>= 0.1.1'
24
23
 
25
- gem.add_development_dependency 'activerecord', '5.2.8.1'
26
- gem.add_development_dependency 'bundler', '2.3.20'
27
- gem.add_development_dependency 'database_cleaner', '1.8.3'
28
- gem.add_development_dependency 'factory_bot', '6.2.1'
29
- gem.add_development_dependency 'pry', '0.14.1'
30
- gem.add_development_dependency 'pry-nav', '1.0.0'
31
- gem.add_development_dependency 'rake', '13.0.1'
32
- gem.add_development_dependency 'reek', '6.0.3'
33
- gem.add_development_dependency 'rspec', '3.11.0'
34
- gem.add_development_dependency 'rspec-core', '3.11.0'
35
- gem.add_development_dependency 'rspec-expectations', '3.11.0'
36
- gem.add_development_dependency 'rspec-mocks', '3.11.1'
37
- gem.add_development_dependency 'rspec-support', '3.11.0'
38
- gem.add_development_dependency 'rubocop', '0.80.1'
39
- gem.add_development_dependency 'rubocop-rspec', '1.38.1'
40
- gem.add_development_dependency 'rubycritic', '4.7.0'
41
- gem.add_development_dependency 'simplecov', '0.21.2'
42
- gem.add_development_dependency 'sqlite3', '1.4.2'
43
- gem.add_development_dependency 'yard', '0.9.27'
44
- gem.add_development_dependency 'yardstick', '0.9.9'
24
+ gem.metadata['rubygems_mfa_required'] = 'true'
45
25
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zyra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DarthJee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-07 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.0
19
+ version: 7.0.4
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.2.0
26
+ version: 7.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jace
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,286 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.1.1
41
- - !ruby/object:Gem::Dependency
42
- name: activerecord
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: 5.2.8.1
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: 5.2.8.1
55
- - !ruby/object:Gem::Dependency
56
- name: bundler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 2.3.20
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '='
67
- - !ruby/object:Gem::Version
68
- version: 2.3.20
69
- - !ruby/object:Gem::Dependency
70
- name: database_cleaner
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 1.8.3
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '='
81
- - !ruby/object:Gem::Version
82
- version: 1.8.3
83
- - !ruby/object:Gem::Dependency
84
- name: factory_bot
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 6.2.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 6.2.1
97
- - !ruby/object:Gem::Dependency
98
- name: pry
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '='
102
- - !ruby/object:Gem::Version
103
- version: 0.14.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.14.1
111
- - !ruby/object:Gem::Dependency
112
- name: pry-nav
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - '='
116
- - !ruby/object:Gem::Version
117
- version: 1.0.0
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '='
123
- - !ruby/object:Gem::Version
124
- version: 1.0.0
125
- - !ruby/object:Gem::Dependency
126
- name: rake
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - '='
130
- - !ruby/object:Gem::Version
131
- version: 13.0.1
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '='
137
- - !ruby/object:Gem::Version
138
- version: 13.0.1
139
- - !ruby/object:Gem::Dependency
140
- name: reek
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '='
144
- - !ruby/object:Gem::Version
145
- version: 6.0.3
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '='
151
- - !ruby/object:Gem::Version
152
- version: 6.0.3
153
- - !ruby/object:Gem::Dependency
154
- name: rspec
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - '='
158
- - !ruby/object:Gem::Version
159
- version: 3.11.0
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - '='
165
- - !ruby/object:Gem::Version
166
- version: 3.11.0
167
- - !ruby/object:Gem::Dependency
168
- name: rspec-core
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - '='
172
- - !ruby/object:Gem::Version
173
- version: 3.11.0
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - '='
179
- - !ruby/object:Gem::Version
180
- version: 3.11.0
181
- - !ruby/object:Gem::Dependency
182
- name: rspec-expectations
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - '='
186
- - !ruby/object:Gem::Version
187
- version: 3.11.0
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - '='
193
- - !ruby/object:Gem::Version
194
- version: 3.11.0
195
- - !ruby/object:Gem::Dependency
196
- name: rspec-mocks
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - '='
200
- - !ruby/object:Gem::Version
201
- version: 3.11.1
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - '='
207
- - !ruby/object:Gem::Version
208
- version: 3.11.1
209
- - !ruby/object:Gem::Dependency
210
- name: rspec-support
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - '='
214
- - !ruby/object:Gem::Version
215
- version: 3.11.0
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - '='
221
- - !ruby/object:Gem::Version
222
- version: 3.11.0
223
- - !ruby/object:Gem::Dependency
224
- name: rubocop
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - '='
228
- - !ruby/object:Gem::Version
229
- version: 0.80.1
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - '='
235
- - !ruby/object:Gem::Version
236
- version: 0.80.1
237
- - !ruby/object:Gem::Dependency
238
- name: rubocop-rspec
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - '='
242
- - !ruby/object:Gem::Version
243
- version: 1.38.1
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - '='
249
- - !ruby/object:Gem::Version
250
- version: 1.38.1
251
- - !ruby/object:Gem::Dependency
252
- name: rubycritic
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - '='
256
- - !ruby/object:Gem::Version
257
- version: 4.7.0
258
- type: :development
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - '='
263
- - !ruby/object:Gem::Version
264
- version: 4.7.0
265
- - !ruby/object:Gem::Dependency
266
- name: simplecov
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - '='
270
- - !ruby/object:Gem::Version
271
- version: 0.21.2
272
- type: :development
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - '='
277
- - !ruby/object:Gem::Version
278
- version: 0.21.2
279
- - !ruby/object:Gem::Dependency
280
- name: sqlite3
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - '='
284
- - !ruby/object:Gem::Version
285
- version: 1.4.2
286
- type: :development
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - '='
291
- - !ruby/object:Gem::Version
292
- version: 1.4.2
293
- - !ruby/object:Gem::Dependency
294
- name: yard
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - '='
298
- - !ruby/object:Gem::Version
299
- version: 0.9.27
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - '='
305
- - !ruby/object:Gem::Version
306
- version: 0.9.27
307
- - !ruby/object:Gem::Dependency
308
- name: yardstick
309
- requirement: !ruby/object:Gem::Requirement
310
- requirements:
311
- - - '='
312
- - !ruby/object:Gem::Version
313
- version: 0.9.9
314
- type: :development
315
- prerelease: false
316
- version_requirements: !ruby/object:Gem::Requirement
317
- requirements:
318
- - - '='
319
- - !ruby/object:Gem::Version
320
- version: 0.9.9
321
41
  description: Gem for seeding data in the database
322
42
  email:
323
43
  - darthjee@gmail.com
@@ -373,7 +93,8 @@ files:
373
93
  - zyra.jpg
374
94
  homepage: https://github.com/darthjee/zyra
375
95
  licenses: []
376
- metadata: {}
96
+ metadata:
97
+ rubygems_mfa_required: 'true'
377
98
  post_install_message:
378
99
  rdoc_options: []
379
100
  require_paths:
@@ -382,14 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
382
103
  requirements:
383
104
  - - ">="
384
105
  - !ruby/object:Gem::Version
385
- version: 2.5.0
106
+ version: 2.7.0
386
107
  required_rubygems_version: !ruby/object:Gem::Requirement
387
108
  requirements:
388
109
  - - ">="
389
110
  - !ruby/object:Gem::Version
390
111
  version: '0'
391
112
  requirements: []
392
- rubygems_version: 3.3.20
113
+ rubygems_version: 3.1.2
393
114
  signing_key:
394
115
  specification_version: 4
395
116
  summary: Gem for seeding data in the database