anchormodel 0.1.2 → 0.1.4

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: 2b70771d2e2deb3240110e225980c5957665efe1d59b2dc4128c43bd092daa6e
4
- data.tar.gz: c8030a9df0c89523d319b38528b0bcdbf238b50e95645a209198895e4d014732
3
+ metadata.gz: 393936de0294a0c3ee8d3096a38c365bce1843b4812e670034ac9037cdd61453
4
+ data.tar.gz: 130e1ae1bdf5fd50dcc1c27d9c0fd7e1b81e2923088f2bf0c81ef4d7e57ccfc6
5
5
  SHA512:
6
- metadata.gz: 7838fd578d77d5f2b5d3d9df078ed4118f3baca165bf47dbba94636897ec4704f1eb22804930c459c29ddf803e271c24a27786b99e48ffd8e16e5598f6fbb807
7
- data.tar.gz: a7e85cae485400d87f6d10b496a4887c0d01f8435bf2e770c0103a26dab2713a22526be3c1b945b52fb624abc0f1770a81cf5136ddd9f47ce6369bb5bfa48fc1
6
+ metadata.gz: 2a9b9e0a451d772fb0c54ae36c9f437b8aab77a74eae058f381b65ba01cc62719ec0adbd5e56b674585bc5071aa239e74e1e540591a3b70bd308c66ec8bd54da
7
+ data.tar.gz: f5f5326a0a77605c3a3b5b1e7139e24f5de82b4acb91d59a0624ae3965db0c2dc5dd0b0a0458b96b727bb7560a1495928ea7664b16b432427665449998eaf910
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 0.1.4 (23.04.2024)
2
+
3
+ - Stick closer to the Rails API of Value
4
+ - Enhance testing
5
+
6
+ # 0.1.3 (19.05.2023)
7
+
8
+ - Add Rails generator
9
+
1
10
  # 0.1.2 (25.01.2023)
2
11
 
3
12
  - Consider empty string as nil (this is necessary to make Rails assignments work)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anchormodel (0.1.1)
4
+ anchormodel (0.1.4.edge)
5
5
  rails (~> 7.0)
6
6
 
7
7
  GEM
@@ -78,41 +78,41 @@ GEM
78
78
  coderay (1.1.3)
79
79
  concurrent-ruby (1.1.10)
80
80
  crass (1.0.6)
81
- date (3.3.3)
81
+ date (3.3.4)
82
82
  erubi (1.12.0)
83
- globalid (1.0.1)
84
- activesupport (>= 5.0)
83
+ globalid (1.2.1)
84
+ activesupport (>= 6.1)
85
85
  i18n (1.12.0)
86
86
  concurrent-ruby (~> 1.0)
87
87
  json (2.6.3)
88
- loofah (2.19.1)
88
+ loofah (2.22.0)
89
89
  crass (~> 1.0.2)
90
- nokogiri (>= 1.5.9)
91
- mail (2.8.0.1)
90
+ nokogiri (>= 1.12.0)
91
+ mail (2.8.1)
92
92
  mini_mime (>= 0.1.1)
93
93
  net-imap
94
94
  net-pop
95
95
  net-smtp
96
- marcel (1.0.2)
96
+ marcel (1.0.4)
97
97
  method_source (1.0.0)
98
- mini_mime (1.1.2)
98
+ mini_mime (1.1.5)
99
99
  minitest (5.17.0)
100
100
  minitest-reporters (1.5.0)
101
101
  ansi
102
102
  builder
103
103
  minitest (>= 5.0)
104
104
  ruby-progressbar
105
- net-imap (0.3.4)
105
+ net-imap (0.4.10)
106
106
  date
107
107
  net-protocol
108
108
  net-pop (0.1.2)
109
109
  net-protocol
110
- net-protocol (0.2.1)
110
+ net-protocol (0.2.2)
111
111
  timeout
112
- net-smtp (0.3.3)
112
+ net-smtp (0.5.0)
113
113
  net-protocol
114
- nio4r (2.5.8)
115
- nokogiri (1.14.0-x86_64-linux)
114
+ nio4r (2.7.1)
115
+ nokogiri (1.16.4-x86_64-linux)
116
116
  racc (~> 1.4)
117
117
  parallel (1.22.1)
118
118
  parser (3.2.0.0)
@@ -120,9 +120,9 @@ GEM
120
120
  pry (0.14.1)
121
121
  coderay (~> 1.1)
122
122
  method_source (~> 1.0)
123
- racc (1.6.2)
123
+ racc (1.7.3)
124
124
  rack (2.2.5)
125
- rack-test (2.0.2)
125
+ rack-test (2.1.0)
126
126
  rack (>= 1.3)
127
127
  rails (7.0.4)
128
128
  actioncable (= 7.0.4)
@@ -138,11 +138,13 @@ GEM
138
138
  activesupport (= 7.0.4)
139
139
  bundler (>= 1.15.0)
140
140
  railties (= 7.0.4)
