gremlin 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f3277bdf017d08b45ad5deb0313a9aa4fe713dd
4
- data.tar.gz: 359c2c16c2438cd7366911abf975c3b802776b87
3
+ metadata.gz: 96d4a7c502789e7253b18116cb7f0ec78f723d87
4
+ data.tar.gz: 79abfbd5b0389284cea77f479c8251bc150f2808
5
5
  SHA512:
6
- metadata.gz: ecc158ed3ff1540d04d163e4ffc5dd2d5d1a02b5cb396133e221d3d41ef521e918612c55a7db11bce2095a72b2d001e6cf820ab03898ab6d5cd1539e9b31e3e4
7
- data.tar.gz: a3477c8661b90c1a227f5870dcccddc0f75b4a171ea372fe766fa552abd1324536621f1d4dd4dcadacce6afe0839d32cf702e1f11fc9de764d7d9f77da14a5b7
6
+ metadata.gz: ac3351e8bc6f3a26ca5e56682774e9d89460c26624cc6601f32ff1bed0d75c8735ae321aa5b571b6c38276f9b122f3977eef099d4e6ddf61030cab380e11f103
7
+ data.tar.gz: 74382b4281f6665f900639bc89480cdba8b88c09ed54eef140af923302ace24b69cb699018f90b14c9b289185120670b7e8149d9b66ff4cc9898c9a53baa33c2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gremlin (0.0.2)
4
+ gremlin (0.0.3)
5
5
  quantile
6
6
  rails
7
7
  redis (~> 3.2)
@@ -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.
@@ -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
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -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
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -42,6 +42,7 @@ module Gremlin
42
42
  def configure
43
43
  config = Config.new
44
44
  yield config
45
+ config.enabled = true if config.enabled.nil?
45
46
  @configuration = config
46
47
  end
47
48
 
@@ -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
- @values.redis = Redis.new(**Gremlin.configuration.redis)
15
+ #@values.redis = Redis::NativeHash.redis
16
16
  @values.key = retention_key
17
17
  @values.save
18
18
  end
@@ -5,9 +5,9 @@ module Gremlin
5
5
  NotAMetricError = Class.new StandardError
6
6
 
7
7
  def initialize
8
- Redis::Client.default = Redis.new(**Gremlin.configuration.redis)
8
+ Redis::NativeHash.redis = Redis.new(**Gremlin.configuration.redis)
9
9
  @metrics = Redis::NativeHash.find(retention_key) || Redis::NativeHash.new()
10
- @metrics.redis = Redis.new(**Gremlin.configuration.redis)
10
+ #@metrics.redis = Redis::NativeHash.redis
11
11
  @metrics.key = retention_key
12
12
  @metrics.save
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Gremlin
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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: