[gnome-code-assistance] [backends/ruby] Added ruby backend
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-code-assistance] [backends/ruby] Added ruby backend
- Date: Thu, 7 Nov 2013 19:03:19 +0000 (UTC)
commit b36a5d1902560349669e8668125cd709b9e41385
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Thu Nov 7 20:03:03 2013 +0100
[backends/ruby] Added ruby backend
backends/Makefile.am | 8 +
backends/rbcommon/Makefile.am | 12 +
.../rbcommon/gnome/codeassistance/transport.rb | 38 +++
.../gnome/codeassistance/transport/dbus.rb | 272 ++++++++++++++++++++
backends/rbcommon/gnome/codeassistance/types.rb | 131 ++++++++++
backends/ruby/Makefile.am | 14 +
backends/ruby/app.rb | 70 +++++
backends/ruby/org.gnome.CodeAssist.ruby.service.in | 3 +
backends/ruby/parser.rb | 103 ++++++++
backends/ruby/ruby.in | 6 +
configure.ac | 84 ++++++
11 files changed, 741 insertions(+), 0 deletions(-)
---
diff --git a/backends/Makefile.am b/backends/Makefile.am
index 7ca3664..223a6ab 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
@@ -2,10 +2,18 @@ if PYTHON_ENABLE
include backends/pycommon/Makefile.am
endif
+if RUBY_ENABLE
+include backends/rbcommon/Makefile.am
+endif
+
if BACKENDS_PYTHON_ENABLE
include backends/python/Makefile.am
endif
+if BACKENDS_RUBY_ENABLE
+include backends/ruby/Makefile.am
+endif
+
if BACKENDS_XML_ENABLE
include backends/xml/Makefile.am
endif
diff --git a/backends/rbcommon/Makefile.am b/backends/rbcommon/Makefile.am
new file mode 100644
index 0000000..3f158ec
--- /dev/null
+++ b/backends/rbcommon/Makefile.am
@@ -0,0 +1,12 @@
+rbgnomecodeassistancebackenddir = $(GCA_RBBACKENDS_ROOT)/gnome/codeassistance
+
+rbgnomecodeassistancebackend_DATA = \
+ backends/rbcommon/gnome/codeassistance/transport.rb \
+ backends/rbcommon/gnome/codeassistance/types.rb
+
+
+rbgnomecodeassistancebackendtransportdir = $(GCA_RBBACKENDS_ROOT)/gnome/codeassistance/transport
+rbgnomecodeassistancebackendtransport_DATA = \
+ backends/rbcommon/gnome/codeassistance/transport/dbus.rb
+
+GITIGNOREDEPS += backends/rbcommon/Makefile.am
diff --git a/backends/rbcommon/gnome/codeassistance/transport.rb
b/backends/rbcommon/gnome/codeassistance/transport.rb
new file mode 100644
index 0000000..3002207
--- /dev/null
+++ b/backends/rbcommon/gnome/codeassistance/transport.rb
@@ -0,0 +1,38 @@
+# gnome code assistance common ruby
+# Copyright (C) 2013 Jesse van den Kieboom <jessevdk gnome org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+require 'optparse'
+
+options = {
+ :transport => 'dbus',
+ :address => ':0'
+}
+
+OptionParser.new do |opts|
+ opts.on('-t', '--transport TRANSPORT', 'Transport (dbus or http)') do |v|
+ options[:transport] = v
+ end
+
+ opts.on('-a', '--address ADDRESS', 'Http address') do |v|
+ options[:address] = v
+ end
+end.parse!
+
+require 'gnome/codeassistance/transport/' + options[:transport]
+require 'gnome/codeassistance/types'
+
+# vi:ts=4:et
diff --git a/backends/rbcommon/gnome/codeassistance/transport/dbus.rb
b/backends/rbcommon/gnome/codeassistance/transport/dbus.rb
new file mode 100644
index 0000000..c5e6861
--- /dev/null
+++ b/backends/rbcommon/gnome/codeassistance/transport/dbus.rb
@@ -0,0 +1,272 @@
+# gnome code assistance common ruby
+# Copyright (C) 2013 Jesse van den Kieboom <jessevdk gnome org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+require 'dbus'
+require 'gnome/codeassistance/types'
+
+module Gnome; end
+
+module Gnome::CodeAssistance
+ class Service
+ class << self; attr_reader :language; end
+ @language = nil
+
+ def initialize(id, name, document)
+ @id = id
+ @name = name
+ @document = document
+ end
+
+ def data_path(path, unsaved)
+ unsaved.each do |u|
+ return u.data_path if u.path == path
+ end
+
+ return path
+ end
+
+ def new_document(*args)
+ @document.call(*args)
+ end
+
+ def parse(path, cursor, unsaved, options, doc)
+ return doc
+ end
+
+ def dispose(doc)
+ end
+ end
+
+ class Document < DBus::Object
+ dbus_interface 'org.gnome.CodeAssist.Document' do
+ end
+
+ def self.extended_modules
+ (class << self; self end).included_modules
+ end
+
+ def initialize(*args)
+ end
+
+ def self.new(path, *args)
+ obj = self.allocate
+
+ DBus::Object.instance_method(:initialize).bind(obj).call(path)
+ self.instance_method(:initialize).bind(obj).call(*args)
+
+ obj
+ end
+ end
+
+ module Services
+ module Diagnostics
+ def self.extended(base)
+ base.instance_eval do
+ dbus_interface 'org.gnome.CodeAssist.Diagnostics' do
+ dbus_method :Diagnostics, "out diagnostics:a(ua((x(xx)(xx))s)a(x(xx)(xx))s)" do
+ return [diagnostics.collect { |d| d.to_tuple }]
+ end
+ end
+ end
+ end
+ end
+ end
+
+ class Server < DBus::Object
+ class App
+ attr_accessor :id, :name, :docs, :ids, :nextid, :service
+
+ def initialize
+ @id = 0
+ @name = ''
+ @docs = {}
+ @ids = {}
+ @nextid = 0
+ @service = nil
+ end
+ end
+
+ dbus_interface 'org.gnome.CodeAssist.Service' do
+ dbus_method :SupportedServices, "out services:as" do
+ app(@sender)
+
+ [ services]
+ end
+
+ dbus_method :Parse, "in path:s, in cursor:t, in unsaved:a(ss), in options:a{sv}, out document:o"
do |path, cursor, unsaved, options|
+ begin
+ return parse(path, cursor, unsaved, options)
+ rescue Exception => e
+ p e
+ raise
+ end
+ end
+
+ dbus_method :Dispose, "in path:s" do |path|
+ a = app(@sender)
+
+ if a.ids.include?(path)
+ id = a.ids[path]
+ dispose_document(a.docs[id])
+
+ a.docs.delete(id)
+ a.ids.delete(path)
+
+ if a.ids.length == 0
+ dispose_app(@sender)
+ end
+ end
+ end
+ end
+
+ def initialize(bus, name, path, service, document)
+ super(path)
+
+ @apps = {}
+ @nextid = 0
+
+ @bus = bus
+ @server = @bus.request_service(name)
+ @appservice = service
+ @document = document
+
+ extract_services
+
+ @server.export(self)
+
+ dbus_service = @bus.service('org.freedesktop.DBus')
+ dbus = dbus_service.object('/org/freedesktop/DBus')
+ dbus.default_iface = 'org.freedesktop.DBus'
+ dbus.introspect
+
+ dbus.on_signal('NameOwnerChanged') do |_, oldname, newname|
+ if newname.empty?
+ dispose_app(oldname)
+ end
+ end
+ end
+
+ def parse(path, cursor, unsaved, options)
+ a = app(@sender)
+ doc = nil
+
+ if a.ids.include?(path)
+ docid = a.ids[path]
+ doc = a.docs[docid]
+ end
+
+ unsaved = unsaved.collect{ |u| UnsavedDocument.new(u[0], u[1]) }
+ doc = a.service.parse(path, cursor, unsaved, options, doc)
+
+ if doc == nil
+ raise DBus::Error.new("Failed to parse document")
+ end
+
+ unless a.ids.include?(path)
+ docid = a.nextid
+
+ a.ids[path] = docid
+ a.docs[docid] = doc
+
+ @server.export(doc)
+ a.nextid += 1
+ end
+
+ return [doc.path]
+ end
+
+ def document_path(a, docid)
+ "#{ path}/#{a.id}/documents/#{docid}"
+ end
+
+ def dispose_document(a, doc)
+ a.service.dispose(doc)
+ @server.unexport(doc)
+ end
+
+ def dispose_app(appid)
+ if @apps.include?(appid)
+ a = @apps[appid]
+
+ a.docs.each do |docid, doc|
+ dispose_document(a, doc)
+ end
+
+ @apps.delete(appid)
+
+ if @apps.length == 0
+ exit(0)
+ end
+ end
+ end
+
+ def app(appid)
+ unless @apps.include?(appid)
+ a = App.new()
+ a.id = @nextid
+ a.name = appid
+
+ a.service = @appservice.new(a.id, a.name, Proc.new do |*args|
+ @document.new(document_path(a, a.nextid), *args)
+ end)
+
+ @apps[a.name] = a
+ @nextid += 1
+
+ return a
+ end
+
+ return @apps[appid]
+ end
+
+ def dispatch(msg)
+ @sender = msg.sender
+ super(msg)
+ end
+
+ def extract_services
+ @services = ['org.gnome.CodeAssist.Document']
+
+ ex = @document.extended_modules
+
+ Services.constants.each do |s|
+ if ex.include?(Services.const_get(s))
+ @services << 'org.gnome.CodeAssist.' + s.to_s()
+ end
+ end
+ end
+ end
+
+ class Transport
+ def initialize(service, document)
+ @bus = DBus::SessionBus.instance
+
+ name = 'org.gnome.CodeAssist.' + service.language
+ path = '/org/gnome/CodeAssist/' + service.language
+
+ @server = Server.new(@bus, name, path, service, document)
+ end
+
+ def run
+ main = DBus::Main.new
+ main << @bus
+ main.run
+ end
+ end
+end
+
+# vi:ts=4:et
diff --git a/backends/rbcommon/gnome/codeassistance/types.rb b/backends/rbcommon/gnome/codeassistance/types.rb
new file mode 100644
index 0000000..6028f45
--- /dev/null
+++ b/backends/rbcommon/gnome/codeassistance/types.rb
@@ -0,0 +1,131 @@
+# gnome code assistance common ruby
+# Copyright (C) 2013 Jesse van den Kieboom <jessevdk gnome org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+module Gnome; end
+
+module Gnome::CodeAssistance
+ class UnsavedDocument
+ attr_accessor :path, :data_path
+
+ def initialize(path='', data_path='')
+ @path = path
+ @data_path = data_path
+ end
+
+ def to_s
+ "<UnsavedDocument: #{ path}, #{ data_path}>"
+ end
+ end
+
+ class SourceLocation
+ attr_accessor :line, :column
+
+ def initialize(line=0, column=0)
+ @line = line
+ @column = column
+ end
+
+ def to_s
+ "#{ line} #{@column}"
+ end
+
+ def to_range(file=0)
+ s = SourceLocation.new(@line, @column)
+ e = SourceLocation.new(@line, @column + 1)
+
+ SourceRange.new(file, s, e)
+ end
+
+ def to_tuple
+ return [ line, @column]
+ end
+ end
+
+ class SourceRange
+ attr_accessor :file, :start, :end
+
+ def initialize(file=0, s=SourceLocation.new(), e=None)
+ @file = file
+ @start = s
+ @end = e
+
+ if e == nil
+ @end = s
+ end
+ end
+
+ def to_s
+ "#{ start}-#{@end}"
+ end
+
+ def to_range
+ self
+ end
+
+ def to_tuple
+ return [ file, @start.to_tuple, @end.to_tuple]
+ end
+ end
+
+ class Fixit
+ attr_accessor :location, :replacement
+
+ def initialize(location=SourceRange.new, replacement='')
+ @location = location
+ @replacement = replacement
+ end
+
+ def to_s
+ "<Fixit: #{ location}: #{ replacement}"
+ end
+
+ def to_tuple
+ return [ location to_tuple(), @replacement]
+ end
+ end
+
+ class Diagnostic
+ module Severity
+ NONE = 0
+ INFO = 1
+ WARNING = 2
+ DEPRECATED = 3
+ ERROR = 4
+ FATAL = 5
+ end
+
+ def initialize(severity=Severity::NONE, fixits=[], locations=[], message='')
+ @severity = severity
+ @fixits = fixits
+ @locations = locations
+ @message = message
+ end
+
+ def to_s
+ "<Diagnostic: #{ severity}, #{ fixits}, #{ locations}, #{ message}>"
+ end
+
+ def to_tuple
+ fixits = @fixits.collect { |f| f.to_tuple }
+ locations = @locations.collect { |l| l.to_tuple }
+
+ return [ severity, fixits, locations, @message]
+ end
+ end
+end
+
+# ex:ts=4:et:
diff --git a/backends/ruby/Makefile.am b/backends/ruby/Makefile.am
new file mode 100644
index 0000000..cabdf67
--- /dev/null
+++ b/backends/ruby/Makefile.am
@@ -0,0 +1,14 @@
+rubybackenddir = $(GCA_RBBACKENDS_DIR)/ruby
+rubybackend_DATA = \
+ backends/ruby/app.rb \
+ backends/ruby/parser.rb
+
+rubybackendexecdir = $(GCA_BACKENDS_EXEC_DIR)
+rubybackendexec_SCRIPTS = \
+ backends/ruby/ruby
+
+rubybackendservicedir = $(datadir)/dbus-1/services
+rubybackendservice_DATA = \
+ backends/ruby/org.gnome.CodeAssist.ruby.service
+
+GITIGNOREDEPS += backends/ruby/Makefile.am
diff --git a/backends/ruby/app.rb b/backends/ruby/app.rb
new file mode 100644
index 0000000..a146203
--- /dev/null
+++ b/backends/ruby/app.rb
@@ -0,0 +1,70 @@
+# gnome code assistance ruby backend
+# Copyright (C) 2013 Jesse van den Kieboom <jessevdk gnome org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+require 'gnome/codeassistance/transport'
+require 'gnome/codeassistance/ruby/parser'
+
+module Gnome::CodeAssistance::Ruby
+ class Service < Gnome::CodeAssistance::Service
+ @language = 'ruby'
+
+ def parse(path, cursor, unsaved, options, doc)
+ dp = data_path(path, unsaved)
+
+ f = File.new(dp, 'r')
+
+ if doc == nil
+ doc = new_document
+ end
+
+ begin
+ Parser.parse(f, path)
+ rescue Parser::ParseError => e
+ doc.errors = e.errors.collect { |e| make_diagnostic(e) }
+ end
+
+ return doc
+ end
+
+ def make_diagnostic(e)
+ loc = Gnome::CodeAssistance::SourceLocation.new(e.line, e.column)
+ Gnome::CodeAssistance::Diagnostic.new(Gnome::CodeAssistance::Diagnostic::Severity::ERROR, [],
[loc.to_range], e.message)
+ end
+ end
+
+ class Document < Gnome::CodeAssistance::Document
+ extend Gnome::CodeAssistance::Services::Diagnostics
+
+ attr_accessor :errors
+
+ def initialize
+ @errors = []
+ end
+
+ def diagnostics
+ @errors
+ end
+ end
+
+ class Application
+ def self.run()
+ Gnome::CodeAssistance::Transport.new(Service, Document).run()
+ end
+ end
+end
+
+# ex:ts=4:et:
diff --git a/backends/ruby/org.gnome.CodeAssist.ruby.service.in
b/backends/ruby/org.gnome.CodeAssist.ruby.service.in
new file mode 100644
index 0000000..d1a26c2
--- /dev/null
+++ b/backends/ruby/org.gnome.CodeAssist.ruby.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.CodeAssist.ruby
+Exec= backendexecdir@/ruby --transport dbus
diff --git a/backends/ruby/parser.rb b/backends/ruby/parser.rb
new file mode 100644
index 0000000..7e999e8
--- /dev/null
+++ b/backends/ruby/parser.rb
@@ -0,0 +1,103 @@
+# gnome code assistance ruby backend
+# Copyright (C) 2013 Jesse van den Kieboom <jessevdk gnome org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+require 'ripper'
+
+module Gnome::CodeAssistance::Ruby
+ class Parser < Ripper
+ class Error
+ attr_accessor :line, :column, :message
+
+ def initialize(line, column, message)
+ @line = line
+ @column = column
+ @message = message
+ end
+
+ def to_s
+ "#{line}.#{column}: #{message}"
+ end
+ end
+
+ class ParseError < StandardError
+ attr_accessor :errors
+
+ def initialize(errors)
+ @errors = errors
+
+ super(to_s)
+ end
+
+ def to_s
+ @errors.collect { |x| x.to_s }.join("\n")
+ end
+ end
+
+ attr_reader :errors
+
+ def initialize(*args)
+ super
+
+ @errors = []
+ end
+
+ def parse(*args)
+ ret = super
+
+ if @errors.length != 0
+ raise ParseError.new(@errors)
+ end
+
+ return ret
+ end
+
+ def add_error(message)
+ @errors << Error.new(lineno, column, message)
+ end
+
+ def on_alias_error(varname)
+ # Happens when you try to alias towards a $n variable (e.g. alias $FOO = $1)
+ add_error("cannot alias #{varname} to number variables")
+ super
+ end
+
+ def on_assign_error(varname)
+ # Happens when assignment cannot happen (e.g. $` = 1)
+ add_error("cannot assign to #{varname}")
+ super
+ end
+
+ def on_class_name_error(classname)
+ # Happens when a class name is invalid (e.g. class foo; end)
+ add_error("invalid class name #{classname}")
+ super
+ end
+
+ def on_param_error(name)
+ # Happens when a parameter name is invalid (e.g. def foo(A); end)
+ add_error("invalid parameter name #{name}")
+ super
+ end
+
+ def on_parse_error(message)
+ add_error(message)
+ super
+ end
+ end
+end
+
+# vi:ts=4:et
diff --git a/backends/ruby/ruby.in b/backends/ruby/ruby.in
new file mode 100644
index 0000000..2550b97
--- /dev/null
+++ b/backends/ruby/ruby.in
@@ -0,0 +1,6 @@
+#!/usr/bin/env @RUBY_BASE@
+
+$:.unshift('@GCA_RBBACKENDS_ROOT_EX@')
+
+require 'gnome/codeassistance/ruby/app'
+Gnome::CodeAssistance::Ruby::Application.run()
diff --git a/configure.ac b/configure.ac
index cd5c0d9..8e3cb65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,6 +224,71 @@ color_enable_var("$enable_python", [enable_python_msg])
AM_CONDITIONAL(BACKENDS_PYTHON_ENABLE, test "x$enable_python" = "xyes")
+dnl ================================================================
+dnl ruby support
+dnl ================================================================
+AC_PATH_PROGS([RUBY],[ruby2.0 ruby1.9.3 ruby1.9.2 ruby1.9.1 ruby])
+
+if test "x$RUBY" != "x"; then
+ AC_MSG_CHECKING([ruby dbus])
+ $RUBY -rdbus -e '' 2>/dev/null
+ if test $? -ne 0 ; then
+ AC_MSG_RESULT([no])
+ RUBY=
+ else
+ AC_MSG_RESULT([yes])
+ fi
+fi
+
+AM_CONDITIONAL(RUBY_ENABLE, test "x$RUBY" != "x")
+
+
+
+dnl ================================================================
+dnl ruby backend configuration
+dnl ================================================================
+AC_ARG_ENABLE([ruby],
+ AS_HELP_STRING([--enable-ruby],[enable ruby backend]),
+ [enable_ruby=$enableval],
+ [enable_ruby=auto])
+
+AC_MSG_CHECKING([ruby backend])
+
+ruby_ripper=no
+
+if test "x$RUBY" != "x"; then
+ $RUBY -rripper -e '' 2>/dev/null
+ if test $? -eq 0 ; then
+ ruby_ripper=yes
+ fi
+fi
+
+RUBY_BASE=`basename "$RUBY"`
+AC_SUBST(RUBY_BASE)
+
+if test "x$enable_ruby" = "xauto"; then
+ if test "x$RUBY" = "x" || test "x$ruby_ripper" = "x"; then
+ AC_MSG_RESULT([no (requires ruby 2.0)])
+ enable_ruby=no
+ else
+ AC_MSG_RESULT([yes])
+ enable_ruby=yes
+ fi
+elif test "x$enable_ruby" != "xno"; then
+ if test "x$RUBY" = "x" || test "x$ruby_ripper" = "x"; then
+ AC_MSG_ERROR([no (requires ruby 2.0)])
+ else
+ AC_MSG_RESULT([yes])
+ enable_ruby=yes
+ fi
+else
+ AC_MSG_RESULT([no])
+fi
+
+color_enable_var("$enable_ruby", [enable_ruby_msg])
+
+AM_CONDITIONAL(BACKENDS_RUBY_ENABLE, test "x$enable_ruby" = "xyes")
+
dnl ================================================================
dnl xml backend configuration
@@ -347,6 +412,8 @@ AC_SUBST(GCA_BACKENDS_DIR)
adl_RECURSIVE_EVAL("$GCA_BACKENDS_DIR", [GCA_BACKENDS_DIR_EX])
AC_SUBST(GCA_BACKENDS_DIR_EX)
+
+dnl python backends
GCA_PYBACKENDS_ROOT="$GCA_BACKENDS_DIR/py"
AC_SUBST(GCA_PYBACKENDS_ROOT)
@@ -360,6 +427,20 @@ adl_RECURSIVE_EVAL("$GCA_PYBACKENDS_DIR", [GCA_PYBACKENDS_DIR_EX])
AC_SUBST(GCA_PYBACKENDS_DIR_EX)
+dnl ruby backends
+GCA_RBBACKENDS_ROOT="$GCA_BACKENDS_DIR/rb"
+AC_SUBST(GCA_RBBACKENDS_ROOT)
+
+adl_RECURSIVE_EVAL("$GCA_RBBACKENDS_ROOT", [GCA_RBBACKENDS_ROOT_EX])
+AC_SUBST(GCA_RBBACKENDS_ROOT_EX)
+
+GCA_RBBACKENDS_DIR="$GCA_RBBACKENDS_ROOT/gnome/codeassistance"
+AC_SUBST(GCA_RBBACKENDS_DIR)
+
+adl_RECURSIVE_EVAL("$GCA_RBBACKENDS_DIR", [GCA_RBBACKENDS_DIR_EX])
+AC_SUBST(GCA_RBBACKENDS_DIR_EX)
+
+
AC_CONFIG_FILES([
Makefile
clients/gedit/data/codeassistance.plugin
@@ -369,6 +450,8 @@ backends/c/config.py
backends/c/c
backends/python/org.gnome.CodeAssist.python.service
backends/python/python
+backends/ruby/org.gnome.CodeAssist.ruby.service
+backends/ruby/ruby
backends/xml/org.gnome.CodeAssist.xml.service
backends/xml/xml
backends/vala/org.gnome.CodeAssist.vala.service
@@ -392,6 +475,7 @@ Configuration:
xml: $enable_xml_msg
vala: $enable_vala_msg
go: $enable_go_msg
+ ruby: $enable_ruby_msg
clients:
gedit: $enable_gedit_msg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]