Skip to content

Commit 752c555

Browse files
authored
Merge pull request #12 from securenative/dev
Align SDK
2 parents a8651af + cd78802 commit 752c555

File tree

126 files changed

+2310
-539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2310
-539
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [macos-latest, ubuntu-latest, windows-latest]
16+
os: [ubuntu-latest]
1717
steps:
1818
- uses: actions/checkout@v1
1919
- uses: actions/setup-ruby@v1
@@ -24,7 +24,7 @@ jobs:
2424
gem install bundler
2525
bundler install
2626
- name: Run tests
27-
run: bundler exec rspec
27+
run: bundle exec rspec spec --pattern **/spec_*.rb
2828

2929
- name: Notify slack success
3030
if: success()

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [macos-latest, ubuntu-latest, windows-latest]
15+
os: [ubuntu-latest]
1616
steps:
1717
- uses: actions/checkout@v1
1818
- uses: actions/setup-ruby@v1
@@ -23,7 +23,7 @@ jobs:
2323
gem install bundler
2424
bundler install
2525
- name: Run tests
26-
run: bundler exec rspec
26+
run: bundle exec rspec spec --pattern **/spec_*.rb
2727

2828
- name: Notify slack success
2929
if: success()

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/test/version_tmp/
1111
/tmp/
1212
.idea
13+
*.iml
1314
# Used by dotenv library to load environment variables.
1415
# .env
1516

@@ -35,4 +36,5 @@
3536

3637
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
3738
.rvmrc
38-
.DS_Store
39+
.DS_Store
40+
.rspec_status

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ gem "rspec"
55
gem "rake"
66
gem "httpclient"
77
gem "parseconfig"
8-
gem "webmock"
9-
gem "codecov", :require => false, :group => :test
8+
gem "simplecov", :require => false, :group => :test
9+
gem "webmock", :require => false, :group => :test
10+
gem "rails", :require => false, :group => :test
11+
gem "hanami", :require => false, :group => :test
12+
gem "sinatra", :require => false, :group => :test

Gemfile.lock

