crudboy 0.1.5 → 0.1.7

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: 69bd2e2762d42e2bbfd7b0a6c0c586013b5713791a376133dbe3bb16d037e133
4
- data.tar.gz: 83d46592a8907a04665a5d5e99b3ee49b1c8ce09f9e75b91e67d61c4980ecea0
3
+ metadata.gz: 866c875982539e7b0bbac41b5032e96fc30652b1a66ea47b5edabaa8c8af36e7
4
+ data.tar.gz: 3c022bb9a5484b178199aad45c529848e5b7f474b8cb1ee2fa6be7b673e07a71
5
5
  SHA512:
6
- metadata.gz: 0a088e7f282c40b833945de0db2c5f9b63f28aebc9234f2f8a3652e896ef740402ccb34b88fa326965f9388285ff30d6543173e5f1911d09c61f52ced372ea7b
7
- data.tar.gz: 89941e6bca4b912959ada8414ba308cb1acf60874dca6e093b08e843fa0034946df744e5bf62178e0a8217d3fbdca4f27f23d24fd0057f2067c6fee253095f7e
6
+ metadata.gz: fcffdd76c72073c1da710174f78ba648440b1aa2284ed21f28d7cac757d6a4247f89b83e8748265fc4fd9b87cf9f9d5fc389d2410c1ce111af862ad53a3e83ef
7
+ data.tar.gz: 876bcc15bcc8eb622a95a4676434bdd568c3af45c11ee353c0cfb2ce11a80b2c85ed52e5244231e56d8f00c143e1f100207177f09daf44a311b72019f567d480
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crudboy (0.1.5)
4
+ crudboy (0.1.6)
5
5
  activerecord (>= 6.0.3, < 6.2.0)
6
6
  activesupport (~> 6.0.3)
7
7
  composite_primary_keys (~> 12.0.3)
@@ -53,7 +53,7 @@ GEM
53
53
  yard (~> 0.9.11)
54
54
  rainbow (3.0.0)
55
55
  rake (12.3.3)
56
- sqlite3 (1.6.8-x86_64-darwin)
56
+ sqlite3 (1.7.3-arm64-darwin)
57
57
  table_print (1.5.7)
58
58
  terminal-table (1.8.0)
59
59
  unicode-display_width (~> 1.1, >= 1.1.1)
@@ -65,11 +65,11 @@ GEM
65
65
  zeitwerk (2.6.6)
66
66
 
67
67
  PLATFORMS
68
- ruby
68
+ arm64-darwin-23
69
69
 
70
70
  DEPENDENCIES
71
71
  crudboy!
72
72
  rake (~> 12.0)
73
73
 
74
74
  BUNDLED WITH
75
- 2.2.3
75
+ 2.4.1
@@ -22,8 +22,8 @@ module Crudboy
22
22
  JDBC_TYPES = {
23
23
  "varchar" => 'VARCHAR',
24
24
  "char" => 'CHAR',
25
- "text" => 'TEXT',
26
- "longtext" => 'LONGVARCHAR',
25
+ "text" => 'VARCHAR',
26
+ "longtext" => 'VARCHAR',
27
27
  "int" => 'INTEGER',
28
28
  "smallint" => 'INTEGER',
29
29
  "bigint" => 'BIGINT',
@@ -59,7 +59,7 @@ module Crudboy
59
59
 
60
60
  class Definition
61
61
 
62
- attr_accessor :table_name, :model, :model_name
62
+ attr_accessor :table_name, :model, :model_name, :table_comment
63
63
 
64
64
  def initialize(options)
65
65
  @@options = options
@@ -74,6 +74,7 @@ module Crudboy
74
74
  raise "Table not exist: #{@table_name}" unless conn.tables.include?(@table_name)
75
75
 
76
76
  table_comment = conn.table_comment(@table_name)
77
+ @table_comment = table_comment
77
78
  conn.primary_key(@table_name).tap do |pkey|
78
79
  Class.new(::CrudboyModel) do
79
80
  include Crudboy::Extension
@@ -3,12 +3,13 @@ module Crudboy
3
3
 
4
4
  include Helper
5
5
 
6
- attr_accessor :model, :columns, :table_name, :model_name, :bundle_options
6
+ attr_accessor :model, :columns, :table_name, :table_comment, :model_name, :bundle_options
7
7
 
8
8
  def initialize(definition)
9
9
  @model = definition.model
10
10
  @model_name = definition.model_name
11
11
  @table_name = definition.table_name
12
+ @table_comment = definition.table_comment
12
13
  @columns = @model.columns
13
14
  end
14
15
 
@@ -1,3 +1,3 @@
1
1
  module Crudboy
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crudboy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Xiang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-18 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2