activerecord_helper_methods 0.1.0

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: 4289d2417f05242d7904849da2730f9388f46d842cf1c49f7916457e05134252
4
+ data.tar.gz: 30ba380c7989617ff301408b57c64a88c605ccacf65402cc32e98ed499b73614
5
+ SHA512:
6
+ metadata.gz: 6b20e58c14e92ff4667481af4f3594b5330d9b544c322f08193d3557f1cb9a164bef7a9a2e6e466ff9c76730cf299e69f50c23908d56ac1ddc88e61d3d44207d
7
+ data.tar.gz: 1202bba89a705bc7c4effdadae6a01269dcad0aa2a01711de38a7d14d6e2d6087de1d8eeffe70a7b1b25b2b1f79bec1ea5e1697f6cebc2c1f1af4ad995ed7c3a
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-12-28
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders 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, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at harry.graham.595@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
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 activerecord_helper_methods.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ activerecord_helper_methods (0.1.0)
5
+ activerecord (>= 6.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (7.0.4)
11
+ activesupport (= 7.0.4)
12
+ activerecord (7.0.4)
13
+ activemodel (= 7.0.4)
14
+ activesupport (= 7.0.4)
15
+ activesupport (7.0.4)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ coderay (1.1.3)
21
+ concurrent-ruby (1.1.10)
22
+ database_cleaner-active_record (2.0.1)
23
+ activerecord (>= 5.a)
24
+ database_cleaner-core (~> 2.0.0)
25
+ database_cleaner-core (2.0.1)
26
+ diff-lcs (1.5.0)
27
+ i18n (1.12.0)
28
+ concurrent-ruby (~> 1.0)
29
+ method_source (1.0.0)
30
+ minitest (5.16.3)
31
+ pry (0.14.1)
32
+ coderay (~> 1.1)
33
+ method_source (~> 1.0)
34
+ rake (13.0.6)
35
+ rspec (3.12.0)
36
+ rspec-core (~> 3.12.0)
37
+ rspec-expectations (~> 3.12.0)
38
+ rspec-mocks (~> 3.12.0)
39
+ rspec-core (3.12.0)
40
+ rspec-support (~> 3.12.0)
41
+ rspec-expectations (3.12.1)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.12.0)
44
+ rspec-mocks (3.12.1)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-support (3.12.0)
48
+ sqlite3 (1.5.4-x86_64-linux)
49
+ tzinfo (2.0.5)
50
+ concurrent-ruby (~> 1.0)
51
+
52
+ PLATFORMS
53
+ x86_64-linux
54
+
55
+ DEPENDENCIES
56
+ activerecord_helper_methods!
57
+ database_cleaner-active_record
58
+ pry
59
+ rake (>= 13.0)
60
+ rspec (~> 3.0)
61
+ sqlite3
62
+
63
+ BUNDLED WITH
64
+ 2.2.11
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Harry Graham
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.
data/README.md ADDED
@@ -0,0 +1,196 @@
1
+ # ActiveRecord Helper Methods
2
+
3
+ A quick and easy way to add certain types of helper methods to your ActiveRecord models.
4
+
5
+ ## Currently supported
6
+ - Finder methods
7
+ - Accessor methods
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'activerecord_helper_methods'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle install
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install activerecord_helper_methods
24
+
25
+ ## Usage
26
+
27
+ ### add_accessor_methods
28
+
29
+ This helper takes a column name and an array of values.
30
+
31
+ ```ruby
32
+ class Ticket < ActiveRecord::Base
33
+ STATUSES = %w[not_started in_progress completed]
34
+
35
+ add_accessor_methods column: :status, values: STATUSES
36
+ end
37
+ ```
38
+
39
+ Result: it defines an instance method for each value:
40
+
41
+ ```ruby
42
+ ticket = Ticket.create!(status: "in_progress")
43
+
44
+ ticket.not_started?
45
+ => false
46
+ ticket.in_progress?
47
+ => true
48
+ ticket.completed?
49
+ => false
50
+ ```
51
+
52
+ Without the helper, this is more verbose, and requires more maintenance because it would require a new instance method to be added manually whenever a new status is added:
53
+
54
+ ```ruby
55
+ class Ticket < ActiveRecord::Base
56
+ STATUSES = %w[not_started in_progress completed]
57
+
58
+ def not_started?
59
+ status == "not_started"
60
+ end
61
+
62
+ def in_progress?
63
+ status == "in_progress"
64
+ end
65
+
66
+ def completed?
67
+ status == "completed"
68
+ end
69
+ end
70
+ ```
71
+
72
+ This can also be done using meta-programming, as this gem does, but this may add unwanted complexity to your project.
73
+
74
+ ### add_finder_methods
75
+
76
+ This helper takes a column name and an array of values.
77
+
78
+ ```ruby
79
+ class Ticket < ActiveRecord::Base
80
+ STATUSES = %w[not_started in_progress completed]
81
+
82
+ add_finder_methods column: :status, values: STATUSES
83
+ end
84
+ ```
85
+
86
+ Result: it defines a class method for each value, that filters by that value:
87
+
88
+ ```ruby
89
+ ticket_not_started = Ticket.create!(status: "not_started")
90
+ ticket_in_progress = Ticket.create!(status: "in_progress")
91
+ ticket_completed = Ticket.create!(status: "completed")
92
+
93
+ Ticket.count
94
+ => 3
95
+ Ticket.not_started
96
+ # Returns an ActiveRecord::Relation object that contains only ticket_not_started
97
+ Ticket.in_progress
98
+ # Returns an ActiveRecord::Relation object that contains only ticket_in_progress
99
+ Ticket.completed
100
+ # Returns an ActiveRecord::Relation object that contains only ticket_completed
101
+ ```
102
+
103
+ Each method returns an ActiveRecord::Relation, and so are chainable with any other class methods, e.g.:
104
+ ```ruby
105
+ # Note: open and active are fictional class methods in this example
106
+ Ticket.open.not_started.active.count
107
+ => 1
108
+ ```
109
+
110
+ Without the helper, this is more verbose, and requires more maintenance because it would require a new class method (scope) to be added manually whenever a new status is added:
111
+
112
+ ```ruby
113
+ class Ticket < ActiveRecord::Base
114
+ STATUSES = %w[not_started in_progress completed]
115
+
116
+ scope :not_started, -> { where(status: "not_started") }
117
+ scope :in_progress, -> { where(status: "in_progress") }
118
+ scope :completed, -> { where(status: "completed") }
119
+ end
120
+ ```
121
+
122
+ ### add_helper_methods
123
+
124
+ This helper adds both the accessor and finder methods.
125
+
126
+ It takes a column name and an array of values.
127
+
128
+ ```ruby
129
+ class Ticket < ActiveRecord::Base
130
+ STATUSES = %w[not_started in_progress completed blocked archived approved rejected]
131
+
132
+ add_helper_methods column: :status, values: STATUSES
133
+ end
134
+ ```
135
+
136
+ Without the helper, this is significantly more verbose, especially when there are lots of values:
137
+
138
+ ```ruby
139
+ class Ticket < ActiveRecord::Base
140
+ STATUSES = %w[not_started in_progress completed blocked archived approved rejected]
141
+
142
+ scope :not_started, -> { where(status: "not_started") }
143
+ scope :in_progress, -> { where(status: "in_progress") }
144
+ scope :completed, -> { where(status: "completed") }
145
+ scope :blocked, -> { where(status: "blocked") }
146
+ scope :archived, -> { where(status: "archived") }
147
+ scope :approved, -> { where(status: "approved") }
148
+ scope :rejected, -> { where(status: "rejected") }
149
+
150
+ def not_started?
151
+ status == "not_started"
152
+ end
153
+
154
+ def in_progress?
155
+ status == "in_progress"
156
+ end
157
+
158
+ def completed?
159
+ status == "completed"
160
+ end
161
+
162
+ def blocked?
163
+ status == "blocked"
164
+ end
165
+
166
+ def archived?
167
+ status == "archived"
168
+ end
169
+
170
+ def approved?
171
+ status == "approved"
172
+ end
173
+
174
+ def rejected?
175
+ status == "rejected"
176
+ end
177
+ end
178
+ ```
179
+
180
+ ## Development
181
+
182
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
183
+
184
+ To install this gem onto your local machine, run `bundle exec rake install`.
185
+
186
+ ## Contributing
187
+
188
+ Bug reports and pull requests are welcome on GitHub at https://github.com/harry-graham/activerecord_helper_methods. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/harry-graham/activerecord_helper_methods/blob/master/CODE_OF_CONDUCT.md).
189
+
190
+ ## License
191
+
192
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
193
+
194
+ ## Code of Conduct
195
+
196
+ Everyone interacting in this project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/harry-graham/activerecord_helper_methods/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/active_record/helper_methods/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "activerecord_helper_methods"
7
+ spec.version = ActiveRecord::HelperMethods::VERSION
8
+ spec.authors = ["Harry Graham"]
9
+ spec.email = ["harry.graham.595@gmail.com"]
10
+
11
+ spec.summary = "Allows easy adding of helper methods for ActiveRecord models."
12
+ spec.description = <<-DESC
13
+ Allows easy adding of helper methods for ActiveRecord models.
14
+ See usage for examples: https://github.com/harry-graham/activerecord_helper_methods#usage
15
+ DESC
16
+ spec.homepage = "https://github.com/harry-graham/activerecord_helper_methods"
17
+ spec.license = "MIT"
18
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
19
+
20
+ spec.metadata["homepage_uri"] = spec.homepage
21
+ spec.metadata["source_code_uri"] = "https://github.com/harry-graham/activerecord_helper_methods"
22
+ spec.metadata["changelog_uri"] = "https://github.com/harry-graham/activerecord_helper_methods/blob/main/CHANGELOG.md"
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_runtime_dependency "activerecord", ">= 6.1"
34
+
35
+ spec.add_development_dependency "pry", ">= 0"
36
+ spec.add_development_dependency "rake", ">= 13.0"
37
+ spec.add_development_dependency "rspec", "~> 3.0"
38
+ spec.add_development_dependency "sqlite3", ">= 0"
39
+ spec.add_development_dependency "database_cleaner-active_record", ">= 0"
40
+ end
data/bin/console ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+
6
+ # Copy test logic from spec/spec_helper.rb as needed.
7
+
8
+ # Load gems
9
+ require "pry"
10
+ require "active_record"
11
+
12
+ # Load lib files
13
+ require "active_record/helper_methods"
14
+
15
+ # Set up fixtures
16
+ require_relative "../spec/fixtures/setup"
17
+
18
+ require "irb"
19
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveRecord
4
+ module HelperMethods
5
+ module ModelHelperMethods
6
+ def add_helper_methods(column:, values:)
7
+ validate_params(column: column, values: values)
8
+
9
+ values.each do |value|
10
+ define_accessor_method(column, value)
11
+ define_finder_method(column, value)
12
+ end
13
+ end
14
+
15
+ def add_accessor_methods(column:, values:)
16
+ validate_params(column: column, values: values)
17
+
18
+ values.each do |value|
19
+ define_accessor_method(column, value)
20
+ end
21
+ end
22
+
23
+ def add_finder_methods(column:, values:)
24
+ validate_params(column: column, values: values)
25
+
26
+ values.each do |value|
27
+ define_finder_method(column, value)
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ def define_accessor_method(column, value)
34
+ define_method "#{value}?" do
35
+ send(column.to_s) == value.to_s
36
+ end
37
+ end
38
+
39
+ def define_finder_method(column, value)
40
+ define_singleton_method "#{value}" do
41
+ where("#{column} == '#{value}'")
42
+ end
43
+ end
44
+
45
+ # --- Validations --------------------------------------------------------
46
+
47
+ def validate_params(column:, values:)
48
+ validate_column_param(column)
49
+ validate_values_param(values)
50
+ end
51
+
52
+ def validate_column_param(column)
53
+ return if column_names.include?(column.to_s)
54
+
55
+ raise StandardError.new("Invalid column value - must be a column on this table")
56
+ end
57
+
58
+ def validate_values_param(values)
59
+ return if values.is_a?(Array) &&
60
+ (
61
+ values.all? { |v| v.is_a?(String) } ||
62
+ values.all? { |v| v.is_a?(Symbol) }
63
+ )
64
+
65
+ raise StandardError.new("Invalid values - must be an array of strings or symbols")
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveRecord
4
+ module HelperMethods
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveRecord
4
+ module HelperMethods
5
+ extend ActiveSupport::Autoload
6
+
7
+ autoload :ModelHelperMethods
8
+ autoload :VERSION
9
+ end
10
+ end
11
+
12
+ ActiveSupport.on_load(:active_record) do
13
+ extend ActiveRecord::HelperMethods::ModelHelperMethods
14
+ end
metadata ADDED
@@ -0,0 +1,147 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activerecord_helper_methods
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Harry Graham
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-12-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '6.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '6.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: database_cleaner-active_record
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: |2
98
+ Allows easy adding of helper methods for ActiveRecord models.
99
+ See usage for examples: https://github.com/harry-graham/activerecord_helper_methods#usage
100
+ email:
101
+ - harry.graham.595@gmail.com
102
+ executables: []
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - ".gitignore"
107
+ - ".rspec"
108
+ - CHANGELOG.md
109
+ - CODE_OF_CONDUCT.md
110
+ - Gemfile
111
+ - Gemfile.lock
112
+ - LICENSE.txt
113
+ - README.md
114
+ - Rakefile
115
+ - activerecord_helper_methods.gemspec
116
+ - bin/console
117
+ - bin/setup
118
+ - lib/active_record/helper_methods.rb
119
+ - lib/active_record/helper_methods/model_helper_methods.rb
120
+ - lib/active_record/helper_methods/version.rb
121
+ homepage: https://github.com/harry-graham/activerecord_helper_methods
122
+ licenses:
123
+ - MIT
124
+ metadata:
125
+ homepage_uri: https://github.com/harry-graham/activerecord_helper_methods
126
+ source_code_uri: https://github.com/harry-graham/activerecord_helper_methods
127
+ changelog_uri: https://github.com/harry-graham/activerecord_helper_methods/blob/main/CHANGELOG.md
128
+ post_install_message:
129
+ rdoc_options: []
130
+ require_paths:
131
+ - lib
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: 2.4.0
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ requirements: []
143
+ rubygems_version: 3.2.3
144
+ signing_key:
145
+ specification_version: 4
146
+ summary: Allows easy adding of helper methods for ActiveRecord models.
147
+ test_files: []