bin/mdes-console in ncs_mdes-0.4.1 vs bin/mdes-console in ncs_mdes-0.4.2
- old
+ new
@@ -2,9 +2,19 @@
##
# Provides a IRB session with a NcsNavigator::Mdes::Specification instance
# for free-form prodding.
+# Allow this executable to be run directly from the source as well as
+# from an installed gem.
+begin
+ lib = File.expand_path('../../lib', __FILE__)
+ unless $LOAD_PATH.include?(lib)
+ $LOAD_PATH << lib
+ require 'rubygems'
+ end
+end
+
require 'irb'
require 'ncs_navigator/mdes'
$mdes12 = NcsNavigator::Mdes::Specification.new('1.2')
$mdes20 = NcsNavigator::Mdes::Specification.new('2.0')