rack-queries 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/CHANGELOG.md +18 -0
- data/Gemfile.lock +1 -1
- data/README.md +5 -1
- data/bin/example +2 -2
- data/docs/screenshot.png +0 -0
- data/lib/rack/queries/version.rb +1 -1
- data/lib/rack/queries.rb +3 -3
- data/package.json +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baff921a2a444802c1cb09ef33c2bae8e0998c41558982e91dec5f441b14ab99
|
4
|
+
data.tar.gz: 7ea740e3b1e9b186f1bd97455dbf099e94220a0f185db1af066fb4f0cacc8095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 584b11a5f07cec2a14d7a4d061efba0643395e73b9ee40518e4a72d4f02c4583a4735e71023d6a4f7b5d0454f1d70a8577238ce2ba3d30a1bf64883c5053b914
|
7
|
+
data.tar.gz: c129c5ad0b8a3e503d9ed43340ef62961b272818ad971008e889c97a697cb75eefde6c6ce7323b04fe84281e03caf427cc2b16e3ffc4ad7d04ba18071f79dc4c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [0.1.1] - 2019-02-27
|
10
|
+
### Changed
|
11
|
+
- Changed the require paths for easier integration with bundler.
|
12
|
+
|
13
|
+
## [0.1.0] - 2019-02-27
|
14
|
+
### Added
|
15
|
+
- Initial release 🎉
|
16
|
+
|
17
|
+
[Unreleased]: https://github.com/CultureHQ/rack-queries/compare/v0.1.0...HEAD
|
18
|
+
[0.1.0]: https://github.com/CultureHQ/rack-queries/compare/f4f0b2...v0.1.0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
# Rack::Queries
|
2
2
|
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/rack-queries.svg)](https://github.com/CultureHQ/rack-queries)
|
4
|
+
|
3
5
|
This gem provides a page in your rack-based (e.g., `Rails`, `Sinatra`) application that allows quick execution of pre-built queries. The goal is to allow quick insights into the state of your application without needing to update the main UI. Consider it a backdoor admin page that you can use before you decide to truly expose query results.
|
4
6
|
|
7
|
+
![Screenshot](docs/screenshot.png)
|
8
|
+
|
5
9
|
## Usage
|
6
10
|
|
7
11
|
First, add `rack-queries` to your Gemfile and `bundle install`. Then, mount the `Rack::Queries::App` application within your app.
|
@@ -35,7 +39,7 @@ class UserPerOrgCountQuery
|
|
35
39
|
end
|
36
40
|
|
37
41
|
def run(opts)
|
38
|
-
Org.where(name: opts['
|
42
|
+
Org.where(name: opts['org']).users.count
|
39
43
|
end
|
40
44
|
end
|
41
45
|
```
|
data/bin/example
CHANGED
@@ -6,8 +6,8 @@ require 'forwardable'
|
|
6
6
|
require 'rack'
|
7
7
|
require 'sqlite3'
|
8
8
|
|
9
|
-
$LOAD_PATH.unshift(File.expand_path(File.join('..', 'lib'
|
10
|
-
require 'queries'
|
9
|
+
$LOAD_PATH.unshift(File.expand_path(File.join('..', 'lib'), __dir__))
|
10
|
+
require 'rack/queries'
|
11
11
|
|
12
12
|
class Database
|
13
13
|
class IncomprehensibleReturnValueError < ArgumentError
|
data/docs/screenshot.png
ADDED
Binary file
|
data/lib/rack/queries/version.rb
CHANGED
data/lib/rack/queries.rb
CHANGED
@@ -4,9 +4,9 @@ require 'forwardable'
|
|
4
4
|
require 'json'
|
5
5
|
require 'rack'
|
6
6
|
|
7
|
-
require 'queries/app'
|
8
|
-
require 'queries/cache'
|
9
|
-
require 'queries/version'
|
7
|
+
require 'rack/queries/app'
|
8
|
+
require 'rack/queries/cache'
|
9
|
+
require 'rack/queries/version'
|
10
10
|
|
11
11
|
module Rack
|
12
12
|
module Queries
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-queries
|
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
|
- Kevin Deisz
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- ".gitignore"
|
136
136
|
- ".rubocop.yml"
|
137
137
|
- ".travis.yml"
|
138
|
+
- CHANGELOG.md
|
138
139
|
- Gemfile
|
139
140
|
- Gemfile.lock
|
140
141
|
- LICENSE
|
@@ -143,6 +144,7 @@ files:
|
|
143
144
|
- bin/console
|
144
145
|
- bin/example
|
145
146
|
- bin/setup
|
147
|
+
- docs/screenshot.png
|
146
148
|
- lib/rack/queries.rb
|
147
149
|
- lib/rack/queries/app.rb
|
148
150
|
- lib/rack/queries/cache.rb
|