structify 0.1.0 → 0.3.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 +4 -4
- data/CHANGELOG.md +22 -0
- data/CLAUDE.md +27 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +26 -25
- data/README.md +301 -139
- data/lib/structify/model.rb +304 -60
- data/lib/structify/schema_serializer.rb +165 -0
- data/lib/structify/version.rb +1 -1
- data/lib/structify.rb +90 -4
- data/structify.gemspec +2 -2
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1542f94c3a228a96c611d5d8c4a9a76ff97b6070321a0b88166d6182a0eec652
|
4
|
+
data.tar.gz: a10e778ed0ea8958b4d111f6b6d49dac5a534ebe05926656760115a60a685856
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 764c252133923dbd6c340087f58f902ae5753bf2c6d56c65244b81dbbce2fc63da22c0b5b5734049dcc908dbc3c846c8f7f85ee40ff5c8d43ba3f0484a3fe8ec
|
7
|
+
data.tar.gz: c2ba694a9c738fd3067f3cb7c6c4d69fe707664075dc65d1ff7c3ac1d9c29a4b4d166b95767edc6fab202219d042c50e9699d0d266f3489e84ea35efbe182fa7
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
## [0.3.0] - 2025-03-17
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Added configuration system with `Structify.configure` method
|
10
|
+
- Added ability to configure default container attribute through initializer
|
11
|
+
- Changed default container attribute from `:extracted_data` to `:json_attributes`
|
12
|
+
|
13
|
+
## [0.2.0] - 2025-03-12
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
- New `thinking` mode option to automatically add chain of thought reasoning to LLM schemas
|
18
|
+
- When enabled, adds a `chain_of_thought` field as the first property in the generated schema
|
19
|
+
|
20
|
+
## [0.1.0] - Initial Release
|
21
|
+
|
22
|
+
- Initial release of Structify
|
data/CLAUDE.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# CLAUDE.md - Guidelines for Structify
|
2
|
+
|
3
|
+
## Commands
|
4
|
+
- Build: `bundle exec rake build`
|
5
|
+
- Install: `bundle exec rake install`
|
6
|
+
- Test all: `bundle exec rake spec`
|
7
|
+
- Test single file: `bundle exec rspec spec/path/to/file_spec.rb`
|
8
|
+
- Test specific example: `bundle exec rspec spec/path/to/file_spec.rb:LINE_NUMBER`
|
9
|
+
- Lint: `bundle exec rubocop`
|
10
|
+
|
11
|
+
## Code Style
|
12
|
+
- Use `# frozen_string_literal: true` at the top of all Ruby files
|
13
|
+
- Follow Ruby naming conventions (snake_case for methods/variables, CamelCase for classes)
|
14
|
+
- Include YARD documentation for classes and methods
|
15
|
+
- Group similar methods together
|
16
|
+
- Include descriptive RSpec tests for all functionality
|
17
|
+
- Keep methods short and focused on a single responsibility
|
18
|
+
- Use specific error classes for error handling
|
19
|
+
- Prefer explicit requires over auto-loading
|
20
|
+
- Follow ActiveSupport::Concern patterns for modules
|
21
|
+
- Keep DSL simple and intuitive for end users
|
22
|
+
|
23
|
+
## Structure
|
24
|
+
- Put core functionality in lib/structify/
|
25
|
+
- Keep implementation details private when possible
|
26
|
+
- Follow semantic versioning guidelines
|
27
|
+
- Ensure proper test coverage for all public APIs
|
data/Gemfile
CHANGED
@@ -7,8 +7,8 @@ group :development, :test do
|
|
7
7
|
gem "rake", "~> 13.0"
|
8
8
|
gem "rspec", "~> 3.12"
|
9
9
|
gem "rspec-rails", "~> 6.1"
|
10
|
-
gem "activerecord", "~>
|
11
|
-
gem
|
10
|
+
gem "activerecord", "~> 8"
|
11
|
+
gem 'sqlite3', '~> 2.0', '>= 2.0.2'
|
12
12
|
gem "rubocop", "~> 1.21"
|
13
13
|
gem "rubocop-rspec", "~> 2.25"
|
14
14
|
gem "yard", "~> 0.9"
|
data/Gemfile.lock
CHANGED
@@ -1,48 +1,48 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
structify (0.
|
5
|
-
activesupport (
|
4
|
+
structify (0.3.0)
|
5
|
+
activesupport (~> 8)
|
6
6
|
attr_json (~> 2.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionpack (
|
12
|
-
actionview (=
|
13
|
-
activesupport (=
|
11
|
+
actionpack (8.0.2)
|
12
|
+
actionview (= 8.0.2)
|
13
|
+
activesupport (= 8.0.2)
|
14
14
|
nokogiri (>= 1.8.5)
|
15
|
-
racc
|
16
15
|
rack (>= 2.2.4)
|
17
16
|
rack-session (>= 1.0.1)
|
18
17
|
rack-test (>= 0.6.3)
|
19
18
|
rails-dom-testing (~> 2.2)
|
20
19
|
rails-html-sanitizer (~> 1.6)
|
21
|
-
|
22
|
-
|
20
|
+
useragent (~> 0.16)
|
21
|
+
actionview (8.0.2)
|
22
|
+
activesupport (= 8.0.2)
|
23
23
|
builder (~> 3.1)
|
24
24
|
erubi (~> 1.11)
|
25
25
|
rails-dom-testing (~> 2.2)
|
26
26
|
rails-html-sanitizer (~> 1.6)
|
27
|
-
activemodel (
|
28
|
-
activesupport (=
|
29
|
-
activerecord (
|
30
|
-
activemodel (=
|
31
|
-
activesupport (=
|
27
|
+
activemodel (8.0.2)
|
28
|
+
activesupport (= 8.0.2)
|
29
|
+
activerecord (8.0.2)
|
30
|
+
activemodel (= 8.0.2)
|
31
|
+
activesupport (= 8.0.2)
|
32
32
|
timeout (>= 0.4.0)
|
33
|
-
activesupport (
|
33
|
+
activesupport (8.0.2)
|
34
34
|
base64
|
35
35
|
benchmark (>= 0.3)
|
36
36
|
bigdecimal
|
37
|
-
concurrent-ruby (~> 1.0, >= 1.
|
37
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
38
38
|
connection_pool (>= 2.2.5)
|
39
39
|
drb
|
40
40
|
i18n (>= 1.6, < 2)
|
41
41
|
logger (>= 1.4.2)
|
42
42
|
minitest (>= 5.1)
|
43
|
-
mutex_m
|
44
43
|
securerandom (>= 0.3)
|
45
|
-
tzinfo (~> 2.0)
|
44
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
45
|
+
uri (>= 0.13.1)
|
46
46
|
ast (2.4.2)
|
47
47
|
attr_json (2.5.0)
|
48
48
|
activerecord (>= 6.0.0, < 8.1)
|
@@ -74,7 +74,6 @@ GEM
|
|
74
74
|
crass (~> 1.0.2)
|
75
75
|
nokogiri (>= 1.12.0)
|
76
76
|
minitest (5.25.4)
|
77
|
-
mutex_m (0.3.0)
|
78
77
|
nokogiri (1.18.2-x86_64-darwin)
|
79
78
|
racc (~> 1.4)
|
80
79
|
parallel (1.26.3)
|
@@ -103,10 +102,10 @@ GEM
|
|
103
102
|
rails-html-sanitizer (1.6.2)
|
104
103
|
loofah (~> 2.21)
|
105
104
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
106
|
-
railties (
|
107
|
-
actionpack (=
|
108
|
-
activesupport (=
|
109
|
-
irb
|
105
|
+
railties (8.0.2)
|
106
|
+
actionpack (= 8.0.2)
|
107
|
+
activesupport (= 8.0.2)
|
108
|
+
irb (~> 1.13)
|
110
109
|
rackup (>= 1.0.0)
|
111
110
|
rake (>= 12.2)
|
112
111
|
thor (~> 1.0, >= 1.2.2)
|
@@ -164,7 +163,7 @@ GEM
|
|
164
163
|
rubocop (~> 1.61)
|
165
164
|
ruby-progressbar (1.13.0)
|
166
165
|
securerandom (0.4.1)
|
167
|
-
sqlite3 (
|
166
|
+
sqlite3 (2.2.0-x86_64-darwin)
|
168
167
|
stringio (3.1.2)
|
169
168
|
thor (1.3.2)
|
170
169
|
timeout (0.4.3)
|
@@ -173,6 +172,8 @@ GEM
|
|
173
172
|
unicode-display_width (3.1.4)
|
174
173
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
175
174
|
unicode-emoji (4.0.4)
|
175
|
+
uri (1.0.3)
|
176
|
+
useragent (0.16.11)
|
176
177
|
yard (0.9.37)
|
177
178
|
zeitwerk (2.7.1)
|
178
179
|
|
@@ -180,14 +181,14 @@ PLATFORMS
|
|
180
181
|
x86_64-darwin-22
|
181
182
|
|
182
183
|
DEPENDENCIES
|
183
|
-
activerecord (~>
|
184
|
+
activerecord (~> 8)
|
184
185
|
debug (>= 1.0.0)
|
185
186
|
rake (~> 13.0)
|
186
187
|
rspec (~> 3.12)
|
187
188
|
rspec-rails (~> 6.1)
|
188
189
|
rubocop (~> 1.21)
|
189
190
|
rubocop-rspec (~> 2.25)
|
190
|
-
sqlite3 (~>
|
191
|
+
sqlite3 (~> 2.0, >= 2.0.2)
|
191
192
|
structify!
|
192
193
|
yard (~> 0.9)
|
193
194
|
|