Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: 2

jobs:

multi-test: &multi-test
docker:
- image: ruby

working_directory: ~/repo

steps:
- checkout
- run:
name: Which bundler?
command: bundle -v

- run:
name: Setup Rubygems
command: bash .circleci/setup-rubygems.sh

- run:
name: Publish to Rubygems
command: |
gem build analytics-ruby
gem push *.gem
# gem push "analytics-ruby-$(git describe --tags).gem"

- run:
name: 'Running E2E tests'
command: '.buildscript/e2e.sh'

test-2.4.3:
<<: *multi-test
docker:
- image: circleci/ruby:2.4.3-stretch-node
test-2.5.0:
<<: *multi-test
docker:
- image: circleci/ruby:2.5.0-stretch-node
test-2.6.0:
<<: *multi-test
docker:
- image: circleci/ruby:2.6.0-stretch-node
test-2.7.3:
<<: *multi-test
docker:
- image: cimg/ruby:2.7.3-node
workflows:
version: 2
multi-test:
jobs:
- test-2.4.3
- test-2.5.0
- test-2.6.0
- test-2.7.3
3 changes: 3 additions & 0 deletions .circleci/setup-rubygems.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdir ~/.gem
echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
chmod 0600 /home/circleci/.gem/credentials
2 changes: 1 addition & 1 deletion analytics-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubocop', '~> 0.51.0'
end
spec.add_development_dependency 'codecov', '~> 0.1.4'
end
end
2 changes: 1 addition & 1 deletion lib/segment/analytics/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def datetime_in_iso8601(datetime)
end

def time_in_iso8601(time)
"#{time.strftime('%Y-%m-%dT%H:%M:%S.%6N')}#{formatted_offset(time, true, 'Z')}"
"#{time.strftime('%Y-%m-%dT%H:%M:%S.%3N')}#{formatted_offset(time, true, 'Z')}"
end

def date_in_iso8601(date)
Expand Down
2 changes: 1 addition & 1 deletion lib/segment/analytics/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Segment
class Analytics
VERSION = '2.4.0'
VERSION = '2.4.1'
end
end