Class: EY::Serverside::DependencyManager::BundlerLock
- Defined in:
- lib/engineyard-serverside/dependency_manager/bundler_lock.rb
Defined Under Namespace
Classes: Lockfile
Constant Summary
Constants inherited from Bundler
EY::Serverside::DependencyManager::Bundler::DEFAULT_VERSION
Instance Attribute Summary
Attributes inherited from Base
#config, #runner, #servers, #shell
Instance Method Summary collapse
- #check ⇒ Object
- #check_ey_config ⇒ Object
- #detected? ⇒ Boolean
- #rails_version ⇒ Object
- #uses_sqlite3? ⇒ Boolean
Methods inherited from Bundler
default_version, #gemfile?, #install, #lockfile?
Methods inherited from Base
#bundler_config, #check_node_npm, #check_ruby_bundler, #clean_bundle_on_system_version_change, detect, #gemfile?, #initialize, #install, #write_system_version
Constructor Details
This class inherits a constructor from EY::Serverside::DependencyManager::Base
Instance Method Details
#check ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/engineyard-serverside/dependency_manager/bundler_lock.rb', line 11 def check shell.status "Gemfile and Gemfile.lock found" if config.check_database_adapter? && !lockfile.any_database_adapter? shell.warning "Gemfile.lock does not contain a recognized database adapter.\nA database-adapter gem such as pg, mysql2, mysql, or do_mysql was expected.\nThis can prevent applications that use PostgreSQL or MySQL from booting.\n\nTo fix, add any needed adapter to your Gemfile, bundle, commit, and redeploy.\nApplications not using PostgreSQL or MySQL can safely ignore this warning by\nadding ignore_database_adapter_warning: true to the application's ey.yml file\nunder this environment's name and adding the file to your repository.\n WARN\n end\nend\n" |
#check_ey_config ⇒ Object
32 33 34 35 36 |
# File 'lib/engineyard-serverside/dependency_manager/bundler_lock.rb', line 32 def check_ey_config unless lockfile.has_ey_config? shell.warning "Gemfile.lock does not contain ey_config.\nAdd gem 'ey_config' to get access to service configuration through EY::Config." end end |
#detected? ⇒ Boolean
7 8 9 |
# File 'lib/engineyard-serverside/dependency_manager/bundler_lock.rb', line 7 def detected? gemfile? && lockfile? end |
#rails_version ⇒ Object
38 39 40 |
# File 'lib/engineyard-serverside/dependency_manager/bundler_lock.rb', line 38 def rails_version lockfile.rails_version end |
#uses_sqlite3? ⇒ Boolean
28 29 30 |
# File 'lib/engineyard-serverside/dependency_manager/bundler_lock.rb', line 28 def uses_sqlite3? lockfile.uses_sqlite3? end |