Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time_truncate: simplify conversion code and tests #676

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented Jan 10, 2022

No description provided.

@kyrylo kyrylo merged commit ac85156 into master Jan 10, 2022
@kyrylo kyrylo deleted the time-truncate-simplification branch January 10, 2022 14:14
@tnir
Copy link
Contributor

tnir commented Jan 10, 2022

Thanks for updating and releasing a new version 6.0.2!

@tnir
Copy link
Contributor

tnir commented Jan 10, 2022

@kyrylo Thanks.

By the way, why are we getting the gem with the dependency rbtree3 ~> 0.5 while the gemspec specifies ~> 0.6 at

s.add_dependency 'rbtree3', '~> 0.6'
?

https://rubygems.org/gems/airbrake-ruby/versions/6.0.2/dependencies also says it has the dependency rbtree3 ~> 0.5.

The following is what I got when updating airbrake-ruby 6.0.1 with #673 to 6.0.2 🤔 :

diff --git a/Gemfile b/Gemfile
index 0dd3d4ea7..81f91361a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -173,6 +173,6 @@ gem "elasticsearch-rails", "7.2.0"
 gem "airbrake", github: "tnir/airbrake", ref: "01a551c0"
-gem "airbrake-ruby", github: "tnir/airbrake-ruby", ref: "f4bdea43"
+gem "airbrake-ruby", "~> 6.0.2"
diff --git a/Gemfile.lock b/Gemfile.lock
index fd2ebcf91..0ae11740c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,11 +1,3 @@
-GIT
-  remote: https://github.com/tnir/airbrake-ruby.git
-  revision: f4bdea433af8b304f4b1e07574af83f5a3395cb8
-  ref: f4bdea43
-  specs:
-    airbrake-ruby (6.0.1)
-      rbtree3 (~> 0.6)
-
 GIT
   remote: https://github.com/tnir/airbrake.git
   revision: 01a551c01fd28b9188eddc3457710c8f9a0fddd4
@@ -88,6 +80,8 @@ GEM
+    airbrake-ruby (6.0.2)
+      rbtree3 (~> 0.5)
@@ -614,7 +608,7 @@ DEPENDENCIES
   airbrake!
-  airbrake-ruby!
+  airbrake-ruby (~> 6.0.2)

@kyrylo
Copy link
Contributor Author

kyrylo commented Jan 10, 2022

Does bundle update rbtree3 work? The ~> 0.6 specification is permissive. BTW: You want to be running rbtree3 0.7.0

@tnir
Copy link
Contributor

tnir commented Jan 10, 2022

I just meant the difference between the source code on Git (GitHub) (~> 0.6) and built gem on Rubygem (~> 0.5). My Gemfile.lock does not matter in this discussion.

My point was the difference between

s.add_dependency 'rbtree3', '~> 0.6'
(~> 0.6) and https://rubygems.org/gems/airbrake-ruby/versions/6.0.2/dependencies (rbtree3 ~> 0.5).

@kyrylo
Copy link
Contributor Author

kyrylo commented Jan 10, 2022

Understood. My guess is that RubyGems cached that version since it was the first version that we specified and it doesn't see the difference between ~> 0.6 or ~> 0.123, since it's basically the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants