urbanairship 9.4.0 → 10.0.1

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: 979edbaca3a95cc2b422ae5f1c3fda149f0eccc9b3aada416b26a50dc1e360a6
4
- data.tar.gz: 002a4f86ec42e19c23c60f368a3175bd9c789312c43400705989d173b50e8ddb
3
+ metadata.gz: 3f2fa5bf60fb73f3481b0cd2fdf5942b2293f637148a6c1244a25d20be92f75c
4
+ data.tar.gz: a57144cfb1481aaed4324b3957b221d743d233c6fc5ca1521a998e58c8894a94
5
5
  SHA512:
6
- metadata.gz: 7ba953bb68f8c20f2c5854447fd95419311ef27c8c898bb9453e35f3d00b6d23cd8febc08e47661f8e1ba50128fcc89d89159a6fefe2c76a7b4ae96a974b78f5
7
- data.tar.gz: b59971c8adcd4b59f93b79bc69a1d0adbf35e5c0938729d7f213d8bb7d0f6ae3c000384c3aee604bfadfde94363ecea27942300531b35f4acaed9bd5a082aa5e
6
+ metadata.gz: eb807a914353a8779d6861a40417d3a443794b49a2480079d1711ff8d951bb097f8ee11ba2df0d3fc3456dc8345fea32676fd568662a9ab829ae1307abc94b0f
7
+ data.tar.gz: f6e4365f019a7b7da659e1746fa2ad7e9b1e43a8bf23c41a2c7d50a45e63b8cd48784e46ad8714575d1aafbc9e0f7808d8136f60cfd929da6d38a1d003a53d24
@@ -15,8 +15,8 @@ Please include link to open issue if applicable.
15
15
 
16
16
  * I've tested for Ruby versions:
17
17
 
18
- - [ ] 2.6.7
19
- - [ ] 2.7.3
18
+ - [ ] 3.3.7
19
+ - [ ] 3.4.2
20
20
 
21
21
  ### Airship Contribution Agreement
22
22
  [Link here](https://docs.google.com/forms/d/e/1FAIpQLScErfiz-fXSPpVZ9r8Di2Tr2xDFxt5MgzUel0__9vqUgvko7Q/viewform)
@@ -9,17 +9,17 @@ jobs:
9
9
 
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: [2.7.3, 2.6.7]
12
+ ruby-version: [3.3.7, 3.4.2]
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v2
16
16
  - name: Set up Ruby ${{ matrix.ruby-version }}
17
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
17
+ uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby-version }}
20
20
  bundler: none
21
- - name: Install bundler 2.4
22
- run: gem install bundler -v 2.4.22
21
+ - name: Install bundler
22
+ run: gem install bundler
23
23
  - name: Install dependencies
24
24
  run: bundle install
25
25
  - name: Run tests
@@ -10,12 +10,12 @@ jobs:
10
10
 
11
11
  strategy:
12
12
  matrix:
13
- ruby-version: [2.7.3, 2.6.7]
13
+ ruby-version: [3.3.7, 3.4.2]
14
14
 
15
15
  steps:
16
16
  - uses: actions/checkout@v2
17
17
  - name: Set up Ruby ${{ matrix.ruby-version }}
18
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
18
+ uses: ruby/setup-ruby@v1
19
19
  with:
20
20
  ruby-version: ${{ matrix.ruby-version }}
21
21
  - name: Install dependencies
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ ## 10.0.1
2
+
3
+ - Changes gemspec to have correct minimum Ruby version
4
+
5
+ ## 10.0.0
6
+
7
+ - Fixes Ruby 3 incompatibilities
8
+ - Drops support for Ruby 2
9
+
1
10
  ## 9.4.0
2
11
 
3
12
  - Adds email replace method
data/README.rst CHANGED
@@ -13,16 +13,16 @@ Requirements
13
13
 
14
14
  We officially support the following Ruby versions::