Lines changed: 218 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,208 @@
11
PATH
22
remote: .
33
specs:
4-
securenative (0.1.16)
4+
securenative (0.1.18)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
9+
actioncable (6.0.3.2)
10+
actionpack (= 6.0.3.2)
11+
nio4r (~> 2.0)
12+
websocket-driver (>= 0.6.1)
13+
actionmailbox (6.0.3.2)
14+
actionpack (= 6.0.3.2)
15+
activejob (= 6.0.3.2)
16+
activerecord (= 6.0.3.2)
17+
activestorage (= 6.0.3.2)
18+
activesupport (= 6.0.3.2)
19+
mail (>= 2.7.1)
20+
actionmailer (6.0.3.2)
21+
actionpack (= 6.0.3.2)
22+
actionview (= 6.0.3.2)
23+
activejob (= 6.0.3.2)
24+
mail (~> 2.5, >= 2.5.4)
25+
rails-dom-testing (~> 2.0)
26+
actionpack (6.0.3.2)
27+
actionview (= 6.0.3.2)
28+
activesupport (= 6.0.3.2)
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.2)
34+
actionpack (= 6.0.3.2)
35+
activerecord (= 6.0.3.2)
36+
activestorage (= 6.0.3.2)
37+
activesupport (= 6.0.3.2)
38+
nokogiri (>= 1.8.5)
39+
actionview (6.0.3.2)
40+
activesupport (= 6.0.3.2)
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.2)
46+
activesupport (= 6.0.3.2)
47+
globalid (>= 0.3.6)
48+
activemodel (6.0.3.2)
49+
activesupport (= 6.0.3.2)
50+
activerecord (6.0.3.2)
51+
activemodel (= 6.0.3.2)
52+
activesupport (= 6.0.3.2)
53+
activestorage (6.0.3.2)
54+
actionpack (= 6.0.3.2)
55+
activejob (= 6.0.3.2)
56+
activerecord (= 6.0.3.2)
57+
marcel (~> 0.3.1)
58+
activesupport (6.0.3.2)
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)
964
addressable (2.7.0)
1065
public_suffix (>= 2.0.2, < 5.0)
11-
codecov (0.1.17)
12-
json
13-
simplecov
14-
url
66+
builder (3.2.4)
67+
concurrent-ruby (1.1.7)
1568
crack (0.4.3)
1669
safe_yaml (~> 1.0.0)
70+
crass (1.0.6)
1771
diff-lcs (1.3)
1872
docile (1.3.2)
73+
dry-configurable (0.11.6)
74+
concurrent-ruby (~> 1.0)
75+
dry-core (~> 0.4, >= 0.4.7)
76+
dry-equalizer (~> 0.2)
77+
dry-container (0.7.2)
78+
concurrent-ruby (~> 1.0)
79+
dry-configurable (~> 0.1, >= 0.1.3)
80+
dry-core (0.4.9)
81+
concurrent-ruby (~> 1.0)
82+
dry-equalizer (0.3.0)
83+
dry-logic (0.4.2)
84+
dry-container (~> 0.2, >= 0.2.6)
85+
dry-core (~> 0.2)
86+
dry-equalizer (~> 0.2)
87+
dry-types (0.12.3)
88+
concurrent-ruby (~> 1.0)
89+
dry-configurable (~> 0.1)
90+
dry-container (~> 0.3)
91+
dry-core (~> 0.2, >= 0.2.1)
92+
dry-equalizer (~> 0.2)
93+
dry-logic (~> 0.4, >= 0.4.2)
94+
inflecto (~> 0.0.0, >= 0.0.2)
95+
dry-validation (0.11.2)
96+
concurrent-ruby (~> 1.0)
97+
dry-configurable (~> 0.1, >= 0.1.3)
98+
dry-core (~> 0.2, >= 0.2.1)
99+
dry-equalizer (~> 0.2)
100+
dry-logic (~> 0.4.2)
101+
dry-types (~> 0.12.0)
102+
erubi (1.9.0)
103+
globalid (0.4.2)
104+
activesupport (>= 4.2.0)
105+
hanami (1.3.3)
106+
bundler (>= 1.6, < 3)
107+
concurrent-ruby (~> 1.0)
108+
hanami-assets (~> 1.3)
109+
hanami-cli (~> 0.3)
110+
hanami-controller (~> 1.3)
111+
hanami-helpers (~> 1.3)
112+
hanami-mailer (~> 1.3)
113+
hanami-router (~> 1.3)
114+
hanami-utils (~> 1.3)
115+
hanami-validations (>= 1.3, < 3)
116+
hanami-view (~> 1.3)
117+
hanami-assets (1.3.4)
118+
hanami-helpers (~> 1.3)
119+
hanami-utils (~> 1.3)
120+
tilt (~> 2.0, >= 2.0.2)
121+
hanami-cli (0.3.1)
122+
concurrent-ruby (~> 1.0)
123+
hanami-utils (~> 1.3)
124+
hanami-controller (1.3.3)
125+
hanami-utils (~> 1.3)
126+
rack (~> 2.0)
127+
hanami-helpers (1.3.3)
128+
hanami-utils (~> 1.3)
129+
hanami-mailer (1.3.2)
130+
hanami-utils (~> 1.3)
131+
mail (~> 2.6)
132+
tilt (~> 2.0, >= 2.0.1)
133+
hanami-router (1.3.2)
134+
hanami-utils (~> 1.3)
135+
http_router (= 0.11.2)
136+
rack (~> 2.0)
137+
hanami-utils (1.3.6)
138+
concurrent-ruby (~> 1.0)
139+
transproc (~> 1.0)
140+
hanami-validations (1.3.6)
141+
dry-logic (~> 0.4.2, < 0.5)
142+
dry-validation (~> 0.11, < 0.12)
143+
hanami-utils (~> 1.3)
144+
hanami-view (1.3.3)
145+
hanami-utils (~> 1.3)
146+
tilt (~> 2.0, >= 2.0.1)
19147
hashdiff (1.0.1)
148+
http_router (0.11.2)
149+
rack (>= 1.0.0)
150+
url_mount (~> 0.2.1)
20151
httpclient (2.8.3)
21-
json (2.3.0)
152+
i18n (1.8.5)
153+
concurrent-ruby (~> 1.0)
154+
inflecto (0.0.2)
155+
loofah (2.6.0)
156+
crass (~> 1.0.2)
157+
nokogiri (>= 1.5.9)
158+
mail (2.7.1)
159+
mini_mime (>= 0.1.1)
160+
marcel (0.3.3)
161+
mimemagic (~> 0.3.2)
162+
method_source (1.0.0)
163+
mimemagic (0.3.5)
164+
mini_mime (1.0.2)
165+
mini_portile2 (2.4.0)
166+
minitest (5.14.1)
167+
mustermann (1.1.1)
168+
ruby2_keywords (~> 0.0.1)
169+
nio4r (2.5.2)
170+
nokogiri (1.10.10)
171+
mini_portile2 (~> 2.4.0)
22172
parseconfig (1.0.8)
23173
public_suffix (4.0.5)
24-
rake (12.3.3)
174+
rack (2.2.3)
175+
rack-protection (2.0.8.1)
176+
rack
177+
rack-test (1.1.0)
178+
rack (>= 1.0, < 3)
179+
rails (6.0.3.2)
180+
actioncable (= 6.0.3.2)
181+
actionmailbox (= 6.0.3.2)
182+
actionmailer (= 6.0.3.2)
183+
actionpack (= 6.0.3.2)
184+
actiontext (= 6.0.3.2)
185+
actionview (= 6.0.3.2)
186+
activejob (= 6.0.3.2)
187+
activemodel (= 6.0.3.2)
188+
activerecord (= 6.0.3.2)
189+
activestorage (= 6.0.3.2)
190+
activesupport (= 6.0.3.2)
191+
bundler (>= 1.3.0)
192+
railties (= 6.0.3.2)
193+
sprockets-rails (>= 2.0.0)
194+
rails-dom-testing (2.0.3)
195+
activesupport (>= 4.2.0)
196+
nokogiri (>= 1.6)
197+
rails-html-sanitizer (1.3.0)
198+
loofah (~> 2.3)
199+
railties (6.0.3.2)
200+
actionpack (= 6.0.3.2)
201+
activesupport (= 6.0.3.2)
202+
method_source
203+
rake (>= 0.8.7)
204+
thor (>= 0.20.3, < 2.0)
205+
rake (13.0.1)
25206
rspec (3.8.0)
26207
rspec-core (~> 3.8.0)
27208
rspec-expectations (~> 3.8.0)
@@ -35,28 +216,55 @@ GEM
35216
diff-lcs (>= 1.2.0, < 2.0)
36217
rspec-support (~> 3.8.0)
37218
rspec-support (3.8.2)
219+
ruby2_keywords (0.0.2)
38220
safe_yaml (1.0.5)
39-
simplecov (0.18.5)
221+
simplecov (0.19.0)
40222
docile (~> 1.1)
41223
simplecov-html (~> 0.11)
42224
simplecov-html (0.12.2)
43-
url (0.3.2)
225+
sinatra (2.0.8.1)
226+
mustermann (~> 1.0)
227+
rack (~> 2.0)
228+
rack-protection (= 2.0.8.1)
229+
tilt (~> 2.0)
230+
sprockets (4.0.2)
231+
concurrent-ruby (~> 1.0)
232+
rack (> 1, < 3)
233+
sprockets-rails (3.2.1)
234+
actionpack (>= 4.0)
235+
activesupport (>= 4.0)
236+
sprockets (>= 3.0.0)
237+
thor (1.0.1)
238+
thread_safe (0.3.6)
239+
tilt (2.0.10)
240+
transproc (1.1.1)
241+
tzinfo (1.2.7)
242+
thread_safe (~> 0.1)
243+
url_mount (0.2.1)
244+
rack
44245
webmock (3.8.3)
45246
addressable (>= 2.3.6)
46247
crack (>= 0.3.2)
47248
hashdiff (>= 0.4.0, < 2.0.0)
249+
websocket-driver (0.7.3)
250+
websocket-extensions (>= 0.1.0)
251+
websocket-extensions (0.1.5)
252+
zeitwerk (2.4.0)
48253

