How to find out which gem fork / original is installed in my system?

When I add a gem 'delayed_job' to my gemfile, how do I know if I am going to get collectidea / delayed_job or tobi / delayed_job ?

Also, is there a way to check among the list of stones that I have already installed, regarding which version / location these stones have been downloaded / installed from?

Ps. I use RVM on Ubuntu, Bundler and Rails 3.0.3

+4
source share
3 answers

There is no one way to find out which fork or github branch you are loading. For the delayed_job gem, you boot from the collectidea branch. You can point to this page where the main page points to collective virtualization. The reason you cannot determine which fork, in particular, is due to the fact that rubygems are not connected to github repositories. These are just packages that are uploaded to the site. As far as you know, you can download the gem from a copy of the local repository, which is not even published on the Internet. You can also download from the SVN repository instead of the Git repository. In general, rubygems.org should give you some insight into how to find the source code for the gem. In addition, most github gems mark their commits with a version number so that you can find out which revision you are using by checking the github / git tags.

+2
source

If you want to specify the location of git, you can use: git param:

 gem "delayed_job", :git => "git://github.com/collectiveidea/delayed_job.git" gem "delayed_job", :git => "git://github.com/tobi/delayed_job.git" 

Read more about Gemfile

+1
source

Gemspec contains the homepage attribute, which often shows the source code repository. You can view the gemspec of a locally installed pearl with:

 gem spec delayed_job 

View your homepage with

 gem spec delayed_job | grep homepage 

However, gemspec does not always have the original repo.

To solve this problem (and others), I wrote a gem called gemdiff . It performs a gemspec check, and if it does not contain a github url, it looks for github to match. It includes exceptions for gems such as delayed_job , which is the fork of the original delayed_job repository.

 gem install gemdiff gemdiff find delayed_job => http://github.com/collectiveidea/delayed_job 

Moreover, gemdiff will check your project package and show you the difference in source code between the version of the gem you installed and the highest version that can be installed as determined by the package.

https://github.com/teeparham/gemdiff

+1
source

Source: https://habr.com/ru/post/1341708/


All Articles