Skip to content

Commit 734d938

Browse files
authored
PAMv3 implementation (#122)
1 parent 70efa36 commit 734d938

File tree

25 files changed

+1273
-29
lines changed

25 files changed

+1273
-29
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: run_acceptance_tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Perform Acceptance BDD tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout project
11+
uses: actions/checkout@v2
12+
- name: Checkout mock-server action
13+
uses: actions/checkout@v2
14+
with:
15+
repository: pubnub/client-engineering-deployment-tools
16+
ref: github-actions
17+
token: ${{ secrets.GH_TOKEN }}
18+
path: client-engineering-deployment-tools
19+
- name: Run mock server action
20+
uses: ./client-engineering-deployment-tools/actions/mock-server
21+
with:
22+
token: ${{ secrets.GH_TOKEN }}
23+
- name: Install dependencies
24+
run: |
25+
sudo gem install bundler &&
26+
bundle install
27+
- name: Run acceptance tests (optional)
28+
run: bundle exec cucumber sdk-specifications/features/ -p mock -p run_beta -p report_beta
29+
continue-on-error: true
30+
- name: Run acceptance tests (required)
31+
run: bundle exec cucumber sdk-specifications/features/ -p mock -p run_main -p report_main
32+
- name: Combine test results
33+
if: always()
34+
run: |
35+
sudo npm install -g junit-report-merger &&
36+
jrm ./main.xml "./main/**/*.xml" &&
37+
jrm ./beta.xml "./beta/**/*.xml"
38+
- name: Expose main report
39+
uses: actions/upload-artifact@v2
40+
if: always()
41+
with:
42+
name: acceptance-test-reports
43+
path: |
44+
main.xml
45+
beta.xml
46+
retention-days: 7

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,18 @@ dev_scripts
1111

1212
# GitHub Actions #
1313
##################
14-
.github/.release
14+
.github/.release
15+
.bundle/ruby
16+
17+
.travis/README.md
18+
.travis/scripts
19+
20+
deployment_keys
21+
deployment_keys-private
22+
deployment_keys.tar
23+
24+
.travis/github-labels-policy.json
25+
.travis/github-labels.json
26+
/.rvmrc
27+
/.bundle/
28+
/features/*.feature

.pubnub.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
2-
version: "4.6.2"
2+
version: "4.7.0"
33
changelog:
4+
- date: 2021-11-09
5+
version: v4.7.0
6+
changes:
7+
- type: feature
8+
text: "Grant_token allows generation of signed token with permissions for channels, channel groups and uuids."
49
-
510
changes:
611
-
@@ -600,7 +605,7 @@ sdks:
600605
- x86-64
601606
- distribution-type: package
602607
distribution-repository: RubyGems
603-
package-name: pubnub-4.6.1.gem
608+
package-name: pubnub-4.7.0.gem
604609
location: https://rubygems.org/gems/pubnub
605610
requires:
606611
- name: addressable
@@ -705,8 +710,8 @@ sdks:
705710
- x86-64
706711
- distribution-type: library
707712
distribution-repository: GitHub release
708-
package-name: pubnub-4.6.1.gem
709-
location: https://github.com/pubnub/ruby/releases/download/v4.6.2/pubnub-4.6.1.gem
713+
package-name: pubnub-v4.7.0.gem
714+
location: https://github.com/pubnub/ruby/releases/download/v4.7.0/pubnub-4.7.0.gem
710715
requires:
711716
- name: addressable
712717
min-version: 2.0.0

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ stages:
1616

1717
jobs:
1818
include:
19-
- stage: "test"
20-
name: 'Ruby 2.4.10'
21-
rvm: '2.4.10'
22-
script: bundle exec rspec
2319
- name: 'Ruby 2.5.8'
2420
rvm: '2.5.8'
2521
script: bundle exec rspec

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v4.7.0
2+
November 09 2021
3+
4+
#### Added
5+
- Grant_token allows generation of signed token with permissions for channels, channel groups and uuids.
6+
17
##### v4.6.2
28

39
- Add new `sdks` section to `.pubnub.yml` with information about available artifacts and distribution variants.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ group :test do
77
gem 'rr'
88
gem 'rspec'
99
gem 'rspec-retry'
10+
gem 'rspec-expectations'
1011
gem 'rubocop'
1112
gem 'simplecov', '>= 0.12', require: false
1213
gem 'vcr'
1314
gem 'webmock'
15+
gem 'cucumber'
1416
end
1517

1618
group :development, :test do

Gemfile.lock

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
pubnub (4.6.2)
4+
pubnub (4.7.0)
55
addressable (>= 2.0.0)
66
concurrent-ruby (~> 1.1.5)
77
concurrent-ruby-edge (~> 0.5.0)
@@ -19,6 +19,7 @@ GEM
1919
awesome_print (1.8.0)
2020
binding_of_caller (0.8.0)
2121
debug_inspector (>= 0.0.1)
22+
builder (3.2.4)
2223
codacy-coverage (2.2.1)
2324
simplecov
2425
coderay (1.1.3)
@@ -27,6 +28,37 @@ GEM
2728
concurrent-ruby (~> 1.1.5)
2829
crack (0.4.3)
2930
safe_yaml (~> 1.0.0)
31+
cucumber (7.0.0)
32+
builder (~> 3.2, >= 3.2.4)
33+
cucumber-core (~> 10.0, >= 10.0.1)
34+
cucumber-create-meta (~> 6.0, >= 6.0.1)
35+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
36+
cucumber-gherkin (~> 20.0, >= 20.0.1)
37+
cucumber-html-formatter (~> 16.0, >= 16.0.1)
38+
cucumber-messages (~> 17.0, >= 17.0.1)
39+
cucumber-wire (~> 6.0, >= 6.0.1)
40+
diff-lcs (~> 1.4, >= 1.4.4)
41+
mime-types (~> 3.3, >= 3.3.1)
42+
multi_test (~> 0.1, >= 0.1.2)
43+
sys-uname (~> 1.2, >= 1.2.2)
44+
cucumber-core (10.0.1)
45+
cucumber-gherkin (~> 20.0, >= 20.0.1)
46+
cucumber-messages (~> 17.0, >= 17.0.1)
47+
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
48+
cucumber-create-meta (6.0.1)
49+
cucumber-messages (~> 17.0, >= 17.0.1)
50+
sys-uname (~> 1.2, >= 1.2.2)
51+
cucumber-cucumber-expressions (12.1.3)
52+
cucumber-gherkin (20.0.1)
53+
cucumber-messages (~> 17.0, >= 17.0.1)
54+
cucumber-html-formatter (16.0.1)
55+
cucumber-messages (~> 17.0, >= 17.0.1)
56+
cucumber-messages (17.1.1)
57+
cucumber-tag-expressions (3.0.1)
58+
cucumber-wire (6.1.1)
59+
cucumber-core (~> 10.0, >= 10.0.1)
60+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
61+
cucumber-messages (~> 17.0, >= 17.0.1)
3062
debug_inspector (0.0.3)
3163
diff-lcs (1.4.4)
3264
docile (1.3.2)
@@ -68,13 +100,18 @@ GEM
68100
dry-equalizer (~> 0.2)
69101
dry-initializer (~> 3.0)
70102
dry-schema (~> 1.5)
103+
ffi (1.13.1)
71104
ffi (1.13.1-java)
72105
hashdiff (1.0.1)
73106
httpclient (2.8.3)
74107
interception (0.5)
75108
json (2.3.1)
76109
json (2.3.1-java)
77110
method_source (1.0.0)
111+
mime-types (3.3.1)
112+
mime-types-data (~> 3.2015)
113+
mime-types-data (3.2021.0901)
114+
multi_test (0.1.2)
78115
parallel (1.19.2)
79116
parser (2.7.1.4)
80117
ast (~> 2.4.1)
@@ -130,6 +167,8 @@ GEM
130167
simplecov-html (0.12.2)
131168
spoon (0.0.6)
132169
ffi
170+
sys-uname (1.2.2)
171+
ffi (~> 1.1)
133172
timers (4.3.0)
134173
unicode-display_width (1.7.0)
135174
vcr (6.0.0)
@@ -145,12 +184,14 @@ PLATFORMS
145184
DEPENDENCIES
146185
awesome_print
147186
codacy-coverage
187+
cucumber
148188
pry
149189
pry-rescue
150190
pry-stack_explorer
151191
pubnub!
152192
rr
153193
rspec
194+
rspec-expectations
154195
rspec-retry
155196
rubocop
156197
simplecov (>= 0.12)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.6.2
1+
4.7.0

config/cucumber.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
default: -p mock -p run_main
2+
run_main: -t "not @skip and not @na=ruby and not @beta"
3+
report_main: -f junit --out main
4+
run_beta: -t "not @skip and not @na=ruby and @beta"
5+
report_beta: -f junit --out beta
6+
mock: SERVER_MOCK=true PAM_SUB_KEY=subKey PAM_PUB_KEY=pubKey PAM_SEC_KEY=secKey SERVER_HOST=localhost SERVER_PORT=8090
7+
prod: SERVER_MOCK=false

0 commit comments

Comments
 (0)