onesignal 5.12.0 → 5.14.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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +3 -3
  5. data/docs/BasicNotification.md +5 -1
  6. data/docs/BasicNotificationAllOf.md +5 -1
  7. data/docs/EmailWarmUp.md +24 -0
  8. data/docs/EmailWarmUpRequest.md +20 -0
  9. data/docs/EmailWarmUpStage.md +24 -0
  10. data/docs/Notification.md +5 -1
  11. data/docs/NotificationWithMeta.md +5 -1
  12. data/docs/NotificationWithMetaAllOf.md +3 -1
  13. data/docs/StartLiveActivityRequest.md +1 -1
  14. data/docs/UpdateLiveActivityRequest.md +7 -3
  15. data/lib/onesignal/api_client.rb +1 -1
  16. data/lib/onesignal/models/basic_notification.rb +35 -2
  17. data/lib/onesignal/models/basic_notification_all_of.rb +35 -2
  18. data/lib/onesignal/models/email_warm_up.rb +298 -0
  19. data/lib/onesignal/models/email_warm_up_request.rb +272 -0
  20. data/lib/onesignal/models/email_warm_up_stage.rb +284 -0
  21. data/lib/onesignal/models/notification.rb +35 -2
  22. data/lib/onesignal/models/notification_with_meta.rb +34 -2
  23. data/lib/onesignal/models/notification_with_meta_all_of.rb +14 -5
  24. data/lib/onesignal/models/start_live_activity_request.rb +1 -1
  25. data/lib/onesignal/models/update_live_activity_request.rb +27 -6
  26. data/lib/onesignal/version.rb +1 -1
  27. data/lib/onesignal.rb +3 -0
  28. data/spec/models/basic_notification_all_of_spec.rb +16 -0
  29. data/spec/models/basic_notification_spec.rb +16 -0
  30. data/spec/models/email_warm_up_request_spec.rb +43 -0
  31. data/spec/models/email_warm_up_spec.rb +59 -0
  32. data/spec/models/email_warm_up_stage_spec.rb +51 -0
  33. data/spec/models/notification_spec.rb +16 -0
  34. data/spec/models/notification_with_meta_all_of_spec.rb +6 -0
  35. data/spec/models/notification_with_meta_spec.rb +16 -0
  36. data/spec/models/update_live_activity_request_spec.rb +12 -0
  37. data/vendor/bundle/ruby/3.2.0/cache/psych-5.5.0.gem +0 -0
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +28 -0
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/psych.so +0 -0
  40. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/README.md +53 -0
  41. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/extconf.rb +22 -0
  42. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych/psych.c +68 -0
  43. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych.h +4 -0
  44. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.c +4 -0
  45. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.c +79 -18
  46. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/class_loader.rb +1 -0
  47. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/parser.rb +40 -1
  48. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/scalar_scanner.rb +15 -3
  49. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/versions.rb +1 -1
  50. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/to_ruby.rb +20 -9
  51. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/yaml_tree.rb +0 -3
  52. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/lib/psych.so +0 -0
  53. data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.4.0.gemspec → psych-5.5.0.gemspec} +2 -2
  54. metadata +74 -62
  55. data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
  56. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +0 -28
  57. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/psych.so +0 -0
  58. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/ext/psych/psych.c +0 -36
  59. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/lib/psych.so +0 -0
  60. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem.build_complete +0 -0
  61. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/mkmf.log +0 -0
  62. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/CONTRIBUTING.md +0 -0
  63. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/LICENSE +0 -0
  64. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/Makefile +0 -0
  65. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/depend +0 -0
  66. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.h +0 -0
  67. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.h +0 -0
  68. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.c +0 -0
  69. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.h +0 -0
  70. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.c +0 -0
  71. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.h +0 -0
  72. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/coder.rb +0 -0
  73. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/core_ext.rb +0 -0
  74. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/exception.rb +0 -0
  75. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handler.rb +0 -0
  76. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/document_stream.rb +0 -0
  77. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/recorder.rb +0 -0
  78. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/ruby_events.rb +0 -0
  79. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/stream.rb +0 -0
  80. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/tree_builder.rb +0 -0
  81. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/yaml_events.rb +0 -0
  82. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/alias.rb +0 -0
  83. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/document.rb +0 -0
  84. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/mapping.rb +0 -0
  85. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/node.rb +0 -0
  86. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/scalar.rb +0 -0
  87. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/sequence.rb +0 -0
  88. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/stream.rb +0 -0
  89. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes.rb +0 -0
  90. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/omap.rb +0 -0
  91. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/set.rb +0 -0
  92. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/stream.rb +0 -0
  93. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/streaming.rb +0 -0
  94. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/syntax_error.rb +0 -0
  95. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/tree_builder.rb +0 -0
  96. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/depth_first.rb +0 -0
  97. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/emitter.rb +0 -0
  98. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/json_tree.rb +0 -0
  99. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/visitor.rb +0 -0
  100. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors.rb +0 -0
  101. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/y.rb +0 -0
  102. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych.rb +0 -0
