promenade 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 6a96e94c081baeb45b67f07de03d05741bf73811365667bc47de25ae9ce73b7c
4
- data.tar.gz: e21d721b54e7940dd76eb1010174709886c2fa9909ec3709df8e9f513eb3a16b
3
+ metadata.gz: a97473b26a487020c3a9fee648234775da0277e10c875d9b422694b1b0717def
4
+ data.tar.gz: 2891fd874b452d414a9fbd677fa656841245513a9fe8e8a4765f637a2c6a128b
5
5
  SHA512:
6
- metadata.gz: 0cbb16b42dc91bed722d743638749ed5ca6109b687eb39e7d335ecb083d8d64f7e82ba3359172f0735b27539aea872e3d45b0bba2e656785531616110c8c6fb7
7
- data.tar.gz: 13bb4634b4d389fd68808133da71cf28ef57824b11ee4994a7d06952cedcb99c93a74abb540aa6782941a4bb135e61c6661cf39d3cf0e0f2545272b4e1174499
6
+ metadata.gz: a67eb34dce4a342c79940dab1dd9196e19339a516aac0c18a7f0d8e41e485e3ae35ea18eb3151f40aa413086afc0f8034e0d0152b4d4f89f2422310567449722
7
+ data.tar.gz: 0d48694c0c4009ecb268a0f54aa2cb9b9da7eac4d202d80c0659ac19362d37538978363ea5cd98ef82d3fa3ab12c329579a163d5bda5ed487759a832bcbe8ebb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- promenade (0.1.7)
4
+ promenade (0.1.8)
5
5
  activesupport
6
6
  prometheus-client-mmap (~> 0.9.3)
7
7
  rack
@@ -18,6 +18,7 @@ GEM
18
18
  backports (3.11.3)
19
19
  binding_of_caller (0.8.0)
20
20
  debug_inspector (>= 0.0.1)
21
+ climate_control (0.2.0)
21
22
  codecov (0.1.10)
22
23
  json
23
24
  simplecov
@@ -112,6 +113,7 @@ PLATFORMS
112
113
 
113
114
  DEPENDENCIES
114
115
  bundler (~> 1.16)
116
+ climate_control
115
117
  codecov
116
118
  deep-cover
117
119
  promenade!
data/README.md CHANGED
@@ -148,6 +148,10 @@ The exporter runs by default on port `9394` and the metrics are avaible at the s
148
148
 
149
149
  ### Configuration
150
150
 
151
+ If you are using rails it should load a railtie and configure promenade.
152
+
153
+ If are not using rails you should call `Promenade.setup` after your environment has loaded.
154
+
151
155
  In a typical development environment there should be nothing for you to do. Promenade stores its state files in `tmp/promenade` and will create that directory if it does not exist.
152
156
 
153
157
  In a production environment you should try to store the state files on tmpfs for performance, you can configure the path that promenade will write to by setting the `PROMETHEUS_MULTIPROC_DIR` environment variable.
data/exe/promenade CHANGED
@@ -4,6 +4,8 @@ require "promenade"
4
4
  require "rack"
5
5
  require "prometheus/client/rack/exporter"
6
6
 
7
+ Promenade.setup
8
+
7
9
  app = Rack::Builder.app do
8
10
  use Rack::Deflater
9
11
  use ::Prometheus::Client::Rack::Exporter
@@ -0,0 +1,9 @@
1
+ require "promenade/setup"
2
+
3
+ module Promenade
4
+ class Railtie < ::Rails::Railtie
5
+ initializer "promenade.configure_rails_initialization" do
6
+ Promenade.setup
7
+ end
8
+ end
9
+ end
@@ -3,7 +3,8 @@ require "prometheus/client/support/unicorn"
3
3
 
4
4
  module Promenade
5
5
  def self.root_dir
6
- Pathname.new(ENV.fetch("RAILS_ROOT", Dir.pwd))
6
+ rails_root = defined?(Rails) && Rails.root
7
+ rails_root || Pathname.new(ENV.fetch("RAILS_ROOT", Dir.pwd))
7
8
  end
8
9
 
9
10
  def self.multiprocess_files_dir
@@ -21,5 +22,3 @@ module Promenade
21
22
  end
22
23
  end
23
24
  end
24
-
25
- Promenade.setup
@@ -1,3 +1,3 @@
1
1
  module Promenade
2
- VERSION = "0.1.7".freeze
2
+ VERSION = "0.1.8".freeze
3
3
  end
data/lib/promenade.rb CHANGED
@@ -1,5 +1,3 @@
1
1
  require "promenade/version"
2
2
  require "promenade/setup"
3
-
4
- module Promenade
5
- end
3
+ require "promenade/railtie" if defined? ::Rails::Railtie
data/promenade.gemspec CHANGED
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "rack"
28
28
 
29
29
  spec.add_development_dependency "bundler", "~> 1.16"
30
+ spec.add_development_dependency "climate_control"
30
31
  spec.add_development_dependency "deep-cover"
31
32
  spec.add_development_dependency "rake", "~> 10.0"
32
33
  spec.add_development_dependency "rspec", "~> 3.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promenade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Robinson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-06 00:00:00.000000000 Z
11
+ date: 2018-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: climate_control
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: deep-cover
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +182,7 @@ files:
168
182
  - lib/promenade/kafka/producer_subscriber.rb
169
183
  - lib/promenade/kafka/subscriber.rb
170
184
  - lib/promenade/prometheus.rb
185
+ - lib/promenade/railtie.rb
171
186
  - lib/promenade/setup.rb
172
187
  - lib/promenade/version.rb
173
188
  - promenade.gemspec