diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-02-04 10:42:21 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-02-04 10:42:21 +0100 |
commit | a14a0644c2a27ddec22f23925578a40aa6fa8302 (patch) | |
tree | aa5c078cc8ec7c4e2020960ad9a343fb7e79a16c /sonar-server/src/main/webapp | |
parent | 0f44a42b85093a3dcef64b52f6e15337b119ec88 (diff) | |
download | sonarqube-a14a0644c2a27ddec22f23925578a40aa6fa8302.tar.gz sonarqube-a14a0644c2a27ddec22f23925578a40aa6fa8302.zip |
Upgrade copyright headers
Diffstat (limited to 'sonar-server/src/main/webapp')
228 files changed, 1457 insertions, 1457 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb index ff16ea8ce3f..340ce2bfc3a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb index 41f3f2c2e69..d57f4dd806b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb index e7654f7fdc7..8ac69071732 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb index 487b371d866..19bc6c75c92 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb index 999af3c8901..709b7d103fe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb index 19accdd5ec0..cfbb9bc07f0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb index 89d22f6002d..c91ad4b2445 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb index 55729ce6829..e22c280a179 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb index e2d2a42bbe0..4d119778824 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb index 9bf22ae9c0d..6e1c880d968 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb index 2572296030d..c1ce7058cd9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb index 4d28149b5b1..e0beb3c8233 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb index 89b78929d1b..0f854e084ee 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb index 45e161969bb..2db651e784c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb index 2daf8b9d568..a7e01d541d0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb index c073a69d793..814ba1c9950 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb index e3d78fba99f..0d9a4bb5394 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb @@ -1,99 +1,99 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-require 'fastercsv'
-require "json"
-
-class Api::RulesController < Api::RestController
-
- def rest_call
- set_backward_compatibility_params
- language = params[:language] || ''
- options= {}
-
- options[:plugins]=params[:plugins].split(',') if params[:plugins]
- options[:language]=language
- options[:priorities]=params[:priorities].split(',') if params[:priorities]
- options[:status]=params[:status]
- options[:searchtext]=params[:searchtext]
- options[:include_parameters]=true
- options[:inheritance]=params[:inheritance]
-
-
- if params[:profile]
- profile = Profile.find_by_name_and_language(params[:profile], language)
- if profile.nil?
- rest_render([])
- else
- options[:profile]=profile
- rules = Rule.search(java_facade, options)
- rest_render(rules, profile)
- end
- else
- rules = Rule.search(java_facade, options)
- rest_render(rules)
- end
- end
-
- def set_backward_compatibility_params
- params[:plugins]=params[:plugin] if params[:plugin]
- params[:priorities]=params[:levels] if params[:levels]
- end
-
-
- private
-
- def rest_render(rules=[], profile=nil)
- respond_to do |format|
- format.json{ render :json => rest_to_json(rules, profile) }
- format.xml { render :xml => rest_to_xml(rules, profile) }
- format.csv {
- send_data(rest_to_csv(rules, profile),
- :type => 'text/csv; charset=utf-8; header=present',
- :disposition => 'attachment; filename=rules.csv')
- }
- end
- end
-
- def rest_to_json(rules, profile)
- JSON(rules.collect{|rule| rule.to_hash_json(profile)})
- end
-
- def rest_to_xml(rules, profile)
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
- xml.rules do
- rules.each do |rule|
- xml << rule.to_xml(profile)
- end
- end
- end
-
- def rest_to_csv(rules, profile)
- FasterCSV.generate do |csv|
- header = ["title", "key", "plugin"]
- header.concat(["priority","status"]) if profile
- csv << header
- rules.each do |rule|
- csv << rule.to_csv(profile)
- end
- end
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +require 'fastercsv' +require "json" + +class Api::RulesController < Api::RestController + + def rest_call + set_backward_compatibility_params + language = params[:language] || '' + options= {} + + options[:plugins]=params[:plugins].split(',') if params[:plugins] + options[:language]=language + options[:priorities]=params[:priorities].split(',') if params[:priorities] + options[:status]=params[:status] + options[:searchtext]=params[:searchtext] + options[:include_parameters]=true + options[:inheritance]=params[:inheritance] + + + if params[:profile] + profile = Profile.find_by_name_and_language(params[:profile], language) + if profile.nil? + rest_render([]) + else + options[:profile]=profile + rules = Rule.search(java_facade, options) + rest_render(rules, profile) + end + else + rules = Rule.search(java_facade, options) + rest_render(rules) + end + end + + def set_backward_compatibility_params + params[:plugins]=params[:plugin] if params[:plugin] + params[:priorities]=params[:levels] if params[:levels] + end + + + private + + def rest_render(rules=[], profile=nil) + respond_to do |format| + format.json{ render :json => rest_to_json(rules, profile) } + format.xml { render :xml => rest_to_xml(rules, profile) } + format.csv { + send_data(rest_to_csv(rules, profile), + :type => 'text/csv; charset=utf-8; header=present', + :disposition => 'attachment; filename=rules.csv') + } + end + end + + def rest_to_json(rules, profile) + JSON(rules.collect{|rule| rule.to_hash_json(profile)}) + end + + def rest_to_xml(rules, profile) + xml = Builder::XmlMarkup.new(:indent => 0) + xml.instruct! + xml.rules do + rules.each do |rule| + xml << rule.to_xml(profile) + end + end + end + + def rest_to_csv(rules, profile) + FasterCSV.generate do |csv| + header = ["title", "key", "plugin"] + header.concat(["priority","status"]) if profile + csv << header + rules.each do |rule| + csv << rule.to_csv(profile) + end + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb index d8ac970bcb0..00d93e56597 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb index 23b4df1405a..4dff8559b9a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb @@ -1,66 +1,66 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-
-require "json"
-
-class Api::SourcesController < Api::RestController
-
- def rest_call
- resource_id=params[:resource]
- if resource_id
- @resource=Project.by_key(resource_id)
- if @resource.nil?
- rest_status_ko("Resource [#{resource_id}] not found", 404)
- return
- end
- end
- return access_denied unless has_role?(:codeviewer, @resource)
-
- source = @resource.last_snapshot.source
- if !source
- rest_status_ko("Resource [#{@resource.id}] has no sources", 404)
- else
- #optimization
- #source.snapshot.project=@resource
- rest_render({:source => source, :params => params})
- end
- end
-
- def rest_to_json(objects)
- source = objects[:source]
- params = objects[:params]
- JSON([source.to_hash_json(params)])
- end
-
- def rest_to_xml(objects)
- source = objects[:source]
- params = objects[:params]
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
- source.to_xml(xml, params)
- end
-
- def rest_to_text(objects)
- source = objects[:source]
- params = objects[:params]
- source.to_txt(params)
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +require "json" + +class Api::SourcesController < Api::RestController + + def rest_call + resource_id=params[:resource] + if resource_id + @resource=Project.by_key(resource_id) + if @resource.nil? + rest_status_ko("Resource [#{resource_id}] not found", 404) + return + end + end + return access_denied unless has_role?(:codeviewer, @resource) + + source = @resource.last_snapshot.source + if !source + rest_status_ko("Resource [#{@resource.id}] has no sources", 404) + else + #optimization + #source.snapshot.project=@resource + rest_render({:source => source, :params => params}) + end + end + + def rest_to_json(objects) + source = objects[:source] + params = objects[:params] + JSON([source.to_hash_json(params)]) + end + + def rest_to_xml(objects) + source = objects[:source] + params = objects[:params] + xml = Builder::XmlMarkup.new(:indent => 0) + xml.instruct! + source.to_xml(xml, params) + end + + def rest_to_text(objects) + source = objects[:source] + params = objects[:params] + source.to_txt(params) + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb index d795f6bfddd..e0e710a3b74 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb index 03f9e53daa7..329d681338c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb index c07628d67c8..e90f6cc9c20 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb index e8b62eafa90..d114af18ba4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb @@ -1,100 +1,100 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-
-require "json"
-
-class Api::ViolationsController < Api::ResourceRestController
-
- def rest_call
- snapshot = @resource.last_snapshot
-
- conditions=[]
- values={}
- if params['scopes']
- conditions << 'snapshots.scope in (:scopes)'
- values[:scopes]=params['scopes'].split(',')
- end
- if params['qualifiers']
- conditions << 'snapshots.qualifier in (:qualifiers)'
- values[:qualifiers]=params['qualifiers'].split(',')
- end
-
- depth=(params['depth'] ? params['depth'].to_i : 0)
- if depth==0
- conditions << 'snapshots.id=:sid'
- values[:sid]=snapshot.id
-
- elsif depth>0
- # all the resource tree
- conditions << 'snapshots.root_snapshot_id=:root_sid'
- values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)
-
- conditions << 'snapshots.path LIKE :path'
- values[:path]="#{snapshot.path}#{snapshot.id}.%"
-
- conditions << 'snapshots.depth=:depth'
- values[:depth] = snapshot.depth + depth
-
- else
- # negative : all the resource tree
- conditions << '(snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))'
- values[:sid] = snapshot.id
- values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)
- values[:path]="#{snapshot.path}#{snapshot.id}.%"
- end
-
- if params[:rules]
- rule_ids=params[:rules].split(',').map do |key_or_id|
- Rule.to_i(key_or_id)
- end.compact
- conditions << 'rule_id IN (:rule_ids)'
- values[:rule_ids] = rule_ids
- end
- if params[:priorities]
- conditions << 'rule_failures.failure_level IN (:priorities)'
- values[:priorities]=params[:priorities].split(',').map do |p|
- Sonar::RulePriority.id(p)
- end.compact
- end
-
- limit = (params[:limit] ? [params[:limit].to_i,5000].min : 5000)
- violations = RuleFailure.find(:all,
- :conditions => [ conditions.join(' AND '), values],
- :include => [:snapshot, {:snapshot => :project}, :rule],
- :order => 'rule_failures.failure_level DESC',
- :limit => limit)
- rest_render(violations)
- end
-
- def rest_to_json(rule_failures)
- JSON(rule_failures.collect{|rule_failure| rule_failure.to_hash_json})
- end
-
- def rest_to_xml(rule_failures)
- xml = Builder::XmlMarkup.new(:indent => 0)
- xml.instruct!
- xml.violations do
- rule_failures.each do |rule_failure|
- rule_failure.to_xml(xml)
- end
- end
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +require "json" + +class Api::ViolationsController < Api::ResourceRestController + + def rest_call + snapshot = @resource.last_snapshot + + conditions=[] + values={} + if params['scopes'] + conditions << 'snapshots.scope in (:scopes)' + values[:scopes]=params['scopes'].split(',') + end + if params['qualifiers'] + conditions << 'snapshots.qualifier in (:qualifiers)' + values[:qualifiers]=params['qualifiers'].split(',') + end + + depth=(params['depth'] ? params['depth'].to_i : 0) + if depth==0 + conditions << 'snapshots.id=:sid' + values[:sid]=snapshot.id + + elsif depth>0 + # all the resource tree + conditions << 'snapshots.root_snapshot_id=:root_sid' + values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id) + + conditions << 'snapshots.path LIKE :path' + values[:path]="#{snapshot.path}#{snapshot.id}.%" + + conditions << 'snapshots.depth=:depth' + values[:depth] = snapshot.depth + depth + + else + # negative : all the resource tree + conditions << '(snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))' + values[:sid] = snapshot.id + values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id) + values[:path]="#{snapshot.path}#{snapshot.id}.%" + end + + if params[:rules] + rule_ids=params[:rules].split(',').map do |key_or_id| + Rule.to_i(key_or_id) + end.compact + conditions << 'rule_id IN (:rule_ids)' + values[:rule_ids] = rule_ids + end + if params[:priorities] + conditions << 'rule_failures.failure_level IN (:priorities)' + values[:priorities]=params[:priorities].split(',').map do |p| + Sonar::RulePriority.id(p) + end.compact + end + + limit = (params[:limit] ? [params[:limit].to_i,5000].min : 5000) + violations = RuleFailure.find(:all, + :conditions => [ conditions.join(' AND '), values], + :include => [:snapshot, {:snapshot => :project}, :rule], + :order => 'rule_failures.failure_level DESC', + :limit => limit) + rest_render(violations) + end + + def rest_to_json(rule_failures) + JSON(rule_failures.collect{|rule_failure| rule_failure.to_hash_json}) + end + + def rest_to_xml(rule_failures) + xml = Builder::XmlMarkup.new(:indent => 0) + xml.instruct! + xml.violations do + rule_failures.each do |rule_failure| + rule_failure.to_xml(xml) + end + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb index 830fbde36b6..cc87fe0dc86 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb index 93a3a94adac..61f6c9748c8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb index 7724a16a5fd..69e07954865 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb index 96849e2bf03..4114927a77e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb index 737936ab11c..f70f303af8b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb index c56dab9ba68..38afc36f524 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index 6379054c6b8..86dcb004482 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb index 4fcc2dbf621..7eb59a26328 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb index 7f1e27281b6..5462e264960 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb index 82d3cf4a8f9..31a1eb4175c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb index 4c232f9bc49..d4f030e2651 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb index 7f67c4035d4..e96f30a6db8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb index 1387add3e79..0b1110c0448 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb index 30cc0c01038..0522b63a718 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb index 6bf27fa6d26..f2efd7b09f1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb index 29af2b1c3a9..9d89aa58a7b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb index 11d82ad57cd..8869b59a5ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb index e0dc56cd941..d206ed13d0b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb index 967f482213d..f5ea76a519d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb index 6225668b563..59ce20ce328 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb index 05aae87c7bf..83ad7be1879 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index 30ea3658d13..9121feb7e60 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 1cbe2a1c06a..cb68a4218cb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb index 234cfa27c90..4ae8ae62694 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb index 67e94f7aba7..d7500963952 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb index fa9563cd03a..b420f46502a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb index e85524a7c75..291a95f217b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb @@ -1,348 +1,348 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-require 'cgi'
-
-class RulesConfigurationController < ApplicationController
-
- SECTION=Navigation::SECTION_CONFIGURATION
-
- STATUS_ACTIVE = "ACTIVE"
- STATUS_INACTIVE = "INACTIVE"
- ANY_SELECTION = [["Any", '']]
- RULE_PRIORITIES = Sonar::RulePriority.as_options.reverse
-
- # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
- verify :method => :post, :only => ['activate_rule', 'update_param', 'bulk_edit', 'create', 'update', 'delete', 'revert_rule'], :redirect_to => { :action => 'index' }
-
- before_filter :admin_required, :except => [ 'index', 'export' ]
-
- def index
- unless params[:id].blank?
- if params[:id].to_i<=0
- redirect_to :controller => 'profiles'
- return
- end
- begin
- @profile = Profile.find(params[:id].to_i)
- rescue
- redirect_to :controller => 'profiles'
- return
- end
- else
- @profile = Profile.default_profile
- end
-
- init_params()
-
- @select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort
- @select_priority = ANY_SELECTION + RULE_PRIORITIES
- @select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]]
- @select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']]
-
- @rules = Rule.search(java_facade, {
- :profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance,
- :plugins => @plugins, :searchtext => @searchtext, :include_parameters => true, :language => @profile.language})
-
- unless @searchtext.blank?
- if @status==STATUS_ACTIVE
- @hidden_inactives=Rule.search(java_facade, {
- :profile => @profile, :status => STATUS_INACTIVE, :priorities => @priorities,
- :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size
-
- elsif @status==STATUS_INACTIVE
- @hidden_actives=Rule.search(java_facade, {
- :profile => @profile, :status => STATUS_ACTIVE, :priorities => @priorities,
- :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size
- end
- end
-
- end
-
-
- #
- #
- # POST /rules_configuration/revert_rule?id=<profile id>&active_rule_id=<active rule id>
- #
- #
- def revert_rule
- id = params[:id].to_i
- rule_id = params[:active_rule_id].to_i
- java_facade.revertRule(id, rule_id)
- redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil})
- end
-
-
- #
- #
- # POST /rules_configuration/activate_rule?id=<profile id>&rule_id=<rule id>&level=<priority>
- #
- # If the parameter "level" is blank or null, then the rule is removed from the profile.
- #
- #
- def activate_rule
- profile = Profile.find(params[:id].to_i)
- if profile && !profile.provided?
- rule=Rule.find(:first, :conditions => {:id => params[:rule_id].to_i, :enabled => true})
- priority=params[:level]
-
- active_rule=profile.active_by_rule_id(rule.id)
- if priority.blank?
- # deactivate the rule
- active_rule.destroy if active_rule
- active_rule=nil
- java_facade.ruleDeactivated(profile.id, rule.id)
- else
- # activate the rule
- if active_rule.nil?
- active_rule = ActiveRule.new(:profile_id => profile.id, :rule => rule)
- rule.parameters.select{|p| p.default_value.present?}.each do |p|
- active_rule.active_rule_parameters.build(:rules_parameter => p, :value => p.default_value)
- end
- end
- active_rule.failure_level=Sonar::RulePriority.id(priority)
- active_rule.save!
- java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
- end
- if active_rule
- active_rule.reload
- end
-
- is_admin=true # security has already been checked by controller filters
- render :update do |page|
- page.replace_html("rule_#{rule.id}", :partial => 'rule', :object => rule, :locals => {:profile => profile, :active_rule => active_rule, :is_admin => is_admin})
- page.assign('localModifications', true)
- end
- end
- end
-
-
- #
- #
- # GET /rules_configuration/new/<profile id>?rule_id=<rule id>
- #
- #
- def new
- # form to duplicate a rule
- @profile = Profile.find(params[:id].to_i)
- @rule = Rule.find(params[:rule_id])
- end
-
- #
- #
- # POST /rules_configuration/create/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...
- #
- #
- def create
- template=Rule.find(params[:rule_id])
- rule=Rule.create(params[:rule].merge(
- {
- :priority => Sonar::RulePriority.id(params[:rule][:priority]),
- :parent_id => template.id,
- :plugin_name => template.plugin_name,
- :cardinality => 'SINGLE',
- :plugin_rule_key => "#{template.plugin_rule_key}_#{Time.now.to_i}",
- :plugin_config_key => template.plugin_config_key,
- :enabled => true}))
-
- template.parameters.each do |template_parameter|
- rule.rules_parameters.build(:name => template_parameter.name, :param_type => template_parameter.param_type, :description => template_parameter.description,
- :default_value => params[:rule_param][template_parameter.name])
- end
-
- if rule.save
- redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name
-
- else
- flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"
- redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]
- end
- end
-
-
- # deprecated since 2.3
- def export
- redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'})
- end
-
- #
- #
- # GET /rules_configuration/new/<profile id>?rule_id=<rule id>
- #
- #
- def edit
- # form to edit a rule
- @profile = Profile.find(params[:id])
- @rule = Rule.find(params[:rule_id])
- if !@rule.editable?
- redirect_to :action => 'index', :id => params[:id]
- end
- end
-
- #
- #
- # POST /rules_configuration/update/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...
- #
- #
- def update
- rule=Rule.find(params[:rule_id])
- if rule.editable?
- rule.name=params[:rule][:name]
- rule.description=params[:rule][:description]
- rule.priority=Sonar::RulePriority.id(params[:rule][:priority])
- rule.parameters.each do |parameter|
- parameter.default_value=params[:rule_param][parameter.name]
- parameter.save
- end
- if rule.save
- redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name
- else
- flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"
- redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]
- end
- else
- flash[:error]='Unknown rule'
- redirect_to :action => 'index', :id => params[:id]
- end
- end
-
-
- #
- #
- # POST /rules_configuration/delete/<profile id>?rule_id=<rule id>
- #
- #
- def delete
- rule=Rule.find(params[:rule_id])
- if rule.editable?
- rule.enabled=false
- rule.save
-
- # it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must
- # also be destroyed in cascade.
- ActiveRule.destroy_all("rule_id=#{rule.id}")
- flash[:notice]='Rule deleted'
- else
- flash[:error]='Unknown rule'
- end
- redirect_to :action => 'index', :id => params[:id]
- end
-
- #
- #
- # POST /rules_configuration/bulk_edit?id=<profile id>&bulk_rule_ids=<list of rule ids>&bulk_action=<action>
- #
- # Values of the parameter 'bulk_action' :
- # - 'activate' : activate all the selected rules with their default priority
- # - 'deactivate' : deactivate all the selected rules
- #
- #
- def bulk_edit
- profile = Profile.find(params[:id].to_i)
- rule_ids = params[:bulk_rule_ids].split(',').map{|id| id.to_i}
- status=params[:rule_status]
-
- case params[:bulk_action]
- when 'activate'
- count=activate_rules(profile, rule_ids)
- flash[:notice]="#{count} rules have been activated."
- status=STATUS_ACTIVE if status==STATUS_INACTIVE
-
- when 'deactivate'
- count=deactivate_rules(profile, rule_ids)
- flash[:notice]="#{count} rules have been deactivated."
- status=STATUS_INACTIVE if status==STATUS_ACTIVE
- end
-
- url_parameters=request.query_parameters.merge({:action => 'index', :bulk_action => nil, :bulk_rule_ids => nil, :id => profile.id, :rule_status => status})
- redirect_to url_parameters
- end
-
-
-
- def update_param
- is_admin=true # security has already been checked by controller filters
- profile = Profile.find(params[:profile_id].to_i)
- rule_param = RulesParameter.find(params[:param_id].to_i)
- active_rule = ActiveRule.find(params[:active_rule_id].to_i)
- active_param = ActiveRuleParameter.find(params[:id].to_i) if params[:id].to_i > 0
- value = params[:value]
- if !profile.provided?
- if value != ""
- active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil?
- active_param.value = value
- active_param.save
- active_param.valid?
- active_param.reload
- elsif !active_param.nil?
- active_param.destroy
- active_param = nil
- end
- java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
- end
- render :partial => 'rule_param', :object => nil,
- :locals => {:parameter => rule_param, :active_parameter => active_param, :profile => profile, :active_rule => active_rule, :is_admin => is_admin }
- end
-
- private
-
- # return the number of newly activated rules
- def activate_rules(profile, rule_ids)
- count=0
- rule_ids_to_activate=(rule_ids - profile.active_rules.map{|ar| ar.rule_id})
- unless rule_ids_to_activate.empty?
- rules_to_activate=Rule.find(:all, :conditions => {:enabled=>true, :id => rule_ids_to_activate})
- count = rules_to_activate.size
- rules_to_activate.each do |rule|
- active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority)
- java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
- end
- end
- count
- end
-
- def deactivate_rules(profile, rule_ids)
- count=0
- profile.active_rules.each do |ar|
- if rule_ids.include?(ar.rule_id) && !ar.inheritance.present?
- ar.destroy
- java_facade.ruleDeactivated(profile.id, ar.rule_id)
- count+=1
- end
- end
- count
- end
-
- def init_params
- @id = params[:id]
- @priorities = filter_any(params[:priorities]) || ['']
- @plugins=filter_any(params[:plugins]) || ['']
- @status=params[:rule_status] || STATUS_ACTIVE
- @inheritance=params[:inheritance] || ''
- @searchtext=params[:searchtext]
- end
-
- def filter_any(array)
- if array && array.size>1 && array.include?('')
- array=[''] #keep only 'any'
- end
- array
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +require 'cgi' + +class RulesConfigurationController < ApplicationController + + SECTION=Navigation::SECTION_CONFIGURATION + + STATUS_ACTIVE = "ACTIVE" + STATUS_INACTIVE = "INACTIVE" + ANY_SELECTION = [["Any", '']] + RULE_PRIORITIES = Sonar::RulePriority.as_options.reverse + + # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) + verify :method => :post, :only => ['activate_rule', 'update_param', 'bulk_edit', 'create', 'update', 'delete', 'revert_rule'], :redirect_to => { :action => 'index' } + + before_filter :admin_required, :except => [ 'index', 'export' ] + + def index + unless params[:id].blank? + if params[:id].to_i<=0 + redirect_to :controller => 'profiles' + return + end + begin + @profile = Profile.find(params[:id].to_i) + rescue + redirect_to :controller => 'profiles' + return + end + else + @profile = Profile.default_profile + end + + init_params() + + @select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort + @select_priority = ANY_SELECTION + RULE_PRIORITIES + @select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]] + @select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']] + + @rules = Rule.search(java_facade, { + :profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance, + :plugins => @plugins, :searchtext => @searchtext, :include_parameters => true, :language => @profile.language}) + + unless @searchtext.blank? + if @status==STATUS_ACTIVE + @hidden_inactives=Rule.search(java_facade, { + :profile => @profile, :status => STATUS_INACTIVE, :priorities => @priorities, + :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size + + elsif @status==STATUS_INACTIVE + @hidden_actives=Rule.search(java_facade, { + :profile => @profile, :status => STATUS_ACTIVE, :priorities => @priorities, + :plugins => @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size + end + end + + end + + + # + # + # POST /rules_configuration/revert_rule?id=<profile id>&active_rule_id=<active rule id> + # + # + def revert_rule + id = params[:id].to_i + rule_id = params[:active_rule_id].to_i + java_facade.revertRule(id, rule_id) + redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil}) + end + + + # + # + # POST /rules_configuration/activate_rule?id=<profile id>&rule_id=<rule id>&level=<priority> + # + # If the parameter "level" is blank or null, then the rule is removed from the profile. + # + # + def activate_rule + profile = Profile.find(params[:id].to_i) + if profile && !profile.provided? + rule=Rule.find(:first, :conditions => {:id => params[:rule_id].to_i, :enabled => true}) + priority=params[:level] + + active_rule=profile.active_by_rule_id(rule.id) + if priority.blank? + # deactivate the rule + active_rule.destroy if active_rule + active_rule=nil + java_facade.ruleDeactivated(profile.id, rule.id) + else + # activate the rule + if active_rule.nil? + active_rule = ActiveRule.new(:profile_id => profile.id, :rule => rule) + rule.parameters.select{|p| p.default_value.present?}.each do |p| + active_rule.active_rule_parameters.build(:rules_parameter => p, :value => p.default_value) + end + end + active_rule.failure_level=Sonar::RulePriority.id(priority) + active_rule.save! + java_facade.ruleActivatedOrChanged(profile.id, active_rule.id) + end + if active_rule + active_rule.reload + end + + is_admin=true # security has already been checked by controller filters + render :update do |page| + page.replace_html("rule_#{rule.id}", :partial => 'rule', :object => rule, :locals => {:profile => profile, :active_rule => active_rule, :is_admin => is_admin}) + page.assign('localModifications', true) + end + end + end + + + # + # + # GET /rules_configuration/new/<profile id>?rule_id=<rule id> + # + # + def new + # form to duplicate a rule + @profile = Profile.find(params[:id].to_i) + @rule = Rule.find(params[:rule_id]) + end + + # + # + # POST /rules_configuration/create/<profile id>?rule_id=<rule id>&rule[name]=<new name>&... + # + # + def create + template=Rule.find(params[:rule_id]) + rule=Rule.create(params[:rule].merge( + { + :priority => Sonar::RulePriority.id(params[:rule][:priority]), + :parent_id => template.id, + :plugin_name => template.plugin_name, + :cardinality => 'SINGLE', + :plugin_rule_key => "#{template.plugin_rule_key}_#{Time.now.to_i}", + :plugin_config_key => template.plugin_config_key, + :enabled => true})) + + template.parameters.each do |template_parameter| + rule.rules_parameters.build(:name => template_parameter.name, :param_type => template_parameter.param_type, :description => template_parameter.description, + :default_value => params[:rule_param][template_parameter.name]) + end + + if rule.save + redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name + + else + flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}" + redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id] + end + end + + + # deprecated since 2.3 + def export + redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'}) + end + + # + # + # GET /rules_configuration/new/<profile id>?rule_id=<rule id> + # + # + def edit + # form to edit a rule + @profile = Profile.find(params[:id]) + @rule = Rule.find(params[:rule_id]) + if !@rule.editable? + redirect_to :action => 'index', :id => params[:id] + end + end + + # + # + # POST /rules_configuration/update/<profile id>?rule_id=<rule id>&rule[name]=<new name>&... + # + # + def update + rule=Rule.find(params[:rule_id]) + if rule.editable? + rule.name=params[:rule][:name] + rule.description=params[:rule][:description] + rule.priority=Sonar::RulePriority.id(params[:rule][:priority]) + rule.parameters.each do |parameter| + parameter.default_value=params[:rule_param][parameter.name] + parameter.save + end + if rule.save + redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name + else + flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}" + redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id] + end + else + flash[:error]='Unknown rule' + redirect_to :action => 'index', :id => params[:id] + end + end + + + # + # + # POST /rules_configuration/delete/<profile id>?rule_id=<rule id> + # + # + def delete + rule=Rule.find(params[:rule_id]) + if rule.editable? + rule.enabled=false + rule.save + + # it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must + # also be destroyed in cascade. + ActiveRule.destroy_all("rule_id=#{rule.id}") + flash[:notice]='Rule deleted' + else + flash[:error]='Unknown rule' + end + redirect_to :action => 'index', :id => params[:id] + end + + # + # + # POST /rules_configuration/bulk_edit?id=<profile id>&bulk_rule_ids=<list of rule ids>&bulk_action=<action> + # + # Values of the parameter 'bulk_action' : + # - 'activate' : activate all the selected rules with their default priority + # - 'deactivate' : deactivate all the selected rules + # + # + def bulk_edit + profile = Profile.find(params[:id].to_i) + rule_ids = params[:bulk_rule_ids].split(',').map{|id| id.to_i} + status=params[:rule_status] + + case params[:bulk_action] + when 'activate' + count=activate_rules(profile, rule_ids) + flash[:notice]="#{count} rules have been activated." + status=STATUS_ACTIVE if status==STATUS_INACTIVE + + when 'deactivate' + count=deactivate_rules(profile, rule_ids) + flash[:notice]="#{count} rules have been deactivated." + status=STATUS_INACTIVE if status==STATUS_ACTIVE + end + + url_parameters=request.query_parameters.merge({:action => 'index', :bulk_action => nil, :bulk_rule_ids => nil, :id => profile.id, :rule_status => status}) + redirect_to url_parameters + end + + + + def update_param + is_admin=true # security has already been checked by controller filters + profile = Profile.find(params[:profile_id].to_i) + rule_param = RulesParameter.find(params[:param_id].to_i) + active_rule = ActiveRule.find(params[:active_rule_id].to_i) + active_param = ActiveRuleParameter.find(params[:id].to_i) if params[:id].to_i > 0 + value = params[:value] + if !profile.provided? + if value != "" + active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil? + active_param.value = value + active_param.save + active_param.valid? + active_param.reload + elsif !active_param.nil? + active_param.destroy + active_param = nil + end + java_facade.ruleActivatedOrChanged(profile.id, active_rule.id) + end + render :partial => 'rule_param', :object => nil, + :locals => {:parameter => rule_param, :active_parameter => active_param, :profile => profile, :active_rule => active_rule, :is_admin => is_admin } + end + + private + + # return the number of newly activated rules + def activate_rules(profile, rule_ids) + count=0 + rule_ids_to_activate=(rule_ids - profile.active_rules.map{|ar| ar.rule_id}) + unless rule_ids_to_activate.empty? + rules_to_activate=Rule.find(:all, :conditions => {:enabled=>true, :id => rule_ids_to_activate}) + count = rules_to_activate.size + rules_to_activate.each do |rule| + active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority) + java_facade.ruleActivatedOrChanged(profile.id, active_rule.id) + end + end + count + end + + def deactivate_rules(profile, rule_ids) + count=0 + profile.active_rules.each do |ar| + if rule_ids.include?(ar.rule_id) && !ar.inheritance.present? + ar.destroy + java_facade.ruleDeactivated(profile.id, ar.rule_id) + count+=1 + end + end + count + end + + def init_params + @id = params[:id] + @priorities = filter_any(params[:priorities]) || [''] + @plugins=filter_any(params[:plugins]) || [''] + @status=params[:rule_status] || STATUS_ACTIVE + @inheritance=params[:inheritance] || '' + @searchtext=params[:searchtext] + end + + def filter_any(array) + if array && array.size>1 && array.include?('') + array=[''] #keep only 'any' + end + array + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb index bdd770fa23c..0604f018c45 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb @@ -1,35 +1,35 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class RulesController < ApplicationController
-
- SECTION=Navigation::SECTION_CONFIGURATION
-
- def show
- key=params[:id]
- if key.to_i==0
- parts=key.split(':')
- @rule=Rule.find(:first, :conditions => ['plugin_name=? and plugin_rule_key=?', parts[0], parts[1]])
- else
- @rule=Rule.find(key)
- end
- @page_title=@rule.name
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class RulesController < ApplicationController + + SECTION=Navigation::SECTION_CONFIGURATION + + def show + key=params[:id] + if key.to_i==0 + parts=key.split(':') + @rule=Rule.find(:first, :conditions => ['plugin_name=? and plugin_rule_key=?', parts[0], parts[1]]) + else + @rule=Rule.find(key) + end + @page_title=@rule.name + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb index 2c74f55edee..5f9b1dc9a97 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb index 42d98aaf49f..e7f95603788 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb index b452dd7ab57..e3564346ad2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb index 11a13c66b36..dcbc9724087 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb index 627fc5a88df..febcdd9127d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb index 674263c87b7..6a185e26f5e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb index 560075c0a30..19ccb8ae985 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb index e86b999221a..3d2cb09006b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index dd1f5bd385c..3a06e83d213 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb index ee665411f86..fd449acf973 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb index 5c8aca6f1ba..237e8d26e1b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb index 90b920a0174..e1a34328ffb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb index 6fb2a240cb7..19537519d4d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb index 27f66bda913..81f59c5ffb3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb index 1f63cb06423..1f5fdab3e33 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb index 079ee80723a..b449c39d570 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb index ad7044b24a8..d9e3d3a5db5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb index 3cce0220a0b..a1cc3ff7f7e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb index 8706b3504bc..c8b9cb1b473 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb index 75f6d4934ca..e25a5d10066 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb index 086ca699915..fff4c5c252f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb index 7b993d7913c..92beb814a56 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb index 856025ab7a7..9a765c28579 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb index 5c2753e4332..c9c91ccf68d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb index bded9a5f141..a44fe8abf29 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb @@ -1,42 +1,42 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-module WidgetPropertiesHelper
-
-
- def property_value_field(definition, value)
- val=value || definition.defaultValue()
- if definition.type.name()==WidgetProperty::TYPE_INTEGER
- text_field_tag definition.key(), val, :size => 10
-
- elsif definition.type.name()==WidgetProperty::TYPE_FLOAT
- text_field_tag definition.key(), val, :size => 10
-
- elsif definition.type.name()==WidgetProperty::TYPE_BOOLEAN
- check_box_tag definition.key(), "true", val=='true'
-
- elsif definition.type.name()==WidgetProperty::TYPE_STRING
- text_field_tag definition.key(), val, :size => 10
-
- else
- hidden_field_tag definition.key()
- end
- end
-
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +module WidgetPropertiesHelper + + + def property_value_field(definition, value) + val=value || definition.defaultValue() + if definition.type.name()==WidgetProperty::TYPE_INTEGER + text_field_tag definition.key(), val, :size => 10 + + elsif definition.type.name()==WidgetProperty::TYPE_FLOAT + text_field_tag definition.key(), val, :size => 10 + + elsif definition.type.name()==WidgetProperty::TYPE_BOOLEAN + check_box_tag definition.key(), "true", val=='true' + + elsif definition.type.name()==WidgetProperty::TYPE_STRING + text_field_tag definition.key(), val, :size => 10 + + else + hidden_field_tag definition.key() + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb index 3ca3383aa8d..558d6cc36ce 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb @@ -1,59 +1,59 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class ActiveDashboard < ActiveRecord::Base
-
- belongs_to :user
- belongs_to :dashboard
-
- def name
- dashboard.name
- end
-
- def order_index
- read_attribute(:order_index) || 1
- end
-
- def shared?
- dashboard.shared
- end
-
- def owner?(user)
- dashboard.owner?(user)
- end
-
- def follower?(user)
- self.user.nil? || self.user_id==user.id
- end
-
- def self.user_dashboards(user)
- result=nil
- if user && user.id
- result=find(:all, :include => 'dashboard', :conditions => ['user_id=?', user.id], :order => 'order_index')
- end
- if result.nil? || result.empty?
- result=default_dashboards
- end
- result
- end
-
- def self.default_dashboards
- find(:all, :include => 'dashboard', :conditions => ['user_id IS NULL'], :order => 'order_index')
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class ActiveDashboard < ActiveRecord::Base + + belongs_to :user + belongs_to :dashboard + + def name + dashboard.name + end + + def order_index + read_attribute(:order_index) || 1 + end + + def shared? + dashboard.shared + end + + def owner?(user) + dashboard.owner?(user) + end + + def follower?(user) + self.user.nil? || self.user_id==user.id + end + + def self.user_dashboards(user) + result=nil + if user && user.id + result=find(:all, :include => 'dashboard', :conditions => ['user_id=?', user.id], :order => 'order_index') + end + if result.nil? || result.empty? + result=default_dashboards + end + result + end + + def self.default_dashboards + find(:all, :include => 'dashboard', :conditions => ['user_id IS NULL'], :order => 'order_index') + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb index f35a4d65ce6..6b0d07bed9a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb index f06282f2569..d02a4462c53 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb @@ -1,110 +1,110 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class ActiveRule < ActiveRecord::Base
- belongs_to :rules_profile, :class_name => 'Profile', :foreign_key => 'profile_id'
- belongs_to :rule
- has_many :active_rule_parameters, :dependent => :destroy
-
- def level
- failure_level
- end
-
- def priority
- failure_level
- end
-
- def priority_text
- Sonar::RulePriority.to_s failure_level
- end
-
- def error?
- Sonar::RulePriority::major?(failure_level)
- end
-
- def warning?
- Sonar::RulePriority::minor?(failure_level)
- end
-
- def info?
- Sonar::RulePriority::info?(failure_level)
- end
-
- def minor?
- Sonar::RulePriority::minor?(failure_level)
- end
-
- def major?
- Sonar::RulePriority::major?(failure_level)
- end
-
- def critical?
- Sonar::RulePriority::critical?(failure_level)
- end
-
- def blocker?
- Sonar::RulePriority::blocker?(failure_level)
- end
-
- def activated?
- error? || warning?
- end
-
- def value(param_id)
- active_rule_parameters.each do |param|
- return param.value if param.rules_parameter_id == param_id
- end
- nil
- end
-
- def parameters
- active_rule_parameters
- end
-
- def parameter(name)
- result=nil
- parameters.each do |param|
- result=param if (param.name==name)
- end
- result
- end
-
- def active_param_by_param_id(param_id)
- parameters.each do |param|
- return param if param.rules_parameter_id==param_id
- end
- nil
- end
-
- def copy
- new_active_rule = ActiveRule.new(:rule => rule, :failure_level => failure_level)
- self.active_rule_parameters.each do |active_rule_parameter|
- new_active_rule.active_rule_parameters << active_rule_parameter.copy
- end
- new_active_rule
- end
-
- def inherited?
- inheritance=='INHERITED'
- end
-
- def overrides?
- inheritance=='OVERRIDES'
- end
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class ActiveRule < ActiveRecord::Base + belongs_to :rules_profile, :class_name => 'Profile', :foreign_key => 'profile_id' + belongs_to :rule + has_many :active_rule_parameters, :dependent => :destroy + + def level + failure_level + end + + def priority + failure_level + end + + def priority_text + Sonar::RulePriority.to_s failure_level + end + + def error? + Sonar::RulePriority::major?(failure_level) + end + + def warning? + Sonar::RulePriority::minor?(failure_level) + end + + def info? + Sonar::RulePriority::info?(failure_level) + end + + def minor? + Sonar::RulePriority::minor?(failure_level) + end + + def major? + Sonar::RulePriority::major?(failure_level) + end + + def critical? + Sonar::RulePriority::critical?(failure_level) + end + + def blocker? + Sonar::RulePriority::blocker?(failure_level) + end + + def activated? + error? || warning? + end + + def value(param_id) + active_rule_parameters.each do |param| + return param.value if param.rules_parameter_id == param_id + end + nil + end + + def parameters + active_rule_parameters + end + + def parameter(name) + result=nil + parameters.each do |param| + result=param if (param.name==name) + end + result + end + + def active_param_by_param_id(param_id) + parameters.each do |param| + return param if param.rules_parameter_id==param_id + end + nil + end + + def copy + new_active_rule = ActiveRule.new(:rule => rule, :failure_level => failure_level) + self.active_rule_parameters.each do |active_rule_parameter| + new_active_rule.active_rule_parameters << active_rule_parameter.copy + end + new_active_rule + end + + def inherited? + inheritance=='INHERITED' + end + + def overrides? + inheritance=='OVERRIDES' + end +end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb index 6b47d8fd407..e517a949ce1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb @@ -1,40 +1,40 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with {library}; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
- class ActiveRuleParameter < ActiveRecord::Base
- belongs_to :active_rule
- belongs_to :rules_parameter
-
- def name
- rules_parameter.name
- end
-
- def parameter
- rules_parameter
- end
-
- def validate_on_update
- rules_parameter.validate_value(value, errors, "value" )
- end
-
- def copy
- ActiveRuleParameter.new(:rules_parameter => rules_parameter, :value => value)
- end
-
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with {library}; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + class ActiveRuleParameter < ActiveRecord::Base + belongs_to :active_rule + belongs_to :rules_parameter + + def name + rules_parameter.name + end + + def parameter + rules_parameter + end + + def validate_on_update + rules_parameter.validate_value(value, errors, "value" ) + end + + def copy + ActiveRuleParameter.new(:rules_parameter => rules_parameter, :value => value) + end + + end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb index 8f5109e02c1..d4087cdeeb2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb index 623c92856d9..5b2d189a173 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb index a86b1829213..2f37204dded 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb index 998aba65bea..f0a9c19a4d9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb index 0bae3cd67a3..d4333884a8a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb index 4d83219f212..0dc46459e72 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb index 90b83ec7707..1177f3c83fa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb index 68eb11767f6..6d9bc22bedb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb index 2a05055f890..71543d6d9ba 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb @@ -1,80 +1,80 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class Dashboard < ActiveRecord::Base
-
- DEFAULT_LAYOUT='50%-50%'
-
- belongs_to :user
-
- has_many :widgets, :include => 'properties', :dependent => :delete_all
- has_many :active_dashboards, :dependent => :delete_all
-
- validates_length_of :name, :within => 1..256
- validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true
- validates_length_of :column_layout, :maximum => 20, :allow_blank => false, :allow_nil => false
- validates_uniqueness_of :name, :scope => :user_id
-
- def shared?
- read_attribute(:shared) || false
- end
-
- def layout
- column_layout
- end
-
- def user_name
- user_id ? user.name : nil
- end
-
- def editable_by?(user)
- (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin))
- end
-
- def owner?(user)
- self.user_id==user.id
- end
-
- def number_of_columns
- column_layout.split('-').size
- end
-
- def column_size(column_index)
- last_widget=widgets.select{|w| w.column_index==column_index}.max{|x,y| x.row_index <=> y.row_index}
- last_widget ? last_widget.row_index : 0
- end
-
- def deep_copy()
- dashboard=Dashboard.new(attributes)
- dashboard.shared=false
- self.widgets.each do |child|
- new_widget = Widget.create(child.attributes)
-
- child.properties.each do |prop|
- widget_prop = WidgetProperty.create(prop.attributes)
- new_widget.properties << widget_prop
- end
-
- new_widget.save
- dashboard.widgets << new_widget
- end
- dashboard.save
- dashboard
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class Dashboard < ActiveRecord::Base + + DEFAULT_LAYOUT='50%-50%' + + belongs_to :user + + has_many :widgets, :include => 'properties', :dependent => :delete_all + has_many :active_dashboards, :dependent => :delete_all + + validates_length_of :name, :within => 1..256 + validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true + validates_length_of :column_layout, :maximum => 20, :allow_blank => false, :allow_nil => false + validates_uniqueness_of :name, :scope => :user_id + + def shared? + read_attribute(:shared) || false + end + + def layout + column_layout + end + + def user_name + user_id ? user.name : nil + end + + def editable_by?(user) + (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin)) + end + + def owner?(user) + self.user_id==user.id + end + + def number_of_columns + column_layout.split('-').size + end + + def column_size(column_index) + last_widget=widgets.select{|w| w.column_index==column_index}.max{|x,y| x.row_index <=> y.row_index} + last_widget ? last_widget.row_index : 0 + end + + def deep_copy() + dashboard=Dashboard.new(attributes) + dashboard.shared=false + self.widgets.each do |child| + new_widget = Widget.create(child.attributes) + + child.properties.each do |prop| + widget_prop = WidgetProperty.create(prop.attributes) + new_widget.properties << widget_prop + end + + new_widget.save + dashboard.widgets << new_widget + end + dashboard.save + dashboard + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb index e1d5afe7df0..2f66151ddbe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb index 7f916b07d1a..ecfa0a7f6b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb index 41ea35d8cfd..ace9123e64f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb index 45752172e1c..85d76c17fc3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb index 7a80de2ae6b..34c50e1034f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb index 84606802e53..d2208f6e47f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb index 3145b1c26f3..82dad3b41fa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb index 4bf41b20aac..ba622929613 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/group.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb index e2a4b188056..b9eebf383bb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb index d7971393cf6..390dc6bb581 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb index 9394320a35a..f72248c35b4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb index cc680cf7106..dd22621af4f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb index 43c93fa45ed..5832321bac0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb index 1d6d69e281e..ec7bd9d7ff3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb index 40813c32380..e4104850b13 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb index 52e986162b4..51c142c12e8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb index 87b1ac4507e..d1fd310a086 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb index fd33b68e5cf..422e45cbf55 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb index 1e553e99659..c95f03ad08a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb index 35088298227..f32b9bfc294 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb index 92082e47daa..ffcb835346a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb index bce1bbf21c0..2cea36c7994 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/role.rb @@ -1,22 +1,22 @@ - #
- # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
- # mailto:contact AT sonarsource DOT com
- #
- # Sonar is free software; you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
- # version 3 of the License, or (at your option) any later version.
- #
- # Sonar 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
- # Lesser General Public License for more details.
- #
- # You should have received a copy of the GNU Lesser General Public
- # License along with Sonar; if not, write to the Free Software
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- #
-class Role < ActiveRecord::Base
- ADMIN = 'sonar_admin'
+ # + # Sonar, entreprise quality control tool. + # Copyright (C) 2008-2011 SonarSource + # mailto:contact AT sonarsource DOT com + # + # Sonar is free software; you can redistribute it and/or + # modify it under the terms of the GNU Lesser General Public + # License as published by the Free Software Foundation; either + # version 3 of the License, or (at your option) any later version. + # + # Sonar 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 + # Lesser General Public License for more details. + # + # You should have received a copy of the GNU Lesser General Public + # License along with Sonar; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + # +class Role < ActiveRecord::Base + ADMIN = 'sonar_admin' end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb index c94e7887b39..c485d0d0736 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb index 64a2517af13..3b4886f2dad 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb index 98f341ad805..1bcc7fd012d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb index 9ee251c29c1..600aa7dc834 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb index 408f32b9e26..065bbbe2fa9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb index 2c80cd4532b..daed9bbb572 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb index bbef4793cfb..e2a8d1ce08d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb index 93145461a19..1828a3e49b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb index 052c64e2c50..8f032d1be26 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb index 43f3fc2416b..a5bd62a826b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb index 91973a19e30..c136fa06156 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb index cb9d2bfaa55..e7b924b015c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb index d79914f4be3..0be1a8494c9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb index 10dee295e63..eb820ad2f92 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb index 6e08e3b17fd..677bdd2d07c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb index 4ee3e05c5bb..9957be12323 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb index 7c6c82a9abf..d10262a99ed 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb @@ -1,76 +1,76 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class Widget < ActiveRecord::Base
- has_many :properties, :dependent => :delete_all, :class_name => 'WidgetProperty'
- belongs_to :dashboards
-
- validates_presence_of :name
- validates_length_of :name, :within => 1..256
-
- validates_presence_of :widget_key
- validates_length_of :widget_key, :within => 1..256
-
- def property(key)
- properties().each do |p|
- return p if (p.key==key)
- end
- nil
- end
-
- def property_value(key, default_value=nil)
- prop=property(key)
- (prop ? prop.value : nil) || default_value
- end
-
- def set_property(key, value, value_type)
- prop=property(key)
- if prop
- prop.text_value=value
- prop.value_type=value_type
- else
- prop=self.properties.build(:kee => key, :text_value => value, :value_type => value_type)
- end
- properties_as_hash[key]=prop.typed_value
- end
-
- def unset_property(key)
- prop=property(key)
- self.properties.delete(prop) if prop
- end
-
- def delete_property(key)
- prop=property(key)
- if prop
- properties.delete(prop)
- end
- end
-
- def properties_as_hash
- @properties_hash ||=
- begin
- hash={}
- properties.each do |prop|
- hash[prop.key]=prop.typed_value
- end
- hash
- end
- @properties_hash
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class Widget < ActiveRecord::Base + has_many :properties, :dependent => :delete_all, :class_name => 'WidgetProperty' + belongs_to :dashboards + + validates_presence_of :name + validates_length_of :name, :within => 1..256 + + validates_presence_of :widget_key + validates_length_of :widget_key, :within => 1..256 + + def property(key) + properties().each do |p| + return p if (p.key==key) + end + nil + end + + def property_value(key, default_value=nil) + prop=property(key) + (prop ? prop.value : nil) || default_value + end + + def set_property(key, value, value_type) + prop=property(key) + if prop + prop.text_value=value + prop.value_type=value_type + else + prop=self.properties.build(:kee => key, :text_value => value, :value_type => value_type) + end + properties_as_hash[key]=prop.typed_value + end + + def unset_property(key) + prop=property(key) + self.properties.delete(prop) if prop + end + + def delete_property(key) + prop=property(key) + if prop + properties.delete(prop) + end + end + + def properties_as_hash + @properties_hash ||= + begin + hash={} + properties.each do |prop| + hash[prop.key]=prop.typed_value + end + hash + end + @properties_hash + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb index df755df8221..a47ba81b6e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb @@ -1,81 +1,81 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class WidgetProperty < ActiveRecord::Base
- TYPE_INTEGER = 'INTEGER'
- TYPE_BOOLEAN = 'BOOLEAN'
- TYPE_FLOAT = 'FLOAT'
- TYPE_STRING = 'STRING'
-
- belongs_to :widget
-
- validates_length_of :kee, :within => 1..100
- validates_length_of :text_value, :maximum => 4000, :allow_blank => true, :allow_nil => true
-
- def key
- kee
- end
-
- def value
- text_value
- end
-
- def typed_value
- case value_type
- when TYPE_INTEGER
- value.to_i
- when TYPE_FLOAT
- Float(value)
- when TYPE_BOOLEAN
- value=='true'
- else
- value
- end
- end
-
- def to_hash_json
- {:key => key, :value => value.to_s}
- end
-
- def to_xml(xml=Builder::XmlMarkup.new(:indent => 0))
- xml.property do
- xml.key(prop_key)
- xml.value {xml.cdata!(text_value.to_s)}
- end
- xml
- end
-
- def self.validate_definition(definition, value)
- errors=[]
- if value.empty?
- errors<<"Missing value" unless definition.optional()
- else
- errors<<"Please type an integer (example: 123)" if definition.type.name()==TYPE_INTEGER && value.to_i.to_s!=value
- if definition.type.name()==TYPE_FLOAT
- begin
- Float(value)
- rescue
- errors<<"Please type a number (example: 123.45)"
- end
- end
- errors<<"Please check value" if definition.type.name()==TYPE_BOOLEAN && !(value=="true" || value=="false")
- end
- errors
- end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class WidgetProperty < ActiveRecord::Base + TYPE_INTEGER = 'INTEGER' + TYPE_BOOLEAN = 'BOOLEAN' + TYPE_FLOAT = 'FLOAT' + TYPE_STRING = 'STRING' + + belongs_to :widget + + validates_length_of :kee, :within => 1..100 + validates_length_of :text_value, :maximum => 4000, :allow_blank => true, :allow_nil => true + + def key + kee + end + + def value + text_value + end + + def typed_value + case value_type + when TYPE_INTEGER + value.to_i + when TYPE_FLOAT + Float(value) + when TYPE_BOOLEAN + value=='true' + else + value + end + end + + def to_hash_json + {:key => key, :value => value.to_s} + end + + def to_xml(xml=Builder::XmlMarkup.new(:indent => 0)) + xml.property do + xml.key(prop_key) + xml.value {xml.cdata!(text_value.to_s)} + end + xml + end + + def self.validate_definition(definition, value) + errors=[] + if value.empty? + errors<<"Missing value" unless definition.optional() + else + errors<<"Please type an integer (example: 123)" if definition.type.name()==TYPE_INTEGER && value.to_i.to_s!=value + if definition.type.name()==TYPE_FLOAT + begin + Float(value) + rescue + errors<<"Please type a number (example: 123.45)" + end + end + errors<<"Please check value" if definition.type.name()==TYPE_BOOLEAN && !(value=="true" || value=="false") + end + errors + end end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb index bd37c1644ff..bd930663577 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb index 5e1797d5397..2e011054f24 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb index 1fc10430ac0..635650bb47b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb index ac7b9150e82..607f8889cb0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb @@ -1,28 +1,28 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class AddMetricsNames < ActiveRecord::Migration
-
- def self.up
- add_column(:metrics, :domain, :string, :null => true, :limit => 64)
- add_column(:metrics, :short_name, :string, :null => true, :limit => 64)
- add_column(:metrics, :qualitative, :boolean, :null => false, :default => false)
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class AddMetricsNames < ActiveRecord::Migration + + def self.up + add_column(:metrics, :domain, :string, :null => true, :limit => 64) + add_column(:metrics, :short_name, :string, :null => true, :limit => 64) + add_column(:metrics, :qualitative, :boolean, :null => false, :default => false) + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb index d1362f1ed85..174a90cecd8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb @@ -1,41 +1,41 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class CreateRulesProfiles < ActiveRecord::Migration
-
- def self.up
- create_table 'rules_profiles'do |t|
- t.column :name, :string, :limit => 40, :null => false
- t.column :active, :boolean, :default => false
- end
-
- create_table 'active_rules' do |t|
- t.column :profile_id, :integer, :null => false
- t.column :rule_id, :integer, :null => false
- t.column :failure_level, :integer, :null => false
- end
-
- create_table :active_rule_parameters do |t|
- t.column :active_rule_id, :integer, :null => false
- t.column :rules_parameter_id, :integer, :null => false
- t.column :value, :string, :limit => 4000, :null => true
- end
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class CreateRulesProfiles < ActiveRecord::Migration + + def self.up + create_table 'rules_profiles'do |t| + t.column :name, :string, :limit => 40, :null => false + t.column :active, :boolean, :default => false + end + + create_table 'active_rules' do |t| + t.column :profile_id, :integer, :null => false + t.column :rule_id, :integer, :null => false + t.column :failure_level, :integer, :null => false + end + + create_table :active_rule_parameters do |t| + t.column :active_rule_id, :integer, :null => false + t.column :rules_parameter_id, :integer, :null => false + t.column :value, :string, :limit => 4000, :null => true + end + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb index 0e42e4f4a57..b5697a1d7dd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb @@ -1,27 +1,27 @@ -#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class AddRulesProfilesProvidedColumn < ActiveRecord::Migration
-
- def self.up
- add_column(:rules_profiles, :provided, :boolean, :default => false, :null => false)
- Profile.reset_column_information
- end
-
-end
+# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# +class AddRulesProfilesProvidedColumn < ActiveRecord::Migration + + def self.up + add_column(:rules_profiles, :provided, :boolean, :default => false, :null => false) + Profile.reset_column_information + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb index e69193ba949..0f249815147 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb index 19eda5fcf7b..84c5df8cf08 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb index b242f04d0df..76f0cf9a21d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb index 724b1010aec..e48f6f6e948 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb index 971e36123ec..64fd7c37eb3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb index 3bba83b2167..269022642c2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb index 409d230b5ed..88121955ce2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb index 99aaf2bb783..36f1d2c2954 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb index cdd2261df1d..97459dff70b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb index 2fc1ac4889c..3d7112f69e6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb index 46d2e9bb470..a03d052cc77 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb index 15b179316a0..ce8a605bd48 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb index 2ea365a61cc..b63aef33688 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb index ac59f71ab65..4307aa28eb3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb index 8d371c5aaf3..c724469946c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb index 61a92a31803..2b110b22761 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb index ab78e77cf2f..a2b6a43c807 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb @@ -1,6 +1,6 @@ # # Sonar, open source software quality management tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb index eb864438ea1..688a46d39b2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb index c8230241ac6..14205a37b86 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb index b89c3437bdd..e53aadd92a0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb index 5be2c8cbeef..cfacedc0dc2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb index 1f251153a79..91111464251 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb index d2d0a1a041d..70b189784ca 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb index f03c351f130..ba00735f89e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb index e6f88cff2b6..cc361ccfcd4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb index eebc5b7ab13..303920a64ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb index 7fa685c6c7b..074dd969836 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb index 2e092e73b0f..fa2742b5fda 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb index d9e634a8947..13eaa3c0d44 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb index cc0e3b23e64..bb8758ceeab 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb index 22b84581557..6b36ffd5ecc 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb index 42bc02b50ce..a4a97eba046 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb index 246962a67ad..62760eb619e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb index 72608eee184..5862bb4844b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb index b8d14e0715b..074c5d8f46d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb index af391d5561b..470fa914283 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb index a0d63550906..cd4751a3a55 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb index d24cd7a5d79..e8076d80ab3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb index f5df428f822..a667100b95e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb index cc585b6561f..351cf6f0789 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb index 0af16cdd90f..7b90fb7f035 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb index db51416035d..c5526de568e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb index 4533b48bf78..14991a2a6a6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb index ec8d1620ab0..7475a2172a0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb index edd98d285cf..7322b8c8376 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb index f3eaac8dde0..ede5e05dc5d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb index d807f926fa4..e9ba4bffa59 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb index 96ecabde10a..7af3cdb223f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb index adc14ea6084..71628aa99bb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb index 376bfcbb23c..2cc1788ae69 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb index 6047e6b08ee..f76a7e9a68b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb index 030380445d3..9c149cd644d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb index 570367391f2..43845cce0ae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb index 8c98a680c96..933e816310b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb index 35eae9bcdea..cbd81d46e8a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb index 43c310e949f..28b7fbde9c2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb index 3fc09b20966..f9f512dec11 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb index cdd3f690de2..09a80851cc4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb index 9649ac93c49..8cb2486f272 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb index c9df90d98c5..905f7b1d118 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb index 2bc3678d79e..a4043d95055 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb index 1aacfa706a3..4d53d8898e6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb index 0474d771ee7..efb604cfc2e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb index f15f6ec3518..4d7eebaeb9c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb index 41a68b9173a..b3ff67c0f22 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb index 6f4868b8885..22f7ddd9223 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb index 106ff2374a0..9ede6b89667 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb index c4a9d1d8aea..c69e2a87aa7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb index c146ef9f9d4..feae3e27912 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb index 3faa46fc0d3..ec028fa1ec5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb index bcdfb838226..941f1a0892f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb index 9ba2eb52e3c..e39844f228d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb index e16f0c6a6a9..7fa69e9f69f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb index 4ee855ea473..a30b36ad7f2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb index c821fa8fed3..76682cd07e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb index 2869047cbe0..16577e7cb9a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb index 62048e4bfba..4fc96eb2d5e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb index b6667c5fe9b..24bc760676b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb index 874c8101969..834dda798d7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb index 3eb65808165..f0a4e78f334 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb index 23be6b35b04..b5273b750a9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb index 9b6e23b62a4..28206277d4b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb index e14e0dfa506..0666c2a3ca6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb index da3087a1f6b..ec4fad631cb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb index d9f4236d912..04d3fbff8f6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb index 3a6e097835b..c5cb4a9e4f7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb index 893342fdb71..21d3b3d9289 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb b/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb index 1b97915efb3..af5cbb497c7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb b/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb index 1811eff2572..eb07a596720 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb b/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb index a1201f86486..bde096664fa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb b/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb index 084915e0648..a880840fde5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb b/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb index 3302cffd6ec..6f50bd9821e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. - # Copyright (C) 2009 SonarSource SA + # Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb b/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb index 86fad2d3383..37509374437 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb @@ -1,6 +1,6 @@ # # Sonar, entreprise quality control tool. -# Copyright (C) 2009 SonarSource SA +# Copyright (C) 2008-2011 SonarSource # mailto:contact AT sonarsource DOT com # # Sonar is free software; you can redistribute it and/or |