@@ -26,18 +26,24 @@ module OneSignal
26
26
 
27
27
  attr_accessor :headings
28
28
 
29
- # Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification.
29
+ # Deprecated. The API ignores this field. Use `ios_sound`.
30
30
  attr_accessor :sound
31
31
 
32
+ # Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. Requires `headings` on the same request: ActivityKit ignores an update whose alert has no title, which silently drops the sound. Supersedes the deprecated `sound` field.
33
+ attr_accessor :ios_sound
34
+
32
35
  # Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale.
33
36
  attr_accessor :stale_date
34
37
 
35
38
  # Accepts Unix timestamp in seconds; only allowed if event is \"end\"
36
39
  attr_accessor :dismissal_date
37
40
 
38
- # Delivery priority through the the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery.
41
+ # Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery.
39
42
  attr_accessor :priority
40
43
 
44
+ # A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later.
45
+ attr_accessor :ios_relevance_score
46
+
41
47
  class EnumAttributeValidator
42
48
  attr_reader :datatype
43
49
  attr_reader :allowable_values
@@ -69,9 +75,11 @@ module OneSignal
69
75
  :'contents' => :'contents',
70
76
  :'headings' => :'headings',
71
77
  :'sound' => :'sound',
78
+ :'ios_sound' => :'ios_sound',
72
79
  :'stale_date' => :'stale_date',
73
80
  :'dismissal_date' => :'dismissal_date',
74
- :'priority' => :'priority'
81
+ :'priority' => :'priority',
82
+ :'ios_relevance_score' => :'ios_relevance_score'
75
83
  }
76
84
  end
77
85
 
@@ -89,15 +97,18 @@ module OneSignal
89
97
  :'contents' => :'LanguageStringMap',
90
98
  :'headings' => :'LanguageStringMap',
91
99
  :'sound' => :'String',
100
+ :'ios_sound' => :'String',
92
101
  :'stale_date' => :'Integer',
93
102
  :'dismissal_date' => :'Integer',
94
- :'priority' => :'Integer'
103
+ :'priority' => :'Integer',
104
+ :'ios_relevance_score' => :'Float'
95
105
  }
96
106
  end
97
107
 
98
108
  # List of attributes with nullable: true
99
109
  def self.openapi_nullable
100
110
  Set.new([
111
+ :'ios_relevance_score'
101
112
  ])
102
113
  end
103
114
 
@@ -140,6 +151,10 @@ module OneSignal
140
151
  self.sound = attributes[:'sound']
141
152
  end
142
153
 
154
+ if attributes.key?(:'ios_sound')
155
+ self.ios_sound = attributes[:'ios_sound']
156
+ end
157
+
143
158
  if attributes.key?(:'stale_date')
144
159
  self.stale_date = attributes[:'stale_date']
145
160
  end
@@ -151,6 +166,10 @@ module OneSignal
151
166
  if attributes.key?(:'priority')
152
167
  self.priority = attributes[:'priority']
153
168
  end
169
+
170
+ if attributes.key?(:'ios_relevance_score')
171
+ self.ios_relevance_score = attributes[:'ios_relevance_score']
172
+ end
154
173
  end
155
174
 
156
175
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -204,9 +223,11 @@ module OneSignal
204
223
  contents == o.contents &&
205
224
  headings == o.headings &&
206
225
  sound == o.sound &&
226
+ ios_sound == o.ios_sound &&
207
227
  stale_date == o.stale_date &&
208
228
  dismissal_date == o.dismissal_date &&
209
- priority == o.priority
229
+ priority == o.priority &&
230
+ ios_relevance_score == o.ios_relevance_score
210
231
  end
211
232
 
212
233
  # @see the `==` method
