lib/cocoapods_plugin.rb in cocoapods-always-be-bundleing-0.0.1 vs lib/cocoapods_plugin.rb in cocoapods-always-be-bundleing-0.0.2
- old
+ new
@@ -1,17 +1,34 @@
-abort "Please run `pod install` with bundle exec instead." unless defined?(Bundler)
\ No newline at end of file
+require 'colored'
+
+module Pod
+ class Installer
+ alias_method :install_before_always_be_bundling, :install!
+
+ def install!
+ if validates_for_bundler
+ install_before_always_be_bundling!
+ else
+ puts "\n\n ** Please run `pod install` with bundle exec instead. **\n\n".red
+ end
+
+ def validates_for_bundler
+ defined?(Bundler)
+ end
+ end
+end