pry-helper 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -11
- data/lib/pry-helper/definition.rb +7 -1
- data/lib/pry-helper/version.rb +1 -1
- data/lib/pry-helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1787736cd728af05efd8a7a4c32a37443ae2d515a6fd0e04388f5f1b0bf1da8c
|
4
|
+
data.tar.gz: 3b33b3a938d0abed4d640bc3be872d90a65c773ec6a2eb603b8e603b567ee3bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1318ed35714bf51daa81f1e5f4b5db7aaa8b67165ba981f5b5163f9b3a391f0126033504f0011b90cc51797c6ce9ae8ccb3b379948a4173f0d20967e84d815c4
|
7
|
+
data.tar.gz: 58fa2d0feb8003d4a3afed21818596d55bbcb054f5a938f3506e46960b71fadbcf5961e61d78717ae4f0c5d9aed253e5f063133f144231ebf3943c136f118ba1
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pry-helper (0.1.
|
4
|
+
pry-helper (0.1.2)
|
5
5
|
activerecord
|
6
6
|
activesupport
|
7
7
|
caxlsx
|
@@ -14,12 +14,12 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
activemodel (7.0.
|
18
|
-
activesupport (= 7.0.
|
19
|
-
activerecord (7.0.
|
20
|
-
activemodel (= 7.0.
|
21
|
-
activesupport (= 7.0.
|
22
|
-
activesupport (7.0.
|
17
|
+
activemodel (7.0.4)
|
18
|
+
activesupport (= 7.0.4)
|
19
|
+
activerecord (7.0.4)
|
20
|
+
activemodel (= 7.0.4)
|
21
|
+
activesupport (= 7.0.4)
|
22
|
+
activesupport (7.0.4)
|
23
23
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
24
24
|
i18n (>= 1.6, < 2)
|
25
25
|
minitest (>= 5.1)
|
@@ -36,10 +36,8 @@ GEM
|
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
37
|
marcel (1.0.2)
|
38
38
|
method_source (1.0.0)
|
39
|
-
mini_portile2 (2.8.0)
|
40
39
|
minitest (5.16.3)
|
41
|
-
nokogiri (1.13.8)
|
42
|
-
mini_portile2 (~> 2.8.0)
|
40
|
+
nokogiri (1.13.8-x86_64-darwin)
|
43
41
|
racc (~> 1.4)
|
44
42
|
pry (0.14.1)
|
45
43
|
coderay (~> 1.1)
|
@@ -59,7 +57,7 @@ GEM
|
|
59
57
|
unicode-display_width (>= 1.1.1, < 3)
|
60
58
|
tzinfo (2.0.5)
|
61
59
|
concurrent-ruby (~> 1.0)
|
62
|
-
unicode-display_width (2.
|
60
|
+
unicode-display_width (2.3.0)
|
63
61
|
webrick (1.7.0)
|
64
62
|
yard (0.9.28)
|
65
63
|
webrick (~> 1.7.0)
|
@@ -105,6 +105,12 @@ module PryHelper
|
|
105
105
|
@@models = []
|
106
106
|
|
107
107
|
ActiveRecord::Base.connection.tap do |conn|
|
108
|
+
Rails.root.join("app/models").tap do |path|
|
109
|
+
Dir.glob("#{path}/**/*.rb").each do |file|
|
110
|
+
file_name = File.basename(file, '.rb')
|
111
|
+
file_name.classify.constantize
|
112
|
+
end
|
113
|
+
end
|
108
114
|
defined_models = ::ApplicationRecord.descendants
|
109
115
|
tables = conn.tables
|
110
116
|
if conn.adapter_name == 'Mysql2'
|
@@ -124,7 +130,7 @@ module PryHelper
|
|
124
130
|
tables.each do |table_name|
|
125
131
|
table_comment = comments[table_name]
|
126
132
|
primary_keys[table_name].tap do |pkey|
|
127
|
-
table_name.camelize.tap do |const_name|
|
133
|
+
table_name.classify.camelize.tap do |const_name|
|
128
134
|
const_name = 'Modul' if const_name == 'Module'
|
129
135
|
const_name = 'Clazz' if const_name == 'Class'
|
130
136
|
if model_class = defined_models.find { |m| m.table_name == table_name }
|
data/lib/pry-helper/version.rb
CHANGED
data/lib/pry-helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liu Xiang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|