notable 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -5
- data/README.md +9 -1
- data/app/models/notable/request.rb +1 -1
- data/lib/generators/notable/jobs_generator.rb +2 -17
- data/lib/generators/notable/requests_generator.rb +2 -17
- data/lib/notable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b698c7c6e4b8d027912deb4740e3713b61acac0eb56130d4e917bd55752b12b8
|
4
|
+
data.tar.gz: 66dd7ddb28daf9422772e23db13acf401c53b33a7acdb017909e66df3aa6db8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f3c6625ffe35bf197a0110071bda6d76c0f00c4de99921e39d8e24dacf940015a597c1437b4ac8100ef744b3af343f7fef9c84c3783969a666389f642efc39b
|
7
|
+
data.tar.gz: d67e694ebb51daae26242fe59e7a3b43178b44f33b77e6d0dbbd639106cc4a6b20d4bcc8f7a6b068338f01b3c0c4cd2df9e22f7c19fe703e57f2197c72af97ad
|
data/CHANGELOG.md
CHANGED
@@ -1,22 +1,26 @@
|
|
1
|
-
## 0.3.
|
1
|
+
## 0.3.1 (2020-05-20)
|
2
|
+
|
3
|
+
- Fixed deprecation warning in Ruby 2.7
|
4
|
+
|
5
|
+
## 0.3.0 (2019-05-28)
|
2
6
|
|
3
7
|
- Added support for Rack::Attack 6
|
4
8
|
- Added job-specific slow job threshold
|
5
9
|
- Dropped support for Rails 4.2
|
6
10
|
|
7
|
-
## 0.2.2
|
11
|
+
## 0.2.2 (2018-05-18)
|
8
12
|
|
9
13
|
- Added `mask_ips` option
|
10
14
|
|
11
|
-
## 0.2.1
|
15
|
+
## 0.2.1 (2017-05-01)
|
12
16
|
|
13
17
|
- Added support for Rails 5.1
|
14
18
|
|
15
|
-
## 0.2.0
|
19
|
+
## 0.2.0 (2017-01-16)
|
16
20
|
|
17
21
|
- Switched to ActiveJob for jobs
|
18
22
|
- Fixed deprecation warnings
|
19
23
|
|
20
|
-
## 0.1.0
|
24
|
+
## 0.1.0 (2016-02-20)
|
21
25
|
|
22
26
|
- Launched
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ A `Notable::Request` is created for:
|
|
50
50
|
- slow requests
|
51
51
|
- timeouts
|
52
52
|
- validation failures
|
53
|
-
- [CSRF failures](
|
53
|
+
- [CSRF failures](https://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf)
|
54
54
|
- unpermitted parameters
|
55
55
|
- blocked and throttled requests
|
56
56
|
|
@@ -158,3 +158,11 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
|
|
158
158
|
- Fix bugs and [submit pull requests](https://github.com/ankane/notable/pulls)
|
159
159
|
- Write, clarify, or fix documentation
|
160
160
|
- Suggest or add new features
|
161
|
+
|
162
|
+
To get started with development:
|
163
|
+
|
164
|
+
```sh
|
165
|
+
git clone https://github.com/ankane/notable.git
|
166
|
+
cd notable
|
167
|
+
bundle install
|
168
|
+
```
|
@@ -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,25 +1,10 @@
|
|
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
|
@@ -1,25 +1,10 @@
|
|
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
|
data/lib/notable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
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-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.1.2
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Track notable requests and background jobs
|