15
15
 
16
- 2.6.7
17
- 2.7.2
16
+ 3.3.7
17
+ 3.4.2
18
18
 
19
- Newer 2.x versions should work as well.
19
+ Newer 3.x versions should work as well.
20
20
 
21
21
 
22
22
  Functionality
23
23
  =============
24
24
 
25
- Version 8.0 is a major upgrade, as we have changed the tested/supported versions of Ruby. A more detailed list of changes can be found in the CHANGELOG.
25
+ Version 10.0 is a major upgrade, as we have changed the tested/supported versions of Ruby. A more detailed list of changes can be found in the CHANGELOG.
26
26
 
27
27
 
28
28
  Questions
data/bin/test.rb ADDED
@@ -0,0 +1,157 @@
1
+ require 'bundler/setup'
2
+ require 'urbanairship'
3
+ require 'jwt'
4
+ require 'irb'
5
+
6
+ UA = Urbanairship
7
+ class TestAssertion
8
+ def initialize
9
+ private_key_str = '-----BEGIN PRIVATE KEY-----
10
+ MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDA28b5fiRI++skfIZxW
11
+ NtXKb80u7CJ7OoHLDFw0Eur2Y9OA2UImJe4WtAAAYaUJOXKhZANiAARf1nJMSvZe
12
+ NnVsOKi48Sre0Ei/45LD+EMjCJo0Ey0rYxXVtyNLWYecCsRxbPOOir4SBgpuETD4
13
+ iKOqhidZxaNxBWEDAvLdEV5SzCDqVWbuKhTIhzqc2AY46XphAPVYQbI=
14
+ -----END PRIVATE KEY-----
15
+ '
16
+ @oauth = UA::Oauth.new(
17
+ client_id: 'OKFei6zAR6K28VraONAltw',
18
+ key: 'vNziktxBTIqn6-_5mXUdZw',
19
+ assertion_private_key: private_key_str,
20
+ # scopes: ['psh', 'chn'],
21
+ # ip_addresses: ['50.47.131.20/22']
22
+ )
23
+ @airship = UA::Client.new(key:'vNziktxBTIqn6-_5mXUdZw', oauth: @oauth)
24
+ end
25
+ def send_broadcast_message
26
+ p = @airship.create_push
27
+ p.audience = UA.all
28
+ p.notification = UA.notification(alert: 'Hello')
29
+ p.device_types = UA.device_types(['web'])
30
+ response = p.send_push
31
+ puts response.payload
32
+ end
33
+
34
+ def channel_listing
35
+ channel_list = UA::ChannelList.new(client: @airship)
36
+ channel_list.each do |channel|
37
+ puts(channel)
38
+ end
39
+ puts(channel_list.count)
40
+ end
41
+
42
+ def register_email
43
+ email_channel = UA::Email.new(client: @airship)
44
+ email_channel.type = 'email'
45
+ email_channel.commercial_opted_in = '2020-10-28T10:34:22'
46
+ email_channel.address = 'jade.westover+neato@airship.com'
47
+ email_channel.timezone = 'America/Los_Angeles'
48
+ email_channel.locale_country = 'US'
49
+ email_channel.locale_language = 'en'
50
+ email_channel.register
51
+ end
52
+
53
+ def update_email
54
+ email_channel = UA::Email.new(client: @airship)
55
+ email_channel.click_tracking_opted_in = '2018-10-28T10:34:22'
56
+ email_channel.open_tracking_opted_in = '2018-10-28T10:34:22'
57
+ email_channel.type = 'email'
58
+ email_channel.commercial_opted_in = '2020-10-28T10:34:22'
59
+ # email_channel.suppression_state = 'imported'
60
+ # email_channel.address = 'jade.westover+neato@airship.com'
61
+ email_channel.timezone = 'America/Los_Angeles'
62
+ email_channel.locale_country = 'US'
63
+ email_channel.locale_language = 'en'
64
+ email_channel.channel_id = '49146a45-6356-4427-bad9-8288ae9254b4'
65
+ puts email_channel.channel_id
66
+ puts email_channel.address
67
+ email_channel.update
68
+ end
69
+ def replace_email
70
+ email_channel = UA::Email.new(client: @airship)
71
+ email_channel.click_tracking_opted_in = '2018-10-28T10:34:22'
72
+ email_channel.open_tracking_opted_in = '2018-10-28T10:34:22'
73
+ email_channel.type = 'email'
74
+ email_channel.commercial_opted_in = '2020-10-28T10:34:22'
75
+ # email_channel.suppression_state = 'imported'
76
+ email_channel.address = 'jade.westover+rubyemailtest12345@airship.com'
77
+ email_channel.timezone = 'America/Los_Angeles'
78
+ email_channel.locale_country = 'US'
79
+ email_channel.locale_language = 'en'
80
+ email_channel.channel_id = '49146a45-6356-4427-bad9-8288ae9254b4'
81
+ email_channel.replace
82
+ end
83
+
84
+ def get_email
85
+ email_channel = UA::Email.new(client: @airship)
86
+ email_channel.address = 'jade.westover+rubyemailtest12345@airship.com'
87
+ email_channel.lookup
88
+ end
89
+
90
+ # def verify_key
91
+ # @oauth.verify_public_key
92
+ # end
93
+ end
94
+
95
+ class TestBasic
96
+ def initialize
97
+ @airship = UA::Client.new(key:'vNziktxBTIqn6-_5mXUdZw', secret: 'yZb9CYoSQkeSO5kVpwgArg')
98
+
99
+ def send_broadcast_message
100
+ p = @airship.create_push
101
+ p.audience = UA.all
102
+ p.notification = UA.notification(alert: 'Hello')
103
+ p.device_types = UA.device_types(['web'])
104
+ response = p.send_push
105
+ puts response.payload
106
+ end
107
+
108
+ def channel_listing
109
+ channel_list = UA::ChannelList.new(client: @airship)
110
+ channel_list.each do |channel|
111
+ puts(channel)
112
+ end
113
+ puts(channel_list.count)
114
+ end
115
+ end
116
+ end
117
+
118
+ class TestBearer
119
+ def initialize
120
+ @airship = UA::Client.new(key:'vNziktxBTIqn6-_5mXUdZw', token: 'MTp2Tnppa3R4QlRJcW42LV81bVhVZFp3OjNGdkxrTzhwZ3gxMnp5WGhnZGZYMzhSYjNBWFo3ZHR2anYwMzR1SFBOWjg')
121
+
122
+ def send_broadcast_message
123
+ p = @airship.create_push
124
+ p.audience = UA.all
125
+ p.notification = UA.notification(alert: 'Hello')
126
+ p.device_types = UA.device_types(['web'])
127
+ response = p.send_push
128
+ puts response.payload
129
+ end
130
+
131
+ def channel_listing
132
+ channel_list = UA::ChannelList.new(client: @airship)
133
+ channel_list.each do |channel|
134
+ puts(channel)
135
+ end
136
+ puts(channel_list.count)
137
+ end
138
+ end
139
+ end
140
+
141
+ # ta = TestAssertion.new
142
+ IRB.start
143
+
144
+
145
+ # ta = TestAssertion.new
146
+ # ta.send_broadcast_message
147
+ # ta.channel_listing
148
+
149
+
150
+
151
+ # tb = TestBasic.new
152
+ # tb.send_broadcast_message
153
+ # tb.channel_listing
154
+
155
+ # tbr = TestBearer.new
156
+ # tbr.send_broadcast_message
157
+ # tbr.channel_listing
@@ -190,7 +190,7 @@ module Urbanairship
190
190
  path: @next_page_path,
