Class: Capistrano::Slacky::Facade::Changelog
- Inherits:
-
Object
- Object
- Capistrano::Slacky::Facade::Changelog
- Defined in:
- lib/capistrano/slacky/facade/changelog.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(previous:, current:) ⇒ Changelog
constructor
A new instance of Changelog.
Constructor Details
Class Method Details
.for(env:) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/capistrano/slacky/facade/changelog.rb', line 7 def self.for(env:) new( previous: env.fetch(:previous_revision), current: env.fetch(:current_revision) ).call end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/capistrano/slacky/facade/changelog.rb', line 21 def call if difference.empty? return ::Capistrano::Slacky::Block::Context.new( ::I18n.t("slacky.nothing_has_changed_since_the_previous_release", scope: "capistrano") ) end difference.map do || ::Capistrano::Slacky::Block::Context.new( *.to_a ) end end |