notable_web 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06f7f35d20e1ddd65c7e23f32c020cfad761592c4bf43fabdc33b574426ad331
4
- data.tar.gz: 64192bf25aa8dac121da8f6946ae56013096b09d5030bfea1320c5050e669282
3
+ metadata.gz: 972238a602ed9ac44948f0fe5452211ac4a3b7c33768899d074919251e838e13
4
+ data.tar.gz: 493e4b473565230d32ed3c98d47722afa3ab34eed23f03c92f1074ab9d2f7a3f
5
5
  SHA512:
6
- metadata.gz: 57aaa64c33a5fde0dc5dd582ba42cb952dfbd15774ed8e736bc0aea128ccb73f4e39402c54f2561516883f38309c2946adcfb8f4f2711474626b90df452910cc
7
- data.tar.gz: 81db2475ebb56425ac0380fba3c354e7a3cd80d0bf6b54291be80f2e650bcbd2109a6c92c48cabc567cab3f4ce5aa1a3c4f5ec8e972a27c0d2a94498688e6388
6
+ metadata.gz: b2015920e1a447e146242031625375a228c2553598dfd5900dde53ba30c8ceeaa2a8b5502100828f1c4c779816c9c981ea33648a8d7981c4610ed2a5572cc71a
7
+ data.tar.gz: 32ea3581acbd0b16568a2c130c38d8e5788c1200fb27bebef831dfa9d99ae975725167e69ac6beffc91bae0173b7195473a0aa91570ef6b81b55d740da68f168
data/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
- ## 0.1.1
1
+ ## 0.2.0 (2023-01-30)
2
+
3
+ - Dropped support for Ruby < 2.7 and Rails < 6
4
+
5
+ ## 0.1.2 (2019-12-23)
6
+
7
+ - Fixed error with Rails 6
8
+
9
+ ## 0.1.1 (2019-10-27)
2
10
 
3
11
  - Added support for Sprockets 4
4
12
 
5
- ## 0.1.0
13
+ ## 0.1.0 (2019-05-28)
6
14
 
7
15
  - Fixed errors with Rails 5 and 6
8
16
  - Dropped support for Rails < 5
9
17
 
10
- ## 0.0.1
18
+ ## 0.0.1 (2014-12-22)
11
19
 
