audiences 1.5.4.alpha → 1.6.alpha

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.
data/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # Version 1.6 (2025-03-19)
4
+
5
+ - Prepackaged audiences-react in UJS [#510](https://github.com/powerhome/audiences/pull/510)
6
+
3
7
  # Version 1.5.4 (2024-12-19)
4
8
 
5
9
  - Fix `authenticate` / `authentication` configuration [#481](https://github.com/powerhome/audiences/pull/481)
data/docs/README.md CHANGED
@@ -26,12 +26,19 @@ $ gem install audiences
26
26
 
27
27
  ### Creating/Managing Audiences
28
28
 
29
- An audience is tied to an owning model within your application. In this document, we'll use a `Team` model as an example. To create audiences for a team using `audiences-react`, render an audiences editor for your model.
29
+ An audience is tied to an owning model within your application. In this document, we'll use a `Team` model as an example. To create audiences for a team use the `audiences-ujs` package bundled with the gem. Render the audiences editor in your view as follows:
30
30
 
31
- This can be done with an unobtrusive JS renderer like `react-rails` or a custom one as shown in [our dummy app](../audiences/spec/dummy/app/frontend/entrypoints/application.js). The editor requires two arguments:
31
+ ```erb
32
+ <%= javascript_include_tag "audiences-ujs", defer: true %>
33
+ <%= render_audiences_editor(@example_owner.members_context) %>
34
+ ```
35
+
36
+ This eliminates the need for `audiences-react` as a separate dependency.
37
+
38
+ ### Required Arguments:
39
+ - **Context**: Example: `owner.members_context`
32
40
 
33
- - The audiences mount point: `audiences.root_url` URL helper
34
- - The context signed key: I.e.: `owner.members_signed_key` or `Audiences::Context.for(owner, relation:).signed_key`
41
+ For more details, refer to [editor_helper](../lib/audiences/editor_helper.rb).
35
42
 
36
43
  ### Configuring Audiences
37
44
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Audiences
4
- VERSION = "1.5.4.alpha"
4
+ VERSION = "1.6.alpha"
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audiences
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4.alpha
4
+ version: 1.6.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Palhares
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2025-03-18 00:00:00.000000000 Z
11
+ date: 2025-04-16 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rails
@@ -80,6 +81,7 @@ metadata:
80
81
  source_code_uri: https://github.com/powerhome/audiences
81
82
  changelog_uri: https://github.com/powerhome/audiences/blob/main/packages/audiences/docs/CHANGELOG.md
82
83
  rubygems_mfa_required: 'true'
84
+ post_install_message:
83
85
  rdoc_options: []
84
86
  require_paths:
85
87
  - lib
@@ -94,7 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
96
  - !ruby/object:Gem::Version
95
97
  version: '0'
96
98
  requirements: []
97
- rubygems_version: 3.6.2
99
+ rubygems_version: 3.5.16
100
+ signing_key:
98
101
  specification_version: 4
99
102
  summary: Audiences system
100
103
  test_files: []