191
191
  url: @next_page_url
192
192
  }.select { |k, v| !v.nil? }
193
- response = @client.send_request(params)
193
+ response = @client.send_request(**params)
194
194
 
195
195
  @data_list = get_new_data(response)
196
196
  @next_page_url = get_next_page_url(response)
@@ -1,3 +1,3 @@
1
1
  module Urbanairship
2
- VERSION = '9.4.0'
2
+ VERSION = '10.0.1'
3
3
  end
data/urbanairship.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.description = 'A Ruby Library for using the Airship web service API for push notifications and rich app pages.'
15
15
  spec.homepage = 'https://github.com/urbanairship/ruby-library'
16
16
 
17
- spec.required_ruby_version = '>= 2.0.0'
17
+ spec.required_ruby_version = '>= 3.0.0'
18
18
 
19
19
  if spec.respond_to?(:metadata)
20
20
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
@@ -29,8 +29,9 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_runtime_dependency 'rest-client', '>= 1.4', '< 4.0'
31
31
  spec.add_runtime_dependency 'jwt', '>= 2.0', '< 3.0'
32
+ spec.add_runtime_dependency 'csv', '~> 3.0'
32
33
 
33
- spec.add_development_dependency 'bundler', '>= 1', '< 2.5'
34
+ spec.add_development_dependency 'bundler', '>= 1', '< 3.0'
34
35
  spec.add_development_dependency 'guard-rspec'