12
20
  - First release
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2019 Andrew Kane
1
+ Copyright (c) 2014-2023 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -7,7 +7,7 @@ A web interface for [Notable](https://github.com/ankane/notable)
7
7
  Add this line to your application’s Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'notable_web'
10
+ gem "notable_web"
11
11
  ```
12
12
 
13
13
  And add it to your `config/routes.rb`.
@@ -47,6 +47,10 @@ end
47
47
 
48
48
  to avoid conflicts.
49
49
 
50
+ ## History
51
+
52
+ View the [changelog](https://github.com/ankane/notable_web/blob/master/CHANGELOG.md)
53
+
50
54
  ## Contributing
51
55
 
52
56
  Everyone is encouraged to help improve this project. Here are a few ways you can help:
@@ -55,3 +59,12 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
55
59
  - Fix bugs and [submit pull requests](https://github.com/ankane/notable_web/pulls)
56
60
  - Write, clarify, or fix documentation
57
61
  - Suggest or add new features
62
+
63
+ To get started with development:
64
+
65
+ ```sh
66
+ git clone https://github.com/ankane/notable_web.git
67
+ cd notable_web
68
+ bundle install
69
+ bundle exec rake test
70
+ ```
@@ -7,9 +7,7 @@ module NotableWeb
7
7
  http_basic_authenticate_with name: ENV["NOTABLE_USERNAME"], password: ENV["NOTABLE_PASSWORD"] if ENV["NOTABLE_PASSWORD"]
8
8
 
9
9
  def index
10
- @safe_params = params.slice(:status, :note_type, :note, :user_id, :user_type, :action_name, :status, :scope).permit!.to_h
11
-
12
- where = @safe_params.slice(:status, :note_type, :note, :user_id, :user_type)
10
+ where = safe_params.slice(:status, :note_type, :note, :user_id, :user_type)
13
11
  where = {notable_requests: where} if where.any?
14
12
 
15
13
  page_method_name = Kaminari.config.page_method_name
@@ -71,5 +69,9 @@ module NotableWeb
71
69
  Notable::Request.where("action IS NOT NULL AND (status = 503 OR note_type = 'Slow Request')")
72
70
  end
73
71
 
72
+ def safe_params
73
+ params.slice(:status, :note_type, :note, :user_id, :user_type, :action_name, :status, :scope).permit!.to_h
74
+ end
75
+ helper_method :safe_params
74
76
  end
75
77
  end
@@ -11,7 +11,7 @@
11
11
  <%= request.note %>
12
12
  <span style="color: #999;"><%= request.action %></span>
13
13
  <% if request.user and show_user %>
14
- <%= link_to NotableWeb.user_name_method.call(request.user), params.slice(:status, :note_type, :scope).merge(user_id: request.user_id, user_type: request.user_type) %>
14
+ <%= link_to NotableWeb.user_name_method.call(request.user), safe_params.slice(:status, :note_type, :scope).merge(user_id: request.user_id, user_type: request.user_type) %>
15
15
  <% end %>
16
16
  <% if params[:scope] == "referrer" %>
17
17
  <br /><%= link_to nil, request.referrer, target: "_blank" %>
@@ -14,7 +14,7 @@
14
14
  <tr>
15
15
  <td>
16
16
  <%= agg.note %> <span style="color: #999;"><%= agg.action %></span>
17
- <%= link_to "view", @safe_params.merge(note: agg.note, action_name: agg.action) %>
17
+ <%= link_to "view", safe_params.merge(note: agg.note, action_name: agg.action) %>
18
18
  </td>
19
19
  <td style="text-align: right;"><%= agg.count_user %></td>
20
20
  <td style="text-align: right;"><%= agg.count_all %></td>
@@ -31,8 +31,8 @@
31
31
  <%= render partial: "stream", locals: {requests: @requests, show_user: !(params[:user_id] && params[:user_type])} %>
32
32
 
33
33
  <% if @requests.current_page != 1 %>
34
- <%= link_to "Prev", @safe_params.merge(page: @requests.current_page - 1), style: "margin-right: 20px;" %>
34
+ <%= link_to "Prev", safe_params.merge(page: @requests.current_page - 1), style: "margin-right: 20px;" %>
35
35
  <% end %>
36
36
  <% if @requests.size == @requests.limit_value %>
37
- <%= link_to "Next", @safe_params.merge(page: @requests.current_page + 1) %>
37
+ <%= link_to "Next", safe_params.merge(page: @requests.current_page + 1) %>
38
38
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module NotableWeb
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notable_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-28 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5'
19
+ version: '6'
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: '5'
26
+ version: '6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: notable
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '2'
61
+ version: '4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '2'
68
+ version: '4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: kaminari
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -94,36 +94,8 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: bundler
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: rake
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: andrew@chartkick.com
97
+ description:
98
+ email: andrew@ankane.org
127
99
  executables: []
128
100
  extensions: []
129
101
  extra_rdoc_files: []
@@ -147,7 +119,7 @@ homepage: https://github.com/ankane/notable_web
147
119
  licenses:
148
120
  - MIT
149
121
  metadata: {}
150
- post_install_message:
122
+ post_install_message:
151
123
  rdoc_options: []
152
124
  require_paths:
153
125
  - lib
@@ -155,15 +127,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
127
  requirements:
156
128
  - - ">="
157
129
  - !ruby/object:Gem::Version
158
- version: '2.4'
130
+ version: '2.7'
159
131
  required_rubygems_version: !ruby/object:Gem::Requirement
160
132
  requirements:
161
133
  - - ">="
162
134
  - !ruby/object:Gem::Version
163
135
  version: '0'
164
136
  requirements: []
165
- rubygems_version: 3.0.3
166
- signing_key:
137
+ rubygems_version: 3.4.1
138
+ signing_key:
167
139
  specification_version: 4
168
140
  summary: A web interface for Notable
169
141
  test_files: []