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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06069805cfe9551cc53e10d10a59082779d8671b
4
- data.tar.gz: a0b01de56a7a136c959004aa95253d0fa384f91a
3
+ metadata.gz: ca8324a87e95b224cc7f8d0a599fcd378e16841d
4
+ data.tar.gz: cab4a694173d311f8cf05a60d57e8e0e88169657
5
5
  SHA512:
6
- metadata.gz: 687420db43859a994c7fae04099e15c6e80c4b6511126c8c8c68fbd733269de1c2a86985ce4be49d1715834056f188011ffc358589153e8079477567c08fe8bf
7
- data.tar.gz: bb27c52b7a36a29052b9a9585190c528bfe6a853e2238eccbbe2769c07e033e1b8fc3022066c0b7a92f2666bcd28f9cb2ba6ef1407dc87ae4f3bf7d3156ad855
6
+ metadata.gz: 7b55e1a2dbd0e559078cdbd9dbeda7ea8fa278c5f06dfe70083ebd512e4f98a2fa4637c6b8cee25509bc7861d3022966574713cef40212b3b4ea35533bc957e7
7
+ data.tar.gz: b85319dbfcc38a0703aef8c59c1b759108a08d143f4eda753d6033a05289f4bef5c66ad1183252779dbdb88536cd53b414c15934aaf3c879cd9a7a1cf99bd38a
@@ -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
@@ -4,3 +4,6 @@ rvm:
4
4
  - 2.3.0
5
5
  - 2.3.1
6
6
  before_install: gem install bundler -v 1.12.5
7
+ script:
8
+ - rake test
9
+ - rake install
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in three-things.gemspec
4
4
  gemspec
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require "rake/testtask"
4
4
  Rake::TestTask.new(:test) do |t|
5
5
  t.libs << "test"
6
6
  t.libs << "lib"
7
- t.test_files = FileList['test/**/*_test.rb']
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
8
  end
9
9
 
10
- task :default => :test
10
+ task default: :test
@@ -1,6 +1,6 @@
1
1
  module ThreeThings
2
2
  class Middleware
3
- def initialize app, statsd, prefix = ""
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 postfix
12
+ def path(postfix)
13
13
  if @prefix != ""
14
- return "#{@prefix}.#{postfix}"
14
+ "#{@prefix}.#{postfix}"
15
15
  else
16
- return postfix
16
+ postfix
17
17
  end
18
18
  end
19
19
 
20
- def call env
20
+ def call(env)
21
21
  req = Rack::Request.new(env)
22
22
 
23
23
  # Request count
@@ -1,3 +1,3 @@
1
1
  module ThreeThings
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1".freeze
3
3
  end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'three-things/version'
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 = %q{A simple statsd middleware for rack.}
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.0
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: '0'
171
+ version: '2.3'
157
172
  required_rubygems_version: !ruby/object:Gem::Requirement
158
173
  requirements:
159
174
  - - ">="