mixflame / Hokkaido

RubyMotion Gem Porting Tool
GNU General Public License v3.0
11 stars 2 forks source link

Success/Failure reporting through post-processing self-tests #4

Closed kfatehi closed 12 years ago

kfatehi commented 12 years ago

Using a little bit of extra code that fakes a Motion Project, Hokkaido should be able to test that it did what it claims (require removal) successfully, and thus be able to provide some feedback (PASS OR FAIL) when trying to port a gem automagically.

module Motion
  FILES = []
  module Project
    module App
      class Files
        def self.<<(path)
          dir = File.expand_path(File.dirname(__FILE__))
          path.gsub!("#{dir}/.", "")
          Motion::FILES << path
          Kernel.require path
        end
      end
      def self.setup(&block)
        block.call(self)
      end
      def self.files
        Files
      end
    end
  end
end
kfatehi commented 12 years ago

Accomplished successfully in this commit. https://github.com/mdks/Hokkaido/commit/942547d116ebc249c91036fda27091f7834bb961