-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
partial implementation of testkit tests for temporal types
- Loading branch information
Showing
15 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ HOE = Class.new(Hoe) do | |
end.spec 'neo4j-ruby-driver' do | ||
developer 'Heinrich Klobuczek', '[email protected]' | ||
|
||
dependency 'activesupport', '>= 0' | ||
dependency 'activesupport', '< 7.1' | ||
# dependency 'async-rspec', '>= 0', :dev | ||
dependency 'ffaker', '>= 0', :dev | ||
dependency 'hoe', '>= 0', :dev | ||
|
@@ -41,7 +41,7 @@ end.spec 'neo4j-ruby-driver' do | |
dependency 'jar-dependencies', '>= 0.4.1' | ||
dependency 'ruby-maven', '>= 0', :dev | ||
|
||
spec_extras[:requirements] = ->(requirements) { requirements << 'jar org.neo4j.driver, neo4j-java-driver-all, 5.8.0' } | ||
spec_extras[:requirements] = ->(requirements) { requirements << 'jar org.neo4j.driver, neo4j-java-driver-all, 5.13.0' } | ||
spec_extras[:platform] = 'java' | ||
else | ||
require_ruby_version '>= 3.1' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
testkit-backend/lib/testkit/backend/messages/requests/cypher_date.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Testkit::Backend::Messages | ||
module Requests | ||
class CypherDate < Request | ||
def to_object | ||
Date.new(year, month, day) | ||
end | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
testkit-backend/lib/testkit/backend/messages/requests/cypher_date_time.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Testkit::Backend::Messages | ||
module Requests | ||
class CypherDateTime < Request | ||
def to_object | ||
if timezone_id | ||
Time.new(year, month, day, hour, minute, second + nanosecond * 1e-9, utc_offset_s).in_time_zone(TZInfo::Timezone.get(timezone_id)) | ||
elsif utc_offset_s | ||
Time.new(year, month, day, hour, minute, second + nanosecond * 1e-9, utc_offset_s) | ||
else | ||
Neo4j::Driver::Types::LocalDateTime.new(Time.new(year, month, day, hour, minute, second + nanosecond * 1e-9)) | ||
end | ||
end | ||
end | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
testkit-backend/lib/testkit/backend/messages/requests/cypher_duration.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Testkit::Backend::Messages | ||
module Requests | ||
class CypherDuration < Request | ||
def to_object | ||
Neo4j::Driver::Internal::DurationNormalizer.create(months, days, seconds, nanoseconds) | ||
end | ||
end | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
testkit-backend/lib/testkit/backend/messages/requests/cypher_time.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Testkit::Backend::Messages | ||
module Requests | ||
class CypherTime < Request | ||
def to_object | ||
if utc_offset_s | ||
Neo4j::Driver::Types::OffsetTime.new(Time.new(1, 1, 1, hour, minute, second + nanosecond * 1e-9, utc_offset_s)) | ||
else | ||
Neo4j::Driver::Types::LocalTime.new(Time.new(1, 1, 1, hour, minute, second + nanosecond * 1e-9)) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters