notable 0.2.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -4
- data/LICENSE.txt +1 -1
- data/README.md +40 -42
- data/app/models/notable/request.rb +1 -1
- data/lib/generators/notable/jobs_generator.rb +3 -20
- data/lib/generators/notable/requests_generator.rb +3 -20
- 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 +26 -18
- data/lib/notable/engine.rb +3 -2
- data/lib/notable/job_extensions.rb +2 -2
- data/lib/notable/middleware.rb +2 -2
- 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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 348c9498e32b0b4cc34f4948b3218318b4bd1947f45f5f7ff92960c73ce7c225
|
4
|
+
data.tar.gz: 53457ed2808f224dbb18389db68f636de4b0c1d17a6da14c3a8a4a54da44b375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38051bc5a3a2b8ca9f89174e7819709841038eb020a42656fe879bd997e465e690ee4845e1f32a2dec3e8a40c3509fc614796f72c3c7ac56165a79cc8207c74b
|
7
|
+
data.tar.gz: e6f1ed85962b007ddc9cda632385af9ddb5bf8d88065d31b6f0f1df0124079a8110657858aa43aea5ad7a4c30a167f71ecd07d91e8f94ab8fc65e372ac65e883
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,39 @@
|
|
1
|
-
## 0.
|
1
|
+
## 0.3.4 (2020-09-07)
|
2
|
+
|
3
|
+
- Use `datetime` type in migration
|
4
|
+
|
5
|
+
## 0.3.3 (2020-07-26)
|
6
|
+
|
7
|
+
- Added support for `queued_time` for Active Job 6
|
8
|
+
|
9
|
+
## 0.3.2 (2020-07-24)
|
10
|
+
|
11
|
+
- Added support for Rails API
|
12
|
+
- Fixed blocked requests with Rack::Attack
|
13
|
+
|
14
|
+
## 0.3.1 (2020-05-20)
|
15
|
+
|
16
|
+
- Fixed deprecation warning in Ruby 2.7
|
17
|
+
|
18
|
+
## 0.3.0 (2019-05-28)
|
19
|
+
|
20
|
+
- Added support for Rack::Attack 6
|
21
|
+
- Added job-specific slow job threshold
|
22
|
+
- Dropped support for Rails 4.2
|
23
|
+
|
24
|
+
## 0.2.2 (2018-05-18)
|
2
25
|
|
3
26
|
- Added `mask_ips` option
|
4
27
|
|
5
|
-
## 0.2.1
|
28
|
+
## 0.2.1 (2017-05-01)
|
6
29
|
|
7
30
|
- Added support for Rails 5.1
|
8
31
|
|
9
|
-
## 0.2.0
|
32
|
+
## 0.2.0 (2017-01-16)
|
10
33
|
|
11
34
|
- Switched to ActiveJob for jobs
|
12
35
|
- Fixed deprecation warnings
|
13
36
|
|
14
|
-
## 0.1.0
|
37
|
+
## 0.1.0 (2016-02-20)
|
15
38
|
|
16
39
|
- Launched
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
# Notable
|
2
2
|
|
3
|
-
:star2:
|
3
|
+
:star2: :star2: :star2:
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
#### Introducing Notable
|
8
|
-
|
9
|
-
Notable tracks notable requests and background jobs and stores them in your database. What makes a request or job notable? There are a number of default situations, but ultimately you decide what interests you.
|
5
|
+
Notable tracks notable requests and background jobs and stores them in your database. What makes a request or job notable? There are a number of default situations, but ultimately you decide what interests you.
|
10
6
|
|
11
7
|
By default, Notable tracks:
|
12
8
|
|
@@ -23,6 +19,8 @@ You can track custom notes as well.
|
|
23
19
|
|
24
20
|
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
25
21
|
|
22
|
+
[![Build Status](https://travis-ci.org/ankane/notable.svg?branch=master)](https://travis-ci.org/ankane/notable)
|
23
|
+
|
26
24
|
## Installation
|
27
25
|
|
28
26
|
Add this line to your application’s Gemfile:
|
@@ -36,31 +34,23 @@ And run:
|
|
36
34
|
```sh
|
37
35
|
rails generate notable:requests
|
38
36
|
rails generate notable:jobs
|
39
|
-
|
37
|
+
rails db:migrate
|
40
38
|
```
|
41
39
|
|
42
|
-
|
40
|
+
To explore the data, check out [Blazer](https://github.com/ankane/blazer).
|
43
41
|
|
44
|
-
##
|
42
|
+
## How It Works
|
45
43
|
|
46
44
|
A `Notable::Request` is created for:
|
47
45
|
|
48
46
|
- errors
|
49
47
|
- 404s
|
50
48
|
- slow requests
|
51
|
-
- timeouts
|
49
|
+
- timeouts from [Slowpoke](https://github.com/ankane/slowpoke)
|
52
50
|
- validation failures
|
53
|
-
- [CSRF failures](
|
51
|
+
- [CSRF failures](https://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf)
|
54
52
|
- unpermitted parameters
|
55
|
-
- blocked and throttled requests
|
56
|
-
|
57
|
-
For timeouts, use [Slowpoke](https://github.com/ankane/slowpoke).
|
58
|
-
|
59
|
-
For blocked and throttled requests, use [Rack Attack](https://github.com/kickstarter/rack-attack).
|
60
|
-
|
61
|
-
## Jobs
|
62
|
-
|
63
|
-
Wouldn’t it be great to have a record of exact jobs that fail?
|
53
|
+
- blocked and throttled requests from [Rack Attack](https://github.com/kickstarter/rack-attack)
|
64
54
|
|
65
55
|
A `Notable::Job` is created for:
|
66
56
|
|
@@ -68,19 +58,13 @@ A `Notable::Job` is created for:
|
|
68
58
|
- slow jobs
|
69
59
|
- validation failures
|
70
60
|
|
71
|
-
|
61
|
+
Create a custom note inside a request or job with:
|
72
62
|
|
73
63
|
```ruby
|
74
|
-
Notable.track(
|
64
|
+
Notable.track("Note Type", "Optional extra info")
|
75
65
|
```
|
76
66
|
|
77
|
-
|
78
|
-
|
79
|
-
```ruby
|
80
|
-
Notable.track("Auth Event", "Signed In")
|
81
|
-
```
|
82
|
-
|
83
|
-
## Customize
|
67
|
+
## Customization
|
84
68
|
|
85
69
|
Disable tracking in certain environments
|
86
70
|
|
@@ -93,23 +77,23 @@ Notable.enabled = Rails.env.production?
|
|
93
77
|
Set slow threshold
|
94
78
|
|
95
79
|
```ruby
|
96
|
-
Notable.slow_request_threshold = 5
|
80
|
+
Notable.slow_request_threshold = 5.seconds
|
97
81
|
```
|
98
82
|
|
99
83
|
Custom user method
|
100
84
|
|
101
85
|
```ruby
|
102
|
-
Notable.user_method =
|
86
|
+
Notable.user_method = lambda do |env|
|
103
87
|
env["warden"].try(:user) || env["action_controller.instance"].try(:current_visit)
|
104
|
-
|
88
|
+
end
|
105
89
|
```
|
106
90
|
|
107
91
|
Custom track method
|
108
92
|
|
109
93
|
```ruby
|
110
|
-
Notable.track_request_method =
|
94
|
+
Notable.track_request_method = lambda do |data, env|
|
111
95
|
Notable::Request.create!(data)
|
112
|
-
|
96
|
+
end
|
113
97
|
```
|
114
98
|
|
115
99
|
Skip tracking CSRF failures
|
@@ -129,21 +113,26 @@ Notable.mask_ips = true
|
|
129
113
|
Set slow threshold
|
130
114
|
|
131
115
|
```ruby
|
132
|
-
Notable.slow_job_threshold = 60
|
116
|
+
Notable.slow_job_threshold = 60.seconds
|
133
117
|
```
|
134
118
|
|
135
|
-
|
119
|
+
To set a threshold for a specific job, use:
|
136
120
|
|
137
121
|
```ruby
|
138
|
-
|
139
|
-
|
140
|
-
|
122
|
+
class CustomJob < ApplicationJob
|
123
|
+
def notable_slow_job_threshold
|
124
|
+
5.minutes
|
125
|
+
end
|
126
|
+
end
|
141
127
|
```
|
142
128
|
|
143
|
-
|
129
|
+
Custom track method
|
144
130
|
|
145
|
-
|
146
|
-
|
131
|
+
```ruby
|
132
|
+
Notable.track_job_method = lambda do |data|
|
133
|
+
Notable::Job.create!(data)
|
134
|
+
end
|
135
|
+
```
|
147
136
|
|
148
137
|
## Contributing
|
149
138
|
|
@@ -153,3 +142,12 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
|
|
153
142
|
- Fix bugs and [submit pull requests](https://github.com/ankane/notable/pulls)
|
154
143
|
- Write, clarify, or fix documentation
|
155
144
|
- Suggest or add new features
|
145
|
+
|
146
|
+
To get started with development:
|
147
|
+
|
148
|
+
```sh
|
149
|
+
git clone https://github.com/ankane/notable.git
|
150
|
+
cd notable
|
151
|
+
bundle install
|
152
|
+
bundle exec rake test
|
153
|
+
```
|
@@ -2,7 +2,7 @@ module Notable
|
|
2
2
|
class Request < ActiveRecord::Base
|
3
3
|
self.table_name = "notable_requests"
|
4
4
|
|
5
|
-
belongs_to :user,
|
5
|
+
belongs_to :user, polymorphic: true, optional: true
|
6
6
|
serialize :params, JSON
|
7
7
|
end
|
8
8
|
end
|
@@ -1,34 +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
|
11
|
-
|
12
|
-
source_root File.expand_path("../templates", __FILE__)
|
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
|
22
|
-
end
|
6
|
+
include ActiveRecord::Generators::Migration
|
7
|
+
source_root File.join(__dir__, "templates")
|
23
8
|
|
24
9
|
def copy_migration
|
25
10
|
migration_template "create_jobs.rb", "db/migrate/create_notable_jobs.rb", migration_version: migration_version
|
26
11
|
end
|
27
12
|
|
28
13
|
def migration_version
|
29
|
-
|
30
|
-
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
31
|
-
end
|
14
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
32
15
|
end
|
33
16
|
end
|
34
17
|
end
|
@@ -1,34 +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
|
11
|
-
|
12
|
-
source_root File.expand_path("../templates", __FILE__)
|
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
|
22
|
-
end
|
6
|
+
include ActiveRecord::Generators::Migration
|
7
|
+
source_root File.join(__dir__, "templates")
|
23
8
|
|
24
9
|
def copy_migration
|
25
10
|
migration_template "create_requests.rb", "db/migrate/create_notable_requests.rb", migration_version: migration_version
|
26
11
|
end
|
27
12
|
|
28
13
|
def migration_version
|
29
|
-
|
30
|
-
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
31
|
-
end
|
14
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
32
15
|
end
|
33
16
|
end
|
34
17
|
end
|
@@ -6,9 +6,9 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
|
|
6
6
|
t.text :job
|
7
7
|
t.string :job_id
|
8
8
|
t.string :queue
|
9
|
-
t.
|
10
|
-
t.
|
11
|
-
t.
|
9
|
+
t.float :runtime
|
10
|
+
t.float :queued_time
|
11
|
+
t.datetime :created_at
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -3,8 +3,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
|
|
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<%= migration_version
|
|
13
12
|
t.text :user_agent
|
14
13
|
t.text :referrer
|
15
14
|
t.text :params
|
16
|
-
t.
|
17
|
-
t.
|
15
|
+
t.float :request_time
|
16
|
+
t.datetime :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
|
@@ -45,7 +41,7 @@ module Notable
|
|
45
41
|
end
|
46
42
|
|
47
43
|
# requests
|
48
|
-
self.track_request_method = -> (data,
|
44
|
+
self.track_request_method = -> (data, _) { Notable::Request.create!(data) }
|
49
45
|
self.user_method = -> (env) { env["warden"].user if env["warden"] }
|
50
46
|
self.slow_request_threshold = 5
|
51
47
|
|
@@ -54,7 +50,7 @@ module Notable
|
|
54
50
|
self.slow_job_threshold = 60
|
55
51
|
|
56
52
|
def self.track(note_type, note = nil)
|
57
|
-
|
53
|
+
notes << {note_type: note_type, note: note}
|
58
54
|
end
|
59
55
|
|
60
56
|
def self.track_error(e)
|
@@ -62,17 +58,19 @@ module Notable
|
|
62
58
|
end
|
63
59
|
|
64
60
|
def self.notes
|
65
|
-
|
61
|
+
Thread.current[:notable_notes] ||= []
|
66
62
|
end
|
67
63
|
|
68
64
|
def self.clear_notes
|
69
|
-
|
65
|
+
Thread.current[:notable_notes] = nil
|
70
66
|
end
|
71
67
|
|
72
|
-
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
|
73
70
|
exception = nil
|
74
71
|
notes = nil
|
75
72
|
start_time = Time.now
|
73
|
+
created_at = Time.parse(created_at) if created_at.is_a?(String)
|
76
74
|
queued_time = created_at ? start_time - created_at : nil
|
77
75
|
begin
|
78
76
|
yield
|
@@ -86,7 +84,7 @@ module Notable
|
|
86
84
|
runtime = Time.now - start_time
|
87
85
|
|
88
86
|
Safely.safely do
|
89
|
-
notes << {note_type: "Slow Job"} if runtime >
|
87
|
+
notes << {note_type: "Slow Job"} if runtime > slow_job_threshold
|
90
88
|
|
91
89
|
notes.each do |note|
|
92
90
|
data = {
|
@@ -118,6 +116,16 @@ module Notable
|
|
118
116
|
end
|
119
117
|
end
|
120
118
|
|
119
|
+
ActiveSupport.on_load(:action_controller) do
|
120
|
+
require "notable/unverified_request"
|
121
|
+
include Notable::UnverifiedRequest
|
122
|
+
end
|
123
|
+
|
124
|
+
ActiveSupport.on_load(:active_record) do
|
125
|
+
require "notable/validation_errors"
|
126
|
+
include Notable::ValidationErrors
|
127
|
+
end
|
128
|
+
|
121
129
|
ActiveSupport.on_load(:active_job) do
|
122
130
|
if Notable.jobs_enabled?
|
123
131
|
require "notable/job_extensions"
|
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
|
@@ -4,8 +4,8 @@ module Notable
|
|
4
4
|
|
5
5
|
included do
|
6
6
|
around_perform do |job, block|
|
7
|
-
#
|
8
|
-
Notable.track_job(job.class.name, job.job_id, job.queue_name,
|
7
|
+
# enqueued_at is only available in Active Job 6+
|
8
|
+
Notable.track_job(job.class.name, job.job_id, job.queue_name, job.try(:enqueued_at), try(:notable_slow_job_threshold)) do
|
9
9
|
block.call
|
10
10
|
end
|
11
11
|
end
|
data/lib/notable/middleware.rb
CHANGED
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.
|
4
|
+
version: 0.3.4
|
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-09-08 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.7.6
|
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
|