ruby-pg-extras 0.6.1 → 0.6.2
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 -1
- data/lib/ruby-pg-extras/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0c4f898fafe14cddcbc3195d8b5b3953c0ceacfc6db3fdb5592d6c2d24d3db
|
4
|
+
data.tar.gz: e55cfa4afc4a1f44146ff55f229756c3d02a1897bd21a8312aaea48defb98815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31d21b258ca0e7907646f44df02bf35e8805b1d45a35033b54b7a881aa1df2b7c19b1b3df8bdc396ff080f98f8b73959964d578bd00cbd218a127f372ff8a786
|
7
|
+
data.tar.gz: 8b0a8653f524cf7fbbf7e6a220ce454172f1758730692ecb1b691cab3b8d559fd9525e24693989b7ccdd9d917d8dc85333bcae4f1334efa717cd4cec193fc377
|
data/README.md
CHANGED
@@ -16,6 +16,20 @@ gem 'ruby-pg-extras'
|
|
16
16
|
|
17
17
|
### Usage
|
18
18
|
|
19
|
+
Gem expects the `ENV['DATABASE_URL']` value in the following format:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
ENV["DATABASE_URL"] = "postgresql://postgres:secret@localhost:5432/database_name"
|
23
|
+
```
|
24
|
+
|
25
|
+
Alternatively you can set it using the module class method:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
RubyPGExtras.database_url = "postgresql://postgres:secret@localhost:5432/database_name"
|
29
|
+
```
|
30
|
+
|
31
|
+
You can run queries using a simple Ruby API:
|
32
|
+
|
19
33
|
```ruby
|
20
34
|
RubyPGExtras.cache_hit
|
21
35
|
```
|
@@ -30,7 +44,6 @@ RubyPGExtras.cache_hit
|
|
30
44
|
+----------------+------------------------+
|
31
45
|
```
|
32
46
|
|
33
|
-
|
34
47
|
By default the ASCII table is displayed, to change to format you need to specify the `in_format` parameter (`[:display_table, :hash, :array, :raw]` options are available):
|
35
48
|
|
36
49
|
```ruby
|