From 3b8b70b1a732ebc9f70be803e643ff3639772667 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 13 Sep 2013 18:14:28 +0200 Subject: [PATCH] Remove unused Ruby files --- .../webapp/WEB-INF/lib/sonar_rdoc_template.rb | 587 ------------------ .../main/webapp/WEB-INF/lib/tasks/jdbc.rake | 79 --- 2 files changed, 666 deletions(-) delete mode 100644 sonar-server/src/main/webapp/WEB-INF/lib/sonar_rdoc_template.rb delete mode 100644 sonar-server/src/main/webapp/WEB-INF/lib/tasks/jdbc.rake diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/sonar_rdoc_template.rb b/sonar-server/src/main/webapp/WEB-INF/lib/sonar_rdoc_template.rb deleted file mode 100644 index 24fc9b31217..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/lib/sonar_rdoc_template.rb +++ /dev/null @@ -1,587 +0,0 @@ -module RDoc -module Page - -FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif" - -STYLE = < pre { -padding: 0.5em; -border: 1px dotted black; -background: #FFE; -} - -CSS - -XHTML_PREAMBLE = %{ - -} - -HEADER = XHTML_PREAMBLE + < - -%title% - - - - - - - -ENDHEADER - -FILE_PAGE = < - - - - -
File
%short_name%
- - - - - - - - - -
Path:%full_path% -IF:cvsurl - (CVS) -ENDIF:cvsurl -
Modified:%dtm_modified%
-
- -
-HTML - -################################################################### - -CLASS_PAGE = < -%classmod%
%full_name% - - - - - - -IF:parent - - - - -ENDIF:parent -
In: -START:infiles -HREF:full_path_url:full_path: -IF:cvsurl - (CVS) -ENDIF:cvsurl -END:infiles -
Parent: -IF:par_url - -ENDIF:par_url -%parent% -IF:par_url - -ENDIF:par_url -
- - - -HTML - -################################################################### - -METHOD_LIST = < -IF:diagram -
-%diagram% -
-ENDIF:diagram - -IF:description -
%description%
-ENDIF:description - -IF:requires -
Required Files
-
    -START:requires -
  • HREF:aref:name:
  • -END:requires -
-ENDIF:requires - -IF:toc -
Contents
- -ENDIF:toc - -IF:methods -
Methods
-
    -START:methods -
  • HREF:aref:name:
  • -END:methods -
-ENDIF:methods - -IF:includes -
Included Modules
-
    -START:includes -
  • HREF:aref:name:
  • -END:includes -
-ENDIF:includes - -START:sections -IF:sectitle - -IF:seccomment -
-%seccomment% -
-ENDIF:seccomment -ENDIF:sectitle - -IF:classlist -
Classes and Modules
-%classlist% -ENDIF:classlist - -IF:constants -
Constants
- -START:constants - - - - - -IF:desc - - - - -ENDIF:desc -END:constants -
%name%=%value%
 %desc%