@@ -218,7 +239,7 @@ module OneSignal
218
239
  # Calculates hash code according to all attributes.
219
240
  # @return [Integer] Hash code
220
241
  def hash
221
- [name, event, event_updates, contents, headings, sound, stale_date, dismissal_date, priority].hash
242
+ [name, event, event_updates, contents, headings, sound, ios_sound, stale_date, dismissal_date, priority, ios_relevance_score].hash
222
243
  end
223
244
 
224
245
  # Builds the object from hash
@@ -10,5 +10,5 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
  =end
11
11
 
12
12
  module OneSignal
13
- VERSION = '5.12.0'
13
+ VERSION = '5.14.0'
14
14
  end
data/lib/onesignal.rb CHANGED
@@ -42,6 +42,9 @@ require 'onesignal/models/create_user_conflict_response_errors_items_meta'
42
42
  require 'onesignal/models/custom_event'
43
43
  require 'onesignal/models/custom_events_request'
44
44
  require 'onesignal/models/delivery_data'
45
+ require 'onesignal/models/email_warm_up'
46
+ require 'onesignal/models/email_warm_up_request'
47
+ require 'onesignal/models/email_warm_up_stage'
45
48
  require 'onesignal/models/export_events_success_response'
46
49
  require 'onesignal/models/export_subscriptions_request_body'
47
50
  require 'onesignal/models/export_subscriptions_success_response'
@@ -598,6 +598,22 @@ describe OneSignal::BasicNotificationAllOf do
598
598
  end
599
599
  end
600
600
 
601
+ describe 'test attribute "kind"' do
602
+ it 'should work' do
603
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
604
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["warmup"])
605
+ # validator.allowable_values.each do |value|
606
+ # expect { instance.kind = value }.not_to raise_error
607
+ # end
608
+ end
609
+ end
610
+
611
+ describe 'test attribute "email_warm_up"' do
612
+ it 'should work' do
613
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
614
+ end
615
+ end
616
+
601
617
  describe 'test attribute "sms_from"' do
602
618
  it 'should work' do
603
619
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -686,6 +686,22 @@ describe OneSignal::BasicNotification do
686
686
  end
687
687
  end
688
688
 
689
+ describe 'test attribute "kind"' do
690
+ it 'should work' do
691
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
692
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["warmup"])
693
+ # validator.allowable_values.each do |value|
694
+ # expect { instance.kind = value }.not_to raise_error
695
+ # end
696
+ end
697
+ end
698
+
699
+ describe 'test attribute "email_warm_up"' do
700
+ it 'should work' do
701
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
702
+ end
703
+ end
704
+
689
705
  describe 'test attribute "sms_from"' do
690
706
  it 'should work' do
691
707
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,43 @@
1
+ =begin
2
+ #OneSignal
3
+
4
+ #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
+
6
+ Contact: devrel@onesignal.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for OneSignal::EmailWarmUpRequest
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe OneSignal::EmailWarmUpRequest do
20
+ let(:instance) { OneSignal::EmailWarmUpRequest.new }
21
+
22
+ describe 'test an instance of EmailWarmUpRequest' do
23
+ it 'should create an instance of EmailWarmUpRequest' do
24
+ expect(instance).to be_instance_of(OneSignal::EmailWarmUpRequest)
25
+ end
26
+ end
27
+ describe 'test attribute "stages"' do
28
+ it 'should work' do
29
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ end
31
+ end
32
+
33
+ describe 'test attribute "strategy"' do
34
+ it 'should work' do
35
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
36
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["recommended", "custom"])
37
+ # validator.allowable_values.each do |value|
38
+ # expect { instance.strategy = value }.not_to raise_error
39
+ # end
40
+ end
41
+ end
42
+
43
+ end
@@ -0,0 +1,59 @@
1
+ =begin
2
+ #OneSignal
3
+
4
+ #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
+
6
+ Contact: devrel@onesignal.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for OneSignal::EmailWarmUp
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe OneSignal::EmailWarmUp do
20
+ let(:instance) { OneSignal::EmailWarmUp.new }
21
+
22
+ describe 'test an instance of EmailWarmUp' do
23
+ it 'should create an instance of EmailWarmUp' do
24
+ expect(instance).to be_instance_of(OneSignal::EmailWarmUp)
25
+ end
26
+ end
27
+ describe 'test attribute "stages"' do
28
+ it 'should work' do
29
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ end
31
+ end
32
+
33
+ describe 'test attribute "strategy"' do
34
+ it 'should work' do
35
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
36
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["recommended", "custom"])
37
+ # validator.allowable_values.each do |value|
38
+ # expect { instance.strategy = value }.not_to raise_error
39
+ # end
40
+ end
41
+ end
42
+
43
+ describe 'test attribute "status"' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["initializing", "draft", "active", "finished", "canceled"])
47
+ # validator.allowable_values.each do |value|
48
+ # expect { instance.status = value }.not_to raise_error
49
+ # end
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "is_live"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ end
@@ -0,0 +1,51 @@
1
+ =begin
2
+ #OneSignal
3
+
4
+ #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
+
6
+ Contact: devrel@onesignal.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
9
+
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for OneSignal::EmailWarmUpStage
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe OneSignal::EmailWarmUpStage do
20
+ let(:instance) { OneSignal::EmailWarmUpStage.new }
21
+
22
+ describe 'test an instance of EmailWarmUpStage' do
23
+ it 'should create an instance of EmailWarmUpStage' do
24
+ expect(instance).to be_instance_of(OneSignal::EmailWarmUpStage)
25
+ end
26
+ end
27
+ describe 'test attribute "start"' do
28
+ it 'should work' do
29
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ end
31
+ end
32
+
33
+ describe 'test attribute "_end"' do
34
+ it 'should work' do
35
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
36
+ end
37
+ end
38
+
39
+ describe 'test attribute "quota"' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "acked"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ end
@@ -686,6 +686,22 @@ describe OneSignal::Notification do
686
686
  end