49254
PLATFORMS
50255
ruby
51256

52257
DEPENDENCIES
53258
bundler (~> 2.0)
54-
codecov
259+
hanami
55260
httpclient
56261
parseconfig
262+
rails
57263
rake
58264
rspec
59265
securenative!
266+
simplecov
267+
sinatra
60268
webmock
61269

62270
BUNDLED WITH

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ securenative = SecureNative.instance
9999
context = securenative.context_builder(ip = '127.0.0.1', client_token = 'SECURED_CLIENT_TOKEN',
100100
headers = { 'user-agent' => 'Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405' })
101101

102-
event_options = EventOptionsBuilder(event_type = EventTypes::LOG_IN,
102+
event_options = EventOptions(event_type = EventTypes::LOG_IN,
103103
user_id = '1234', user_traits = UserTraits('Your Name', '[email protected]', '+1234567890'),
104104
context = context, properties = {prop1 => 'CUSTOM_PARAM_VALUE', prop2 => true, prop3 => 3}).build
105105

@@ -119,7 +119,7 @@ def track(request)
119119
securenative = SecureNative.instance
120120
context = SecureNative.context_builder.from_http_request(request).build
121121

122-
event_options = EventOptionsBuilder(event_type = EventTypes::LOG_IN,
122+
event_options = EventOptions(event_type = EventTypes::LOG_IN,
123123
user_id = '1234', user_traits = UserTraits('Your Name', '[email protected]', '+1234567890'),
124124
context = context, properties = {prop1 => 'CUSTOM_PARAM_VALUE', prop2 => true, prop3 => 3}).build
125125

@@ -142,7 +142,7 @@ def verify(request)
142142
securenative = SecureNative.instance
143143
context = SecureNative.context_builder.from_http_request(request).build
144144

145-
event_options = EventOptionsBuilder(event_type = EventTypes::LOG_IN,
145+
event_options = EventOptions(event_type = EventTypes::LOG_IN,
146146
user_id = '1234', user_traits = UserTraits('Your Name', '[email protected]', '+1234567890'),
147147
context = context, properties = {prop1 => 'CUSTOM_PARAM_VALUE', prop2 => true, prop3 => 3}).build
148148

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.17
1+
0.1.18

codecov.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)