rails_autoscale_agent 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +45 -0
- data/Rakefile +6 -0
- data/bin/console +7 -0
- data/bin/setup +6 -0
- data/lib/rails_autoscale_agent.rb +5 -0
- data/lib/rails_autoscale_agent/autoscale_api.rb +52 -0
- data/lib/rails_autoscale_agent/collector.rb +23 -0
- data/lib/rails_autoscale_agent/config.rb +22 -0
- data/lib/rails_autoscale_agent/logger.rb +9 -0
- data/lib/rails_autoscale_agent/measurement.rb +7 -0
- data/lib/rails_autoscale_agent/middleware.rb +37 -0
- data/lib/rails_autoscale_agent/railtie.rb +9 -0
- data/lib/rails_autoscale_agent/registration.rb +15 -0
- data/lib/rails_autoscale_agent/report.rb +17 -0
- data/lib/rails_autoscale_agent/reporter.rb +78 -0
- data/lib/rails_autoscale_agent/request.rb +14 -0
- data/lib/rails_autoscale_agent/store.rb +41 -0
- data/lib/rails_autoscale_agent/time_rounder.rb +17 -0
- data/lib/rails_autoscale_agent/version.rb +3 -0
- data/rails_autoscale_agent.gemspec +28 -0
- metadata +182 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e36ab348752b0f7b470a47224ccfb8b8375a2355
|
4
|
+
data.tar.gz: 14d64ad0ed2114955d34f2e9e5a129c763d5ffb3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d68ddb62be312c4afd8ee376c249f9755472c04a90cb8a98409a8b9e806dafaa3ea909c2ff06e2a42c6b48d466b1af1dca134640eef7db0ae67df79251d7017e
|
7
|
+
data.tar.gz: 59fb44914ffc29746221370e8cbaf3397b5adb725a474905d20fcd42e36172fe0aa7b9736e3f5b354c16e92915040f8238fad0abf8f166c28cac5084019464af
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Adam McCrea
|
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,45 @@
|
|
1
|
+
# Rails Autoscale Agent
|
2
|
+
|
3
|
+
This gem works together with the Rails Autoscale Heroku add-on
|
4
|
+
to automatically scale your web dynos as needed.
|
5
|
+
It gathers a minimal set of metrics for each request,
|
6
|
+
and periodically posts this data asynchronously to the Rails Autoscale service.
|
7
|
+
|
8
|
+
## Requirements
|
9
|
+
|
10
|
+
We've tested this with Rails versions 3.2 through 5.0 and Ruby versions 1.9.3 through 2.3.1.
|
11
|
+
|
12
|
+
## Getting Started
|
13
|
+
|
14
|
+
Add this line to your application's Gemfile and run `bundle`:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'rails_autoscale_agent'
|
18
|
+
```
|
19
|
+
|
20
|
+
This will automatically insert the agent into your Rack middleware stack.
|
21
|
+
|
22
|
+
The agent will only communicate with Rails Autoscale if a `RAILS_AUTOSCALE_URL` ENV variable is present,
|
23
|
+
which happens automatically when you install the Heroku add-on.
|
24
|
+
In development (or anytime the ENV var is missing), the middleware will still produce
|
25
|
+
`INFO`-level log output to your Rails log.
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
30
|
+
Then, run `rake spec` to run the tests.
|
31
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
32
|
+
|
33
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
34
|
+
To release a new version, update the version number in `version.rb`,
|
35
|
+
and then run `bundle exec rake release`, which will create a git tag for the version,
|
36
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/adamlogic/rails_autoscale_agent.
|
41
|
+
|
42
|
+
## License
|
43
|
+
|
44
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
45
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
3
|
+
require 'json'
|
4
|
+
require 'rails_autoscale_agent/logger'
|
5
|
+
|
6
|
+
module RailsAutoscaleAgent
|
7
|
+
class AutoscaleApi
|
8
|
+
include Logger
|
9
|
+
|
10
|
+
SUCCESS = 'success'
|
11
|
+
|
12
|
+
def initialize(api_url_base)
|
13
|
+
@api_url_base = api_url_base
|
14
|
+
end
|
15
|
+
|
16
|
+
def report_metrics!(report_params)
|
17
|
+
post '/reports', report: report_params
|
18
|
+
end
|
19
|
+
|
20
|
+
def register_reporter!(registration_params)
|
21
|
+
post '/registrations', registration: registration_params
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def post(path, data)
|
27
|
+
header = {'Content-Type' => 'application/json'}
|
28
|
+
uri = URI.parse("#{@api_url_base}#{path}")
|
29
|
+
ssl = uri.scheme == 'https'
|
30
|
+
|
31
|
+
response = Net::HTTP.start(uri.host, uri.port, use_ssl: ssl) do |http|
|
32
|
+
request = Net::HTTP::Post.new(uri.request_uri, header)
|
33
|
+
request.body = JSON.dump(data)
|
34
|
+
|
35
|
+
logger.debug "[AutoscaleApi] Posting to #{request.body.size} bytes to #{uri}"
|
36
|
+
http.request(request)
|
37
|
+
end
|
38
|
+
|
39
|
+
case response.code.to_i
|
40
|
+
when 200...300 then SuccessResponse.new
|
41
|
+
else FailureResponse.new(response.message)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
class SuccessResponse
|
46
|
+
end
|
47
|
+
|
48
|
+
class FailureResponse < Struct.new(:failure_message)
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rails_autoscale_agent/logger'
|
2
|
+
|
3
|
+
module RailsAutoscaleAgent
|
4
|
+
class Collector
|
5
|
+
extend Logger
|
6
|
+
|
7
|
+
def self.collect(request, store)
|
8
|
+
if request.entered_queue_at
|
9
|
+
if request.entered_queue_at < (Time.now - 60 * 10)
|
10
|
+
# ignore unreasonable values
|
11
|
+
logger.debug "[Collector] request queued for more than 10 minutes... skipping collection"
|
12
|
+
else
|
13
|
+
queue_time_millis = (Time.now - request.entered_queue_at) * 1000
|
14
|
+
queue_time_millis = 0 if queue_time_millis < 0
|
15
|
+
store.push(queue_time_millis)
|
16
|
+
end
|
17
|
+
else
|
18
|
+
logger.debug "[Collector] no wait time data to collect"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module RailsAutoscaleAgent
|
2
|
+
class Config
|
3
|
+
attr_reader :api_base_url, :dyno, :pid, :fake_mode
|
4
|
+
alias_method :fake_mode?, :fake_mode
|
5
|
+
|
6
|
+
def initialize(environment)
|
7
|
+
@api_base_url = environment['RAILS_AUTOSCALE_URL']
|
8
|
+
@pid = Process.pid
|
9
|
+
@fake_mode = true if environment['RAILS_AUTOSCALE_FAKE_MODE'] == 'true'
|
10
|
+
|
11
|
+
if fake_mode?
|
12
|
+
@dyno = 'web.123'
|
13
|
+
else
|
14
|
+
@dyno = environment['DYNO']
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
"#{@dyno}-#{@pid}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'rails_autoscale_agent/logger'
|
2
|
+
require 'rails_autoscale_agent/store'
|
3
|
+
require 'rails_autoscale_agent/collector'
|
4
|
+
require 'rails_autoscale_agent/reporter'
|
5
|
+
require 'rails_autoscale_agent/config'
|
6
|
+
require 'rails_autoscale_agent/request'
|
7
|
+
|
8
|
+
module RailsAutoscaleAgent
|
9
|
+
class Middleware
|
10
|
+
include Logger
|
11
|
+
|
12
|
+
def initialize(app)
|
13
|
+
@app = app
|
14
|
+
end
|
15
|
+
|
16
|
+
def call(env)
|
17
|
+
config = Config.new(ENV)
|
18
|
+
|
19
|
+
logger.tagged 'RailsAutoscaleAgent', config.to_s do
|
20
|
+
if config.api_base_url
|
21
|
+
request = Request.new(env, config)
|
22
|
+
|
23
|
+
logger.debug "[Middleware] enter middleware for #{request.fullpath}"
|
24
|
+
|
25
|
+
store = Store.instance
|
26
|
+
Reporter.start(config, store)
|
27
|
+
Collector.collect(request, store)
|
28
|
+
else
|
29
|
+
logger.info "[Middleware] RAILS_AUTOSCALE_URL is not set"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
@app.call(env)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rails_autoscale_agent/version'
|
2
|
+
|
3
|
+
module RailsAutoscaleAgent
|
4
|
+
class Registration < Struct.new(:config)
|
5
|
+
|
6
|
+
def to_params
|
7
|
+
{
|
8
|
+
pid: Process.pid,
|
9
|
+
ruby_version: RUBY_VERSION,
|
10
|
+
rails_version: Rails.version,
|
11
|
+
gem_version: VERSION,
|
12
|
+
}
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RailsAutoscaleAgent
|
2
|
+
class Report < Struct.new(:time, :values)
|
3
|
+
|
4
|
+
def initialize(time, values = [])
|
5
|
+
super
|
6
|
+
end
|
7
|
+
|
8
|
+
def to_params(config)
|
9
|
+
{
|
10
|
+
time: time.iso8601,
|
11
|
+
dyno: config.dyno,
|
12
|
+
pid: config.pid,
|
13
|
+
measurements: values,
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require 'rails_autoscale_agent/logger'
|
3
|
+
require 'rails_autoscale_agent/autoscale_api'
|
4
|
+
require 'rails_autoscale_agent/time_rounder'
|
5
|
+
require 'rails_autoscale_agent/registration'
|
6
|
+
|
7
|
+
# Reporter wakes up every minute to send metrics to the RailsAutoscale API
|
8
|
+
|
9
|
+
module RailsAutoscaleAgent
|
10
|
+
class Reporter
|
11
|
+
include Singleton
|
12
|
+
include Logger
|
13
|
+
|
14
|
+
def self.start(config, store)
|
15
|
+
instance.start!(config, store) unless instance.running?
|
16
|
+
end
|
17
|
+
|
18
|
+
def start!(config, store)
|
19
|
+
logger.info "[Reporter] starting reporter, will report every minute"
|
20
|
+
|
21
|
+
@running = true
|
22
|
+
|
23
|
+
Thread.new do
|
24
|
+
register!(config)
|
25
|
+
|
26
|
+
loop do
|
27
|
+
beginning_of_next_minute = TimeRounder.beginning_of_minute(Time.now) + 60
|
28
|
+
|
29
|
+
# add 0-5 seconds to avoid slamming the API at one moment
|
30
|
+
next_report_time = beginning_of_next_minute + rand * 5
|
31
|
+
|
32
|
+
sleep next_report_time - Time.now
|
33
|
+
|
34
|
+
begin
|
35
|
+
report!(config, store)
|
36
|
+
rescue => ex
|
37
|
+
# Exceptions in threads other than the main thread will fail silently
|
38
|
+
# https://ruby-doc.org/core-2.2.0/Thread.html#class-Thread-label-Exception+handling
|
39
|
+
logger.error "[Reporter] #{ex.inspect}"
|
40
|
+
logger.error ex.backtrace.join("\n")
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def running?
|
47
|
+
@running
|
48
|
+
end
|
49
|
+
|
50
|
+
def report!(config, store)
|
51
|
+
while report = store.pop_report
|
52
|
+
logger.info "[Reporter] reporting queue times for #{report.values.size} requests during minute #{report.time.iso8601}"
|
53
|
+
|
54
|
+
params = report.to_params(config)
|
55
|
+
result = AutoscaleApi.new(config.api_base_url).report_metrics!(params)
|
56
|
+
|
57
|
+
case result
|
58
|
+
when AutoscaleApi::SuccessResponse
|
59
|
+
logger.info "[Reporter] reported successfully"
|
60
|
+
when AutoscaleApi::FailureResponse
|
61
|
+
logger.error "[Reporter] failed: #{result.failure_message}"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
logger.debug "[Reporter] nothing to report" unless result
|
66
|
+
end
|
67
|
+
|
68
|
+
def register!(config)
|
69
|
+
params = Registration.new(config).to_params
|
70
|
+
result = AutoscaleApi.new(config.api_base_url).register_reporter!(params)
|
71
|
+
|
72
|
+
if result.is_a? AutoscaleApi::FailureResponse
|
73
|
+
logger.error "[Reporter] failed to register: #{result.failure_message}"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RailsAutoscaleAgent
|
2
|
+
class Request
|
3
|
+
attr_reader :entered_queue_at, :fullpath
|
4
|
+
|
5
|
+
def initialize(env, config)
|
6
|
+
@fullpath = "#{env['HTTP_HOST']}#{env['PATH_INFO']}"
|
7
|
+
@entered_queue_at = if unix_millis = env['HTTP_X_REQUEST_START']
|
8
|
+
Time.at(unix_millis.to_f / 1000)
|
9
|
+
elsif config.fake_mode?
|
10
|
+
Time.now - rand(1000) / 1000.0 # 0-1000 ms ago
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require 'rails_autoscale_agent/logger'
|
3
|
+
require 'rails_autoscale_agent/time_rounder'
|
4
|
+
require 'rails_autoscale_agent/measurement'
|
5
|
+
require 'rails_autoscale_agent/report'
|
6
|
+
|
7
|
+
module RailsAutoscaleAgent
|
8
|
+
class Store
|
9
|
+
include Singleton
|
10
|
+
include Logger
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@measurements = []
|
14
|
+
end
|
15
|
+
|
16
|
+
def push(value, time = Time.now)
|
17
|
+
logger.debug "[Collector] queue time: #{value}"
|
18
|
+
@measurements << Measurement.new(time, value)
|
19
|
+
end
|
20
|
+
|
21
|
+
def pop_report
|
22
|
+
result = nil
|
23
|
+
boundary = TimeRounder.beginning_of_minute(Time.now)
|
24
|
+
|
25
|
+
while @measurements[0] && @measurements[0].time < boundary
|
26
|
+
measurement = @measurements.shift
|
27
|
+
|
28
|
+
if result.nil?
|
29
|
+
report_time = TimeRounder.beginning_of_minute(measurement.time)
|
30
|
+
boundary = report_time + 60
|
31
|
+
result = Report.new(report_time)
|
32
|
+
end
|
33
|
+
|
34
|
+
result.values << measurement.value
|
35
|
+
end
|
36
|
+
|
37
|
+
result
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rails_autoscale_agent/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rails_autoscale_agent"
|
8
|
+
spec.version = RailsAutoscaleAgent::VERSION
|
9
|
+
spec.authors = ["Adam McCrea"]
|
10
|
+
spec.email = ["adam@adamlogic.com"]
|
11
|
+
|
12
|
+
spec.summary = "This gem works with the Rails Autoscale Heroku add-on to automatically scale your web dynos."
|
13
|
+
spec.homepage = "https://github.com/adamlogic/rails_autoscale_agent"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_dependency "activesupport", ">= 3.2"
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
24
|
+
spec.add_development_dependency "vcr", "~> 3.0"
|
25
|
+
spec.add_development_dependency "webmock"
|
26
|
+
spec.add_development_dependency "pry"
|
27
|
+
spec.add_development_dependency "pry-byebug"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_autoscale_agent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam McCrea
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: vcr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: webmock
|
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'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-byebug
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description:
|
126
|
+
email:
|
127
|
+
- adam@adamlogic.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rspec"
|
134
|
+
- ".travis.yml"
|
135
|
+
- Gemfile
|
136
|
+
- LICENSE.txt
|
137
|
+
- README.md
|
138
|
+
- Rakefile
|
139
|
+
- bin/console
|
140
|
+
- bin/setup
|
141
|
+
- lib/rails_autoscale_agent.rb
|
142
|
+
- lib/rails_autoscale_agent/autoscale_api.rb
|
143
|
+
- lib/rails_autoscale_agent/collector.rb
|
144
|
+
- lib/rails_autoscale_agent/config.rb
|
145
|
+
- lib/rails_autoscale_agent/logger.rb
|
146
|
+
- lib/rails_autoscale_agent/measurement.rb
|
147
|
+
- lib/rails_autoscale_agent/middleware.rb
|
148
|
+
- lib/rails_autoscale_agent/railtie.rb
|
149
|
+
- lib/rails_autoscale_agent/registration.rb
|
150
|
+
- lib/rails_autoscale_agent/report.rb
|
151
|
+
- lib/rails_autoscale_agent/reporter.rb
|
152
|
+
- lib/rails_autoscale_agent/request.rb
|
153
|
+
- lib/rails_autoscale_agent/store.rb
|
154
|
+
- lib/rails_autoscale_agent/time_rounder.rb
|
155
|
+
- lib/rails_autoscale_agent/version.rb
|
156
|
+
- rails_autoscale_agent.gemspec
|
157
|
+
homepage: https://github.com/adamlogic/rails_autoscale_agent
|
158
|
+
licenses:
|
159
|
+
- MIT
|
160
|
+
metadata: {}
|
161
|
+
post_install_message:
|
162
|
+
rdoc_options: []
|
163
|
+
require_paths:
|
164
|
+
- lib
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
requirements: []
|
176
|
+
rubyforge_project:
|
177
|
+
rubygems_version: 2.5.1
|
178
|
+
signing_key:
|
179
|
+
specification_version: 4
|
180
|
+
summary: This gem works with the Rails Autoscale Heroku add-on to automatically scale
|
181
|
+
your web dynos.
|
182
|
+
test_files: []
|