opt_ar 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 93053f9644941d1687edc76dec02f9d2dfb64a50f4f0931c4df50b5d83dee276
4
+ data.tar.gz: 138d399b11b12eac779bb7533c170a1110f8b39c9258cbae618411b5f0ec4441
5
+ SHA512:
6
+ metadata.gz: 8b8365b6c9e4faf4569c50a76a51403891555b1784546bb67ef051bd3e72eae0ae8002900046c00acbecdeffa4b825f1e6a732480ad1165faff937ff30a0e859
7
+ data.tar.gz: 69dd6621084a08c33aad785459eb2a44ce2b9b62ce04cd1916e7247312f40b7ce1b3c24200ed3d6eebfb287a790ea9d640dc855ff929f9192cd82eaaecfc1a08
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.3
5
+ before_install: gem install bundler -v 1.16.1
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at ragavendren.ramachandran@freshworks.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in opt_ar.gemspec
6
+ gemspec
7
+
8
+ gem 'activerecord', '>= 3.2'
9
+ gem 'mysql2', '>= 0.3 '
10
+ gem 'minitest-reporters'
data/Gemfile.lock ADDED
@@ -0,0 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ opt_ar (1.0.0)
5
+ activerecord (>= 3.2)
6
+ mysql2 (>= 0.3)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (4.2.6)
12
+ activesupport (= 4.2.6)
13
+ builder (~> 3.1)
14
+ activerecord (4.2.6)
15
+ activemodel (= 4.2.6)
16
+ activesupport (= 4.2.6)
17
+ arel (~> 6.0)
18
+ activesupport (4.2.6)
19
+ i18n (~> 0.7)
20
+ json (~> 1.7, >= 1.7.7)
21
+ minitest (~> 5.1)
22
+ thread_safe (~> 0.3, >= 0.3.4)
23
+ tzinfo (~> 1.1)
24
+ ansi (1.5.0)
25
+ arel (6.0.4)
26
+ builder (3.2.3)
27
+ i18n (0.8.1)
28
+ json (1.8.6)
29
+ minitest (5.10.1)
30
+ minitest-reporters (1.3.5)
31
+ ansi
32
+ builder
33
+ minitest (>= 5.0)
34
+ ruby-progressbar
35
+ mysql2 (0.4.9)
36
+ rake (10.4.2)
37
+ ruby-progressbar (1.10.0)
38
+ thread_safe (0.3.6)
39
+ tzinfo (1.2.2)
40
+ thread_safe (~> 0.1)
41
+
42
+ PLATFORMS
43
+ ruby
44
+
45
+ DEPENDENCIES
46
+ activerecord (>= 3.2)
47
+ bundler (~> 1.16)
48
+ minitest (~> 5.0)
49
+ minitest-reporters
50
+ mysql2 (>= 0.3)
51
+ opt_ar!
52
+ rake (~> 10.0)
53
+
54
+ BUNDLED WITH
55
+ 1.16.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 ragav0102
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,43 @@
1
+ # OptAR
2
+
3
+ Generates memory-optimal immutable ActiveRecord dupes that are easily serializable and behaves much like them. Define required attributes before-hand and use them just as you would on an AR, for better memory optimization.
4
+
5
+ Ideally, suitable in place of caching AR objects with cache stores like Memcached, where serialization and de-serialization are memory-hungry
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'opt_ar'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install opt_ar
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/opt_ar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the OptAR project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/opt_ar/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << 'test'
6
+ t.libs << 'lib'
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task default: :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "opt_ar"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,7 @@
1
+ module ActiveRecord
2
+ class Relation
3
+ def opt_ar_objects(options = {})
4
+ to_a.opt_ar_objects(options)
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class Array
2
+ def opt_ar_objects(options = {})
3
+ map { |obj| obj.opt_ar_object(options) }
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ module OptAR
2
+ module Errors
3
+ class UndefinedScopeError < StandardError
4
+ end
5
+
6
+ class DuplicateNameError < StandardError
7
+ end
8
+
9
+ class MutationNotAllowedError < StandardError
10
+ end
11
+
12
+ class ARObjectNotFoundError < StandardError
13
+ end
14
+
15
+ class MissingPrimaryKeyError < StandardError
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,69 @@
1
+ module OptAR
2
+ module MethodFinderHelper
3
+ ID_STRING = 'id'.freeze
4
+ WARN_MSG = 'WARNING :: Trying to access attr that was not requested'.freeze
5
+
6
+ private
7
+
8
+ # def attr_reader_proc
9
+ # proc.new {
10
+ # return @attributes[method_name] if @attributes.key?(method_name)
11
+ # }
12
+ # end
13
+
14
+ # Checks for attribute from the attributes hash and returns if found
15
+ #
16
+ # Overriding to avoid attributes misses from causing an error
17
+ # It just throws a warning and proceeds with fetching the actual
18
+ # ActiveRecord object,to check for it's response to the method
19
+ # defined by name method_name
20
+ #
21
+ # Provided only as a fallback for the worst case scenario. Avoid calling
22
+ # methods on the instance, for attribute that was not requested initially
23
+ def method_missing(method_name, *args)
24
+ method_name = method_name.to_sym
25
+ return @attributes[method_name] if @attributes.key?(method_name)
26
+
27
+ raise OptAR::Errors::MissingPrimaryKeyError if primary_key?(method_name)
28
+
29
+ raise OptAR::Errors::MutationNotAllowedError if assign?(method_name)
30
+
31
+ Rails.logger.warn "#{WARN_MSG} :: #{method_name}"
32
+ load_ar_object
33
+ @klass_object ? @klass_object.send(method_name, *args) : super
34
+ end
35
+
36
+ # Introducing this as a best practice when overriding method_missing
37
+ #
38
+ # Be cautious of using respond_to? as this will try to query for the
39
+ # actual ActiveRecord object and check for it's response
40
+ def respond_to_missing?(*args)
41
+ load_ar_object
42
+ @klass_object.respond_to?(*args)
43
+ end
44
+
45
+ # Default scope for the class defined by klass_name will be applied here
46
+ def load_ar_object
47
+ @klass_object ||= klass_name.constantize
48
+ .where(id: id)
49
+ .first(readonly: true)
50
+ raise OptAR::Errors::ARObjectNotFoundError unless @klass_object
51
+ end
52
+
53
+ def klass_key
54
+ klass_name.gsub('::', '_').underscore
55
+ end
56
+
57
+ def klass_primary_key(klass)
58
+ klass.primary_key.to_sym
59
+ end
60
+
61
+ def primary_key?(method_name)
62
+ method_name == klass_primary_key(klass_name.constantize)
63
+ end
64
+
65
+ def assign?(method_name)
66
+ method_name.to_s.include?('=')
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,76 @@
1
+ require File.dirname(__FILE__) + '/helpers/method_finder_helper'
2
+
3
+ module OptAR
4
+ class OptimalActiveRecord
5
+ include OptAR::MethodFinderHelper
6
+
7
+ attr_reader :attributes, :klass_name, :klass_object
8
+
9
+ BLACKLISTED_ATTRIBUTES = 'BLACKLISTED_ATTRIBUTES'.freeze
10
+
11
+ def initialize(object, options = {})
12
+ req_attributes = options[:req_attributes] || []
13
+ assign_attributes(object, req_attributes)
14
+ @klass_name = object.class.name
15
+ # define_attr_readers
16
+ end
17
+
18
+ def as_json
19
+ {
20
+ klass_key => attributes.as_json
21
+ }
22
+ end
23
+
24
+ def to_json
25
+ JSON.dump(as_json)
26
+ end
27
+
28
+ # TODO: for handling JSON serialization
29
+ def self.from_json(string); end
30
+
31
+ private
32
+
33
+ # def define_attr_readers
34
+ # @attributes.each_pair do |attri, val|
35
+ # define_singleton_method attri do
36
+ # val
37
+ # end
38
+ # end
39
+ # end
40
+
41
+ # By default only the primary key will be fetched
42
+ # Any required attribute has to be called out deliberately
43
+ def assign_attributes(object, req_attributes)
44
+ obj_attributes = object.attributes.symbolize_keys
45
+ klass = object.class
46
+ attribute_keys = req_attributes +
47
+ mandatory_attributes(klass) -
48
+ skipped_attributes(klass)
49
+ @attributes = obj_attributes.slice(*attribute_keys)
50
+ end
51
+
52
+ def mandatory_attributes(klass)
53
+ [klass_primary_key(klass)]
54
+ end
55
+
56
+ # Skips fetching attributes defined by BLACKLISTED_ATTRIBUTES constant
57
+ # for the ActiveRecord class
58
+ # Can be used to prevent exposing attributes having PII, password,
59
+ # security related information to the outside world
60
+ def skipped_attributes(klass)
61
+ if klass.const_defined?(BLACKLISTED_ATTRIBUTES)
62
+ klass.const_get(BLACKLISTED_ATTRIBUTES)
63
+ else
64
+ []
65
+ end
66
+ end
67
+
68
+ def marshal_dump
69
+ [@attributes, @klass_name]
70
+ end
71
+
72
+ def marshal_load(result)
73
+ @attributes, @klass_name = result
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,74 @@
1
+ require 'active_support/core_ext/kernel/singleton_class'
2
+ require File.dirname(__FILE__) + '/../optimal_active_record'
3
+
4
+ module OptAR
5
+ module OptimalAR
6
+ module Builder
7
+ module ClassMethods
8
+ def build_opt_ar(name, options = {})
9
+ validate_name(name)
10
+ faker_proc = lambda do |*args|
11
+ options = options.respond_to?(:call) ? unscoped { options.call(*args) } : options
12
+ scope = options[:scope]
13
+ if scope
14
+ valid_scope?(scope) ? safe_send(scope).opt_ar_objects(options) : throw_error(:undefined_scope, scope: scope)
15
+ else
16
+ safe_send(:build_default_scope).opt_ar_objects(options)
17
+ end
18
+ end
19
+ singleton_class.safe_send(:redefine_method, name, &faker_proc)
20
+ end
21
+
22
+ alias show_as build_opt_ar
23
+
24
+ private
25
+
26
+ def valid_scope?(scope_name)
27
+ respond_to? scope_name
28
+ end
29
+
30
+ def validate_name(name)
31
+ valid = valid_name?(name)
32
+ throw_error(:invalid_name, name: name, type: valid) unless valid == true
33
+ end
34
+
35
+ def valid_name?(name)
36
+ if !name.is_a?(Symbol)
37
+ :symbol_expected
38
+ elsif respond_to? name
39
+ :duplicate_name
40
+ else
41
+ true
42
+ end
43
+ end
44
+
45
+ def throw_error(error_type, error_options)
46
+ raise safe_send(error_type, error_options)
47
+ end
48
+
49
+ def undefined_scope(options)
50
+ Rails.logger.error(" :: show_as defined with Undefined Scope :: #{options[:scope]}")
51
+ OptAR::Error::UndefinedScopeError.new(options)
52
+ end
53
+
54
+ def invalid_name(options)
55
+ Rails.logger.error(" :: show_as defined with invalid name :: #{options[:name]} :: #{options[:type]}")
56
+ OptAR::Error::DuplicateNameError.new(options)
57
+ end
58
+ end
59
+
60
+ module InstanceMethods
61
+ def opt_ar_object(options = {})
62
+ OptAR::OptimalActiveRecord.new(self, options)
63
+ end
64
+
65
+ alias opt_ar_objects opt_ar_object
66
+ end
67
+
68
+ def self.included(receiver)
69
+ receiver.extend ClassMethods
70
+ receiver.send :include, InstanceMethods
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,3 @@
1
+ module OptAR
2
+ VERSION = '1.0.0'.freeze
3
+ end
data/lib/opt_ar.rb ADDED
@@ -0,0 +1,23 @@
1
+ require 'opt_ar/version'
2
+ require 'active_record'
3
+ require_relative './opt_ar/optimal_ar/builder'
4
+ # Dir["#{File.dirname(__FILE__)}/lib/opt_ar/**/*.rb"].each { |f| require f }
5
+
6
+ module OptAR
7
+ end
8
+
9
+ ActiveRecord::Base.send :include, OptAR::OptimalAR::Builder
10
+
11
+ module ActiveRecord
12
+ class Relation
13
+ def opt_ar_objects(options = {})
14
+ to_a.opt_ar_objects(options)
15
+ end
16
+ end
17
+ end
18
+
19
+ class Array
20
+ def opt_ar_objects(options = {})
21
+ map { |obj| obj.opt_ar_object(options) }
22
+ end
23
+ end
data/opt_ar.gemspec ADDED
@@ -0,0 +1,35 @@
1
+
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'opt_ar/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'opt_ar'
8
+ spec.version = OptAR::VERSION
9
+ spec.authors = ['ragav0102']
10
+ spec.email = ['ragavh123@gmail.com']
11
+
12
+ spec.summary = 'Generates memory-optimal immutable ActiveRecord dupes'
13
+ spec.description = 'Generates memory-optimal immutable ActiveRecord dupes '\
14
+ 'that are easily serializable and behaves much like '\
15
+ 'them. Define required attributes before-hand and use'\
16
+ ' them just as you would on an AR, for better memory '\
17
+ 'optimization.\n Ideally, suitable in place of caching '\
18
+ 'AR objects with cache stores like Memcached, where '\
19
+ 'serialization and de-serialization are memory-hungry'
20
+ spec.homepage = "https://github.com/ragav0102/opt_ar"
21
+ spec.license = 'MIT'
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ f.match(%r{^(test|spec|features)/})
25
+ end
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_dependency 'activerecord', '>= 3.2'
31
+ spec.add_dependency 'mysql2', '>= 0.3'
32
+ spec.add_development_dependency 'bundler', '~> 1.16'
33
+ spec.add_development_dependency 'minitest', '~> 5.0'
34
+ spec.add_development_dependency 'rake', '~> 10.0'
35
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opt_ar
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - ragav0102
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-05-01 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: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mysql2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.3'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.16'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.16'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '5.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ description: Generates memory-optimal immutable ActiveRecord dupes that are easily
84
+ serializable and behaves much like them. Define required attributes before-hand
85
+ and use them just as you would on an AR, for better memory optimization.\n Ideally,
86
+ suitable in place of caching AR objects with cache stores like Memcached, where
87
+ serialization and de-serialization are memory-hungry
88
+ email:
89
+ - ragavh123@gmail.com
90
+ executables: []
91
+ extensions: []
92
+ extra_rdoc_files: []
93
+ files:
94
+ - ".gitignore"
95
+ - ".travis.yml"
96
+ - CODE_OF_CONDUCT.md
97
+ - Gemfile
98
+ - Gemfile.lock
99
+ - LICENSE.txt
100
+ - README.md
101
+ - Rakefile
102
+ - bin/console
103
+ - bin/setup
104
+ - lib/opt_ar.rb
105
+ - lib/opt_ar/core_ext/active_record/relation.rb
106
+ - lib/opt_ar/core_ext/array.rb
107
+ - lib/opt_ar/errors.rb
108
+ - lib/opt_ar/helpers/method_finder_helper.rb
109
+ - lib/opt_ar/optimal_active_record.rb
110
+ - lib/opt_ar/optimal_ar/builder.rb
111
+ - lib/opt_ar/version.rb
112
+ - opt_ar.gemspec
113
+ homepage: https://github.com/ragav0102/opt_ar
114
+ licenses:
115
+ - MIT
116
+ metadata: {}
117
+ post_install_message:
118
+ rdoc_options: []
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ requirements: []
132
+ rubyforge_project:
133
+ rubygems_version: 2.7.5
134
+ signing_key:
135
+ specification_version: 4
136
+ summary: Generates memory-optimal immutable ActiveRecord dupes
137
+ test_files: []