form_attribute 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5122b7ca658f3cfb0ced9493d175fbc0297ae56a40290e66a107a0c9b814d9eb
4
+ data.tar.gz: 67fd143a8683bb2ca4dd943781ab21e560abf325432aaa82bcc019287ec574ca
5
+ SHA512:
6
+ metadata.gz: ee33c9ec3542ee74890716fd202b56af220e68b8e227d8833858b6c1d69fec2d1fae01b5be7a432c459ea93e24adf562a5773e5c283691a37d71f5b4737963f2
7
+ data.tar.gz: de46fff5600fa151a9af04cbbaf3ee1d98d4352acaed09a6dc99dc0041c45f75461bd322f1c31284533d3b7e2ff0bcde0ce73316091d6ada04ba8b669cc7b0d6
@@ -0,0 +1,36 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ main ]
13
+ pull_request:
14
+ branches: [ main ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby: ['2.6', '2.7', '3.0']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
31
+ - name: Run rubocop
32
+ run: bundle exec rubocop
33
+ - name: Run reek
34
+ run: bundle exec reek
35
+ - name: Run tests
36
+ run: bundle exec rspec
@@ -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
@@ -0,0 +1,7 @@
1
+ detectors:
2
+ IrresponsibleModule:
3
+ enabled: false
4
+
5
+ NilCheck:
6
+ exclude:
7
+ - "FormAttribute#matching_type_for"
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,14 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.6
4
+
5
+ Style/Documentation:
6
+ Enabled: false
7
+
8
+ Layout/EmptyLinesAroundClassBody:
9
+ Enabled: true
10
+ EnforcedStyle: empty_lines
11
+
12
+ Metrics/BlockLength:
13
+ Exclude:
14
+ - spec/*
@@ -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 ollie@nyemail.co.uk. 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 [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in form_attribute.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 12.0'
9
+
10
+ group :test do
11
+ gem 'simplecov', require: false
12
+ end
@@ -0,0 +1,78 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ form_attribute (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.1)
10
+ diff-lcs (1.4.4)
11
+ docile (1.3.5)
12
+ kwalify (0.7.2)
13
+ parallel (1.20.1)
14
+ parser (3.0.0.0)
15
+ ast (~> 2.4.1)
16
+ psych (3.3.0)
17
+ rainbow (3.0.0)
18
+ rake (12.3.3)
19
+ reek (6.0.3)
20
+ kwalify (~> 0.7.0)
21
+ parser (~> 3.0.0)
22
+ psych (~> 3.1)
23
+ rainbow (>= 2.0, < 4.0)
24
+ regexp_parser (2.0.3)
25
+ rexml (3.2.4)
26
+ rspec (3.10.0)
27
+ rspec-core (~> 3.10.0)
28
+ rspec-expectations (~> 3.10.0)
29
+ rspec-mocks (~> 3.10.0)
30
+ rspec-core (3.10.1)
31
+ rspec-support (~> 3.10.0)
32
+ rspec-expectations (3.10.1)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.10.0)
35
+ rspec-mocks (3.10.1)
36
+ diff-lcs (>= 1.2.0, < 2.0)
37
+ rspec-support (~> 3.10.0)
38
+ rspec-support (3.10.1)
39
+ rubocop (1.8.1)
40
+ parallel (~> 1.10)
41
+ parser (>= 3.0.0.0)
42
+ rainbow (>= 2.2.2, < 4.0)
43
+ regexp_parser (>= 1.8, < 3.0)
44
+ rexml
45
+ rubocop-ast (>= 1.2.0, < 2.0)
46
+ ruby-progressbar (~> 1.7)
47
+ unicode-display_width (>= 1.4.0, < 3.0)
48
+ rubocop-ast (1.4.0)
49
+ parser (>= 2.7.1.5)
50
+ rubocop-rake (0.5.1)
51
+ rubocop
52
+ rubocop-rspec (2.1.0)
53
+ rubocop (~> 1.0)
54
+ rubocop-ast (>= 1.1.0)
55
+ ruby-progressbar (1.11.0)
56
+ simplecov (0.21.2)
57
+ docile (~> 1.1)
58
+ simplecov-html (~> 0.11)
59
+ simplecov_json_formatter (~> 0.1)
60
+ simplecov-html (0.12.3)
61
+ simplecov_json_formatter (0.1.2)
62
+ unicode-display_width (2.0.0)
63
+
64
+ PLATFORMS
65
+ ruby
66
+
67
+ DEPENDENCIES
68
+ form_attribute!
69
+ rake (~> 12.0)
70
+ reek (~> 6)
71
+ rspec (~> 3.10)
72
+ rubocop (~> 1.8)
73
+ rubocop-rake (~> 0.5)
74
+ rubocop-rspec (~> 2.1)
75
+ simplecov
76
+
77
+ BUNDLED WITH
78
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Ollie Nye
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.
@@ -0,0 +1,126 @@
1
+ # FormAttribute
2
+
3
+ ![Ruby](https://github.com/hex-event-solutions/form-attribute/workflows/Ruby/badge.svg)
4
+
5
+ A lightweight gem for adding typed attributes to plain objects
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'form_attribute'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install form_attribute
22
+
23
+ ## Usage
24
+
25
+ Add the line `extend FormAttribute` to your class, then start defining
26
+ attributes as in the example below:
27
+
28
+ ```ruby
29
+ class Person
30
+ extend FormAttribute
31
+
32
+ attribute :name, String
33
+ attribute :role, String, default: 'user'
34
+ attribute :employee, Boolean, default: true
35
+ attribute :contact, [String, Integer]
36
+ attribute :date_of_birth, Time
37
+ end
38
+ ```
39
+
40
+ Attribute definitions follow the pattern `attribute <name>, <types>, <options>`.
41
+ `<types>` can be an array of allowed types or a single allowed type. When
42
+ setting the value, it will be validated against this list of types and will
43
+ raise a `TypeError` if the value being set is not one of these types.
44
+
45
+ Attributes on an object can be read with `Class.attributes`
46
+
47
+ ```ruby
48
+ Person.attributes
49
+ => [:name, :role, :employee, :contact, :date_of_birth]
50
+ ```
51
+
52
+ The type of an attribute can be read with `Class.type_of(<attribute>)`
53
+
54
+ ```ruby
55
+ Person.type_of :name
56
+ => [String]
57
+
58
+ Person.type_of :contact
59
+ => [String, Integer]
60
+ ```
61
+
62
+ The default value of an attribute can be read with
63
+ `Class.default_for(<attribute>)`
64
+
65
+ ```ruby
66
+ Person.default_for :role
67
+ => "user"
68
+ ```
69
+
70
+ Each attribute is available as a method on the object created.
71
+
72
+ ```ruby
73
+ person = Person.new
74
+ => #<Person name: nil, role: "user", employee: true, contact: nil, date_of_birth: nil>
75
+
76
+ person.name
77
+ => nil
78
+
79
+ person.role
80
+ => "user"
81
+ ```
82
+
83
+ Setting attributes is also available as a method
84
+
85
+ ```ruby
86
+ person.name = 'John Smith'
87
+ => "John Smith"
88
+
89
+ person.name
90
+ => "John Smith"
91
+ ```
92
+
93
+ ## Development
94
+
95
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
96
+ `rake spec` to run the tests. You can also run `bin/console` for an interactive
97
+ prompt that will allow you to experiment.
98
+
99
+ To install this gem onto your local machine, run `bundle exec rake install`. To
100
+ release a new version, update the version number in `version.rb`, and then run
101
+ `bundle exec rake release`, which will create a git tag for the version, push
102
+ git commits and tags, and push the `.gem` file to
103
+ [rubygems.org](https://rubygems.org).
104
+
105
+ ## Contributing
106
+
107
+ Bug reports and pull requests are welcome on GitHub at
108
+ https://github.com/hex-event-solutions/form_attribute. This project is intended
109
+ to be a safe, welcoming space for collaboration, and contributors are expected
110
+ to adhere to the
111
+ [code of conduct](https://github.com/hex-event-solutions/form_attribute/blob/master/CODE_OF_CONDUCT.md).
112
+
113
+ ## License
114
+
115
+ The gem is available as open source under the terms of the
116
+ [MIT License](https://opensource.org/licenses/MIT).
117
+
118
+ ## Code of Conduct
119
+
120
+ Everyone interacting in the FormAttribute project's codebases, issue trackers,
121
+ chat rooms and mailing lists is expected to follow the
122
+ [code of conduct](https://github.com/hex-event-solutions/form_attribute/blob/master/CODE_OF_CONDUCT.md).
123
+
124
+ ```
125
+
126
+ ```
@@ -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,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'form_attribute'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
@@ -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,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/form_attribute/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'form_attribute'
7
+ spec.version = FormAttribute::VERSION
8
+ spec.authors = ['Ollie Nye']
9
+ spec.email = ['ollie@nyemail.co.uk']
10
+
11
+ spec.summary = 'A lightweight gem for adding typed attributes to plain objects.'
12
+ spec.description = 'A lightweight gem for adding typed attributes to plain objects.'
13
+ spec.homepage = 'https://github.com/hex-event-solutions/form-attribute'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
16
+
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = 'https://github.com/hex-event-solutions/form-attribute'
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ end
25
+ spec.bindir = 'exe'
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ['lib']
28
+
29
+ spec.add_development_dependency 'reek', '~> 6'
30
+ spec.add_development_dependency 'rspec', '~> 3.10'
31
+ spec.add_development_dependency 'rubocop', '~> 1.8'
32
+ spec.add_development_dependency 'rubocop-rake', '~> 0.5'
33
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.1'
34
+ spec.add_development_dependency 'simplecov', '~> 0.21'
35
+ end
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'form_attribute/version'
4
+ require 'form_attribute/errors'
5
+ require 'form_attribute/boolean'
6
+
7
+ module FormAttribute
8
+ def self.extended(base)
9
+ base.instance_variable_set('@attrs', {})
10
+ base.include InstanceMethods
11
+ base.define_method('initialize') do |**attributes|
12
+ write_many(**attributes)
13
+ end
14
+ end
15
+
16
+ def attribute(name, type, options = {})
17
+ name = name.to_sym
18
+ default = options[:default]
19
+
20
+ init_attribute(name, type, default)
21
+
22
+ matching_type_for(name, default)
23
+
24
+ define_accessors(name)
25
+ end
26
+
27
+ def attributes
28
+ @attrs.keys
29
+ end
30
+
31
+ def type_of(name)
32
+ attr(name)[:type]
33
+ end
34
+
35
+ def default_for(name)
36
+ attr(name)[:default]
37
+ end
38
+
39
+ def matching_type_for(name, value)
40
+ return true if value.nil?
41
+
42
+ type_of(name).each do |type|
43
+ return true if value.is_a? type
44
+ end
45
+ raise TypeError, "Value for #{name.inspect} is the wrong type"
46
+ end
47
+
48
+ private
49
+
50
+ def init_attribute(name, type, default)
51
+ @attrs[name] = {
52
+ type: [type].flatten,
53
+ default: default
54
+ }
55
+ end
56
+
57
+ def define_accessors(name)
58
+ define_method("#{name}=") { |value| write_attribute(name, value) }
59
+ define_method(name) { read_attribute(name) }
60
+ end
61
+
62
+ def attr(name)
63
+ attribute = @attrs[name]
64
+ return attribute if attribute
65
+
66
+ raise UnknownAttributeName, name.inspect
67
+ end
68
+
69
+ module InstanceMethods
70
+ def inspect
71
+ attrs = attributes.map { |name| "#{name}: #{read_attribute(name).inspect}" }.join(', ')
72
+ "#<#{self.class} #{attrs}>"
73
+ end
74
+
75
+ private
76
+
77
+ def write_many(**attributes)
78
+ attributes.each { |name, value| write_attribute(name, value) }
79
+ end
80
+
81
+ def write_attribute(name, value)
82
+ matching_type_for(name, value)
83
+ instance_variable_set("@#{name}", value)
84
+ end
85
+
86
+ def read_attribute(name)
87
+ raise UnknownAttributeName, name unless attributes.include? name
88
+
89
+ value = instance_variable_get("@#{name}")
90
+ value || default_for(name)
91
+ end
92
+
93
+ def attributes
94
+ self.class.attributes
95
+ end
96
+
97
+ def matching_type_for(name, value)
98
+ self.class.matching_type_for(name, value)
99
+ end
100
+
101
+ def default_for(name)
102
+ self.class.default_for(name)
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Boolean; end
4
+
5
+ class TrueClass; include Boolean; end
6
+
7
+ class FalseClass; include Boolean; end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Error < StandardError; end
4
+
5
+ class UnknownAttributeName < Error; end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FormAttribute
4
+ VERSION = '1.0.0'
5
+ end
metadata ADDED
@@ -0,0 +1,147 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: form_attribute
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ollie Nye
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-01-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: reek
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.8'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.8'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.5'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.5'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.21'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.21'
97
+ description: A lightweight gem for adding typed attributes to plain objects.
98
+ email:
99
+ - ollie@nyemail.co.uk
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".github/workflows/ruby.yml"
105
+ - ".gitignore"
106
+ - ".reek.yml"
107
+ - ".rspec"
108
+ - ".rubocop.yml"
109
+ - CODE_OF_CONDUCT.md
110
+ - Gemfile
111
+ - Gemfile.lock
112
+ - LICENSE.txt
113
+ - README.md
114
+ - Rakefile
115
+ - bin/console
116
+ - bin/setup
117
+ - form_attribute.gemspec
118
+ - lib/form_attribute.rb
119
+ - lib/form_attribute/boolean.rb
120
+ - lib/form_attribute/errors.rb
121
+ - lib/form_attribute/version.rb
122
+ homepage: https://github.com/hex-event-solutions/form-attribute
123
+ licenses:
124
+ - MIT
125
+ metadata:
126
+ homepage_uri: https://github.com/hex-event-solutions/form-attribute
127
+ source_code_uri: https://github.com/hex-event-solutions/form-attribute
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.6.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.1.4
144
+ signing_key:
145
+ specification_version: 4
146
+ summary: A lightweight gem for adding typed attributes to plain objects.
147
+ test_files: []