revirow 0.1.2 → 0.1.4
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/README.md +31 -2
- data/lib/generators/revirow/install_generator.rb +26 -0
- data/lib/generators/revirow/templates/initializer.rb +16 -0
- data/lib/revirow/resources/changelog.rb +21 -2
- data/lib/revirow/version.rb +1 -1
- data/revirow-0.1.2.gem +0 -0
- data/revirow-0.1.3.gem +0 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17633b49a16632da3fbf1af84df34cf72f003cf68ecbc566360501700bdccc31
|
|
4
|
+
data.tar.gz: 244284eafd9ca0462ef7a40fc41b31ea42397f2bb26b36f785f2de33e76062a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c606b95de98d2f170876a285cd28308dac05723ce15460385cccf7883cd06cd63f520a523f7a0f5911f33953afc6b657602d6323dbba2adb020d9780507d7476
|
|
7
|
+
data.tar.gz: f97bf057d644bd50b4096850ae465a8ab623d31d2da8b2e60d568d5037862eb35fb641bc45bd4898b29010b8d2be7d5f223e0e81c9a6e14ad4791a19b373c2ac
|
data/README.md
CHANGED
|
@@ -54,14 +54,29 @@ client = Revirow::Client.new
|
|
|
54
54
|
|
|
55
55
|
### Changelog
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
List entries with cursor-based pagination:
|
|
58
58
|
|
|
59
59
|
```ruby
|
|
60
|
+
# Summary (default) - lighter payload for index pages
|
|
60
61
|
response = client.changelog.list(limit: 10)
|
|
61
62
|
|
|
62
63
|
response['entries'].each do |entry|
|
|
64
|
+
puts entry['id'] # public_id
|
|
65
|
+
puts entry['slug'] # optional custom slug
|
|
63
66
|
puts entry['title']
|
|
64
|
-
puts entry['
|
|
67
|
+
puts entry['summary'] # truncated plain text (~200 chars)
|
|
68
|
+
puts entry['published_at']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Full content - for single-page changelog displays
|
|
72
|
+
response = client.changelog.list(limit: 10, content: :full)
|
|
73
|
+
|
|
74
|
+
response['entries'].each do |entry|
|
|
75
|
+
puts entry['id']
|
|
76
|
+
puts entry['slug']
|
|
77
|
+
puts entry['title']
|
|
78
|
+
puts entry['content'] # full plain text
|
|
79
|
+
puts entry['content_html'] # full HTML
|
|
65
80
|
puts entry['published_at']
|
|
66
81
|
end
|
|
67
82
|
|
|
@@ -74,6 +89,20 @@ if response['pagination']['has_more']
|
|
|
74
89
|
end
|
|
75
90
|
```
|
|
76
91
|
|
|
92
|
+
Fetch a single entry:
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
# By public_id
|
|
96
|
+
entry = client.changelog.find('abc123')
|
|
97
|
+
puts entry['entry']['title']
|
|
98
|
+
puts entry['entry']['content_html']
|
|
99
|
+
|
|
100
|
+
# By slug (if set)
|
|
101
|
+
entry = client.changelog.find_by_slug('dark-mode-launch')
|
|
102
|
+
puts entry['entry']['title']
|
|
103
|
+
puts entry['entry']['content_html']
|
|
104
|
+
```
|
|
105
|
+
|
|
77
106
|
### Feedback
|
|
78
107
|
|
|
79
108
|
Submit feedback requests to a feedback board:
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Revirow
|
|
4
|
+
module Generators
|
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
|
7
|
+
|
|
8
|
+
desc "Creates a Revirow initializer file"
|
|
9
|
+
|
|
10
|
+
def copy_initializer
|
|
11
|
+
template "initializer.rb", "config/initializers/revirow.rb"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def show_readme
|
|
15
|
+
say ""
|
|
16
|
+
say "Revirow installed!", :green
|
|
17
|
+
say ""
|
|
18
|
+
say "Next steps:"
|
|
19
|
+
say " 1. Add REVIROW_APP_ID and REVIROW_KEY to your environment"
|
|
20
|
+
say " 2. Update config/initializers/revirow.rb with your customer data"
|
|
21
|
+
say " 3. Add <%= revirow_widget %> to your layout"
|
|
22
|
+
say ""
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
Revirow.config do |config|
|
|
4
|
+
# Define your customer context for the widget.
|
|
5
|
+
# This is called on each request to get the current customer data for JWT.
|
|
6
|
+
# config.customer = Proc.new {
|
|
7
|
+
# {
|
|
8
|
+
# email: Current.user&.email_address,
|
|
9
|
+
# id: Current.user&.id
|
|
10
|
+
# }
|
|
11
|
+
# }
|
|
12
|
+
|
|
13
|
+
# Optional: Override if not using environment variables
|
|
14
|
+
# config.app_id = "your_app_id"
|
|
15
|
+
# config.secret = "your_secret"
|
|
16
|
+
end
|
|
@@ -7,11 +7,30 @@ module Revirow
|
|
|
7
7
|
@client = client
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
# List changelog entries with pagination
|
|
11
|
+
# @param limit [Integer] Number of entries to return (default: 10, max: 50)
|
|
12
|
+
# @param cursor [String] Cursor for pagination (public_id of last entry)
|
|
13
|
+
# @param content [Symbol] Content detail level - :summary (default) or :full
|
|
14
|
+
# @return [Hash] Response with entries array and pagination info
|
|
15
|
+
def list(limit: 10, cursor: nil, content: :summary)
|
|
16
|
+
params = { limit: limit, content: content }
|
|
12
17
|
params[:cursor] = cursor if cursor
|
|
13
18
|
@client.get("/api/changelog", params)
|
|
14
19
|
end
|
|
20
|
+
|
|
21
|
+
# Find a changelog entry by public_id
|
|
22
|
+
# @param id [String] The public_id of the entry
|
|
23
|
+
# @return [Hash] The changelog entry with full content
|
|
24
|
+
def find(id)
|
|
25
|
+
@client.get("/api/changelog/#{id}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Find a changelog entry by slug
|
|
29
|
+
# @param slug [String] The slug of the entry
|
|
30
|
+
# @return [Hash] The changelog entry with full content
|
|
31
|
+
def find_by_slug(slug)
|
|
32
|
+
@client.get("/api/changelog/by-slug/#{slug}")
|
|
33
|
+
end
|
|
15
34
|
end
|
|
16
35
|
end
|
|
17
36
|
end
|
data/lib/revirow/version.rb
CHANGED
data/revirow-0.1.2.gem
ADDED
|
Binary file
|
data/revirow-0.1.3.gem
ADDED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: revirow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Revirow
|
|
@@ -33,6 +33,8 @@ files:
|
|
|
33
33
|
- LICENSE.txt
|
|
34
34
|
- README.md
|
|
35
35
|
- Rakefile
|
|
36
|
+
- lib/generators/revirow/install_generator.rb
|
|
37
|
+
- lib/generators/revirow/templates/initializer.rb
|
|
36
38
|
- lib/revirow.rb
|
|
37
39
|
- lib/revirow/client.rb
|
|
38
40
|
- lib/revirow/configuration.rb
|
|
@@ -44,6 +46,8 @@ files:
|
|
|
44
46
|
- lib/revirow/widget.rb
|
|
45
47
|
- revirow-0.1.0.gem
|
|
46
48
|
- revirow-0.1.1.gem
|
|
49
|
+
- revirow-0.1.2.gem
|
|
50
|
+
- revirow-0.1.3.gem
|
|
47
51
|
- sig/revirow.rbs
|
|
48
52
|
homepage: https://revirow.com
|
|
49
53
|
licenses:
|