three-things 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -0
- data/.travis.yml +3 -0
- data/Gemfile +1 -1
- data/Rakefile +2 -2
- data/lib/three-things/middleware.rb +5 -5
- data/lib/three-things/version.rb +1 -1
- data/three-things.gemspec +6 -3
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca8324a87e95b224cc7f8d0a599fcd378e16841d
|
4
|
+
data.tar.gz: cab4a694173d311f8cf05a60d57e8e0e88169657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b55e1a2dbd0e559078cdbd9dbeda7ea8fa278c5f06dfe70083ebd512e4f98a2fa4637c6b8cee25509bc7861d3022966574713cef40212b3b4ea35533bc957e7
|
7
|
+
data.tar.gz: b85319dbfcc38a0703aef8c59c1b759108a08d143f4eda753d6033a05289f4bef5c66ad1183252779dbdb88536cd53b414c15934aaf3c879cd9a7a1cf99bd38a
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Style/StringLiterals:
|
2
|
+
EnforcedStyle: double_quotes
|
3
|
+
Style/StringLiteralsInInterpolation:
|
4
|
+
EnforcedStyle: double_quotes
|
5
|
+
Metrics/LineLength:
|
6
|
+
Max: 100
|
7
|
+
Style/TrailingCommaInLiteral:
|
8
|
+
EnforcedStyleForMultiline: comma
|
9
|
+
SupportedStyles:
|
10
|
+
- comma
|
11
|
+
- no_comma
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module ThreeThings
|
2
2
|
class Middleware
|
3
|
-
def initialize
|
3
|
+
def initialize(app, statsd, prefix = "")
|
4
4
|
@app = app
|
5
5
|
@statsd = statsd
|
6
6
|
|
@@ -9,15 +9,15 @@ module ThreeThings
|
|
9
9
|
@prefix = prefix
|
10
10
|
end
|
11
11
|
|
12
|
-
def path
|
12
|
+
def path(postfix)
|
13
13
|
if @prefix != ""
|
14
|
-
|
14
|
+
"#{@prefix}.#{postfix}"
|
15
15
|
else
|
16
|
-
|
16
|
+
postfix
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def call
|
20
|
+
def call(env)
|
21
21
|
req = Rack::Request.new(env)
|
22
22
|
|
23
23
|
# Request count
|
data/lib/three-things/version.rb
CHANGED
data/three-things.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "three-things/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "three-things"
|
@@ -9,18 +9,21 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Nat Welch"]
|
10
10
|
spec.email = ["nat@natwelch.com"]
|
11
11
|
|
12
|
-
spec.summary =
|
12
|
+
spec.summary = "A simple statsd middleware for rack."
|
13
13
|
spec.homepage = "https://github.com/icco/three-things"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
+
spec.required_ruby_version = "~> 2.3"
|
20
|
+
|
19
21
|
spec.add_development_dependency "bundler", "~> 1.12"
|
20
22
|
spec.add_development_dependency "dogstatsd-ruby", "~> 1.6"
|
21
23
|
spec.add_development_dependency "minitest", "~> 5.0"
|
22
24
|
spec.add_development_dependency "rack-test"
|
23
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rubocop"
|
24
27
|
spec.add_development_dependency "vcr"
|
25
28
|
spec.add_development_dependency "webmock"
|
26
29
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: three-things
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Welch
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: vcr
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +144,7 @@ extensions: []
|
|
130
144
|
extra_rdoc_files: []
|
131
145
|
files:
|
132
146
|
- ".gitignore"
|
147
|
+
- ".rubocop.yml"
|
133
148
|
- ".travis.yml"
|
134
149
|
- CODE_OF_CONDUCT.md
|
135
150
|
- Gemfile
|
@@ -151,9 +166,9 @@ require_paths:
|
|
151
166
|
- lib
|
152
167
|
required_ruby_version: !ruby/object:Gem::Requirement
|
153
168
|
requirements:
|
154
|
-
- - "
|
169
|
+
- - "~>"
|
155
170
|
- !ruby/object:Gem::Version
|
156
|
-
version: '
|
171
|
+
version: '2.3'
|
157
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
173
|
requirements:
|
159
174
|
- - ">="
|