rails-markup 1.2.0 → 1.2.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4d92edb94812f28021a43c76cf45ad13604ed0de5545e3de5b02c47a819839ee
|
|
4
|
+
data.tar.gz: 6a9704b1c7cd903632a96861f12b7cd17810bb02b87ff31928ea82a86aebd2ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3decfcd9d93210c4326825ea5cf084b0891169c04f5865696dc01ef996ea0fd3d6222c0df90bbfbb949bbff719f68810d81b8b6fded7f76648f350fdcb03a73e
|
|
7
|
+
data.tar.gz: 7bf263251ca961e77132c09b678eab22736401a7c512280d7e5055e3906685a6154ade96ddf1b0d12b91625c14169b1a09c2055c2a55a4781d44a759ae238295
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Point-and-click annotation tool for Rails apps. Click any element, describe what
|
|
|
17
17
|
|
|
18
18
|
```ruby
|
|
19
19
|
# Gemfile
|
|
20
|
-
gem "rails-markup", github: "
|
|
20
|
+
gem "rails-markup", github: "nauman/rails-markup", require: "rails_markup"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```bash
|
|
@@ -294,7 +294,7 @@ Browser Toolbar AI Agent (Claude Code, Cursor)
|
|
|
294
294
|
## Development
|
|
295
295
|
|
|
296
296
|
```bash
|
|
297
|
-
git clone https://github.com/
|
|
297
|
+
git clone https://github.com/nauman/rails-markup
|
|
298
298
|
cd rails-markup && bundle install
|
|
299
299
|
bundle exec ruby -Ilib:test test/**/*_test.rb
|
|
300
300
|
```
|
|
@@ -220,7 +220,9 @@ module RailsMarkup
|
|
|
220
220
|
def generate_csv(scope)
|
|
221
221
|
CSV.generate(headers: true) do |csv|
|
|
222
222
|
csv << %w[id status intent severity content page_url author selected_text created_at updated_at]
|
|
223
|
-
|
|
223
|
+
# each (not find_each) so the export keeps the scope's :recent ordering —
|
|
224
|
+
# find_each ignores ORDER BY and batches by primary key.
|
|
225
|
+
scope.each do |ann|
|
|
224
226
|
csv << [ann.id, ann.status, ann.intent, ann.severity, ann.content, ann.page_url,
|
|
225
227
|
ann.author_name, ann.selected_text, ann.created_at.iso8601, ann.updated_at.iso8601]
|
|
226
228
|
end
|
|
@@ -107,12 +107,14 @@ module RailsMarkup
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
def acknowledge!
|
|
110
|
+
return self if status == "acknowledged" # idempotent — re-acknowledging is a no-op
|
|
110
111
|
raise "Cannot acknowledge a #{status} annotation" unless status == "pending"
|
|
111
112
|
|
|
112
113
|
update!(status: "acknowledged")
|
|
113
114
|
end
|
|
114
115
|
|
|
115
116
|
def resolve!(summary: nil)
|
|
117
|
+
return self if status == "resolved" # idempotent — re-resolving is a no-op
|
|
116
118
|
raise "Cannot resolve a #{status} annotation" unless status.in?(%w[pending acknowledged])
|
|
117
119
|
|
|
118
120
|
transaction do
|
|
@@ -122,6 +124,7 @@ module RailsMarkup
|
|
|
122
124
|
end
|
|
123
125
|
|
|
124
126
|
def dismiss!(reason: nil)
|
|
127
|
+
return self if status == "dismissed" # idempotent — re-dismissing is a no-op
|
|
125
128
|
raise "Cannot dismiss a #{status} annotation" unless status.in?(%w[pending acknowledged])
|
|
126
129
|
|
|
127
130
|
transaction do
|
data/lib/rails_markup/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-markup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- InventList
|
|
@@ -161,13 +161,13 @@ files:
|
|
|
161
161
|
- lib/rails_markup/store.rb
|
|
162
162
|
- lib/rails_markup/version.rb
|
|
163
163
|
- lib/tasks/rails_markup_client_uuids.rake
|
|
164
|
-
homepage: https://github.com/
|
|
164
|
+
homepage: https://github.com/nauman/rails-markup
|
|
165
165
|
licenses:
|
|
166
166
|
- MIT
|
|
167
167
|
metadata:
|
|
168
|
-
homepage_uri: https://github.com/
|
|
169
|
-
source_code_uri: https://github.com/
|
|
170
|
-
changelog_uri: https://github.com/
|
|
168
|
+
homepage_uri: https://github.com/nauman/rails-markup
|
|
169
|
+
source_code_uri: https://github.com/nauman/rails-markup
|
|
170
|
+
changelog_uri: https://github.com/nauman/rails-markup/blob/main/CHANGELOG.md
|
|
171
171
|
post_install_message: |
|
|
172
172
|
Rails Markup installed! Run the generator to set up:
|
|
173
173
|
|