-ENDIF:constants - -IF:attributes -
Attributes
- -START:attributes - - - - - -END:attributes -
-IF:rw -[%rw%] -ENDIF:rw -%name%%a_desc%
-ENDIF:attributes - -IF:method_list -START:method_list -IF:methods -
%type% %category% methods
-START:methods -
-
-IF:callseq -%callseq% -ENDIF:callseq -IFNOT:callseq -%name%%params% -ENDIF:callseq -IF:codeurl -[ source ] -ENDIF:codeurl -
-IF:m_desc -
-%m_desc% -
-ENDIF:m_desc -IF:aka -
-This method is also aliased as -START:aka -%name% -END:aka -
-ENDIF:aka -IF:sourcecode -
- -
-
-%sourcecode%
-
-
-
-ENDIF:sourcecode -
-END:methods -ENDIF:methods -END:method_list -ENDIF:method_list -END:sections - -HTML - -FOOTER = < - -ENDFOOTER - -BODY = HEADER + < - -
-#{METHOD_LIST} -
- -#{FOOTER} -ENDBODY - -########################## Source code ########################## - -SRC_PAGE = XHTML_PREAMBLE + < -%title% - - - - -
%code%
- - -HTML - -########################## Index ################################ - -FR_INDEX_BODY = < - - - - - - - -
-START:entries -%name%
-END:entries -
- -HTML - -CLASS_INDEX = FILE_INDEX -METHOD_INDEX = FILE_INDEX - -INDEX = XHTML_PREAMBLE + < - -%title% - - - - - - - -IF:inline_source - -ENDIF:inline_source -IFNOT:inline_source - - - - -ENDIF:inline_source - -<body bgcolor="white"> -Click <a href="html/index.html">here</a> for a non-frames -version of this page. -</body> - - - - -HTML - -end -end \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/tasks/jdbc.rake b/sonar-server/src/main/webapp/WEB-INF/lib/tasks/jdbc.rake deleted file mode 100644 index 602b938001c..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/lib/tasks/jdbc.rake +++ /dev/null @@ -1,79 +0,0 @@ -def redefine_task(*args, &block) - task_name = Hash === args.first ? args.first.keys[0] : args.first - existing_task = Rake.application.lookup task_name - if existing_task - class << existing_task; public :instance_variable_set; end - existing_task.instance_variable_set "@prerequisites", FileList[] - existing_task.instance_variable_set "@actions", [] - end - task(*args, &block) -end - -namespace :db do - redefine_task :create => :environment do - create_database(ActiveRecord::Base.configurations[RAILS_ENV]) - end - - # hack to make the task work class must be commented to avoid a bug with rake - #class << self; alias_method :previous_create_database, :create_database; end - def create_database(config) - begin - ActiveRecord::Base.establish_connection(config) - ActiveRecord::Base.connection - rescue - begin - url = config['url'] - if url - if url =~ /^(.*\/)/ - url = $1 - end - end - - ActiveRecord::Base.establish_connection(config.merge({'database' => nil, 'url' => url})) - ActiveRecord::Base.connection.create_database(config['database']) - ActiveRecord::Base.establish_connection(config) - rescue - previous_create_database(config) - end - end - end - - redefine_task :drop => :environment do - config = ActiveRecord::Base.configurations[RAILS_ENV] - begin - ActiveRecord::Base.establish_connection(config) - db = ActiveRecord::Base.connection.database_name - ActiveRecord::Base.connection.drop_database(db) - rescue - drop_database(config) - end - end - - namespace :structure do - redefine_task :dump => :environment do - abcs = ActiveRecord::Base.configurations - ActiveRecord::Base.establish_connection(abcs[RAILS_ENV]) - File.open("db/#{RAILS_ENV}_structure.sql", "w+") { |f| f << ActiveRecord::Base.connection.structure_dump } - if ActiveRecord::Base.connection.supports_migrations? - File.open("db/#{RAILS_ENV}_structure.sql", "a") { |f| f << ActiveRecord::Base.connection.dump_schema_information } - end - end - end - namespace :test do - redefine_task :clone_structure => [ "db:structure:dump", "db:test:purge" ] do - abcs = ActiveRecord::Base.configurations - ActiveRecord::Base.establish_connection(:test) - ActiveRecord::Base.connection.execute('SET foreign_key_checks = 0') if abcs["test"]["adapter"] =~ /mysql/i - IO.readlines("db/#{RAILS_ENV}_structure.sql").join.split(";\n\n").each do |ddl| - ActiveRecord::Base.connection.execute(ddl) - end - end - - redefine_task :purge => :environment do - abcs = ActiveRecord::Base.configurations - ActiveRecord::Base.establish_connection(:test) - db = ActiveRecord::Base.connection.database_name - ActiveRecord::Base.connection.recreate_database(db) - end - end -end -- 2.39.5