dba 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +7 -0
- data/dba.gemspec +1 -1
- data/lib/dba/database.rb +7 -1
- data/lib/dba/sample.rb +1 -1
- data/lib/dba.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff91c96a26c84120b2294eaceafbc9cd97d50ae7b8138ed08657efe355fe905b
|
4
|
+
data.tar.gz: 1e25615aea3aab8f5820f790d038363ea2854488e950d3925e48953d1055006c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b77b8fe626319fe20ac77cb31bb5bd2ed349438ea76ef6472b7367e22a804d1027a99744bde3ad2e32e7104f88a52b125a49f32c40223095281f648f150c8f64
|
7
|
+
data.tar.gz: 21d2f2a661aacc27375c7e9031c1057471ca627f0fb1bcb2c47dc051096e9d15d507d186854bb2fbac2b9851ba63ef2c807d7f91814ecd9490c564c6e073bdf1
|
data/CHANGES.md
CHANGED
data/dba.gemspec
CHANGED
data/lib/dba/database.rb
CHANGED
@@ -73,7 +73,13 @@ module DBA::Database
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def database_config
|
76
|
-
|
76
|
+
source = ERB.new(File.read(database_config_path)).result
|
77
|
+
|
78
|
+
if YAML.respond_to?(:unsafe_load)
|
79
|
+
YAML.unsafe_load(source)
|
80
|
+
else
|
81
|
+
YAML.load(source)
|
82
|
+
end
|
77
83
|
end
|
78
84
|
|
79
85
|
def development_database_args
|
data/lib/dba/sample.rb
CHANGED
@@ -5,7 +5,7 @@ class DBA::Sample < DBA::Command
|
|
5
5
|
column_name = column.to_sym if column
|
6
6
|
|
7
7
|
if column_name
|
8
|
-
dataset = database[table_name].distinct.select(column_name)
|
8
|
+
dataset = database[table_name].exclude(column_name => nil).distinct.select(column_name)
|
9
9
|
dataset.from_self.order(random_function).limit(20).each do |row|
|
10
10
|
puts row[column_name]
|
11
11
|
end
|
data/lib/dba.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Craft
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
117
|
+
rubygems_version: 3.4.10
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: See description
|