Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
cbd0fab
changing default timeout and default interval value in Asynchelper#ev…
sonianand11 Apr 12, 2017
90c7826
fix failing test of wroker spec. Used present? method to check batch …
sonianand11 Apr 13, 2017
bba8c7f
adding comment for race condition and fix suggested changes
sonianand11 Apr 13, 2017
949612e
adding comment to worker spec about race condition
sonianand11 Apr 13, 2017
cfb13b7
Fix failing test in worker spec (#119)
benjaminhoffman Apr 13, 2017
8350466
Merge branch 'master' into req-id
benjaminhoffman Apr 14, 2017
cedf380
adds spec for anonymous_id
benjaminhoffman Apr 14, 2017
6758671
run spec
benjaminhoffman Apr 14, 2017
497dc70
Enforces userId anonId requirement (#116)
benjaminhoffman May 3, 2017
4f59494
Update readme (#89)
lucasprag May 9, 2017
7b71cb3
implement respond_to_missing? instead of respond_to? (#120)
dmuneras Sep 15, 2017
4cc38b9
Revert "Enforces userId anonId requirement"
f2prateek Sep 15, 2017
6fc0696
Revert "Fix failing test in worker spec"
f2prateek Sep 15, 2017
32a572b
Merge pull request #122 from segmentio/revert-116-req-id
f2prateek Sep 15, 2017
29a1403
Merge pull request #123 from segmentio/revert-119-removed-gem-wrong
f2prateek Sep 15, 2017
246e8ba
Release 2.2.3.pre
f2prateek Sep 15, 2017
fb3d56a
Update platforms to test against on CI.
f2prateek Sep 1, 2017
3fefcf0
Update rspec to ~> 3.0
rohitpaulk Nov 21, 2017
e152c6b
Update ActiveSupport
rohitpaulk Nov 21, 2017
0388eea
When testing client, force worker to not pick jobs
rohitpaulk Nov 21, 2017
bd79486
Merge pull request #128 from rohitpaulk/update-activesupport-dep
f2prateek Nov 22, 2017
3c44ee9
Add linter (#130)
rohitpaulk Nov 29, 2017
940345f
Upload coverage stats to codecov.io
rohitpaulk Nov 29, 2017
1dd39ef
Handle HTTP status code failures (#132)
rohitpaulk Dec 1, 2017
d75a19c
Add analytics-ruby.rb for easier Gemfile use
nixme Feb 29, 2016
9c31047
Add file naming exception to rubocop.yml
rohitpaulk Dec 4, 2017
954a2c9
Use HEADERS from defaults.rb
rohitpaulk Dec 4, 2017
3281176
Merge pull request #133 from rohitpaulk/easier-gemfile-usage
f2prateek Dec 4, 2017
bd084e6
Add exponential backoff
rohitpaulk Dec 4, 2017
0c6ccdd
Tweak retry count to match segmentio/analytics-go
rohitpaulk Dec 5, 2017
8cb8e9d
Merge pull request #134 from rohitpaulk/add-exponential-backoff
f2prateek Dec 5, 2017
58a955e
Add User-Agent header
rohitpaulk Dec 7, 2017
a15c6f2
Merge pull request #135 from rohitpaulk/add-user-agent-header
f2prateek Dec 8, 2017
aa35213
Add an end-to-end test (#139)
rohitpaulk Dec 15, 2017
c429653
Spawn worker after adding item to queue (#138)
rohitpaulk Dec 15, 2017
779cc77
Avoid catching Exception, only catch StandardError instead (#141)
rohitpaulk Dec 20, 2017
114af0b
Use a custom 'Message' class
rohitpaulk Jan 5, 2018
5174fbd
Add custom 'MessageBatch' class
rohitpaulk Jan 5, 2018
f6e659b
Reject messages that exceed the maximum allowed size
rohitpaulk Jan 5, 2018
feedf1a
Cache JSON generation for individual messages
rohitpaulk Jan 5, 2018
6682f02
Limit batch size to 500kb
rohitpaulk Jan 9, 2018
39232c2
Add specs for MessageBatch#full?
rohitpaulk Jan 9, 2018
c8cf2f1
Increase number of runscope messages checked for e2e tests
rohitpaulk Jan 9, 2018
1fcc958
Fix long lines in worker_spec.rb
rohitpaulk Jan 10, 2018
c76f94a
Fix indeterminate test in worker_spec.rb
rohitpaulk Jan 10, 2018
42b2861
Log errors for messages that exceed the maximum size (#143)
rohitpaulk Jan 11, 2018
8f987c7
Add logging if queue is full (#145)
rohitpaulk Jan 11, 2018
204d5a2
Reuse TCP connections (#149)
rohitpaulk Jan 11, 2018
ffbe680
Merge branch 'master' into limit-batch-size
rohitpaulk Jan 12, 2018
04beda6
Merge pull request #147 from segmentio/limit-batch-size
rohitpaulk Jan 12, 2018
1c63a85
Cleanup docs (#150)
rohitpaulk Jan 12, 2018
5aea697
Add Makefile
rohitpaulk Jan 16, 2018
93a0f28
Remove bundle install travis step, use makefile for test script
rohitpaulk Jan 17, 2018
64bb15f
Merge pull request #151 from segmentio/add-makefile
rohitpaulk Jan 17, 2018
86683ac
Deploy tagged commits to RubyGems
rohitpaulk Feb 4, 2018
4f8ca5b
Update version and History.md for 2.2.4.pre
rohitpaulk Feb 4, 2018
ded04b0
Update RELEASING.md
rohitpaulk Feb 4, 2018
d8a645d
Add RubyGems API key
f2prateek Feb 14, 2018
ee75471
Merge pull request #153 from segmentio/add-api-key
f2prateek Feb 14, 2018
c969ab4
Merge branch 'master' into release-via-travis
f2prateek Feb 14, 2018
0bfd54f
Merge pull request #152 from segmentio/release-via-travis
f2prateek Feb 15, 2018
ffd69ea
[CI] Test against Ruby 2.5
nicolasleger Feb 15, 2018
5c398c2
Merge pull request #154 from nicolasleger/patch-1
f2prateek Feb 15, 2018
d6c4e7f
Update analytics binary to be compatible with the testing harness.
f2prateek Mar 5, 2018
2f7b1d6
Merge pull request #155 from segmentio/e2e-compliant
f2prateek Mar 9, 2018
c9c6a15
Release 2.2.4
f2prateek Apr 30, 2018
dbc6ae0
require version first as it is used in the defaults now
nijikon May 1, 2018
248698b
Merge pull request #158 from nijikon/require-version-first
rohitpaulk May 1, 2018
927e70c
Release 2.2.5
f2prateek May 1, 2018
293d224
Avoid rubygems race condition with parallel pushes
rohitpaulk May 1, 2018
5690a0a
Merge pull request #160 from segmentio/avoid-deploy-race
rohitpaulk May 1, 2018
c135f87
Add missing forwardable requirement
rohitpaulk May 15, 2018
aedabe9
Merge pull request #162 from segmentio/add-forwardable
f2prateek May 15, 2018
b55df26
Add [analytics-ruby] prefix to all log messages
rohitpaulk May 19, 2018
4463ca5
Add debug log when retrying request
rohitpaulk May 19, 2018
c52c386
Add debug log for number of items sent in each call
rohitpaulk May 19, 2018
59858b9
Merge pull request #163 from segmentio/better-logging
rohitpaulk May 19, 2018
34cabff
Add HTTP status code to debug logs
rohitpaulk May 23, 2018
dcad49b
Merge pull request #164 from segmentio/rohitpaulk/add-status-code-logs
f2prateek May 23, 2018
aa7aa88
Add tests for oj/rails conflict
rohitpaulk Jun 12, 2018
f860f27
Remove intermediary message class
rohitpaulk Jun 13, 2018
220011d
Only install oj if ruby is > 2.0 and not jruby
rohitpaulk Jun 13, 2018
efbb754
Merge pull request #166 from segmentio/rohitpaulk/oj-rails-conflict-t…
f2prateek Jun 13, 2018
494b3ff
Revert "Reuse TCP connections"
rohitpaulk Jun 25, 2018
244e1ad
Merge pull request #168 from segmentio/rohitpaulk/revert-tcp-conn-reuse
f2prateek Jun 25, 2018
4b9d328
Prep for 2.2.6 release
rohitpaulk Jun 27, 2018
b5c709d
Disable e2e tests for a month
rohitpaulk Jun 27, 2018
7d26677
Merge pull request #170 from segmentio/rohitpaulk/release-2.2.6
rohitpaulk Jun 29, 2018
f1d8b68
Add note about oj/rails conflict to changelog
rohitpaulk Jul 10, 2018
479e689
Merge pull request #171 from segmentio/rohitpaulk-patch-1
f2prateek Jul 10, 2018
60a1dfe
Update end to end tests
f2prateek Aug 27, 2018
4b0fa63
Merge pull request #175 from segmentio/update-e2e
f2prateek Sep 10, 2018
8837903
Move commander to development_dependencies, fixes #176
rohitpaulk Oct 20, 2018
cf47510
Merge pull request #177 from segmentio/rohitpaulk/move-commander-to-d…
f2prateek Oct 20, 2018
ddf7a20
Update README
Mar 1, 2019
3b34da1
Remove build status from README
Mar 4, 2019
4cd516f
Merge pull request #179 from segmentio/william/add-intro
williamgrosset Mar 4, 2019
7d42b0d
Refine DateTime tests to use iso8601 helpers
rohitpaulk Mar 30, 2019
63549f7
Merge pull request #185 from segmentio/rohitpaulk/fix-datetime-tests
rohitpaulk Apr 1, 2019
070fefc
Remove #sleep calls in tests
rohitpaulk Mar 30, 2019
e55cd87
Don't assume that all errors are ConnectionErrors
rohitpaulk Mar 30, 2019
5d6a148
Merge pull request #187 from segmentio/rohitpaulk/fix-error-logging
rohitpaulk Apr 2, 2019
c703f26
Merge pull request #186 from segmentio/rohitpaulk/faster-tests
rohitpaulk Apr 2, 2019
d07c42b
Promote 2.2.6.pre to 2.2.6
rohitpaulk Jul 11, 2018
cfc197d
Merge pull request #172 from segmentio/rohitpaulk/release-2.2.6
f2prateek Apr 2, 2019
7681bdc
Remove unused method
rohitpaulk Mar 30, 2019
cb00e85
Remove unused instance variable
rohitpaulk Mar 30, 2019
66d941a
Add FieldParser, use in #track
rohitpaulk Mar 30, 2019
62f4a24
Use common fields parser for #identify
rohitpaulk Mar 30, 2019
15369fe
Use common fields parser for #alias
rohitpaulk Mar 30, 2019
fd8faa9
Use common fields parser for #group
rohitpaulk Mar 30, 2019
ecc5576
Use common field parser for #page
rohitpaulk Mar 30, 2019
84e5eb7
Use common field parser for #screen
rohitpaulk Mar 30, 2019
15d957a
Remove unused private methods
rohitpaulk Mar 30, 2019
153bc46
Simplify repetitive documentation using macros
rohitpaulk Apr 6, 2019
e2336c2
Add extra tests for user_id/anonymous_id
rohitpaulk Apr 6, 2019
f6a70b9
Merge pull request #188 from segmentio/rohitpaulk/allow-anonymous-id-…
rohitpaulk Apr 15, 2019
5da40ad
Add failing test for optional :name in #page
rohitpaulk Apr 19, 2019
b59720a
Make name non-mandatory in #page
rohitpaulk Apr 19, 2019
77c7410
Merge pull request #194 from segmentio/rohitpaulk/allow-empty-name-in…
rohitpaulk Apr 26, 2019
343e3d1
Add new release instructions
rohitpaulk May 9, 2019
95ba917
Bump version and update history for 2.2.7.pre
rohitpaulk May 9, 2019
3bd8000
Merge pull request #196 from segmentio/rohitpaulk/release-2.2.7.pre
rohitpaulk May 10, 2019
3381f7f
Update history to reflect 2.2.7 release
rohitpaulk May 24, 2019
6e502d2
Merge pull request #198 from segmentio/update-2.2.7
rohitpaulk May 27, 2019
0e62d14
Upgrade tester version
rohitpaulk May 27, 2019
8b4dca9
Support --integrations in CLI for e2e tests
rohitpaulk May 27, 2019
c13ff43
Support 'alias' calls in e2e tests
rohitpaulk May 27, 2019
bc71efc
Don't send fields if they're nil
rohitpaulk May 27, 2019
39aad12
Use wget's quiet mode when downloading tester
rohitpaulk May 27, 2019
8b87679
Merge pull request #199 from segmentio/rohitpaulk/upgrade-e2e-tester
rohitpaulk May 28, 2019
540af90
Fix steps in RELEASING.md for pre-releases
rohitpaulk Jun 5, 2019
e2ff9b3
Merge pull request #200 from segmentio/rohitpaulk/fix-releasing-md
rohitpaulk Jun 5, 2019
92a3594
Remove 1.9.3 from test matrix
rohitpaulk Jul 18, 2019
2a3596f
Merge pull request #201 from segmentio/rohitpaulk/remove-1.9.3-from-t…
rohitpaulk Jul 21, 2019
4a135fb
Add coverage/ to .gitignore
rohitpaulk Jul 29, 2019
81b825e
Handle serialization errors, isolate bad events
rohitpaulk Jul 29, 2019
783d5f8
Merge pull request #202 from segmentio/rohitpaulk/add-coverage-gitignore
rohitpaulk Jul 30, 2019
328c914
Merge pull request #203 from segmentio/rohitpaulk/fix-batch-serializa…
rohitpaulk Jul 30, 2019
5da703e
Explicitly initialize @worker_thread
kylev Sep 7, 2019
f590aef
Merge pull request #205 from kylev/patch-1
rohitpaulk Sep 8, 2019
e84b6fc
Set minimum ruby version to 2.0
rohitpaulk Oct 5, 2019
d3e831e
Refresh .rubocop_todo.yml
rohitpaulk Oct 5, 2019
7a2439c
Avoid network calls in tests
rohitpaulk Oct 5, 2019
407e252
Merge pull request #210 from segmentio/rohitpaulk/refresh-rubocop-todos
rohitpaulk Oct 25, 2019
f44c9e4
Merge pull request #209 from segmentio/rohitpaulk/deprecate-ruby-19
rohitpaulk Oct 25, 2019
bb2b0b8
Merge pull request #211 from segmentio/rohitpaulk/avoid-network-in-tests
rohitpaulk Oct 25, 2019
6bba4b7
Fix stubbed request message
mbirman Nov 26, 2019
9347bdd
Merge pull request #212 from mbirman/fix-stubbed-request-message
rohitpaulk Nov 29, 2019
25edc53
Release 2.2.8.pre
rohitpaulk Nov 29, 2019
4675099
Merge pull request #213 from segmentio/rohitpaulk/release-2.2.8.pre
rohitpaulk Dec 3, 2019
6205ce3
Re-use TCP connections across API calls
rohitpaulk Dec 6, 2019
b8b285e
Merge pull request #214 from segmentio/rohitpaulk/re-use-connections
rohitpaulk Dec 17, 2019
b48dfa9
Update History.md to reflect 2.2.8 release
rohitpaulk Feb 10, 2020
6e5e31a
Merge pull request #216 from segmentio/rohitpaulk/update-2.2.8
lubird Feb 10, 2020
bde3d65
BitDeli is gone, remove badge from README.
kylev Feb 20, 2020
b6681ff
Merge pull request #217 from kylev/patch-1
rohitpaulk Feb 20, 2020
0fcb338
Changed the fractional digits to display 6 places instead of the orig…
nd4p90x Mar 24, 2021
7aa3f1d
Issue #226 Update supported Ruby Versions
nd4p90x Mar 26, 2021
6c99834
Update version file
nd4p90x Mar 26, 2021
9b0f187
Merge pull request #227 from North-Two-Five/Issue-#226-Update-Ruby-ve…
pooyaj Mar 26, 2021
91799d8
Changed the fractional digits to display 6 places instead of the orig…
nd4p90x Mar 24, 2021
53e9e2d
Merge branch 'Issue-#223-Sub-Millisecond-Timestamp' of github.com:Nor…
nd4p90x Mar 26, 2021
a8558ea
Minor version bump with history
nd4p90x Mar 26, 2021
abb6fc7
Merge pull request #225 from North-Two-Five/Issue-#223-Sub-Millisecon…
pooyaj Mar 26, 2021
7305134
release 2.3.0
pooyaj Mar 26, 2021
46df274
Add test option and queue for easier testing
ryanwjackson Feb 19, 2021
337072c
Update quotes for rubocop
ryanwjackson Apr 9, 2021
b91d435
Merge pull request #222 from ryanwjackson/master
pooyaj Apr 12, 2021
3ff9d01
Update version for gem
nd4p90x Apr 13, 2021
5202c1d
Merge pull request #229 from North-Two-Five/Bump-version
pooyaj Apr 13, 2021
98adba6
enable-overriding-transport-options Pass options when initializing Tr…
annc128 Apr 29, 2021
156f789
enable-overriding-transport-options Bump version
annc128 Apr 29, 2021
0eeafa0
Merge pull request #230 from annc128/enable-overriding-transport-options
pooyaj May 5, 2021
6bc8d8f
Version update 2.3.3
nd4p90x May 5, 2021
cda8e5d
Merge pull request #232 from North-Two-Five/master
pooyaj May 5, 2021
8fa2e1c
Update History.md
pooyaj May 5, 2021
9b1dc2f
Update version.rb
pooyaj May 5, 2021
a3c83a2
Fix test queue reset! documentation
davehughes Jun 9, 2021
01cc675
Merge pull request #235 from davehughes/patch-1
nd4p90x Jun 16, 2021
9d230d9
Update README.md
pooyaj Jun 16, 2021
fabd8d4
Merge pull request #236 from segmentio/pooyaj-patch-1
pooyaj Jun 16, 2021
675b296
not enqueuing test action in real queue
MaxenceFlatlooker Jun 21, 2021
f9a04c2
Merge pull request #237 from MaxenceFlatlooker/not_enqueuing_test_act…
nd4p90x Jun 22, 2021
18a8408
Correct dates on History.md
diego-silva Aug 25, 2021
169e99b
Merge pull request #240 from diego-silva/patch-1
nd4p90x Aug 26, 2021
c908070
Fix for empty user_id or anonymous_id not throwing errors
tyler-goodwin Oct 13, 2021
c52b770
Merge pull request #245 from tyler-goodwin/master
pooyaj Oct 20, 2021
36f82d1
Create ruby.yml
nd4p90x Jan 17, 2022
5f4328e
Update test version
nd4p90x Jan 17, 2022
34a5be7
rubocop update parameters; fix syntax reported by rubocop
nd4p90x Jan 17, 2022
c03164b
rubocop syntax update
nd4p90x Jan 17, 2022
48bac00
Add ruby gems config
nd4p90x Jan 18, 2022
5d53b6c
Add GPR into config
nd4p90x Jan 18, 2022
ee8e68c
Merge pull request #1 from North-Two-Five/github-actions-integration
nd4p90x Feb 7, 2022
85367e3
Merge pull request #249 from North-Two-Five/master
pooyaj Feb 8, 2022
9e61564
Resolve Issue #247, change milliseconds from reporting 6 places back …
nd4p90x Feb 23, 2022
19df916
Merge pull request #251 from North-Two-Five/Issue-247-timestamp
pooyaj Feb 23, 2022
d188a39
Mentioning about stubbing during tests.
raghuvarmabh Apr 20, 2022
d6d9a33
Bumping the version
raghuvarmabh Apr 20, 2022
0d21a26
Merge pull request #253 from raghuvarmabh/update_test_instructions
pooyaj Apr 27, 2022
71b3077
Add frozen_string_literals magic comment
nirebu Jan 10, 2023
0484c52
CI: add Ruby 3.0, 3.1, and 3.2 to the test matrix
orien Jan 24, 2023
f18e649
Update development dependencies
orien Jan 24, 2023
d258c1c
Rubocop: resolve Style/HashSyntax
orien Jan 24, 2023
32e92e6
Rubocop: update configuration
orien Jan 24, 2023
7fac392
Merge pull request #258 from nirebu/lower-memory-retention
MichaelGHSeg Feb 21, 2023
5833403
Updating sub-version
nd4p90x Mar 2, 2023
c7f9e2d
Update ruby config
nd4p90x Mar 2, 2023
abaeb57
Update gem yaml
nd4p90x Mar 2, 2023
13a0ddc
Corrected Version
nd4p90x Mar 2, 2023
46cec0c
Merge pull request #262 from North-Two-Five/ruby3.2-New
MichaelGHSeg Mar 14, 2023
e9890ba
Update README.md
bockets Oct 19, 2023
ffbd2a7
Merge pull request #267 from bockets/patch-1
MichaelGHSeg Oct 25, 2023
c440393
Update README.md
alanjcharles Feb 13, 2024
e31e742
Push raising error message
nd4p90x Apr 17, 2024
d3cb44a
Update codecov token
MichaelGHSeg May 1, 2024
89fe8e2
Trying another format
MichaelGHSeg May 1, 2024
18fc214
Add codecov gh action to replace per-test upload
MichaelGHSeg May 1, 2024
c1b7951
Remove deprecated codecov uploader
MichaelGHSeg May 1, 2024
08e2049
Removing codecov dependency, using GH actions instead
MichaelGHSeg May 1, 2024
a77c1f3
Adding new codecov depenencies
MichaelGHSeg May 1, 2024
a0f577f
Adding new cov formatter
MichaelGHSeg May 1, 2024
fbe081b
Fixing nit from codecov's tutorial code
MichaelGHSeg May 1, 2024
42d4dd8
Codecov says commit yaml was invalid, reverting?
MichaelGHSeg May 1, 2024
8733904
Merge pull request #271 from segmentio/MichaelGHSegcodecov-token
MichaelGHSeg May 2, 2024
91548db
Push raising error message
nd4p90x Apr 17, 2024
bc16068
Merge branch 'Issue-268-Raise-Error' of github.com:North-Two-Five/ana…
nd4p90x May 2, 2024
8efb707
Export github issues to jira
MichaelGHSeg May 17, 2024
d993c8e
Resolve test response issue
nd4p90x May 28, 2024
ce515b2
update
nd4p90x May 28, 2024
aded43d
update
nd4p90x May 28, 2024
2440e09
update
nd4p90x May 28, 2024
9b190dd
update
nd4p90x May 28, 2024
44c94ce
upd
nd4p90x May 28, 2024
bad6777
upd
nd4p90x May 28, 2024
b4506dd
upd
nd4p90x May 28, 2024
78bf82e
upd
nd4p90x May 28, 2024
f26d642
test
nd4p90x May 28, 2024
91a24a5
updt
nd4p90x May 28, 2024
6ede327
Final Adjustment
nd4p90x May 28, 2024
bdf9d9d
Fix auto correct quotes and spaces
nd4p90x May 28, 2024
ee68d65
Missed a few single quotes
nd4p90x May 28, 2024
030da10
Merge pull request #269 from North-Two-Five/Issue-268-Raise-Error
MichaelGHSeg Jun 12, 2024
5153c1a
Update Release notes
nd4p90x Jul 17, 2024
bb3aed9
Merge pull request #274 from North-Two-Five/Issue-#273-Prep-Release
MichaelGHSeg Oct 7, 2024
5052ed9
Release 2.5.0.
MichaelGHSeg Oct 7, 2024
1027bbd
Merge pull request #275 from segmentio/MichaelGHSeg/release_2_5_0
MichaelGHSeg Oct 7, 2024
132aa19
Removing github gem publish step
MichaelGHSeg Oct 7, 2024
167f59f
Merge pull request #276 from segmentio/MichaelGHSeg/no_gpr_publish
MichaelGHSeg Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .buildscript/e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -ex

if [ "$RUN_E2E_TESTS" != "true" ]; then
echo "Skipping end to end tests."
else
echo "Running end to end tests..."
wget -q https://github.com/segmentio/library-e2e-tester/releases/download/0.4.0/tester_linux_amd64 -O tester
chmod +x tester
./tester -path='./bin/analytics'
echo "End to end tests completed!"
fi
39 changes: 39 additions & 0 deletions .github/workflows/create_jira.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create Jira Ticket

on:
issues:
types:
- opened

jobs:
create_jira:
name: Create Jira Ticket
runs-on: ubuntu-latest
environment: IssueTracker
steps:
- name: Checkout
uses: actions/checkout@master
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_TOKEN }}
JIRA_EPIC_KEY: ${{ secrets.JIRA_EPIC_KEY }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}

- name: Create
id: create
uses: atlassian/gajira-create@master
with:
project: ${{ secrets.JIRA_PROJECT }}
issuetype: Bug
summary: |
[${{ github.event.repository.name }}] (${{ github.event.issue.number }}): ${{ github.event.issue.title }}
description: |
Github Link: ${{ github.event.issue.html_url }}
${{ github.event.issue.body }}
fields: '{"parent": {"key": "${{ secrets.JIRA_EPIC_KEY }}"}}'

- name: Log created issue
run: echo "Issue ${{ steps.create.outputs.issue }} was created"
30 changes: 30 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Ruby Gem

on:
workflow_dispatch:

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
36 changes: 36 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Ruby

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.gem
Gemfile.lock
.ruby-version
coverage/
84 changes: 84 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: '2.0'
SuggestExtensions: false
NewCops: disable

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Metrics/AbcSize:
Exclude:
- "spec/**/*.rb"

Metrics/BlockLength:
Exclude:
- "spec/**/*.rb"

Metrics/ClassLength:
Exclude:
- "spec/**/*.rb"

Metrics/CyclomaticComplexity:
Exclude:
- "spec/**/*.rb"

Layout/LineLength:
Exclude:
- "spec/**/*.rb"

Metrics/MethodLength:
Exclude:
- "spec/**/*.rb"

Metrics/PerceivedComplexity:
Exclude:
- "spec/**/*.rb"

Naming/FileName:
Exclude:
- lib/analytics-ruby.rb # Gem name, added for easier Gemfile usage

Naming/PredicateName:
AllowedMethods:
- is_requesting? # Can't be renamed, backwards compatibility

Style/BlockDelimiters:
Exclude:
- 'spec/**/*'

Style/DateTime:
Exclude:
- 'spec/**/*.rb'

Style/Documentation:
Enabled: false

Style/FormatString:
EnforcedStyle: percent

# Allow one-liner functions to be wrapped in conditionals rather
# than forcing a guard clause
Style/GuardClause:
MinBodyLength: 2

Style/HashSyntax:
EnforcedStyle: hash_rockets
Exclude:
- 'spec/**/*.rb'

Style/ModuleFunction:
Enabled: false

Style/MutableConstant:
Enabled: false

Style/NumericLiterals:
MinDigits: 6

Style/ParallelAssignment:
Enabled: false

Style/PreferredHashMethods:
EnforcedStyle: verbose
170 changes: 170 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-01-24 09:12:04 UTC using RuboCop version 1.44.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemspec
Gemspec/OrderedDependencies:
Exclude:
- 'analytics-ruby.gemspec'

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RubyVersionGlobalsUsage:
Exclude:
- 'analytics-ruby.gemspec'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Layout/EmptyLineAfterGuardClause:
Exclude:
- 'lib/segment/analytics/client.rb'
- 'spec/spec_helper.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/HashAlignment:
Exclude:
- 'spec/segment/analytics/client_spec.rb'
- 'spec/spec_helper.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Layout/SpaceAfterComma:
Exclude:
- 'Rakefile'

# Offense count: 1
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
Exclude:
- 'bin/analytics'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'bin/analytics'

# Offense count: 3
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 25

# Offense count: 3
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 76

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 115

# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 8

# Offense count: 11
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/MethodLength:
Max: 16

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/ExpandPathArguments:
Exclude:
- 'analytics-ruby.gemspec'

# Offense count: 6
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
EnforcedStyle: unannotated

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/GlobalStdStream:
Exclude:
- 'lib/segment/analytics/logging.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
- 'analytics-ruby.gemspec'
- 'bin/analytics'
- 'lib/segment/analytics/client.rb'

# Offense count: 1
Style/MixinUsage:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 2
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Exclude:
- 'lib/segment/analytics/utils.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/Proc:
Exclude:
- 'bin/analytics'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'bin/analytics'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'Rakefile'
- 'analytics-ruby.gemspec'
- 'bin/analytics'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral:
Exclude:
- 'Rakefile'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 147
Loading