ideasbugs 0.7.6 → 0.7.7
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +10 -0
- data/lib/generators/ideasbugs/install/install_generator.rb +1 -0
- data/lib/ideasbugs/engine.rb +4 -0
- data/lib/ideasbugs/seeds.rb +62 -0
- data/lib/ideasbugs/version.rb +1 -1
- data/lib/ideasbugs.rb +1 -0
- data/lib/tasks/ideasbugs_tasks.rake +9 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e054b5c1fcb3a26c77783e54d044550ca8a395bad3189540451b79498e36fe0b
|
|
4
|
+
data.tar.gz: 567787250431c93054d02c0cca2a0366515138c35f9d2ac7a9ed87162d318d9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8542b1c572317d929ae744c2caaeb2e0e59240ad68e740c290d3a15ab4761b9a55cf54b4332b6334667585f45603f9ce9444a3362ccc0a7762ab9c856ee330e
|
|
7
|
+
data.tar.gz: 8da898919668edb4d3f7d87e76e4223a295bea3374c8e7a355b446277ed08b8983606aecb81544ccf765e1640d26c34f01febaf447bc1950b0e1aa89a771e7fc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.7 (2026-08-01)
|
|
4
|
+
|
|
5
|
+
- Added `Ideasbugs::Seeds.load!` and a `rake ideasbugs:seed_demo` task that
|
|
6
|
+
create or refresh a small set of demo feedback records, so a freshly mounted
|
|
7
|
+
dashboard has realistic content to look at. Seeding is idempotent and
|
|
8
|
+
accepts an optional `tenant:`.
|
|
9
|
+
|
|
3
10
|
## 0.7.6 (2026-07-31)
|
|
4
11
|
|
|
5
12
|
- Fixed the trusted publishing workflow by building and pushing the gem
|
data/README.md
CHANGED
|
@@ -47,6 +47,16 @@ bin/rails db:migrate
|
|
|
47
47
|
That's it. A floating **Feedback** button appears bottom-right; submissions
|
|
48
48
|
land at `/feedback`.
|
|
49
49
|
|
|
50
|
+
Optional demo data:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bin/rails ideasbugs:seed_demo
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
It creates three idempotent sample submissions across the open, in-review, and
|
|
57
|
+
resolved states. Running the task again refreshes those records instead of
|
|
58
|
+
duplicating them.
|
|
59
|
+
|
|
50
60
|
> [!IMPORTANT]
|
|
51
61
|
> The dashboard defaults to **development only**. Set `authorize_admin` before
|
|
52
62
|
> you deploy — see [Configure](#configure).
|
|
@@ -28,6 +28,7 @@ module Ideasbugs
|
|
|
28
28
|
def post_install
|
|
29
29
|
say "\nideasbugs installed. Run `rails db:migrate`, then add", :green
|
|
30
30
|
say '`<%= ideasbugs_tag %>` before </body> in your layout.'
|
|
31
|
+
say 'Optional: run `bin/rails ideasbugs:seed_demo` for sample feedback.'
|
|
31
32
|
say "Browse submissions at /feedback (development only until you set config.authorize_admin).\n"
|
|
32
33
|
end
|
|
33
34
|
|
data/lib/ideasbugs/engine.rb
CHANGED
|
@@ -4,6 +4,10 @@ module Ideasbugs
|
|
|
4
4
|
class Engine < ::Rails::Engine
|
|
5
5
|
isolate_namespace Ideasbugs
|
|
6
6
|
|
|
7
|
+
rake_tasks do
|
|
8
|
+
load File.expand_path('../tasks/ideasbugs_tasks.rake', __dir__)
|
|
9
|
+
end
|
|
10
|
+
|
|
7
11
|
initializer 'ideasbugs.helper' do
|
|
8
12
|
ActiveSupport.on_load(:action_view) do
|
|
9
13
|
include Ideasbugs::WidgetHelper
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ideasbugs
|
|
4
|
+
module Seeds
|
|
5
|
+
FEEDBACK = [
|
|
6
|
+
{
|
|
7
|
+
seed_id: 'checkout-error',
|
|
8
|
+
kind: 'bug',
|
|
9
|
+
section: 'Checkout',
|
|
10
|
+
message: 'The payment form shows "Something went wrong" after entering a valid card.',
|
|
11
|
+
status: 'open',
|
|
12
|
+
page_url: '/checkout',
|
|
13
|
+
author_label: 'Demo Customer'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
seed_id: 'saved-filters',
|
|
17
|
+
kind: 'feature',
|
|
18
|
+
section: 'Reports',
|
|
19
|
+
message: 'It would save time if I could save this report filter and reuse it next week.',
|
|
20
|
+
status: 'in_review',
|
|
21
|
+
page_url: '/reports/revenue',
|
|
22
|
+
author_label: 'Demo Product Manager'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
seed_id: 'export-confusing',
|
|
26
|
+
kind: 'other',
|
|
27
|
+
section: 'Settings',
|
|
28
|
+
message: 'The CSV export worked, but I expected the button to say when the file was ready.',
|
|
29
|
+
status: 'resolved',
|
|
30
|
+
page_url: '/settings/exports',
|
|
31
|
+
author_label: 'Demo Admin'
|
|
32
|
+
}
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def self.load!(tenant: nil)
|
|
36
|
+
FEEDBACK.map do |attributes|
|
|
37
|
+
seed_id = attributes.fetch(:seed_id)
|
|
38
|
+
feedback = Ideasbugs::Feedback.find_or_initialize_by(
|
|
39
|
+
author_id: "ideasbugs-demo:#{seed_id}",
|
|
40
|
+
tenant: tenant.presence
|
|
41
|
+
)
|
|
42
|
+
seed_attributes = attributes.except(:seed_id).merge(
|
|
43
|
+
kind: kind_for(attributes.fetch(:kind)),
|
|
44
|
+
tenant: tenant.presence,
|
|
45
|
+
user_agent: 'ideasbugs demo seed'
|
|
46
|
+
)
|
|
47
|
+
feedback.assign_attributes(seed_attributes)
|
|
48
|
+
feedback.save!
|
|
49
|
+
feedback
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.kind_for(preferred)
|
|
54
|
+
kinds = Ideasbugs.config.kinds.map(&:to_s)
|
|
55
|
+
return preferred if kinds.include?(preferred)
|
|
56
|
+
return kinds.first if kinds.any?
|
|
57
|
+
|
|
58
|
+
preferred
|
|
59
|
+
end
|
|
60
|
+
private_class_method :kind_for
|
|
61
|
+
end
|
|
62
|
+
end
|
data/lib/ideasbugs/version.rb
CHANGED
data/lib/ideasbugs.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ideasbugs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yaroslav Shmarov
|
|
@@ -86,9 +86,11 @@ files:
|
|
|
86
86
|
- lib/ideasbugs/dashboard.css
|
|
87
87
|
- lib/ideasbugs/engine.rb
|
|
88
88
|
- lib/ideasbugs/has_feedback.rb
|
|
89
|
+
- lib/ideasbugs/seeds.rb
|
|
89
90
|
- lib/ideasbugs/version.rb
|
|
90
91
|
- lib/ideasbugs/widget.js
|
|
91
92
|
- lib/ideasbugs/widget.rb
|
|
93
|
+
- lib/tasks/ideasbugs_tasks.rake
|
|
92
94
|
homepage: https://github.com/yshmarov/ideasbugs
|
|
93
95
|
licenses:
|
|
94
96
|
- MIT
|