rails-sqlite-extras 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -6
- data/lib/rails-sqlite-extras.rb +1 -1
- data/lib/rails_sqlite_extras/version.rb +1 -1
- data/rails-sqlite-extras.gemspec +3 -0
- data/spec/smoke_spec.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b21efc318bad2844678e1755313e97568b9f6a73783dfeafc47e39cbfa4af90
|
4
|
+
data.tar.gz: 42205a943f3f7369774e290bb9a8704ba9aef3c4af318a9c81f7a84e467c5dae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bfefeab9d245876ca4dcd55a66d795afcb483ad233b4f3a92fb2efc1c49aa39bc93c0c261dae87dfd2135d7d1c4d78b0d65d1bacc39dd18f44a85df967c9206
|
7
|
+
data.tar.gz: 3e14eaef9a495fa4838ddbb42088dad0213e272e7ba24bd2f876f348ab626da795365df70cc33a3a57dfc479cd4e3d8c894ed1722062810b4745136ef84c5700
|
data/README.md
CHANGED
@@ -1,19 +1,27 @@
|
|
1
1
|
# Rails Sqlite Extras [![Gem Version](https://badge.fury.io/rb/rails-sqlite-extras.svg)](https://badge.fury.io/rb/rails-sqlite-extras) [![GH Actions](https://github.com/pawurb/rails-sqlite-extras/actions/workflows/ci.yml/badge.svg)](https://github.com/pawurb/rails-sqlite-extras/actions)
|
2
2
|
|
3
|
-
Copy/paste of [ecto_sqlite3_extras](https://github.com/orsinium-labs/ecto_sqlite3_extras). Helper queries available in Ruby and rake tasks providing insights into the Sqlite database.
|
3
|
+
Copy/paste of [ecto_sqlite3_extras](https://github.com/orsinium-labs/ecto_sqlite3_extras). Helper queries available in Ruby and Rails rake tasks providing insights into the Sqlite database.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
`Gemfile`
|
9
8
|
```bash
|
10
|
-
|
11
|
-
bundle config set build.sqlite3 "--with-sqlite-cflags='-DSQLITE_ENABLE_DBSTAT_VTAB=1'"
|
9
|
+
gem "rails-sqlite-extras"
|
12
10
|
```
|
13
11
|
|
12
|
+
Some queries use `dbstat` table. You have to use [sqlite3 gem](https://github.com/sparklemotion/sqlite3-ruby) with version `>= 2.3.0` because it has this feature enabled by default:
|
13
|
+
|
14
14
|
`Gemfile`
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem "sqlite3", "~> 2.3"
|
18
|
+
```
|
19
|
+
|
20
|
+
Alternatively, if you're stuck on lower version, you have to enable `dbstat` by setting a `SQLITE_ENABLE_DBSTAT_VTAB` compile flag:
|
21
|
+
|
15
22
|
```bash
|
16
|
-
|
23
|
+
bundle config set force_ruby_platform true
|
24
|
+
bundle config set build.sqlite3 "--with-sqlite-cflags='-DSQLITE_ENABLE_DBSTAT_VTAB=1'"
|
17
25
|
```
|
18
26
|
|
19
27
|
## Available queries
|
data/lib/rails-sqlite-extras.rb
CHANGED
data/rails-sqlite-extras.gemspec
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require "rails_sqlite_extras/version"
|
5
|
+
require "terminal-table"
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "rails-sqlite-extras"
|
@@ -17,9 +18,11 @@ Gem::Specification.new do |s|
|
|
17
18
|
s.license = "MIT"
|
18
19
|
s.add_dependency "rails"
|
19
20
|
s.add_dependency "sqlite3"
|
21
|
+
s.add_dependency "terminal-table"
|
20
22
|
s.add_development_dependency "rake"
|
21
23
|
s.add_development_dependency "rspec"
|
22
24
|
s.add_development_dependency "rufo"
|
25
|
+
s.add_development_dependency "dbg-rb"
|
23
26
|
|
24
27
|
if s.respond_to?(:metadata=)
|
25
28
|
s.metadata = { "rubygems_mfa_required" => "true" }
|
data/spec/smoke_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-sqlite-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: terminal-table
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: dbg-rb
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
83
111
|
description: " Helper queries providing insights into the Sqlite database for Rails
|
84
112
|
apps. "
|
85
113
|
email:
|