687
687
  end
688
688
 
689
+ describe 'test attribute "kind"' do
690
+ it 'should work' do
691
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
692
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["warmup"])
693
+ # validator.allowable_values.each do |value|
694
+ # expect { instance.kind = value }.not_to raise_error
695
+ # end
696
+ end
697
+ end
698
+
699
+ describe 'test attribute "email_warm_up"' do
700
+ it 'should work' do
701
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
702
+ end
703
+ end
704
+
689
705
  describe 'test attribute "sms_from"' do
690
706
  it 'should work' do
691
707
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -108,4 +108,10 @@ describe OneSignal::NotificationWithMetaAllOf do
108
108
  end
109
109
  end
110
110
 
111
+ describe 'test attribute "email_warm_up"' do
112
+ it 'should work' do
113
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
114
+ end
115
+ end
116
+
111
117
  end
@@ -686,6 +686,22 @@ describe OneSignal::NotificationWithMeta do
686
686
  end
687
687
  end
688
688
 
689
+ describe 'test attribute "kind"' do
690
+ it 'should work' do
691
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
692
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["warmup"])
693
+ # validator.allowable_values.each do |value|
694
+ # expect { instance.kind = value }.not_to raise_error
695
+ # end
696
+ end
697
+ end
698
+
699
+ describe 'test attribute "email_warm_up"' do
700
+ it 'should work' do
701
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
702
+ end
703
+ end
704
+
689
705
  describe 'test attribute "sms_from"' do
690
706
  it 'should work' do
691
707
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -64,6 +64,12 @@ describe OneSignal::UpdateLiveActivityRequest do
64
64
  end
65
65
  end
66
66
 
67
+ describe 'test attribute "ios_sound"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
67
73
  describe 'test attribute "stale_date"' do
68
74
  it 'should work' do
69
75
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -82,4 +88,10 @@ describe OneSignal::UpdateLiveActivityRequest do
82
88
  end
83
89
  end
84
90
 
91
+ describe 'test attribute "ios_relevance_score"' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ end
95
+ end
96
+
85
97
  end
@@ -0,0 +1,28 @@
1
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
2
+ /opt/hostedtoolcache/Ruby/3.2.11/x64/bin/ruby extconf.rb
3
+ creating Makefile
4
+
5
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
6
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk clean
7
+ cd libyaml && make clean
8
+ /bin/sh: 1: cd: can't cd to libyaml
9
+ make: [Makefile:283: clean-so] Error 2 (ignored)
10
+
11
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
12
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk
13
+ compiling psych.c
14
+ compiling psych_emitter.c
15
+ compiling psych_parser.c
16
+ compiling psych_to_ruby.c
17
+ compiling psych_yaml_tree.c
18
+ linking shared-object psych.so
19
+
20
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
21
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk install
22
+ /usr/bin/install -c -m 0755 psych.so ./.gem.20260825-2130-bppjtk
23
+
24
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
25
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk clean
26
+ cd libyaml && make clean
27
+ /bin/sh: 1: cd: can't cd to libyaml
28
+ make: [Makefile:283: clean-so] Error 2 (ignored)
@@ -23,6 +23,7 @@ Psych.dump("foo") # => "--- foo\n...\n"
23
23
  ## Dependencies