141
- rails-dom-testing (2.0.3)
142
- activesupport (>= 4.2.0)
141
+ rails-dom-testing (2.2.0)
142
+ activesupport (>= 5.0.0)
143
+ minitest
143
144
  nokogiri (>= 1.6)
144
- rails-html-sanitizer (1.5.0)
145
- loofah (~> 2.19, >= 2.19.1)
145
+ rails-html-sanitizer (1.6.0)
146
+ loofah (~> 2.21)
147
+ nokogiri (~> 1.14)
146
148
  railties (7.0.4)
147
149
  actionpack (= 7.0.4)
148
150
  activesupport (= 7.0.4)
@@ -172,20 +174,20 @@ GEM
172
174
  rubocop (>= 1.33.0, < 2.0)
173
175
  ruby-progressbar (1.11.0)
174
176
  sqlite3 (1.6.0-x86_64-linux)
175
- thor (1.2.1)
176
- timeout (0.3.1)
177
+ thor (1.3.1)
178
+ timeout (0.4.1)
177
179
  tzinfo (2.0.5)
178
180
  concurrent-ruby (~> 1.0)
179
181
  unicode-display_width (2.4.2)
180
182
  webrick (1.7.0)
181
- websocket-driver (0.7.5)
183
+ websocket-driver (0.7.6)
182
184
  websocket-extensions (>= 0.1.0)
183
185
  websocket-extensions (0.1.5)
184
186
  yard (0.9.28)
185
187
  webrick (~> 1.7.0)
186
188
  yard-activesupport-concern (0.0.1)
187
189
  yard (>= 0.8)
188
- zeitwerk (2.6.6)
190
+ zeitwerk (2.6.13)
189
191
 
190
192
  PLATFORMS
191
193
  x86_64-linux
data/README.md CHANGED
@@ -50,6 +50,14 @@ entries of an Anchormodel.
50
50
  1. Add gem to Gemfile: `gem 'anchormodel'`
51
51
  2. In `application_record.rb`, add in the class body: `include Anchormodel::ModelMixin`
52
52
 
53
+ # Generator
54
+
55
+ For convenience, Anchormodel provides a Rails generator:
56
+
57
+ `rails generate anchormodel Role`
58
+
59
+ This will create `app/anchormodels/role.rb`.
60
+
53
61
  # Basic example
54
62
 
55
63
  `app/anchormodels/role.rb`:
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.4
data/anchormodel.gemspec CHANGED
@@ -2,48 +2,33 @@
2
2
  # This file is auto-generated via: 'rake gemspec'.
3
3
 
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: anchormodel 0.1.2 ruby lib
5
+ # stub: anchormodel 0.1.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "anchormodel".freeze
9
- s.version = "0.1.2"
9
+ s.version = "0.1.4".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Sandro Kalbermatter".freeze]
14
- s.date = "2023-01-25"
15
- s.files = [".gitignore".freeze, ".ruby-version".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "anchormodel.gemspec".freeze, "bin/rails".freeze, "doc/Anchormodel.html".freeze, "doc/Anchormodel/ActiveModelTypeValue.html".freeze, "doc/Anchormodel/Attribute.html".freeze, "doc/Anchormodel/ModelMixin.html".freeze, "doc/Anchormodel/Version.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/anchormodel.rb".freeze, "lib/anchormodel/active_model_type_value.rb".freeze, "lib/anchormodel/attribute.rb".freeze, "lib/anchormodel/model_mixin.rb".freeze, "lib/anchormodel/version.rb".freeze, "logo.svg".freeze, "test/active_record_model/user_test.rb".freeze, "test/dummy/.gitignore".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/anchormodels/locale.rb".freeze, "test/dummy/app/anchormodels/role.rb".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/user.rb".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/credentials.yml.enc".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/initializers/content_security_policy.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/permissions_policy.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/db/migrate/20230107173151_create_users.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/db/seeds.rb".freeze, "test/dummy/lib/tasks/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/tmp/.keep".freeze, "test/dummy/tmp/pids/.keep".freeze, "test/test_helper.rb".freeze]
14
+ s.date = "2024-04-23"
15
+ s.files = [".gitignore".freeze, ".ruby-version".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "anchormodel.gemspec".freeze, "bin/rails".freeze, "doc/Anchormodel.html".freeze, "doc/Anchormodel/ActiveModelTypeValue.html".freeze, "doc/Anchormodel/Attribute.html".freeze, "doc/Anchormodel/ModelMixin.html".freeze, "doc/Anchormodel/Version.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/anchormodel.rb".freeze, "lib/anchormodel/active_model_type_value_single.rb".freeze, "lib/anchormodel/attribute.rb".freeze, "lib/anchormodel/model_mixin.rb".freeze, "lib/anchormodel/util.rb".freeze, "lib/anchormodel/version.rb".freeze, "lib/generators/anchormodel/USAGE".freeze, "lib/generators/anchormodel/anchormodel_generator.rb".freeze, "lib/generators/anchormodel/templates/anchormodel.rb.erb".freeze, "logo.svg".freeze, "pkg/anchormodel-0.1.3.gem".freeze, "test/active_record_model/user_test.rb".freeze, "test/dummy/.gitignore".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/anchormodels/locale.rb".freeze, "test/dummy/app/anchormodels/role.rb".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/user.rb".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/credentials.yml.enc".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/initializers/content_security_policy.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/permissions_policy.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/db/migrate/20230107173151_create_users.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/db/seeds.rb".freeze, "test/dummy/lib/tasks/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/tmp/.keep".freeze, "test/dummy/tmp/pids/.keep".freeze, "test/test_helper.rb".freeze]
16
16
  s.homepage = "https://github.com/kalsan/anchormodel".freeze
