securenative 0.1.23 → 0.1.29

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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -29
  3. data/lib/securenative.rb +47 -81
  4. data/{out/test/securenative-ruby → spec}/spec_helper.rb +0 -0
  5. metadata +8 -109
  6. data/.github/workflows/ci.yml +0 -49
  7. data/.github/workflows/publish.yml +0 -60
  8. data/.github/workflows/test.yml +0 -48
  9. data/.gitignore +0 -40
  10. data/.rakeTasks +0 -7
  11. data/.rspec +0 -3
  12. data/Gemfile +0 -11
  13. data/Gemfile.lock +0 -272
  14. data/LICENSE +0 -21
  15. data/Rakefile +0 -6
  16. data/bin/console +0 -14
  17. data/bin/setup +0 -8
  18. data/lib/api_manager.rb +0 -39
  19. data/lib/config/configuration_builder.rb +0 -27
  20. data/lib/config/configuration_manager.rb +0 -56
  21. data/lib/config/securenative_options.rb +0 -23
  22. data/lib/context/hanami_context.rb +0 -42
  23. data/lib/context/rails_context.rb +0 -44
  24. data/lib/context/securenative_context.rb +0 -67
  25. data/lib/context/sinatra_context.rb +0 -42
  26. data/lib/enums/api_route.rb +0 -6
  27. data/lib/enums/event_types.rb +0 -23
  28. data/lib/enums/failover_strategy.rb +0 -6
  29. data/lib/enums/risk_level.rb +0 -7
  30. data/lib/errors/securenative_config_error.rb +0 -4
  31. data/lib/errors/securenative_http_error.rb +0 -4
  32. data/lib/errors/securenative_invalid_options_error.rb +0 -4
  33. data/lib/errors/securenative_invalid_uri_error.rb +0 -4
  34. data/lib/errors/securenative_parse_error.rb +0 -4
  35. data/lib/errors/securenative_sdk_Illegal_state_error.rb +0 -4
  36. data/lib/errors/securenative_sdk_error.rb +0 -4
  37. data/lib/event_manager.rb +0 -157
  38. data/lib/http/secure_native_http_response.rb +0 -12
  39. data/lib/http/securenative_http_client.rb +0 -50
  40. data/lib/models/client_token.rb +0 -12
  41. data/lib/models/device.rb +0 -10
  42. data/lib/models/event_options.rb +0 -37
  43. data/lib/models/request_context.rb +0 -18
  44. data/lib/models/request_options.rb +0 -12
  45. data/lib/models/sdk_event.rb +0 -49
  46. data/lib/models/user_traits.rb +0 -13
  47. data/lib/models/verify_result.rb +0 -16
  48. data/lib/utils/date_utils.rb +0 -9
  49. data/lib/utils/encryption_utils.rb +0 -49
  50. data/lib/utils/ip_utils.rb +0 -23
  51. data/lib/utils/request_utils.rb +0 -69
  52. data/lib/utils/secure_native_logger.rb +0 -44
  53. data/lib/utils/signature_utils.rb +0 -16
  54. data/lib/utils/utils.rb +0 -9
  55. data/lib/utils/version_utils.rb +0 -11
  56. data/out/production/securenative-ruby/api_manager.rb +0 -39
  57. data/out/production/securenative-ruby/config/configuration_builder.rb +0 -27
  58. data/out/production/securenative-ruby/config/configuration_manager.rb +0 -56
  59. data/out/production/securenative-ruby/config/securenative_options.rb +0 -23
  60. data/out/production/securenative-ruby/context/hanami_context.rb +0 -42
  61. data/out/production/securenative-ruby/context/rails_context.rb +0 -44
  62. data/out/production/securenative-ruby/context/securenative_context.rb +0 -67
  63. data/out/production/securenative-ruby/context/sinatra_context.rb +0 -42
  64. data/out/production/securenative-ruby/enums/api_route.rb +0 -6
  65. data/out/production/securenative-ruby/enums/event_types.rb +0 -23
  66. data/out/production/securenative-ruby/enums/failover_strategy.rb +0 -6
  67. data/out/production/securenative-ruby/enums/risk_level.rb +0 -7
  68. data/out/production/securenative-ruby/errors/securenative_config_error.rb +0 -4
  69. data/out/production/securenative-ruby/errors/securenative_http_error.rb +0 -4
  70. data/out/production/securenative-ruby/errors/securenative_invalid_options_error.rb +0 -4
  71. data/out/production/securenative-ruby/errors/securenative_invalid_uri_error.rb +0 -4
  72. data/out/production/securenative-ruby/errors/securenative_parse_error.rb +0 -4
  73. data/out/production/securenative-ruby/errors/securenative_sdk_Illegal_state_error.rb +0 -4
  74. data/out/production/securenative-ruby/errors/securenative_sdk_error.rb +0 -4
  75. data/out/production/securenative-ruby/event_manager.rb +0 -157
  76. data/out/production/securenative-ruby/http/secure_native_http_response.rb +0 -12
  77. data/out/production/securenative-ruby/http/securenative_http_client.rb +0 -50
  78. data/out/production/securenative-ruby/models/client_token.rb +0 -12
  79. data/out/production/securenative-ruby/models/device.rb +0 -10
  80. data/out/production/securenative-ruby/models/event_options.rb +0 -37
  81. data/out/production/securenative-ruby/models/request_context.rb +0 -18
  82. data/out/production/securenative-ruby/models/request_options.rb +0 -12
  83. data/out/production/securenative-ruby/models/sdk_event.rb +0 -49
  84. data/out/production/securenative-ruby/models/user_traits.rb +0 -13
  85. data/out/production/securenative-ruby/models/verify_result.rb +0 -16
  86. data/out/production/securenative-ruby/securenative.rb +0 -83
  87. data/out/production/securenative-ruby/utils/date_utils.rb +0 -9
  88. data/out/production/securenative-ruby/utils/encryption_utils.rb +0 -49
  89. data/out/production/securenative-ruby/utils/ip_utils.rb +0 -23
  90. data/out/production/securenative-ruby/utils/request_utils.rb +0 -69
  91. data/out/production/securenative-ruby/utils/secure_native_logger.rb +0 -44
  92. data/out/production/securenative-ruby/utils/signature_utils.rb +0 -16
  93. data/out/production/securenative-ruby/utils/utils.rb +0 -9
  94. data/out/production/securenative-ruby/utils/version_utils.rb +0 -11
  95. data/out/test/securenative-ruby/spec_api_manager.rb +0 -87
  96. data/out/test/securenative-ruby/spec_context_builder.rb +0 -87
  97. data/out/test/securenative-ruby/spec_date_utils.rb +0 -13
  98. data/out/test/securenative-ruby/spec_encryption_utils.rb +0 -26
  99. data/out/test/securenative-ruby/spec_event_manager.rb +0 -93
  100. data/out/test/securenative-ruby/spec_ip_utils.rb +0 -41
  101. data/out/test/securenative-ruby/spec_request_utils.rb +0 -25
  102. data/out/test/securenative-ruby/spec_sdk_event.rb +0 -24
  103. data/out/test/securenative-ruby/spec_securenative.rb +0 -61
  104. data/out/test/securenative-ruby/spec_securenative_http_client.rb +0 -31
  105. data/out/test/securenative-ruby/spec_signature_utils.rb +0 -18
  106. data/out/test/securenative-ruby/spec_version_util.rb +0 -10
  107. data/securenative.gemspec +0 -28
