gloo-mysql 1.0 → 1.1
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 +4 -4
- data/README.md +22 -0
- data/lib/mysql.rb +41 -0
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9d45a88a3a1eb006e70be0d3b54874923e1f4dd02ac2f3c297cd1921975d1f9
|
|
4
|
+
data.tar.gz: b5e02252e4201e5ded230d69171304126c287570b3cd0c8af2e02cf742a3e26c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b1addd1be16de2b24a32cdd92b8d5048483370c291315409eae5bd247c6479428a5c3968392ec4d2bcf1afe6495a868a180d7937b0f75322d4c12c201b117cf
|
|
7
|
+
data.tar.gz: cf786e9a6d8ab705f5d679e97ee55b57a1c9c1ca05e262ac95c651a3e9265c3c080513ca33188eace2a4a9ac2bf946c11e77011d06b5594df5c436c2a804a7d7
|
data/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# gloo-mysql
|
|
2
|
+
|
|
3
|
+
A core gloo library for mysql.
|
|
4
|
+
|
|
5
|
+
Use alongside `gloo-db` — this gem provides the MySQL driver, `gloo-db` provides `query`/`table`.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Load this library in a gloo script:
|
|
10
|
+
|
|
11
|
+
```gloo
|
|
12
|
+
> load lib db
|
|
13
|
+
> load lib mysql
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Objects
|
|
17
|
+
|
|
18
|
+
- `mysql` — a MySQL database connection
|
|
19
|
+
|
|
20
|
+
## Full Reference
|
|
21
|
+
|
|
22
|
+
The object's children and messages are documented in-app once the library is loaded — `help> object mysql`.
|
data/lib/mysql.rb
CHANGED
|
@@ -247,4 +247,45 @@ class Mysql < Gloo::Core::Obj
|
|
|
247
247
|
return true
|
|
248
248
|
end
|
|
249
249
|
|
|
250
|
+
# ---------------------------------------------------------------------
|
|
251
|
+
# Object Documentation
|
|
252
|
+
# ---------------------------------------------------------------------
|
|
253
|
+
|
|
254
|
+
#
|
|
255
|
+
# Get the object's documentation data.
|
|
256
|
+
#
|
|
257
|
+
def self.doc_data
|
|
258
|
+
{
|
|
259
|
+
:name => KEYWORD,
|
|
260
|
+
:shortcut => KEYWORD_SHORT,
|
|
261
|
+
:description => 'A MySQL database connection.',
|
|
262
|
+
:children => [
|
|
263
|
+
'host (string) — The database server host.',
|
|
264
|
+
'database (string) — The name of the database.',
|
|
265
|
+
'username (string) — The username with which to connect.',
|
|
266
|
+
"password (string) — The user's password."
|
|
267
|
+
],
|
|
268
|
+
:messages => [
|
|
269
|
+
'verify — Verify that the database connection can be established.'
|
|
270
|
+
],
|
|
271
|
+
:examples => <<~EXAMPLES.strip
|
|
272
|
+
mysql [can] :
|
|
273
|
+
on_load [script] :
|
|
274
|
+
run mysql.get_passwd
|
|
275
|
+
run mysql.sql
|
|
276
|
+
db [mysql] :
|
|
277
|
+
host : localhost
|
|
278
|
+
database : my_database
|
|
279
|
+
username : my_user
|
|
280
|
+
password [alias] : mysql.get_passwd.result
|
|
281
|
+
sql [query] :
|
|
282
|
+
database [alias] : mysql.db
|
|
283
|
+
sql : SELECT first, last, phone FROM people
|
|
284
|
+
get_passwd [ask] :
|
|
285
|
+
prompt [string] : Database Password?
|
|
286
|
+
result [string] :
|
|
287
|
+
EXAMPLES
|
|
288
|
+
}
|
|
289
|
+
end
|
|
290
|
+
|
|
250
291
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gloo-mysql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '1.
|
|
4
|
+
version: '1.1'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Crane
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: mysql2
|
|
@@ -37,14 +36,15 @@ executables: []
|
|
|
37
36
|
extensions: []
|
|
38
37
|
extra_rdoc_files: []
|
|
39
38
|
files:
|
|
39
|
+
- README.md
|
|
40
40
|
- lib/gloo-mysql.rb
|
|
41
41
|
- lib/mysql.rb
|
|
42
|
-
homepage: https://
|
|
42
|
+
homepage: https://github.com/ecrane/gloo
|
|
43
43
|
licenses:
|
|
44
44
|
- MIT
|
|
45
45
|
metadata:
|
|
46
46
|
gloo.type: core-library
|
|
47
|
-
|
|
47
|
+
documentation_uri: https://github.com/ecrane/gloo
|
|
48
48
|
rdoc_options: []
|
|
49
49
|
require_paths:
|
|
50
50
|
- lib
|
|
@@ -59,8 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
60
|
version: '0'
|
|
61
61
|
requirements: []
|
|
62
|
-
rubygems_version:
|
|
63
|
-
signing_key:
|
|
62
|
+
rubygems_version: 4.0.17
|
|
64
63
|
specification_version: 4
|
|
65
64
|
summary: Gloo core library. MySQL support.
|
|
66
65
|
test_files: []
|