17
17
  s.licenses = ["LGPL-3.0-or-later".freeze]
18
18
  s.required_ruby_version = Gem::Requirement.new(">= 3.0.0".freeze)
19
- s.rubygems_version = "3.3.26".freeze
19
+ s.rubygems_version = "3.5.6".freeze
20
20
  s.summary = "Bringing object-oriented programming to Rails enums".freeze
21
21
 
22
- if s.respond_to? :specification_version then
23
- s.specification_version = 4
24
- end
22
+ s.specification_version = 4
25
23
 
26
- if s.respond_to? :add_runtime_dependency then
27
- s.add_runtime_dependency(%q<rails>.freeze, ["~> 7.0"])
28
- s.add_development_dependency(%q<rake>.freeze, ["~> 13.0.6"])
29
- s.add_development_dependency(%q<pry>.freeze, ["~> 0.14.1"])
30
- s.add_development_dependency(%q<rubocop>.freeze, ["~> 1.43.0"])
31
- s.add_development_dependency(%q<rubocop-rails>.freeze, ["~> 2.17.4"])
32
- s.add_development_dependency(%q<yard>.freeze, ["~> 0.9.28"])
33
- s.add_development_dependency(%q<yard-activesupport-concern>.freeze, ["~> 0.0.1"])
34
- s.add_development_dependency(%q<minitest>.freeze, ["~> 5.17.0"])
35
- s.add_development_dependency(%q<minitest-reporters>.freeze, ["~> 1.5.0"])
36
- s.add_development_dependency(%q<sqlite3>.freeze, ["~> 1.6.0"])
37
- else
38
- s.add_dependency(%q<rails>.freeze, ["~> 7.0"])
39
- s.add_dependency(%q<rake>.freeze, ["~> 13.0.6"])
40
- s.add_dependency(%q<pry>.freeze, ["~> 0.14.1"])
41
- s.add_dependency(%q<rubocop>.freeze, ["~> 1.43.0"])
42
- s.add_dependency(%q<rubocop-rails>.freeze, ["~> 2.17.4"])
43
- s.add_dependency(%q<yard>.freeze, ["~> 0.9.28"])
44
- s.add_dependency(%q<yard-activesupport-concern>.freeze, ["~> 0.0.1"])
45
- s.add_dependency(%q<minitest>.freeze, ["~> 5.17.0"])
46
- s.add_dependency(%q<minitest-reporters>.freeze, ["~> 1.5.0"])
47
- s.add_dependency(%q<sqlite3>.freeze, ["~> 1.6.0"])
48
- end
24
+ s.add_runtime_dependency(%q<rails>.freeze, ["~> 7.0".freeze])
25
+ s.add_development_dependency(%q<rake>.freeze, ["~> 13.0.6".freeze])
26
+ s.add_development_dependency(%q<pry>.freeze, ["~> 0.14.1".freeze])
27
+ s.add_development_dependency(%q<rubocop>.freeze, ["~> 1.43.0".freeze])
28
+ s.add_development_dependency(%q<rubocop-rails>.freeze, ["~> 2.17.4".freeze])
29
+ s.add_development_dependency(%q<yard>.freeze, ["~> 0.9.28".freeze])
30
+ s.add_development_dependency(%q<yard-activesupport-concern>.freeze, ["~> 0.0.1".freeze])
31
+ s.add_development_dependency(%q<minitest>.freeze, ["~> 5.17.0".freeze])
32
+ s.add_development_dependency(%q<minitest-reporters>.freeze, ["~> 1.5.0".freeze])
33
+ s.add_development_dependency(%q<sqlite3>.freeze, ["~> 1.6.0".freeze])
49
34
  end
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Anchormodel::Attribute
8
8
 
9
- &mdash; Documentation by YARD 0.9.28
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -496,9 +496,9 @@
496
496
  </div>
497
497
 
498
498
  <div id="footer">
499
- Generated on Wed Jan 25 12:36:40 2023 by
499
+ Generated on Tue Apr 23 17:20:43 2024 by
500
500
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
501
- 0.9.28 (ruby-3.1.3).
501
+ 0.9.36 (ruby-3.2.2).
502
502
  </div>
503
503
 
504
504
  </div>