Updated mcollective.init according to OSCI-658
[packages/precise/mcollective.git] / lib / mcollective / vendor / json / bin / edit_json.rb
diff --git a/lib/mcollective/vendor/json/bin/edit_json.rb b/lib/mcollective/vendor/json/bin/edit_json.rb
new file mode 100755 (executable)
index 0000000..04a8189
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/env ruby
+require 'json/editor'
+
+filename, encoding = ARGV
+JSON::Editor.start(encoding) do |window|
+  if filename
+    window.file_open(filename)
+  end
+end