gremlin 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/gremlin.rb +1 -0
- data/lib/gremlin/instruments.rb +2 -2
- data/lib/gremlin/registry.rb +2 -2
- data/lib/gremlin/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96d4a7c502789e7253b18116cb7f0ec78f723d87
|
4
|
+
data.tar.gz: 79abfbd5b0389284cea77f479c8251bc150f2808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac3351e8bc6f3a26ca5e56682774e9d89460c26624cc6601f32ff1bed0d75c8735ae321aa5b571b6c38276f9b122f3977eef099d4e6ddf61030cab380e11f103
|
7
|
+
data.tar.gz: 74382b4281f6665f900639bc89480cdba8b88c09ed54eef140af923302ace24b69cb699018f90b14c9b289185120670b7e8149d9b66ff4cc9898c9a53baa33c2
|
data/Gemfile.lock
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Kevin G. Phillips
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Gremlin
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gremlin`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'gremlin'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install gremlin
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gremlin.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gremlin"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/gremlin.rb
CHANGED
data/lib/gremlin/instruments.rb
CHANGED
@@ -9,10 +9,10 @@ module Gremlin
|
|
9
9
|
@base_labels = base_labels
|
10
10
|
@mutex = Mutex.new
|
11
11
|
|
12
|
-
Redis::Client.default = Redis.new(**Gremlin.configuration.redis)
|
13
12
|
@r = Redis.new(**Gremlin.configuration.redis)
|
13
|
+
Redis::NativeHash.redis = @r
|
14
14
|
@values = Redis::NativeHash.find(retention_key) || Redis::NativeHash.new
|
15
|
-
|
15
|
+
#@values.redis = Redis::NativeHash.redis
|
16
16
|
@values.key = retention_key
|
17
17
|
@values.save
|
18
18
|
end
|
data/lib/gremlin/registry.rb
CHANGED
@@ -5,9 +5,9 @@ module Gremlin
|
|
5
5
|
NotAMetricError = Class.new StandardError
|
6
6
|
|
7
7
|
def initialize
|
8
|
-
Redis::
|
8
|
+
Redis::NativeHash.redis = Redis.new(**Gremlin.configuration.redis)
|
9
9
|
@metrics = Redis::NativeHash.find(retention_key) || Redis::NativeHash.new()
|
10
|
-
|
10
|
+
#@metrics.redis = Redis::NativeHash.redis
|
11
11
|
@metrics.key = retention_key
|
12
12
|
@metrics.save
|
13
13
|
|
data/lib/gremlin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gremlin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin G. Phillips
|
@@ -138,8 +138,13 @@ files:
|
|
138
138
|
- ".gitignore"
|
139
139
|
- Gemfile
|
140
140
|
- Gemfile.lock
|
141
|
+
- LICENSE.txt
|
142
|
+
- README.md
|
143
|
+
- Rakefile
|
141
144
|
- app/controllers/gremlin/metrics_controller.rb
|
142
145
|
- benchmark.rb
|
146
|
+
- bin/console
|
147
|
+
- bin/setup
|
143
148
|
- config/routes.rb
|
144
149
|
- gremlin.gemspec
|
145
150
|
- lib/gremlin.rb
|
@@ -181,4 +186,3 @@ signing_key:
|
|
181
186
|
specification_version: 4
|
182
187
|
summary: Gem to sanely emit metrics from Omadahealth rails applications
|
183
188
|
test_files: []
|
184
|
-
has_rdoc:
|