striuct 0.9.0 → 0.10.1

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: 1a14fe7f8c251b39c9e7a8d65fc96b62519a6e271eb5765b043f92cfe1b8bc3b
4
- data.tar.gz: be0b9456cee901dc7d0079e5661de91cda71b52cdae47fa1277cd7b833310126
3
+ metadata.gz: 209dd1ff84de379965762e6b1dfc8d730487125aac3c68601198212a45b73491
4
+ data.tar.gz: cd659be7ccc4e033c01805189ea00242ccb298c002d7ced0190dcfa69793639f
5
5
  SHA512:
6
- metadata.gz: a7600df197c958a8fc6f37cfec1f0bff19ec3c1542f469ed12f927193f060c8e1a4c211d6c0d3411d344e9562714b7c8cf159469409c4635d0018abd5c855bcd
7
- data.tar.gz: 03b8604868221c485c16c99ce1e428da36f2c5f9db6c0458957f460f0a16aaba55753043cb65901df1f695fc5c9bf069d0b09dae9aa88f50081200844d3ca9c1
6
+ metadata.gz: 7c84b2a3fd370f35315b809b748a1b5fd45682e45ca7edff772806d40dc910535862c2f4464b81aacb87d0af8472c06e2ea9d0139dce76ce98acab2b209a1b97
7
+ data.tar.gz: abc84b95eac37052258aecaed387c9e8adb9e7c8ab8c8aa9463c7e910681f32690044fdf9bd8b9e70925b8a49c5b111bbe3ce1182eac03b705f5061715b027f0
@@ -1,5 +1,3 @@
1
- MIT License
2
-
3
1
  Copyright (c) 2011 Kenichi Kamiya
4
2
 
5
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
data/README.md CHANGED
@@ -1,18 +1,22 @@
1
1
  # striuct
2
2
 
3
3
  ![Build Status](https://github.com/kachick/striuct/actions/workflows/test_behaviors.yml/badge.svg?branch=main)
4
- [![Gem Version](https://badge.fury.io/rb/striuct.png)](http://badge.fury.io/rb/striuct)
4
+ [![Gem Version](https://badge.fury.io/rb/striuct.svg)](http://badge.fury.io/rb/striuct)
5
5
 
6
6
  Struct++
7
7
 
8
+ - _**This repository is archived**_
9
+ - _**No longer maintained**_
10
+ - _**I didn't remove old versions on https://rubygems.org/gems/striuct, but I no longer plan to update them.**_
11
+
8
12
  ## Usage
9
13
 
10
- Require Ruby 2.6 or later
14
+ Tested in Ruby 3.2 or 3.3
11
15
 
12
16
  Add this line to your `Gemfile`
13
17
 
14
18
  ```ruby
15
- gem 'striuct', '~> 0.9.0'
19
+ gem 'striuct', '~> 0.10.1'
16
20
  ```
17
21
 
18
22
  Then add below code into your Ruby code
@@ -96,28 +100,23 @@ UseMustOption.new #=> InvalidOperationError "`foo` require a value under `must`
96
100
 
97
101
  ### Strict
98
102
 
99
- * Easy and Flexible Validations
100
- * Basically use `#===` for the validation
101
- * The pattern builder DSL is just using [eqq](https://github.com/kachick/eqq)
102
- * When passed the Proc, it will be evaluated in the instance context
103
- * Prevent to conflict member names
104
- * Lock setters for each member
103
+ - Easy and Flexible Validations
104
+ - Basically use `#===` for the validation
105
+ - The pattern builder DSL is just using [eqq](https://github.com/kachick/eqq)
106
+ - When passed the Proc, it will be evaluated in the instance context
107
+ - Prevent to conflict member names
108
+ - Lock setters for each member
105
109
 
106
110
  ### Useful
107
111
 
108
- * Hook just before setters
109
- * Default value
110
- * Member aliasing
111
- * Inheritable
112
- * Handling between nil <-> unassigned
113
- * Similar API for Hash
112
+ - Hook just before setters
113
+ - Default value
114
+ - Member aliasing
115
+ - Inheritable
116
+ - Handling between nil <-> unassigned
117
+ - Similar API for Hash
114
118
 
115
119
  ### Finally
116
120
 
117
- * Base API looks like Struct
118
- * Pure Ruby :)
119
-
120
- ## Link
121
-
122
- * [Repository](https://github.com/kachick/striuct)
123
- * [API documents](https://kachick.github.io/striuct/)
121
+ - Base API looks like Struct
122
+ - Pure Ruby :)
@@ -1,10 +1,8 @@
1
- Note
2
- =====
1
+ # Note
3
2
 
4
3
  This dir's tree is divided under roles/features.
5
4
  Not only divided by CONSTANT names.
6
5
 
7
- CONSTANT
8
- --------
6
+ ## CONSTANT
9
7
 
10
- * attributes - Attributes
8
+ - attributes - Attributes
@@ -1,5 +1,4 @@
1
- Note
2
- =====
1
+ # Note
3
2
 
4
3
  This dir's tree is divided under roles/features.
5
4
  Not under CONSTANT names.
@@ -42,7 +42,8 @@ class Striuct
42
42
 
43
43
  @db[autonym] = value
44
44
  rescue InvalidValueError
45
- unless /in \[\]=/.match?(caller(2..2).first.slice(/([^:]+)\z/))
45
+ # @note Why caller with range instead of the index? See https://github.com/rubocop/rubocop/pull/4078
46
+ unless caller(2..2).first.slice(/([^:]+)\z/).include?('in []=')
46
47
  $!.backtrace.delete_if { |s| /#{Regexp.escape(File.dirname(__FILE__))}/ =~ s }
47
48
  $!.backtrace.first.sub!(/([^:]+)\z/) { "in `#{autonym}='" }
48
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: striuct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichi Kamiya
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-10 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eqq
@@ -31,7 +31,7 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - MIT-LICENSE.txt
34
+ - LICENSE
35
35
  - README.md
36
36
  - lib/striuct.rb
37
37
  - lib/striuct/bootstrap.rb
@@ -76,12 +76,10 @@ homepage: https://github.com/kachick/striuct
76
76
  licenses:
77
77
  - MIT
78
78
  metadata:
79
- documentation_uri: https://kachick.github.io/striuct/
80
- homepage_uri: https://github.com/kachick/striuct
81
79
  source_code_uri: https://github.com/kachick/striuct
82
80
  bug_tracker_uri: https://github.com/kachick/striuct/issues
83
81
  rubygems_mfa_required: 'true'
84
- post_install_message:
82
+ post_install_message:
85
83
  rdoc_options: []
86
84
  require_paths:
87
85
  - lib
@@ -89,15 +87,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
87
  requirements:
90
88
  - - ">="
91
89
  - !ruby/object:Gem::Version
92
- version: 2.6.0
90
+ version: '3.2'
91
+ - - "<"
92
+ - !ruby/object:Gem::Version
93
+ version: '3.4'
93
94
  required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  requirements:
95
96
  - - ">="
96
97
  - !ruby/object:Gem::Version
97
98
  version: '0'
98
99
  requirements: []
99
- rubygems_version: 3.3.7
100
- signing_key:
100
+ rubygems_version: 3.5.7
101
+ signing_key:
101
102
  specification_version: 4
102
103
  summary: Struct++
103
104
  test_files: []