├── integration └── todo │ ├── log │ └── .keep │ ├── tmp │ └── .keep │ ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep │ ├── vendor │ └── .keep │ ├── public │ ├── favicon.ico │ ├── apple-touch-icon.png │ ├── apple-touch-icon-precomposed.png │ ├── robots.txt │ ├── 500.html │ ├── 422.html │ └── 404.html │ ├── test │ ├── fixtures │ │ ├── .keep │ │ ├── files │ │ │ └── .keep │ │ ├── todo_items.yml │ │ └── todo_lists.yml │ ├── helpers │ │ └── .keep │ ├── mailers │ │ └── .keep │ ├── models │ │ ├── .keep │ │ ├── todo_item_test.rb │ │ └── todo_list_test.rb │ ├── system │ │ ├── .keep │ │ └── todo_lists_test.rb │ ├── controllers │ │ ├── .keep │ │ ├── todo_items_controller_test.rb │ │ └── todo_lists_controller_test.rb │ ├── integration │ │ └── .keep │ ├── application_system_test_case.rb │ └── test_helper.rb │ ├── app │ ├── assets │ │ ├── images │ │ │ └── .keep │ │ ├── javascripts │ │ │ ├── channels │ │ │ │ └── .keep │ │ │ ├── todo_items.coffee │ │ │ ├── todo_lists.coffee │ │ │ ├── cable.js │ │ │ └── application.js │ │ ├── config │ │ │ └── manifest.js │ │ └── stylesheets │ │ │ ├── todo_items.scss │ │ │ ├── todo_lists.scss │ │ │ ├── application.css │ │ │ └── scaffolds.scss │ ├── models │ │ ├── concerns │ │ │ └── .keep │ │ ├── todo_list.rb │ │ ├── application_record.rb │ │ └── todo_item.rb │ ├── controllers │ │ ├── concerns │ │ │ └── .keep │ │ ├── application_controller.rb │ │ ├── todo_items_controller.rb │ │ └── todo_lists_controller.rb │ ├── views │ │ ├── layouts │ │ │ ├── mailer.text.erb │ │ │ ├── mailer.html.erb │ │ │ └── application.html.erb │ │ ├── todo_lists │ │ │ ├── show.json.jbuilder │ │ │ ├── index.json.jbuilder │ │ │ ├── new.html.erb │ │ │ ├── _todo_list.json.jbuilder │ │ │ ├── edit.html.erb │ │ │ ├── show.html.erb │ │ │ ├── index.html.erb │ │ │ └── _form.html.erb │ │ └── todo_items │ │ │ ├── _form.html.erb │ │ │ └── _todo_item.html.erb │ ├── helpers │ │ ├── application_helper.rb │ │ ├── todo_items_helper.rb │ │ └── todo_lists_helper.rb │ ├── jobs │ │ └── application_job.rb │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ └── mailers │ │ └── application_mailer.rb │ ├── package.json │ ├── bin │ ├── bundle │ ├── rake │ ├── rails │ ├── yarn │ ├── spring │ ├── update │ └── setup │ ├── config │ ├── spring.rb │ ├── boot.rb │ ├── environment.rb │ ├── initializers │ │ ├── mime_types.rb │ │ ├── application_controller_renderer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── cookies_serializer.rb │ │ ├── backtrace_silencers.rb │ │ ├── wrap_parameters.rb │ │ ├── assets.rb │ │ └── inflections.rb │ ├── cable.yml │ ├── routes.rb │ ├── application.rb │ ├── database.yml │ ├── locales │ │ └── en.yml │ ├── secrets.yml │ ├── environments │ │ ├── test.rb │ │ ├── development.rb │ │ └── production.rb │ └── puma.rb │ ├── config.ru │ ├── db │ ├── migrate │ │ ├── 20180819123754_add_completed_at_to_todo_items.rb │ │ ├── 20180818210306_create_todo_lists.rb │ │ └── 20180819121311_create_todo_items.rb │ ├── seeds.rb │ └── schema.rb │ ├── Rakefile │ ├── README.md │ ├── sonar-project.properties │ ├── .gitignore │ ├── Gemfile │ └── Gemfile.lock ├── sonar-project.properties ├── Dockerfile ├── CHANGELOG ├── src ├── test │ ├── resources │ │ ├── unknown_file.rb │ │ ├── test_controller.rb │ │ └── result.json │ └── java │ │ └── com │ │ └── fortitudetec │ │ └── sonar │ │ └── plugins │ │ └── ruby │ │ ├── metrics │ │ ├── ClassCountParserTest.java │ │ ├── CommentCountParserTest.java │ │ ├── CombinedCoverageSensorTest.java │ │ └── RubyMetricsSensorTest.java │ │ ├── RubyRuleProfileTest.java │ │ ├── RubyPluginTest.java │ │ ├── utils │ │ └── TestUtils.java │ │ ├── RubyTest.java │ │ ├── rubocop │ │ ├── RubocopParserTest.java │ │ └── RubocopSensorTest.java │ │ ├── simplecov │ │ ├── SimpleCovParserTest.java │ │ └── SimpleCovSensorTest.java │ │ ├── RubyRulesDefinitionTest.java │ │ └── PathResolverTest.java └── main │ └── java │ └── com │ └── fortitudetec │ └── sonar │ └── plugins │ └── ruby │ ├── rubocop │ ├── model │ │ ├── RubocopFile.java │ │ ├── RubocopResult.java │ │ └── RubocopOffense.java │ ├── RubocopExecutorConfig.java │ ├── RubocopParser.java │ ├── RubocopExecutor.java │ └── RubocopSensor.java │ ├── model │ ├── RubocopPosition.java │ ├── RubocopIssue.java │ └── RubocopRule.java │ ├── squid │ ├── RubyRecognizer.java │ └── RubyFootPrint.java │ ├── RubyRuleProfile.java │ ├── metrics │ ├── CombinedCoverageSensor.java │ ├── ClassCountParser.java │ ├── CommentCountParser.java │ └── RubyMetricsSensor.java │ ├── simplecov │ ├── SimpleCovSensor.java │ └── SimpleCovParser.java │ ├── PathResolver.java │ ├── Ruby.java │ ├── RubyRulesDefinition.java │ └── RubyPlugin.java ├── .travis.yml ├── .gitignore ├── LICENSE ├── README.md └── pom.xml /integration/todo/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/vendor/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/system/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/fixtures/files/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/public/apple-touch-icon.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/app/assets/javascripts/channels/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/todo/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /integration/todo/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /integration/todo/app/helpers/todo_items_helper.rb: -------------------------------------------------------------------------------- 1 | module TodoItemsHelper 2 | end 3 | -------------------------------------------------------------------------------- /integration/todo/app/helpers/todo_lists_helper.rb: -------------------------------------------------------------------------------- 1 | module TodoListsHelper 2 | end 3 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey = sonarqube-ruby-plugin 2 | sonar.sources = . 3 | -------------------------------------------------------------------------------- /integration/todo/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /integration/todo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo", 3 | "private": true, 4 | "dependencies": {} 5 | } 6 | -------------------------------------------------------------------------------- /integration/todo/app/models/todo_list.rb: -------------------------------------------------------------------------------- 1 | class TodoList < ApplicationRecord 2 | has_many :todo_items 3 | end 4 | -------------------------------------------------------------------------------- /integration/todo/app/views/todo_lists/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.partial! "todo_lists/todo_list", todo_list: @todo_list 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sonarqube:7.1 2 | 3 | COPY target/sonar-ruby-plugin-1.1.0.jar /opt/sonarqube/extensions/plugins/ 4 | 5 | 6 | -------------------------------------------------------------------------------- /integration/todo/app/views/todo_lists/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array! @todo_lists, partial: 'todo_lists/todo_list', as: :todo_list 2 | -------------------------------------------------------------------------------- /integration/todo/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /integration/todo/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end 4 | -------------------------------------------------------------------------------- /integration/todo/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | v 1.1.0: 2 | - Support other test runners besides RSpec 3 | - Added a sample Rails application for testing the plugin with SonarQube 4 | -------------------------------------------------------------------------------- /integration/todo/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /integration/todo/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /integration/todo/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | protect_from_forgery with: :exception 3 | end 4 | -------------------------------------------------------------------------------- /integration/todo/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: 'from@example.com' 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /integration/todo/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /integration/todo/config/spring.rb: -------------------------------------------------------------------------------- 1 | %w( 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ).each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /integration/todo/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /integration/todo/app/views/todo_lists/new.html.erb: -------------------------------------------------------------------------------- 1 |
<%= notice %>
2 | 3 |4 | Title: 5 | <%= @todo_list.title %> 6 |
7 | 8 |9 | Description: 10 | <%= @todo_list.description %> 11 |
12 | 13 |<%= notice %>
2 | 3 || Title | 9 |Description | 10 |11 | | ||
|---|---|---|---|---|
| <%= todo_list.title %> | 18 |<%= todo_list.description %> | 19 |<%= link_to 'Show', todo_list %> | 20 |<%= link_to 'Edit', edit_todo_list_path(todo_list) %> | 21 |<%= link_to 'Destroy', todo_list, method: :delete, data: { confirm: 'Are you sure?' } %> | 22 |
<%= todo_item.content %>
<%= todo_item.content %>
18 |If you are the application owner check the logs for more information.
64 |Maybe you tried to change something you didn't have access to.
63 |If you are the application owner check the logs for more information.
65 |You may have mistyped the address or the page may have moved.
63 |If you are the application owner check the logs for more information.
65 |