@@ -1,60 +0,0 @@
1
- name: Publish
2
-
3
- on:
4
- release:
5
- types: [created]
6
-
7
- jobs:
8
- deploy:
9
- name: Publish
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Notify slack success
13
- if: success()
14
- id: slack # IMPORTANT: reference this step ID value in future Slack steps
15
- env:
16
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
17
- uses: voxmedia/github-action-slack-notify-build@v1.1.1
18
- with:
19
- channel: github-actions
20
- status: STARTING
21
- color: warning
22
-
23
- - uses: actions/checkout@v2
24
- - name: Set up Ruby 2.6
25
- uses: actions/setup-ruby@v1
26
- with:
27
- version: 2.6.x
28
-
29
- - name: Publish to RubyGems
30
- run: |
31
- mkdir -p $HOME/.gem
32
- touch $HOME/.gem/credentials
33
- chmod 0600 $HOME/.gem/credentials
34
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
35
- gem build *.gemspec
36
- gem push *.gem
37
- env:
38
- GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
39
-
40
- - name: Notify slack success
41
- if: success()
42
- env:
43
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
44
- uses: voxmedia/github-action-slack-notify-build@v1.1.1
45
- with:
46
- message_id: ${{ steps.slack.outputs.message_id }}
47
- channel: github-actions
48
- status: SUCCESS
49
- color: good
50
-
51
- - name: Notify slack fail
52
- if: failure()
53
- env:
54
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
55
- uses: voxmedia/github-action-slack-notify-build@v1.1.1
56
- with:
57
- message_id: ${{ steps.slack.outputs.message_id }}
58
- channel: github-actions
59
- status: FAILED
60
- color: danger
@@ -1,48 +0,0 @@
1
- name: Testing
2
-
3
- on:
4
- push:
5
- branches:
6
- - '*'
7
- - '!master'
8
-
9
- jobs:
10
- test:
11
- name: Testing
12
- runs-on: ${{ matrix.os }}
13
- strategy:
14
- matrix:
15
- os: [ubuntu-latest]
16
- steps:
17
- - uses: actions/checkout@v1
18
- - uses: actions/setup-ruby@v1
19
- with:
20
- ruby-version: 2.6.x
21
- - name: Install dependencies
22
- run: |
23
- gem install bundler
24
- bundler install
25
- - name: Run tests
26
- run: bundle exec rspec spec --pattern **/spec_*.rb
27
-
28
- - name: Notify slack success
29
- if: success()
30
- env:
31
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
32
- uses: voxmedia/github-action-slack-notify-build@v1.1.1
33
- with:
34
- message_id: ${{ steps.slack.outputs.message_id }}
35
- channel: github-actions
36
- status: SUCCESS
37
- color: good
38
-
39
- - name: Notify slack fail
40
- if: failure()
41
- env:
42
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
43
- uses: voxmedia/github-action-slack-notify-build@v1.1.1
44
- with:
45
- message_id: ${{ steps.slack.outputs.message_id }}
46
- channel: github-actions
47
- status: FAILED
48
- color: danger
data/.gitignore DELETED
@@ -1,40 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
- .idea
13
- *.iml
14
- # Used by dotenv library to load environment variables.
15
- # .env
16
-
17
- # Ignore Byebug command history file.
18
- .byebug_history
19
-
20
- ## Documentation cache and generated files:
21
- /.yardoc/
22
- /_yardoc/
23
- /doc/
24
- /rdoc/
25
-
26
- ## Environment normalization:
27
- /.bundle/
28
- /vendor/bundle
29
- /lib/bundler/man/
30
-
31
- # for a library or gem, you might want to ignore these files since the code is
32
- # intended to run in multiple environments; otherwise, check them in:
33
- # Gemfile.lock
34
- # .ruby-version
35
- # .ruby-gemset
36
-
37
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
38
- .rvmrc
39
- .DS_Store
40
- .rspec_status
data/.rakeTasks DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Settings><!--This file was automatically generated by Ruby plugin.
3
- You are allowed to:
4
- 1. Remove rake task
5
- 2. Add existing rake tasks
6
- To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
- gem "rspec"
5
- gem "rake"
6
- gem "simplecov", :require => false, :group => :test
7
- gem "codecov", :require => false, :group => :test
8
- gem "webmock", :require => false, :group => :test
9
- gem "rails", :require => false, :group => :test
10
- gem "hanami", :require => false, :group => :test
11
- gem "sinatra", :require => false, :group => :test
@@ -1,272 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- securenative (0.1.23)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actioncable (6.0.3.3)
10
- actionpack (= 6.0.3.3)
11
- nio4r (~> 2.0)
12
- websocket-driver (>= 0.6.1)
13
- actionmailbox (6.0.3.3)
14
- actionpack (= 6.0.3.3)
15
- activejob (= 6.0.3.3)
16
- activerecord (= 6.0.3.3)
17
- activestorage (= 6.0.3.3)
18
- activesupport (= 6.0.3.3)
19
- mail (>= 2.7.1)
20
- actionmailer (6.0.3.3)
21
- actionpack (= 6.0.3.3)
22
- actionview (= 6.0.3.3)
23
- activejob (= 6.0.3.3)
24
- mail (~> 2.5, >= 2.5.4)
25
- rails-dom-testing (~> 2.0)
26
- actionpack (6.0.3.3)
27
- actionview (= 6.0.3.3)
28
- activesupport (= 6.0.3.3)
29
- rack (~> 2.0, >= 2.0.8)
30
- rack-test (>= 0.6.3)
31
- rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
33
- actiontext (6.0.3.3)
34
- actionpack (= 6.0.3.3)
35
- activerecord (= 6.0.3.3)
36
- activestorage (= 6.0.3.3)
37
- activesupport (= 6.0.3.3)
38
- nokogiri (>= 1.8.5)
39
- actionview (6.0.3.3)
40
- activesupport (= 6.0.3.3)
41
- builder (~> 3.1)
42
- erubi (~> 1.4)
43
- rails-dom-testing (~> 2.0)
44
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
45
- activejob (6.0.3.3)
46
- activesupport (= 6.0.3.3)
47
- globalid (>= 0.3.6)
48
- activemodel (6.0.3.3)
49
- activesupport (= 6.0.3.3)
50
- activerecord (6.0.3.3)
51
- activemodel (= 6.0.3.3)
52
- activesupport (= 6.0.3.3)
53
- activestorage (6.0.3.3)
54
- actionpack (= 6.0.3.3)
55
- activejob (= 6.0.3.3)
56
- activerecord (= 6.0.3.3)
57
- marcel (~> 0.3.1)
58
- activesupport (6.0.3.3)
59
- concurrent-ruby (~> 1.0, >= 1.0.2)
60
- i18n (>= 0.7, < 2)
61
- minitest (~> 5.1)
62
- tzinfo (~> 1.1)
63
- zeitwerk (~> 2.2, >= 2.2.2)
64
- addressable (2.7.0)
65
- public_suffix (>= 2.0.2, < 5.0)
66
- builder (3.2.4)
67
- codecov (0.2.11)
68
- json
69
- simplecov
70
- concurrent-ruby (1.1.7)
71
- crack (0.4.3)
72
- safe_yaml (~> 1.0.0)
73
- crass (1.0.6)
74
- diff-lcs (1.4.4)
75
- docile (1.3.2)
76
- dry-configurable (0.11.6)
77
- concurrent-ruby (~> 1.0)
78
- dry-core (~> 0.4, >= 0.4.7)
79
- dry-equalizer (~> 0.2)
80
- dry-container (0.7.2)
81
- concurrent-ruby (~> 1.0)
82
- dry-configurable (~> 0.1, >= 0.1.3)
83
- dry-core (0.4.9)
84
- concurrent-ruby (~> 1.0)
85
- dry-equalizer (0.3.0)
86
- dry-logic (0.4.2)
87
- dry-container (~> 0.2, >= 0.2.6)
88
- dry-core (~> 0.2)
89
- dry-equalizer (~> 0.2)
90
- dry-types (0.12.3)
91
- concurrent-ruby (~> 1.0)
92
- dry-configurable (~> 0.1)
93
- dry-container (~> 0.3)
94
- dry-core (~> 0.2, >= 0.2.1)
95
- dry-equalizer (~> 0.2)
96
- dry-logic (~> 0.4, >= 0.4.2)
97
- inflecto (~> 0.0.0, >= 0.0.2)
98
- dry-validation (0.11.2)
99
- concurrent-ruby (~> 1.0)
100
- dry-configurable (~> 0.1, >= 0.1.3)
101
- dry-core (~> 0.2, >= 0.2.1)
102
- dry-equalizer (~> 0.2)
103
- dry-logic (~> 0.4.2)
104
- dry-types (~> 0.12.0)
105
- erubi (1.9.0)
106
- globalid (0.4.2)
107
- activesupport (>= 4.2.0)
108
- hanami (1.3.3)
109
- bundler (>= 1.6, < 3)
110
- concurrent-ruby (~> 1.0)
111
- hanami-assets (~> 1.3)
112
- hanami-cli (~> 0.3)
113
- hanami-controller (~> 1.3)
114
- hanami-helpers (~> 1.3)
115
- hanami-mailer (~> 1.3)
116
- hanami-router (~> 1.3)
117
- hanami-utils (~> 1.3)
118
- hanami-validations (>= 1.3, < 3)
119
- hanami-view (~> 1.3)
120
- hanami-assets (1.3.4)
121
- hanami-helpers (~> 1.3)
122
- hanami-utils (~> 1.3)
123
- tilt (~> 2.0, >= 2.0.2)
124
- hanami-cli (0.3.1)
125
- concurrent-ruby (~> 1.0)
126
- hanami-utils (~> 1.3)
127
- hanami-controller (1.3.3)
128
- hanami-utils (~> 1.3)
129
- rack (~> 2.0)
130
- hanami-helpers (1.3.3)
131
- hanami-utils (~> 1.3)
132
- hanami-mailer (1.3.2)
133
- hanami-utils (~> 1.3)
134
- mail (~> 2.6)
135
- tilt (~> 2.0, >= 2.0.1)
136
- hanami-router (1.3.2)
137
- hanami-utils (~> 1.3)
138
- http_router (= 0.11.2)
139
- rack (~> 2.0)
140
- hanami-utils (1.3.6)
141
- concurrent-ruby (~> 1.0)
142
- transproc (~> 1.0)
143
- hanami-validations (1.3.6)
144
- dry-logic (~> 0.4.2, < 0.5)
145
- dry-validation (~> 0.11, < 0.12)
146
- hanami-utils (~> 1.3)
147
- hanami-view (1.3.3)
148
- hanami-utils (~> 1.3)
149
- tilt (~> 2.0, >= 2.0.1)
150
- hashdiff (1.0.1)
151
- http_router (0.11.2)
152
- rack (>= 1.0.0)
153
- url_mount (~> 0.2.1)
154
- i18n (1.8.5)
155
- concurrent-ruby (~> 1.0)
156
- inflecto (0.0.2)
157
- json (2.3.1)
158
- loofah (2.7.0)
159
- crass (~> 1.0.2)
160
- nokogiri (>= 1.5.9)
161
- mail (2.7.1)
162
- mini_mime (>= 0.1.1)
163
- marcel (0.3.3)
164
- mimemagic (~> 0.3.2)
165
- method_source (1.0.0)
166
- mimemagic (0.3.5)
167
- mini_mime (1.0.2)
168
- mini_portile2 (2.4.0)
169
- minitest (5.14.2)
170
- mustermann (1.1.1)
171
- ruby2_keywords (~> 0.0.1)
172
- nio4r (2.5.4)
173
- nokogiri (1.10.10)
174
- mini_portile2 (~> 2.4.0)
175
- public_suffix (4.0.6)
176
- rack (2.2.3)
177
- rack-protection (2.1.0)
178
- rack
179
- rack-test (1.1.0)
180
- rack (>= 1.0, < 3)
181
- rails (6.0.3.3)
182
- actioncable (= 6.0.3.3)
183
- actionmailbox (= 6.0.3.3)
184
- actionmailer (= 6.0.3.3)
185
- actionpack (= 6.0.3.3)
186
- actiontext (= 6.0.3.3)
187
- actionview (= 6.0.3.3)
188
- activejob (= 6.0.3.3)
189
- activemodel (= 6.0.3.3)
190
- activerecord (= 6.0.3.3)
191
- activestorage (= 6.0.3.3)
192
- activesupport (= 6.0.3.3)
193
- bundler (>= 1.3.0)
194
- railties (= 6.0.3.3)
195
- sprockets-rails (>= 2.0.0)
196
- rails-dom-testing (2.0.3)
197
- activesupport (>= 4.2.0)
198
- nokogiri (>= 1.6)
199
- rails-html-sanitizer (1.3.0)
200
- loofah (~> 2.3)
201
- railties (6.0.3.3)
202
- actionpack (= 6.0.3.3)
203
- activesupport (= 6.0.3.3)
204
- method_source
205
- rake (>= 0.8.7)
206
- thor (>= 0.20.3, < 2.0)
207
- rake (13.0.1)
208
- rspec (3.9.0)
209
- rspec-core (~> 3.9.0)
210
- rspec-expectations (~> 3.9.0)
211
- rspec-mocks (~> 3.9.0)
212
- rspec-core (3.9.2)
213
- rspec-support (~> 3.9.3)
214
- rspec-expectations (3.9.2)
215
- diff-lcs (>= 1.2.0, < 2.0)
216
- rspec-support (~> 3.9.0)
217
- rspec-mocks (3.9.1)
218
- diff-lcs (>= 1.2.0, < 2.0)
219
- rspec-support (~> 3.9.0)
220
- rspec-support (3.9.3)
221
- ruby2_keywords (0.0.2)
222
- safe_yaml (1.0.5)
223
- simplecov (0.19.0)
224
- docile (~> 1.1)
225
- simplecov-html (~> 0.11)
226
- simplecov-html (0.12.2)
227
- sinatra (2.1.0)
228
- mustermann (~> 1.0)
229
- rack (~> 2.2)
230
- rack-protection (= 2.1.0)
231
- tilt (~> 2.0)
232
- sprockets (4.0.2)
233
- concurrent-ruby (~> 1.0)
234
- rack (> 1, < 3)
235
- sprockets-rails (3.2.2)
236
- actionpack (>= 4.0)
237
- activesupport (>= 4.0)
238
- sprockets (>= 3.0.0)
239
- thor (1.0.1)
240
- thread_safe (0.3.6)
241
- tilt (2.0.10)
242
- transproc (1.1.1)
243
- tzinfo (1.2.7)
244
- thread_safe (~> 0.1)
245
- url_mount (0.2.1)
246
- rack
247
- webmock (3.9.1)
248
- addressable (>= 2.3.6)
249
- crack (>= 0.3.2)
250
- hashdiff (>= 0.4.0, < 2.0.0)
251
- websocket-driver (0.7.3)
252
- websocket-extensions (>= 0.1.0)
253
- websocket-extensions (0.1.5)
254
- zeitwerk (2.4.0)
255
-
256
- PLATFORMS
257
- ruby
258
-
259
- DEPENDENCIES
260
- bundler (~> 2.0)
261
- codecov
262
- hanami
263
- rails
264
- rake
265
- rspec
266
- securenative!
267
- simplecov
268
- sinatra
269
- webmock
270
-
271
- BUNDLED WITH
272
- 2.1.4