lib/tape.rb in taperole-1.3.6 vs lib/tape.rb in taperole-1.4.0
- old
+ new
@@ -21,10 +21,11 @@
class ExecutionModule
attr_reader :opts
def initialize(opts)
@opts = opts || {}
+ @observers = []
end
def self.actions
@actions
end
@@ -42,11 +43,11 @@
def actions
self.class.actions
end
def fe_app?
- !Dir["#{local_dir}/gulpfile.*"].empty?
+ !Dir["#{local_dir}/package.json"].empty?
end
def rails_app?
!Dir["#{local_dir}/config.ru"].empty?
end
@@ -94,10 +95,9 @@
add_observer(::SlackNotifier.new(config["slack_webhook_url"], deploy_info))
end
end
def add_observer(observer)
- @observers = [] unless @observers
@observers.push(observer)
end
def notify_observers(state)
@observers.each do |observer|