35
36
  spec.add_development_dependency 'pry', '~> 0'
36
37
  spec.add_development_dependency 'rake', '~> 12.3.3'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urbanairship
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.4.0
4
+ version: 10.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airship
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-02-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rest-client
@@ -50,6 +49,20 @@ dependencies:
50
49
  - - "<"
51
50
  - !ruby/object:Gem::Version
52
51
  version: '3.0'
52
+ - !ruby/object:Gem::Dependency
53
+ name: csv
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '3.0'
59
+ type: :runtime
60
+ prerelease: false
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - "~>"
64
+ - !ruby/object:Gem::Version
65
+ version: '3.0'
53
66
  - !ruby/object:Gem::Dependency
54
67
  name: bundler
55
68
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +72,7 @@ dependencies:
59
72
  version: '1'
60
73
  - - "<"
61
74
  - !ruby/object:Gem::Version
62
- version: '2.5'
75
+ version: '3.0'
63
76
  type: :development
64
77
  prerelease: false
65
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +82,7 @@ dependencies:
69
82
  version: '1'
70
83
  - - "<"
71
84
  - !ruby/object:Gem::Version
72
- version: '2.5'
85
+ version: '3.0'
73
86
  - !ruby/object:Gem::Dependency
74
87
  name: guard-rspec
75
88
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +191,7 @@ files:
178
191
  - Rakefile
179
192
  - bin/console
180
193
  - bin/setup
194
+ - bin/test.rb
181
195
  - docs/Makefile
182
196
  - docs/ab_tests.rst
183
197
  - docs/attributes.rst
@@ -242,7 +256,6 @@ licenses:
242
256
  - Apache-2.0
243
257
  metadata:
244
258
  allowed_push_host: https://rubygems.org
245
- post_install_message:
246
259
  rdoc_options: []
247
260
  require_paths:
248
261
  - lib
@@ -250,15 +263,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
263
  requirements:
251
264
  - - ">="
252
265
  - !ruby/object:Gem::Version
253
- version: 2.0.0
266
+ version: 3.0.0
254
267
  required_rubygems_version: !ruby/object:Gem::Requirement
255
268
  requirements:
256
269
  - - ">="
257
270
  - !ruby/object:Gem::Version
258
271
  version: '0'
259
272
  requirements: []
260
- rubygems_version: 3.1.6
261
- signing_key:
273
+ rubygems_version: 3.6.8
262
274
  specification_version: 4
263
275
  summary: Ruby Gem for using the Airship API
264
276
  test_files: []