I have several engines in my API, all depend on Artemis::Core
.
I want to understand the difference between declaring in Gemfile
, for example, gem artemis-core
:
source 'https://rubygems.org'
gem 'artemis-core', '~> 0.0.1'
gemspec
And declare the same gem in the file gemspec
:
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'artemis/support/version'
Gem::Specification.new do |s|
s.name = 'artemis-support'
s.version = Artemis::Support::VERSION
s.authors = ['Secret Name']
s.email = ['[email protected]']
s.summary = 'Secret summary'
s.files = Dir['{app,config,db,lib}/**/*', 'Rakefile', 'README.md']
s.add_dependency 'rails', '~> 5.0.2', '>= 5.0.2'
s.add_dependency 'artemis-core', '~> 0.0.1'
s.add_development_dependency 'pg', '~> 0.20'
end
I know that automatically gemspec
inherits gems declared in Gemfile
.
Is there a special rule for these situations? Thank you.