notable 0.2.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +25 -2
- data/LICENSE.txt +1 -1
- data/README.md +38 -16
- data/app/models/notable/request.rb +1 -1
- data/lib/generators/notable/jobs_generator.rb +6 -17
- data/lib/generators/notable/requests_generator.rb +6 -17
- data/lib/generators/notable/templates/{create_jobs.rb → create_jobs.rb.tt} +3 -3
- data/lib/generators/notable/templates/{create_requests.rb → create_requests.rb.tt} +3 -6
- data/lib/notable.rb +38 -18
- data/lib/notable/engine.rb +3 -2
- data/lib/notable/job_extensions.rb +1 -1
- data/lib/notable/middleware.rb +8 -3
- data/lib/notable/throttle.rb +5 -3
- data/lib/notable/unpermitted_parameters.rb +1 -1
- data/lib/notable/unverified_request.rb +1 -3
- data/lib/notable/validation_errors.rb +0 -2
- data/lib/notable/version.rb +1 -1
- metadata +103 -25
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/Rakefile +0 -1
- data/notable.gemspec +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 97e610b1e6274a603bf4404cad75d7fb024b265b2ccad352916940e3f1b81dd1
|
4
|
+
data.tar.gz: 0b7b71c06fcf86d5b9cf5b3aa10439d7902d3c9a185ce52ae50ce43a63aa8030
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24736ec76486d7f1dc515bbf7d45da6c0d4328f56b27232ace17df78f5899b9dd1230b4f11a4c62baa5ac729df2d113b595f038467d9099a0f62d5d111dabcb8
|
7
|
+
data.tar.gz: a2af6018e63f62f886be2212b6349909ee3d36f15aaa16063508d0420366921afd12b8b27e914ebcc889f0af4287dad87e8fa7dd956729341a976bb1b3c2c3af
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,31 @@
|
|
1
|
-
## 0.2
|
1
|
+
## 0.3.2 (2020-07-24)
|
2
|
+
|
3
|
+
- Added support for Rails API
|
4
|
+
- Fixed blocked requests with Rack::Attack
|
5
|
+
|
6
|
+
## 0.3.1 (2020-05-20)
|
7
|
+
|
8
|
+
- Fixed deprecation warning in Ruby 2.7
|
9
|
+
|
10
|
+
## 0.3.0 (2019-05-28)
|
11
|
+
|
12
|
+
- Added support for Rack::Attack 6
|
13
|
+
- Added job-specific slow job threshold
|
14
|
+
- Dropped support for Rails 4.2
|
15
|
+
|
16
|
+
## 0.2.2 (2018-05-18)
|
17
|
+
|
18
|
+
- Added `mask_ips` option
|
19
|
+
|
20
|
+
## 0.2.1 (2017-05-01)
|
21
|
+
|
22
|
+
- Added support for Rails 5.1
|
23
|
+
|
24
|
+
## 0.2.0 (2017-01-16)
|
2
25
|
|
3
26
|
- Switched to ActiveJob for jobs
|
4
27
|
- Fixed deprecation warnings
|
5
28
|
|
6
|
-
## 0.1.0
|
29
|
+
## 0.1.0 (2016-02-20)
|
7
30
|
|
8
31
|
- Launched
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -23,6 +23,8 @@ You can track custom notes as well.
|
|
23
23
|
|
24
24
|
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
25
25
|
|
26
|
+
[![Build Status](https://travis-ci.org/ankane/notable.svg?branch=master)](https://travis-ci.org/ankane/notable)
|
27
|
+
|
26
28
|
## Installation
|
27
29
|
|
28
30
|
Add this line to your application’s Gemfile:
|
@@ -36,10 +38,10 @@ And run:
|
|
36
38
|
```sh
|
37
39
|
rails generate notable:requests
|
38
40
|
rails generate notable:jobs
|
39
|
-
|
41
|
+
rails db:migrate
|
40
42
|
```
|
41
43
|
|
42
|
-
|
44
|
+
To explore the data, check out [Blazer](https://github.com/ankane/blazer).
|
43
45
|
|
44
46
|
## Requests
|
45
47
|
|
@@ -50,7 +52,7 @@ A `Notable::Request` is created for:
|
|
50
52
|
- slow requests
|
51
53
|
- timeouts
|
52
54
|
- validation failures
|
53
|
-
- [CSRF failures](
|
55
|
+
- [CSRF failures](https://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf)
|
54
56
|
- unpermitted parameters
|
55
57
|
- blocked and throttled requests
|
56
58
|
|
@@ -93,23 +95,23 @@ Notable.enabled = Rails.env.production?
|
|
93
95
|
Set slow threshold
|
94
96
|
|
95
97
|
```ruby
|
96
|
-
Notable.slow_request_threshold = 5
|
98
|
+
Notable.slow_request_threshold = 5.seconds
|
97
99
|
```
|
98
100
|
|
99
101
|
Custom user method
|
100
102
|
|
101
103
|
```ruby
|
102
|
-
Notable.user_method =
|
104
|
+
Notable.user_method = lambda do |env|
|
103
105
|
env["warden"].try(:user) || env["action_controller.instance"].try(:current_visit)
|
104
|
-
|
106
|
+
end
|
105
107
|
```
|
106
108
|
|
107
109
|
Custom track method
|
108
110
|
|
109
111
|
```ruby
|
110
|
-
Notable.track_request_method =
|
112
|
+
Notable.track_request_method = lambda do |data, env|
|
111
113
|
Notable::Request.create!(data)
|
112
|
-
|
114
|
+
end
|
113
115
|
```
|
114
116
|
|
115
117
|
Skip tracking CSRF failures
|
@@ -118,26 +120,37 @@ Skip tracking CSRF failures
|
|
118
120
|
skip_before_action :track_unverified_request
|
119
121
|
```
|
120
122
|
|
123
|
+
Anonymize IP addresses
|
124
|
+
|
125
|
+
```ruby
|
126
|
+
Notable.mask_ips = true
|
127
|
+
```
|
128
|
+
|
121
129
|
### Jobs
|
122
130
|
|
123
131
|
Set slow threshold
|
124
132
|
|
125
133
|
```ruby
|
126
|
-
Notable.slow_job_threshold = 60
|
134
|
+
Notable.slow_job_threshold = 60.seconds
|
127
135
|
```
|
128
136
|
|
129
|
-
|
137
|
+
To set a threshold for a specific job, use:
|
130
138
|
|
131
139
|
```ruby
|
132
|
-
|
133
|
-
|
134
|
-
|
140
|
+
class CustomJob < ApplicationJob
|
141
|
+
def notable_slow_job_threshold
|
142
|
+
5.minutes
|
143
|
+
end
|
144
|
+
end
|
135
145
|
```
|
136
146
|
|
137
|
-
|
147
|
+
Custom track method
|
138
148
|
|
139
|
-
|
140
|
-
|
149
|
+
```ruby
|
150
|
+
Notable.track_job_method = lambda do |data|
|
151
|
+
Notable::Job.create!(data)
|
152
|
+
end
|
153
|
+
```
|
141
154
|
|
142
155
|
## Contributing
|
143
156
|
|
@@ -147,3 +160,12 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
|
|
147
160
|
- Fix bugs and [submit pull requests](https://github.com/ankane/notable/pulls)
|
148
161
|
- Write, clarify, or fix documentation
|
149
162
|
- Suggest or add new features
|
163
|
+
|
164
|
+
To get started with development:
|
165
|
+
|
166
|
+
```sh
|
167
|
+
git clone https://github.com/ankane/notable.git
|
168
|
+
cd notable
|
169
|
+
bundle install
|
170
|
+
bundle exec rake test
|
171
|
+
```
|
@@ -1,28 +1,17 @@
|
|
1
|
-
# taken from https://github.com/collectiveidea/audited/blob/master/lib/generators/audited/install_generator.rb
|
2
|
-
require "rails/generators"
|
3
|
-
require "rails/generators/migration"
|
4
|
-
require "active_record"
|
5
1
|
require "rails/generators/active_record"
|
6
2
|
|
7
3
|
module Notable
|
8
4
|
module Generators
|
9
5
|
class JobsGenerator < Rails::Generators::Base
|
10
|
-
include
|
6
|
+
include ActiveRecord::Generators::Migration
|
7
|
+
source_root File.join(__dir__, "templates")
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
# Implement the required interface for Rails::Generators::Migration.
|
15
|
-
def self.next_migration_number(dirname) #:nodoc:
|
16
|
-
next_migration_number = current_migration_number(dirname) + 1
|
17
|
-
if ActiveRecord::Base.timestamped_migrations
|
18
|
-
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
|
19
|
-
else
|
20
|
-
"%.3d" % next_migration_number
|
21
|
-
end
|
9
|
+
def copy_migration
|
10
|
+
migration_template "create_jobs.rb", "db/migrate/create_notable_jobs.rb", migration_version: migration_version
|
22
11
|
end
|
23
12
|
|
24
|
-
def
|
25
|
-
|
13
|
+
def migration_version
|
14
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
26
15
|
end
|
27
16
|
end
|
28
17
|
end
|
@@ -1,28 +1,17 @@
|
|
1
|
-
# taken from https://github.com/collectiveidea/audited/blob/master/lib/generators/audited/install_generator.rb
|
2
|
-
require "rails/generators"
|
3
|
-
require "rails/generators/migration"
|
4
|
-
require "active_record"
|
5
1
|
require "rails/generators/active_record"
|
6
2
|
|
7
3
|
module Notable
|
8
4
|
module Generators
|
9
5
|
class RequestsGenerator < Rails::Generators::Base
|
10
|
-
include
|
6
|
+
include ActiveRecord::Generators::Migration
|
7
|
+
source_root File.join(__dir__, "templates")
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
# Implement the required interface for Rails::Generators::Migration.
|
15
|
-
def self.next_migration_number(dirname) #:nodoc:
|
16
|
-
next_migration_number = current_migration_number(dirname) + 1
|
17
|
-
if ActiveRecord::Base.timestamped_migrations
|
18
|
-
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
|
19
|
-
else
|
20
|
-
"%.3d" % next_migration_number
|
21
|
-
end
|
9
|
+
def copy_migration
|
10
|
+
migration_template "create_requests.rb", "db/migrate/create_notable_requests.rb", migration_version: migration_version
|
22
11
|
end
|
23
12
|
|
24
|
-
def
|
25
|
-
|
13
|
+
def migration_version
|
14
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
26
15
|
end
|
27
16
|
end
|
28
17
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class <%= migration_class_name %> < ActiveRecord::Migration
|
1
|
+
class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
|
2
2
|
def change
|
3
3
|
create_table :notable_jobs do |t|
|
4
4
|
t.string :note_type
|
@@ -6,8 +6,8 @@ class <%= migration_class_name %> < ActiveRecord::Migration
|
|
6
6
|
t.text :job
|
7
7
|
t.string :job_id
|
8
8
|
t.string :queue
|
9
|
-
t.
|
10
|
-
t.
|
9
|
+
t.float :runtime
|
10
|
+
t.float :queued_time
|
11
11
|
t.timestamp :created_at
|
12
12
|
end
|
13
13
|
end
|
@@ -1,10 +1,9 @@
|
|
1
|
-
class <%= migration_class_name %> < ActiveRecord::Migration
|
1
|
+
class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
|
2
2
|
def change
|
3
3
|
create_table :notable_requests do |t|
|
4
4
|
t.string :note_type
|
5
5
|
t.text :note
|
6
|
-
t.
|
7
|
-
t.string :user_type
|
6
|
+
t.references :user, polymorphic: true
|
8
7
|
t.text :action
|
9
8
|
t.integer :status
|
10
9
|
t.text :url
|
@@ -13,10 +12,8 @@ class <%= migration_class_name %> < ActiveRecord::Migration
|
|
13
12
|
t.text :user_agent
|
14
13
|
t.text :referrer
|
15
14
|
t.text :params
|
16
|
-
t.
|
15
|
+
t.float :request_time
|
17
16
|
t.timestamp :created_at
|
18
17
|
end
|
19
|
-
|
20
|
-
add_index :notable_requests, [:user_id, :user_type]
|
21
18
|
end
|
22
19
|
end
|
data/lib/notable.rb
CHANGED
@@ -1,19 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require "request_store"
|
1
|
+
# dependencies
|
2
|
+
require "active_support"
|
4
3
|
require "safely/core"
|
5
|
-
require "action_dispatch/middleware/debug_exceptions"
|
6
|
-
|
7
|
-
# middleware
|
8
|
-
require "notable/middleware"
|
9
|
-
require "notable/engine" if defined?(Rails)
|
10
4
|
|
11
|
-
#
|
12
|
-
require "notable/unpermitted_parameters"
|
13
|
-
require "notable/unverified_request"
|
14
|
-
require "notable/validation_errors"
|
5
|
+
# modules
|
15
6
|
require "notable/debug_exceptions"
|
7
|
+
require "notable/middleware"
|
16
8
|
require "notable/throttle"
|
9
|
+
require "notable/unpermitted_parameters"
|
10
|
+
require "notable/version"
|
11
|
+
|
12
|
+
require "notable/engine" if defined?(Rails)
|
17
13
|
|
18
14
|
module Notable
|
19
15
|
class << self
|
@@ -25,6 +21,7 @@ module Notable
|
|
25
21
|
attr_accessor :track_request_method
|
26
22
|
attr_accessor :user_method
|
27
23
|
attr_accessor :slow_request_threshold
|
24
|
+
attr_accessor :mask_ips
|
28
25
|
|
29
26
|
# jobs
|
30
27
|
attr_accessor :track_job_method
|
@@ -33,6 +30,7 @@ module Notable
|
|
33
30
|
self.enabled = true
|
34
31
|
self.requests_enabled = true
|
35
32
|
self.jobs_enabled = true
|
33
|
+
self.mask_ips = false
|
36
34
|
|
37
35
|
def self.requests_enabled?
|
38
36
|
enabled && requests_enabled
|
@@ -43,7 +41,7 @@ module Notable
|
|
43
41
|
end
|
44
42
|
|
45
43
|
# requests
|
46
|
-
self.track_request_method = -> (data,
|
44
|
+
self.track_request_method = -> (data, _) { Notable::Request.create!(data) }
|
47
45
|
self.user_method = -> (env) { env["warden"].user if env["warden"] }
|
48
46
|
self.slow_request_threshold = 5
|
49
47
|
|
@@ -52,7 +50,7 @@ module Notable
|
|
52
50
|
self.slow_job_threshold = 60
|
53
51
|
|
54
52
|
def self.track(note_type, note = nil)
|
55
|
-
|
53
|
+
notes << {note_type: note_type, note: note}
|
56
54
|
end
|
57
55
|
|
58
56
|
def self.track_error(e)
|
@@ -60,14 +58,15 @@ module Notable
|
|
60
58
|
end
|
61
59
|
|
62
60
|
def self.notes
|
63
|
-
|
61
|
+
Thread.current[:notable_notes] ||= []
|
64
62
|
end
|
65
63
|
|
66
64
|
def self.clear_notes
|
67
|
-
|
65
|
+
Thread.current[:notable_notes] = nil
|
68
66
|
end
|
69
67
|
|
70
|
-
def self.track_job(job, job_id, queue, created_at)
|
68
|
+
def self.track_job(job, job_id, queue, created_at, slow_job_threshold = nil)
|
69
|
+
slow_job_threshold ||= Notable.slow_job_threshold
|
71
70
|
exception = nil
|
72
71
|
notes = nil
|
73
72
|
start_time = Time.now
|
@@ -84,7 +83,7 @@ module Notable
|
|
84
83
|
runtime = Time.now - start_time
|
85
84
|
|
86
85
|
Safely.safely do
|
87
|
-
notes << {note_type: "Slow Job"} if runtime >
|
86
|
+
notes << {note_type: "Slow Job"} if runtime > slow_job_threshold
|
88
87
|
|
89
88
|
notes.each do |note|
|
90
89
|
data = {
|
@@ -103,6 +102,27 @@ module Notable
|
|
103
102
|
|
104
103
|
raise exception if exception
|
105
104
|
end
|
105
|
+
|
106
|
+
def self.mask_ip(ip)
|
107
|
+
addr = IPAddr.new(ip)
|
108
|
+
if addr.ipv4?
|
109
|
+
# set last octet to 0
|
110
|
+
addr.mask(24).to_s
|
111
|
+
else
|
112
|
+
# set last 80 bits to zeros
|
113
|
+
addr.mask(48).to_s
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
ActiveSupport.on_load(:action_controller) do
|
119
|
+
require "notable/unverified_request"
|
120
|
+
include Notable::UnverifiedRequest
|
121
|
+
end
|
122
|
+
|
123
|
+
ActiveSupport.on_load(:active_record) do
|
124
|
+
require "notable/validation_errors"
|
125
|
+
include Notable::ValidationErrors
|
106
126
|
end
|
107
127
|
|
108
128
|
ActiveSupport.on_load(:active_job) do
|
data/lib/notable/engine.rb
CHANGED
@@ -4,8 +4,9 @@ module Notable
|
|
4
4
|
|
5
5
|
initializer "notable" do |app|
|
6
6
|
if Notable.requests_enabled?
|
7
|
-
|
8
|
-
ActionDispatch::
|
7
|
+
# insert in same place as request_store
|
8
|
+
app.config.middleware.insert_after ActionDispatch::RequestId, Notable::Middleware
|
9
|
+
ActionDispatch::DebugExceptions.prepend Notable::DebugExceptions
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
@@ -5,7 +5,7 @@ module Notable
|
|
5
5
|
included do
|
6
6
|
around_perform do |job, block|
|
7
7
|
# no way to get queued_at time :(
|
8
|
-
Notable.track_job(job.class.name, job.job_id, job.queue_name, nil) do
|
8
|
+
Notable.track_job(job.class.name, job.job_id, job.queue_name, nil, try(:notable_slow_job_threshold)) do
|
9
9
|
block.call
|
10
10
|
end
|
11
11
|
end
|
data/lib/notable/middleware.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Notable
|
2
2
|
class Middleware
|
3
|
-
|
4
3
|
def initialize(app)
|
5
4
|
@app = app
|
6
5
|
end
|
@@ -44,6 +43,11 @@ module Notable
|
|
44
43
|
user = Notable.user_method.call(env)
|
45
44
|
|
46
45
|
notes.each do |note|
|
46
|
+
ip = request.remote_ip
|
47
|
+
if ip && Notable.mask_ips
|
48
|
+
ip = Notable.mask_ip(ip)
|
49
|
+
end
|
50
|
+
|
47
51
|
data = {
|
48
52
|
note_type: note[:note_type],
|
49
53
|
note: note[:note],
|
@@ -52,7 +56,7 @@ module Notable
|
|
52
56
|
status: status,
|
53
57
|
params: params,
|
54
58
|
request_id: request.uuid,
|
55
|
-
ip:
|
59
|
+
ip: ip,
|
56
60
|
user_agent: request.user_agent,
|
57
61
|
url: url,
|
58
62
|
referrer: request.referer,
|
@@ -64,7 +68,8 @@ module Notable
|
|
64
68
|
end
|
65
69
|
|
66
70
|
[status, headers, body]
|
71
|
+
ensure
|
72
|
+
Notable.clear_notes
|
67
73
|
end
|
68
|
-
|
69
74
|
end
|
70
75
|
end
|
data/lib/notable/throttle.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
ActiveSupport::Notifications.subscribe "rack.attack" do |
|
2
|
-
|
3
|
-
|
1
|
+
ActiveSupport::Notifications.subscribe "rack.attack" do |_name, _start, _finish, _request_id, req|
|
2
|
+
request = req.is_a?(Hash) ? req[:request] : req
|
3
|
+
|
4
|
+
if [:blacklist, :blocklist, :throttle].include?(request.env["rack.attack.match_type"])
|
5
|
+
Notable.track "Throttle", request.env["rack.attack.matched"]
|
4
6
|
end
|
5
7
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
ActiveSupport::Notifications.subscribe "unpermitted_parameters.action_controller" do |
|
1
|
+
ActiveSupport::Notifications.subscribe "unpermitted_parameters.action_controller" do |_name, _start, _finish, _id, payload|
|
2
2
|
Notable.track "Unpermitted Parameters", payload[:keys].join(", ")
|
3
3
|
end
|
@@ -7,7 +7,7 @@ module Notable
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def track_unverified_request
|
10
|
-
if !verified_request?
|
10
|
+
if respond_to?(:verified_request?, true) && !verified_request?
|
11
11
|
expected = form_authenticity_token
|
12
12
|
actual = form_authenticity_param || request.headers["X-CSRF-Token"]
|
13
13
|
Notable.track "Unverified Request", "#{actual || "nil"} != #{expected}"
|
@@ -15,5 +15,3 @@ module Notable
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
19
|
-
ActionController::Base.send(:include, Notable::UnverifiedRequest)
|
data/lib/notable/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: safely_block
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,49 +42,129 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: combustion
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
89
|
+
version: '0'
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
|
-
- - "
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
67
102
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
|
70
|
-
|
71
|
-
|
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: sqlite3
|
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
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rack-attack
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: slowpoke
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description:
|
154
|
+
email: andrew@chartkick.com
|
72
155
|
executables: []
|
73
156
|
extensions: []
|
74
157
|
extra_rdoc_files: []
|
75
158
|
files:
|
76
|
-
- ".gitignore"
|
77
159
|
- CHANGELOG.md
|
78
|
-
- Gemfile
|
79
160
|
- LICENSE.txt
|
80
161
|
- README.md
|
81
|
-
- Rakefile
|
82
162
|
- app/models/notable/job.rb
|
83
163
|
- app/models/notable/request.rb
|
84
164
|
- lib/generators/notable/jobs_generator.rb
|
85
165
|
- lib/generators/notable/requests_generator.rb
|
86
|
-
- lib/generators/notable/templates/create_jobs.rb
|
87
|
-
- lib/generators/notable/templates/create_requests.rb
|
166
|
+
- lib/generators/notable/templates/create_jobs.rb.tt
|
167
|
+
- lib/generators/notable/templates/create_requests.rb.tt
|
88
168
|
- lib/notable.rb
|
89
169
|
- lib/notable/debug_exceptions.rb
|
90
170
|
- lib/notable/engine.rb
|
@@ -95,7 +175,6 @@ files:
|
|
95
175
|
- lib/notable/unverified_request.rb
|
96
176
|
- lib/notable/validation_errors.rb
|
97
177
|
- lib/notable/version.rb
|
98
|
-
- notable.gemspec
|
99
178
|
homepage: https://github.com/ankane/notable
|
100
179
|
licenses:
|
101
180
|
- MIT
|
@@ -108,15 +187,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
187
|
requirements:
|
109
188
|
- - ">="
|
110
189
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
190
|
+
version: '2.4'
|
112
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
192
|
requirements:
|
114
193
|
- - ">="
|
115
194
|
- !ruby/object:Gem::Version
|
116
195
|
version: '0'
|
117
196
|
requirements: []
|
118
|
-
|
119
|
-
rubygems_version: 2.6.8
|
197
|
+
rubygems_version: 3.1.2
|
120
198
|
signing_key:
|
121
199
|
specification_version: 4
|
122
200
|
summary: Track notable requests and background jobs
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
data/notable.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "notable/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "notable"
|
8
|
-
spec.version = Notable::VERSION
|
9
|
-
spec.authors = ["Andrew Kane"]
|
10
|
-
spec.email = ["andrew@chartkick.com"]
|
11
|
-
spec.summary = "Track notable requests and background jobs"
|
12
|
-
spec.description = "Track notable requests and background jobs"
|
13
|
-
spec.homepage = "https://github.com/ankane/notable"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_dependency "request_store"
|
22
|
-
spec.add_dependency "safely_block", ">= 0.1.1"
|
23
|
-
|
24
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
-
end
|