annotaterb 4.11.0 → 4.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8ac4fa020d2d3a8980738eea31e2166be78fe5bbdf194b9198fef2d63cc0c08
4
- data.tar.gz: 51ee76fd8ff66837b7dd4e9b565e0656e3204203f0a5ea99c990e9611662c2d0
3
+ metadata.gz: acf04a7f1c6244fa950273cc78bb159e3f25e1e1f8f154ebb5a668152672f28d
4
+ data.tar.gz: 67466b09b7efa8ad90d2b674228c60b368c475b8809a5af7f0c9c48f1bfa3938
5
5
  SHA512:
6
- metadata.gz: df8b18d6ed8398fac4768ca5686e318811407e54992711b9712cf4cba51ce5b798087df674ecb9a99d051bc3ab30daee84b4cde27a6eb9881626de9d7b0a6f94
7
- data.tar.gz: 8ace009c0f5bcc692661b441dd82e3c673818e7854513baadbe5e3c83c1554dd2b941501fbce5519ef6d29929c2771284efc737de7ece49f434bd90e6cdf8129
6
+ metadata.gz: 76fcd6ffe70e014b15a4aab9b8e5f838432281cf7836eb83532a17f3f13c0e70381ea20bcec185efd91816df6eed64ae25d9541403c1aa0e3bb94b7970846f5b
7
+ data.tar.gz: 311ccf2c9013fe16ee0b70a693f9c1c478b4ab1543b6f8fdc3baf3fb0b4c9f8840e45d98236d2b634b80e3cadc1b33bb77f92a77f118828e92319292a85d8845
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [v4.11.0](https://github.com/drwl/annotaterb/tree/v4.11.0) (2024-08-16)
4
+
5
+ [Full Changelog](https://github.com/drwl/annotaterb/compare/v4.10.2...v4.11.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - Include the length of comments in max\_schema\_info\_width only when the with\_column\_comments option is true. [\#144](https://github.com/drwl/annotaterb/issues/144)
10
+ - Rakefile seems to be loaded twice [\#130](https://github.com/drwl/annotaterb/issues/130)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - Bump version to v4.11.0 [\#146](https://github.com/drwl/annotaterb/pull/146) ([drwl](https://github.com/drwl))
15
+ - Include the length of comments in max\_schema\_info\_width only when the with\_comment and with\_column\_comments option is true. [\#145](https://github.com/drwl/annotaterb/pull/145) ([shibaaaa](https://github.com/shibaaaa))
16
+ - Add Ruby 3.3 to CI [\#143](https://github.com/drwl/annotaterb/pull/143) ([drwl](https://github.com/drwl))
17
+ - Generate changelog for v4.10.2 [\#142](https://github.com/drwl/annotaterb/pull/142) ([drwl](https://github.com/drwl))
18
+
3
19
  ## [v4.10.2](https://github.com/drwl/annotaterb/tree/v4.10.2) (2024-07-23)
4
20
 
5
21
  [Full Changelog](https://github.com/drwl/annotaterb/compare/v4.10.1...v4.10.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.11.0
1
+ 4.12.0
@@ -14,6 +14,12 @@ module AnnotateRb
14
14
  def to_default
15
15
  unique_info = index.unique ? " UNIQUE" : ""
16
16
 
17
+ nulls_not_distinct_info = if index.try(:nulls_not_distinct)
18
+ " NULLS NOT DISTINCT"
19
+ else
20
+ ""
21
+ end
22
+
17
23
  value = index.try(:where).try(:to_s)
18
24
  where_info = if value.present?
19
25
  " WHERE #{value}"
@@ -30,10 +36,11 @@ module AnnotateRb
30
36
 
31
37
  # standard:disable Lint/FormatParameterMismatch
32
38
  sprintf(
33
- "# %-#{max_size}.#{max_size}s %s%s%s%s",
39
+ "# %-#{max_size}.#{max_size}s %s%s%s%s%s",
34
40
  index.name,
35
41
  "(#{columns_info.join(",")})",
36
42
  unique_info,
43
+ nulls_not_distinct_info,
37
44
  where_info,
38
45
  using_info
39
46
  ).rstrip
@@ -43,6 +50,12 @@ module AnnotateRb
43
50
  def to_markdown
44
51
  unique_info = index.unique ? " _unique_" : ""
45
52
 
53
+ nulls_not_distinct_info = if index.try(:nulls_not_distinct)
54
+ " _nulls_not_distinct_"
55
+ else
56
+ ""
57
+ end
58
+
46
59
  value = index.try(:where).try(:to_s)
47
60
  where_info = if value.present?
48
61
  " _where_ #{value}"
@@ -58,8 +71,9 @@ module AnnotateRb
58
71
  end
59
72
 
60
73
  details = sprintf(
61
- "%s%s%s",
74
+ "%s%s%s%s",
62
75
  unique_info,
76
+ nulls_not_distinct_info,
63
77
  where_info,
64
78
  using_info
65
79
  ).strip
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotaterb
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew W. Lee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-16 00:00:00.000000000 Z
11
+ date: 2024-09-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Annotates Rails/ActiveRecord Models, routes, fixtures, and others based
14
14
  on the database schema.