Module: Dory::Upgrade
- Defined in:
- lib/dory/upgrade.rb
Class Method Summary collapse
- .cleanup ⇒ Object
- .install ⇒ Object
- .new_version ⇒ Object
- .outdated?(new_version = self.new_version) ⇒ Boolean
Class Method Details
.cleanup ⇒ Object
19 20 21 |
# File 'lib/dory/upgrade.rb', line 19 def self.cleanup Dory::Sh.run_command('gem cleanup dory') end |
.install ⇒ Object
15 16 17 |
# File 'lib/dory/upgrade.rb', line 15 def self.install Dory::Sh.run_command('gem install dory') end |
.new_version ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/dory/upgrade.rb', line 3 def self.new_version res = Dory::Sh.run_command('gem search -q dory') return false unless res.success? newver = /dory\s+\((.*)\)/.match(res.stdout) return false if !newver || newver.length != 2 newver[1] end |