24
24
 
25
25
  * libyaml
26
+ * libfyaml (optional, only for the experimental `--enable-libfyaml` backend)
26
27
 
27
28
  ## Installation
28
29
 
@@ -57,6 +58,58 @@ gem 'psych'
57
58
 
58
59
  JRuby ships with a pure Java implementation of Psych.
59
60
 
61
+ ## Experimental libfyaml backend
62
+
63
+ Psych ships an experimental, opt-in backend built on
64
+ [libfyaml](https://github.com/pantoniou/libfyaml), a fully YAML 1.2 compliant
65
+ parser and emitter. It is compiled only when you explicitly pass
66
+ `--enable-libfyaml` at build time. Without the flag the default libyaml
67
+ backend is used and nothing changes.
68
+
69
+ ```bash
70
+ # libfyaml and pkg-config must be installed first, for example:
71
+ # apt-get install libfyaml-dev # Debian/Ubuntu
72
+ # brew install libfyaml # macOS
73
+ gem install psych -- --enable-libfyaml
74
+ ```
75
+
76
+ This backend is not supported on Windows.
77
+
78
+ Because libfyaml follows YAML 1.2, the YAML 1.1 booleans `yes`, `no`, `on`, and
79
+ `off` load as plain strings instead of `true`/`false` (only `true`/`false` are
80
+ booleans). This resolves the so-called "Norway problem", where the country
81
+ code `no` was parsed as `false`:
82
+
83
+ ```ruby
84
+ Psych.load("country: no") # => {"country" => "no"}
85
+ ```
86
+
87
+ You can check which backend is active:
88
+
89
+ ```ruby
90
+ Psych::BACKEND # => "libfyaml" (or "libyaml")
91
+ Psych.libfyaml_version # => "0.9.6"
92
+ ```
93
+
94
+ The backend is experimental. Its output is valid YAML but is formatted
95
+ differently from libyaml in places, and a few emitter edge cases are not yet
96
+ matched. The default libyaml backend remains the supported choice.
97
+
98
+ Two more differences are worth knowing. Scalars emitted with the default
99
+ (`ANY`) style may be quoted or laid out differently from libyaml, so
100
+ byte-for-byte output is not guaranteed to match. On a parse error,
101
+ `Psych::SyntaxError#problem` carries libfyaml's full diagnostic message and
102
+ `Psych::SyntaxError#context` is always `nil`, whereas libyaml splits the
103
+ description across `#problem` and `#context`.
104
+
105
+ This backend targets YAML 1.2 compliance, not speed. In a rough
106
+ single-machine benchmark that loads and dumps in-memory documents, parsing
107
+ was roughly on par with libyaml (sometimes faster on string-heavy input),
108
+ while emitting was about 1.7x to 1.9x slower. Your numbers will vary, but the
109
+ shape holds: libfyaml is competitive at parsing and slower at emitting. Use
110
+ this backend when you need YAML 1.2 semantics. If throughput is your priority,
111
+ keep using the default libyaml backend.
112
+
60
113
  ## Release
61
114
 
62
115
  We used the trusted publisher and [rubygems/release-gem](https://github.com/rubygems/release-gem) workflow.
@@ -2,6 +2,28 @@
2
2
  # frozen_string_literal: true
3
3
  require 'mkmf'
4
4
 
5
+ # Experimental, opt-in libfyaml backend. Only used when psych is built with
6
+ # --enable-libfyaml. Without the flag nothing below changes and the default
7
+ # libyaml backend is built exactly as before.
8
+ if enable_config("libfyaml", false)
9
+ if $mswin or $mingw or $cygwin
10
+ abort "The libfyaml backend (--enable-libfyaml) is not supported on Windows"
11
+ end
12
+ unless pkg_config('libfyaml')
13
+ abort "libfyaml was requested with --enable-libfyaml but was not found via pkg-config"
14
+ end
15
+ # libfyaml 0.8 and earlier crash psych's emitter, so require a known-good
16
+ # version rather than building something that segfaults at runtime.
17
+ pkgconfig = ENV["PKG_CONFIG"] || "pkg-config"
18
+ unless system(pkgconfig, "--atleast-version=0.9", "libfyaml")
19
+ abort "The libfyaml backend requires libfyaml 0.9 or newer"
20
+ end
21
+ $defs << "-DPSYCH_USE_LIBFYAML"
22
+
23
+ create_makefile 'psych'
24
+ return
25
+ end
26
+
5
27
  if $mswin or $mingw or $cygwin
6
28
  $CPPFLAGS << " -DYAML_DECLARE_STATIC"
7
29
  end
@@ -0,0 +1,68 @@
1
+ #include <psych.h>
2
+
3
+ /* call-seq: Psych.libyaml_version
4
+ *
5
+ * Returns the version of the underlying YAML library as a three-element
6
+ * array. This is libyaml by default. On the experimental libfyaml backend,
7
+ * where libyaml is not linked, it reports the libfyaml version instead.
8
+ */
9
+ static VALUE libyaml_version(VALUE module)
10
+ {
11
+ int major, minor, patch;
12
+ VALUE list[3];
13
+
14
+ #ifdef PSYCH_USE_LIBFYAML
15
+ /* Experimental libfyaml backend: there is no libyaml linked in. Report
16
+ * the libfyaml version so callers still receive a 3-element version. */
17
+ const struct fy_version *v = fy_version_default();
18
+ major = v ? v->major : 0;
19
+ minor = v ? v->minor : 0;
20
+ patch = 0;
21
+ #else
22
+ yaml_get_version(&major, &minor, &patch);
23
+ #endif
24
+
25
+ list[0] = INT2NUM(major);
26
+ list[1] = INT2NUM(minor);
27
+ list[2] = INT2NUM(patch);
28
+
29
+ return rb_ary_new4((long)3, list);
30
+ }
31
+
32
+ #ifdef PSYCH_USE_LIBFYAML
33
+ /* call-seq: Psych.libfyaml_version
34
+ *
35
+ * Returns the libfyaml version string. This method is only defined when
36
+ * psych was built with the experimental libfyaml backend
37
+ * (+--enable-libfyaml+).
38
+ */
39
+ static VALUE libfyaml_version(VALUE module)
40
+ {
41
+ const char *v = fy_library_version();
42
+ return v ? rb_usascii_str_new2(v) : Qnil;
43
+ }
44
+ #endif
45
+
46
+ VALUE mPsych;
47
+
48
+ void Init_psych(void)
49
+ {
50
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
51
+ RB_EXT_RACTOR_SAFE(true);
52
+ #endif
53
+ mPsych = rb_define_module("Psych");
54
+
55
+ rb_define_singleton_method(mPsych, "libyaml_version", libyaml_version, 0);
56
+
57
+ #ifdef PSYCH_USE_LIBFYAML
58
+ rb_define_singleton_method(mPsych, "libfyaml_version", libfyaml_version, 0);
59
+ rb_define_const(mPsych, "BACKEND", rb_usascii_str_new2("libfyaml"));
60
+ #else
61
+ rb_define_const(mPsych, "BACKEND", rb_usascii_str_new2("libyaml"));
62
+ #endif
63
+
64
+ Init_psych_parser();
65
+ Init_psych_emitter();
66
+ Init_psych_to_ruby();
67
+ Init_psych_yaml_tree();
68
+ }
@@ -4,7 +4,11 @@
4
4
  #include <ruby.h>
5
5
  #include <ruby/encoding.h>
6
6
 
7
+ #ifdef PSYCH_USE_LIBFYAML
8
+ #include <libfyaml.h>
9
+ #else
7
10
  #include <yaml.h>
11
+ #endif
8
12
 
9
13
  #include <psych_parser.h>
10
14
  #include <psych_emitter.h>
@@ -1,5 +1,7 @@
1
1
  #include <psych.h>
2
2
 
3
+ #ifndef PSYCH_USE_LIBFYAML
4
+
3
5
  #if !defined(RARRAY_CONST_PTR)
4
6
  #define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
5
7
  #endif
@@ -587,3 +589,5 @@ void Init_psych_emitter(void)
587
589
  id_indentation = rb_intern("indentation");
588
590
  id_canonical = rb_intern("canonical");
589
591
  }
592
+
593
+ #endif /* PSYCH_USE_LIBFYAML */