Sha256: a5987abc811ffde91e236770e04aee7b1560f0fc8e514fc4979686681df00ffb

Contents?: true

Size: 1.19 KB

Versions: 10

Compression:

Stored size: 1.19 KB

Contents

module BubbleWrap
  module Ext
    module BuildTask

      def self.extended(base)
        base.instance_eval do
          def setup_with_bubblewrap(*args, &block)
            bw_config = proc do |app|
              ::BubbleWrap.before_config(app)
              block.call(app) unless block.nil?
            end

            setup_without_bubblewrap *args, &bw_config
          end
          alias :setup_without_bubblewrap :setup
          alias :setup :setup_with_bubblewrap
        end
      end

    end

    module Config
      def config_with_bubblewrap
        config_without_bubblewrap.tap do |c|
          ::BubbleWrap.after_config(c)
        end
      end

      def self.extended(base)
        singleton_class = class << base; self; end
        singleton_class.send :alias_method, :config_without_bubblewrap, :config
        singleton_class.send :alias_method, :config, :config_with_bubblewrap
      end
    end

    module Platforms
      def osx?
        self.respond_to?(:template) && self.template == :osx
      end
    end
  end
end

Motion::Project::App.extend(BubbleWrap::Ext::BuildTask)

Motion::Project::App.extend(BubbleWrap::Ext::Platforms)

Motion::Project::App.extend(BubbleWrap::Ext::Config)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.6 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.5 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.4 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.3 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.2 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.1 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.9.0 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.8.0 lib/bubble-wrap/ext/motion_project_app.rb
bubble-wrap-1.7.1 lib/bubble-wrap/ext/motion_project_app.rb