commit
3ccbea2510
@ -0,0 +1,54 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
<% if repository.class.manages_remote? %> |
||||
<div class="form--field"> |
||||
<%= form.text_field(:url, |
||||
label: l('repositories.managed_url'), |
||||
value: l('repositories.managed_remote'), |
||||
disabled: true, |
||||
'aria-disabled' => true |
||||
) %> |
||||
<div class="form--field-instructions"> |
||||
<p><%= l('repositories.managed_remote_note') %></p> |
||||
</div> |
||||
</div> |
||||
<% else %> |
||||
<div class="form--field"> |
||||
<%= form.text_field(:url, |
||||
label: l('repositories.managed_url'), |
||||
value: repository.new_record? ? repository.managed_repository_url : |
||||
repository.url, |
||||
disabled: true, |
||||
'aria-disabled' => true |
||||
) %> |
||||
<div class="form--field-instructions"> |
||||
<%= l("repositories.#{vendor}.instructions.managed_url") %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
@ -0,0 +1,42 @@ |
||||
#-- encoding: UTF-8 |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
## |
||||
# Provides an asynchronous job to create a managed repository on a remote system |
||||
# using a simple HTTP callback |
||||
# Currently, this is run synchronously due to potential issues |
||||
# with error handling. |
||||
# We envision a repository management wrapper that covers transactional |
||||
# creation and deletion of repositories BOTH on the database and filesystem. |
||||
# Until then, a synchronous process is more failsafe. |
||||
class Scm::CreateRemoteRepositoryJob < Scm::RemoteRepositoryJob |
||||
def perform |
||||
send(repository_request.merge(action: :create)) |
||||
end |
||||
end |
@ -0,0 +1,41 @@ |
||||
#-- encoding: UTF-8 |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
## |
||||
# Provides an asynchronous job to delete a managed repository on the filesystem. |
||||
# Currently, this is run synchronously due to potential issues |
||||
# with error handling. |
||||
# We envision a repository management wrapper that covers transactional |
||||
# creation and deletion of repositories BOTH on the database and filesystem. |
||||
# Until then, a synchronous process is more failsafe. |
||||
class Scm::DeleteRemoteRepositoryJob < Scm::RemoteRepositoryJob |
||||
def perform |
||||
send(repository_request.merge(action: :delete)) |
||||
end |
||||
end |
@ -0,0 +1,93 @@ |
||||
#-- encoding: UTF-8 |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
## |
||||
# Provides an asynchronous job to create a managed repository on the filesystem. |
||||
# Currently, this is run synchronously due to potential issues |
||||
# with error handling. |
||||
# We envision a repository management wrapper that covers transactional |
||||
# creation and deletion of repositories BOTH on the database and filesystem. |
||||
# Until then, a synchronous process is more failsafe. |
||||
class Scm::RemoteRepositoryJob |
||||
include OpenProject::BeforeDelayedJob |
||||
|
||||
def initialize(repository) |
||||
# TODO currently uses the full repository object, |
||||
# as the Job is performed synchronously. |
||||
# Change this to serialize the ID once its turned to process asynchronously. |
||||
@repository = repository |
||||
end |
||||
|
||||
protected |
||||
|
||||
## |
||||
# Submits the request to the configured managed remote as JSON. |
||||
def send(request) |
||||
uri = @repository.class.managed_remote |
||||
req = ::Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') |
||||
req.body = request.to_json |
||||
|
||||
response = ::Net::HTTP.start(uri.hostname, uri.port) do |http| |
||||
http.request(req) |
||||
end |
||||
|
||||
unless response.is_a? ::Net::HTTPSuccess |
||||
info = try_to_parse_response(response.body) |
||||
raise OpenProject::Scm::Exceptions::ScmError.new( |
||||
I18n.t('repositories.errors.remote_call_failed', |
||||
code: response.code, |
||||
message: info['message'] |
||||
) |
||||
) |
||||
end |
||||
end |
||||
|
||||
def try_to_parse_response(body) |
||||
JSON.parse(body) |
||||
rescue JSON::JSONError => e |
||||
raise OpenProject::Scm::Exceptions::ScmError.new( |
||||
I18n.t('repositories.errors.remote_invalid_response') |
||||
) |
||||
end |
||||
|
||||
def repository_request |
||||
project = @repository.project |
||||
|
||||
{ |
||||
identifier: @repository.repository_identifier, |
||||
vendor: @repository.vendor, |
||||
scm_type: @repository.scm_type, |
||||
project: { |
||||
id: project.id, |
||||
name: project.name, |
||||
identifier: project.identifier, |
||||
} |
||||
} |
||||
end |
||||
end |
@ -1,4 +1,4 @@ |
||||
package Apache::Authn::OpenProject; |
||||
package Apache::OpenProjectAuthentication; |
||||
|
||||
use strict; |
||||
use warnings FATAL => 'all', NONFATAL => 'redefine'; |
@ -0,0 +1,182 @@ |
||||
package Apache::OpenProjectRepoman; |
||||
|
||||
use strict; |
||||
use warnings FATAL => 'all', NONFATAL => 'redefine'; |
||||
|
||||
use File::Path qw(remove_tree); |
||||
use File::Spec (); |
||||
|
||||
use Apache2::Module; |
||||
use Apache2::Module; |
||||
use Apache2::Access; |
||||
use Apache2::ServerRec qw(); |
||||
use Apache2::Response (); |
||||
use Apache2::RequestRec qw(); |
||||
use Apache2::RequestUtil qw(); |
||||
use Apache2::RequestIO qw(); |
||||
use Apache2::Const -compile => qw(FORBIDDEN OK OR_AUTHCFG TAKE1 HTTP_UNPROCESSABLE_ENTITY HTTP_BAD_REQUEST OK); |
||||
use APR::Table (); |
||||
|
||||
use JSON::PP; |
||||
use Carp; |
||||
|
||||
|
||||
## |
||||
# Add AccessSecret directive to Apache, which is checked during configtest |
||||
my @directives = ( |
||||
{ |
||||
name => 'AccessSecret', |
||||
req_override => Apache2::Const::OR_AUTHCFG, |
||||
args_how => Apache2::Const::TAKE1, |
||||
errmsg => 'Secret access token used to access the repository wrapper.', |
||||
} |
||||
); |
||||
Apache2::Module::add(__PACKAGE__, \@directives); |
||||
|
||||
## |
||||
# Accepts and tests the access secret value given in the Apache configuration |
||||
sub AccessSecret { |
||||
my ($self, $parms, @args) = @_; |
||||
$self->{token} = $args[0]; |
||||
unless (length($self->{token}) >= 8) { |
||||
die "Use at least 8 characters for the repoman access token!"; |
||||
} |
||||
} |
||||
|
||||
## |
||||
# Creates an actual repository on disk for Subversion and Git. |
||||
sub create_repository { |
||||
my ($r, $vendor, $repository) = @_; |
||||
|
||||
my $command = { |
||||
git => "git init $repository --shared --bare", |
||||
subversion => "svnadmin create $repository" |
||||
}->{$vendor}; |
||||
|
||||
die "No create command known for vendor '$vendor'\n" unless defined($command); |
||||
die "Could not create repository.\n" unless system($command) == 0; |
||||
} |
||||
|
||||
## |
||||
# Removes the repository with a given identifier on disk. |
||||
sub delete_repository { |
||||
my ($r, $vendor, $repository) = @_; |
||||
remove_tree($repository, { safe => 1 }) if -d $repository; |
||||
} |
||||
|
||||
## |
||||
# Extract and return JSON request from the Apache request handler. |
||||
sub parse_request { |
||||
my $r = shift; |
||||
my $len = $r->headers_in->{'Content-Length'}; |
||||
|
||||
die "Request invalid.\n" unless (defined($len) && $len > 0); |
||||
die "Request too large.\n" if ($len > (2**13)); |
||||
|
||||
my ($buf, $content); |
||||
while($r->read($buf, $len)) { |
||||
$content .= $buf; |
||||
} |
||||
|
||||
return decode_json($content); |
||||
} |
||||
|
||||
## |
||||
# Returns a JSON error and sets the HTTP response code to $type. |
||||
sub make_error { |
||||
my ($r, $type, $msg) = @_; |
||||
my $response = { |
||||
success => JSON::PP::false, |
||||
message => $msg |
||||
}; |
||||
|
||||
$r->status($type) ; |
||||
return $response; |
||||
} |
||||
|
||||
## |
||||
# Actual incoming request handler, that receives the JSON request |
||||
# and determines the necessary local action from the request. |
||||
sub _handle_request { |
||||
my $r = shift; |
||||
|
||||
# Parse JSON request |
||||
my $request = parse_request($r); |
||||
|
||||
# Get repository root for the current vendor |
||||
my %paths = $r->dir_config->get('ScmVendorPaths'); |
||||
|
||||
my $vendor = $request->{vendor}; |
||||
my $repository_root = $paths{$vendor}; |
||||
|
||||
# Compare access token |
||||
my $passed_token = $request->{token}; |
||||
my $cfg = Apache2::Module::get_config( __PACKAGE__, $r->server, $r->per_dir_config ); |
||||
|
||||
unless (length($passed_token) >= 8 && ($passed_token eq $cfg->{token})) { |
||||
return make_error($r, Apache2::Const::FORBIDDEN, 'Invalid access token'); |
||||
} |
||||
|
||||
# Abort unless repository root is configured in the Apache configuration |
||||
unless (defined($repository_root)) { |
||||
return make_error($r, |
||||
Apache2::Const::HTTP_UNPROCESSABLE_ENTITY, |
||||
"Vendor '$vendor' not configured."); |
||||
} |
||||
|
||||
# Abort unless the repository root actually exists |
||||
unless (-d $repository_root) { |
||||
return make_error($r, |
||||
Apache2::Const::HTTP_UNPROCESSABLE_ENTITY, |
||||
"Repository path for vendor '$vendor' does not exist."); |
||||
} |
||||
|
||||
# Determine validity of the identifier as a dir name |
||||
my $repository_identifier = $request->{identifier}; |
||||
if ($repository_identifier =~ m{[\\/:*?"<>|]}) { |
||||
return make_error($r, |
||||
Apache2::Const::HTTP_UNPROCESSABLE_ENTITY, |
||||
"Repository identifier is an invalid filename"); |
||||
} |
||||
|
||||
# Call the necessary action on disk |
||||
my $target = File::Spec->catdir($repository_root, $repository_identifier); |
||||
my %actions = ( |
||||
'create' => \&create_repository, |
||||
'delete' => \&delete_repository |
||||
); |
||||
|
||||
my $action = $actions{$request->{action}}; |
||||
die "Unknown action.\n" unless defined($action); |
||||
$action->($r, $vendor, $target); |
||||
|
||||
return { |
||||
success => JSON::PP::true, |
||||
message => "The action has completed sucessfully.", |
||||
repository => $target |
||||
}; |
||||
} |
||||
|
||||
## |
||||
# Handler subroutine that is called for each request by Apache |
||||
sub handler { |
||||
my $r = shift; |
||||
|
||||
my $response; |
||||
$r->content_type('application/json'); |
||||
|
||||
eval { |
||||
$response = _handle_request($r); |
||||
1; |
||||
} or do { |
||||
my $err = $@; |
||||
chomp $err; |
||||
$response = make_error($r, Apache2::Const::HTTP_BAD_REQUEST, $err); |
||||
}; |
||||
|
||||
|
||||
print encode_json($response); |
||||
return Apache2::Const::OK; |
||||
} |
||||
|
||||
1; |
@ -1,62 +0,0 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Feature: Project creation with support for project type |
||||
As a ChiliProject Admin |
||||
I want to set a project type when creating a project |
||||
So that the default planning element types are enabled automatically |
||||
|
||||
Background: |
||||
Given there are the following types: |
||||
| Name | Is default | |
||||
| Phase | true | |
||||
| Milestone | false | |
||||
| Something else | false | |
||||
|
||||
And there are the following project types: |
||||
| Name | |
||||
| Standard Project | |
||||
| Extraordinary Project | |
||||
|
||||
Scenario: The admin may create a project with a project type |
||||
Given I am already admin |
||||
When I go to the admin page |
||||
And I follow the first link matching "Projects" |
||||
And I follow "New project" |
||||
Then I fill in "Fancy Pants" for "Name" |
||||
And I fill in "fancy-pants" for "Identifier" |
||||
And I check "Timelines" |
||||
And I select "Standard Project" from "Project type" |
||||
And I press "Create" |
||||
Then I should see a notice flash stating "Successful creation." |
||||
When the following types are enabled for projects of type "Standard Project" |
||||
| Phase | |
||||
| Milestone | |
||||
And I go to the "types" tab of the settings page of the project called "Fancy Pants" |
||||
Then the "Phase" checkbox should be checked |
||||
And the "Milestone" checkbox should be checked |
@ -1,64 +0,0 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Feature: Project Default Settings |
||||
Background: |
||||
Given I am already admin |
||||
|
||||
Scenario: Setting project defaults |
||||
When I go to the projects tab of the settings page |
||||
And I uncheck "Activity" |
||||
And I uncheck "Wiki" |
||||
And I press "Save" |
||||
And I go to the projects admin page |
||||
And I follow "New project" |
||||
Then the "Wiki" checkbox should not be checked |
||||
And the "Activity" checkbox should not be checked |
||||
|
||||
Scenario: Setting project defaults without activity |
||||
When I go to the projects tab of the settings page |
||||
And I uncheck "Activity" |
||||
And I check "Wiki" |
||||
And I check "Forums" |
||||
And I press "Save" |
||||
And I go to the projects admin page |
||||
And I follow "New project" |
||||
Then the "Wiki" checkbox should be checked |
||||
And the "Activity" checkbox should not be checked |
||||
And the "Forums" checkbox should be checked |
||||
|
||||
Scenario: Creating a new project with default settings |
||||
When I go to the projects admin page |
||||
And I follow "New project" |
||||
And I fill in "project_name" with "A New Hope" |
||||
And I fill in "project_identifier" with "a-new-hope" |
||||
And I uncheck "Wiki" |
||||
And I press "Create" |
||||
And I go to the settings page of the project called "A New Hope" |
||||
And I click on "tab-modules" |
||||
Then the "Wiki" checkbox should not be checked |
@ -1,123 +0,0 @@ |
||||
#-- encoding: UTF-8 |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
desc 'Run the Continuous Integration tests for OpenProject' |
||||
task :ci do |
||||
# RAILS_ENV and ENV[] can diverge so force them both to test |
||||
ENV['RAILS_ENV'] = 'test' |
||||
RAILS_ENV = 'test' |
||||
Rake::Task['ci:setup'].invoke |
||||
Rake::Task['ci:build'].invoke |
||||
Rake::Task['ci:teardown'].invoke |
||||
end |
||||
|
||||
# Tasks can be hooked into by redefining them in a plugin |
||||
namespace :ci do |
||||
namespace :travis do |
||||
desc 'Prepare a TRAVIS run' |
||||
task :prepare do |
||||
Rails.env = 'test' |
||||
ENV['RAILS_ENV'] = 'test' |
||||
RAILS_ENV = 'test' |
||||
db_adapter = ENV['DB'] |
||||
|
||||
raise 'please provide a db adapter with DB={mysql2, postgres}' unless db_adapter |
||||
|
||||
db_info = { |
||||
'mysql2' => { |
||||
'adapter' => 'mysql2', |
||||
'username' => 'root' |
||||
}, |
||||
'postgres' => { |
||||
'adapter' => 'postgresql', |
||||
'username' => 'postgres' |
||||
} |
||||
}[db_adapter] |
||||
|
||||
database_yml = { |
||||
'database' => 'chiliproject_test' |
||||
}.merge(db_info) |
||||
|
||||
File.open('config/database.yml', 'w') do |f| |
||||
YAML.dump({ 'test' => database_yml, |
||||
'development' => database_yml, |
||||
'production' => database_yml }, f) |
||||
end |
||||
|
||||
# Create and migrate the database |
||||
Rake::Task['db:create'].invoke |
||||
|
||||
# db:create invokes db:load_config. db:load_config collects migration paths, but the |
||||
# migration paths for plugins are set on the Engine config when the application |
||||
# is initialized, which the environment task does. The environment task is only later |
||||
# executed as dependency for db:migrate. db:migrate also depends on load_config, but since |
||||
# it has been executed before, rake doesn't execute it a second time. |
||||
# Loading the environment bevore explicitly executing db:load_config (not only invoking it) |
||||
# makes rake execute it a second time after the environment has been loaded. |
||||
# Loading the environment before db:create does not work, since initializing the application |
||||
# depends on an existing databse. |
||||
Rake::Task['environment'].invoke |
||||
Rake::Task['db:load_config'].execute |
||||
|
||||
Rake::Task['db:migrate'].invoke |
||||
Rake::Task['db:schema:dump'].invoke |
||||
|
||||
# Create test repositories |
||||
Rake::Task['test:scm:setup:all'].invoke |
||||
end |
||||
end |
||||
|
||||
desc 'Setup OpenProject for a new build.' |
||||
task :setup do |
||||
Rake::Task['ci:dump_environment'].invoke |
||||
Rake::Task['db:drop'].invoke |
||||
Rake::Task['db:create'].invoke |
||||
Rake::Task['db:migrate'].invoke |
||||
Rake::Task['db:schema:dump'].invoke |
||||
Rake::Task['test:scm:update'].invoke |
||||
end |
||||
|
||||
desc 'Build OpenProject' |
||||
task :build do |
||||
Rake::Task['test'].invoke |
||||
end |
||||
|
||||
# Use this to cleanup after building or run post-build analysis. |
||||
desc 'Finish the build' |
||||
task :teardown do |
||||
end |
||||
|
||||
desc 'Dump the environment information to a BUILD_ENVIRONMENT ENV variable for debugging' |
||||
task :dump_environment do |
||||
ENV['BUILD_ENVIRONMENT'] = ['ruby -v', 'gem -v', 'gem list'].collect { |command| |
||||
result = `#{command}` |
||||
"$ #{command}\n#{result}" |
||||
}.join("\n") |
||||
end |
||||
end |
@ -0,0 +1,73 @@ |
||||
#-- encoding: UTF-8 |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
# script/ci_runner.sh |
||||
#!/bin/sh |
||||
|
||||
set -e |
||||
|
||||
# Usage: |
||||
# sh script/ci_runner.sh spec 3 1 |
||||
# |
||||
# Use |
||||
# sh script/ci_runner.sh spec |
||||
# to make use of all available cores on the current machine. Most likely to |
||||
# be used on local dev machines. |
||||
# |
||||
|
||||
# $1: type |
||||
# $2: group size |
||||
# $3: group number |
||||
run() { |
||||
echo $1; |
||||
eval $1; |
||||
echo $2; |
||||
eval $2; |
||||
echo $3; |
||||
eval $3; |
||||
} |
||||
|
||||
if [ $2 != '' ] && [ $3 != '' ] |
||||
then |
||||
GROUPING=" -n $2 --only-group $3" |
||||
else |
||||
GROUPING='' |
||||
fi |
||||
|
||||
if [ $1 = "npm" ]; then |
||||
run "npm test" |
||||
elif [ $1 = "legacy" ]; then |
||||
run "bundle exec parallel_test --type rspec -o '-I spec_legacy' spec_legacy $GROUPING" |
||||
elif [ $1 = "spec" ]; then |
||||
run "bundle exec parallel_test --type rspec --runtime-log script/files/parallel_runtime_rspec.log spec $GROUPING || \ |
||||
bundle exec rspec --only-failures" |
||||
elif [ $1 = "cucumber" ]; then |
||||
run "bundle exec parallel_test --type cucumber -o '-p rerun -r features' --runtime-log script/files/parallel_runtime_cucumber.log features $GROUPING || \ |
||||
bundle exec cucumber -p rerun -r features" |
||||
fi |
@ -0,0 +1,53 @@ |
||||
#-- encoding: UTF-8 |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
# script/ci_setup.sh |
||||
#!/bin/sh |
||||
|
||||
run() { |
||||
echo $1; |
||||
eval $1; |
||||
} |
||||
|
||||
if [ $1 = "mysql" ]; then |
||||
run "mysql -e 'create database travis_ci_test;'" |
||||
run "cp script/templates/database.travis.mysql.yml config/database.yml" |
||||
|
||||
elif [ $1 = "postgres" ]; then |
||||
run "psql -c 'create database travis_ci_test;' -U postgres" |
||||
run "cp script/templates/database.travis.postgres.yml config/database.yml" |
||||
|
||||
fi |
||||
|
||||
# run migrations for mysql or postgres |
||||
if [ $1 != '' ]; then |
||||
run "bundle exec rake db:migrate" |
||||
run "bundle exec rake spec:prepare" |
||||
run "bundle exec rake test:scm:setup:all" |
||||
fi |
@ -0,0 +1,102 @@ |
||||
features/admin/user.feature:21.254794597625732 |
||||
features/custom_fields/create_bool.feature:11.824590921401978 |
||||
features/custom_fields/edit_bool.feature:6.803788900375366 |
||||
features/general_administration.feature:7.458944082260132 |
||||
features/planning_elements/filter.feature:67.90526580810547 |
||||
features/projects/show.feature:4.4210638999938965 |
||||
features/users/password_complexity_checks.feature:9.30823802947998 |
||||
features/versions/edit.feature:2.957937717437744 |
||||
features/work_packages/changesets_on_show.feature:10.702651023864746 |
||||
features/work_packages/copy_with_watchers.feature:12.6042799949646 |
||||
features/work_packages/navigate_to_edit.feature:7.26867413520813 |
||||
features/work_packages/switch_type.feature:4.98246693611145 |
||||
features/activities/index.feature:3.113095998764038 |
||||
features/custom_fields/edit_bool_delete_localizations.feature:0.6856679916381836 |
||||
features/issues/time_entries.feature:29.522482872009277 |
||||
features/projects/archive.feature:22.968013048171997 |
||||
features/timelines/timeline_comparison_view.feature:9.385524988174438 |
||||
features/timelines/timeline_view_with_reporters.feature:70.87646293640137 |
||||
features/users/add_user.feature:3.314553737640381 |
||||
features/users/force_password_change.feature:10.895864963531494 |
||||
features/users/random_password_assignment.feature:11.002774000167847 |
||||
features/wiki/parent_page.feature:5.9299211502075195 |
||||
features/wiki/wiki_initial.feature:6.297181844711304 |
||||
features/work_packages/diff_on_show.feature:0.9747560024261475 |
||||
features/planning_element_type_colors/colors_administration.feature:21.823258876800537 |
||||
features/project_types/project_types_administration.feature:25.556543827056885 |
||||
features/projects/visibility.feature:4.468430042266846 |
||||
features/reportings/reporting_permissions.feature:29.80443787574768 |
||||
features/timelines/navigate_to_timeline.feature:8.427798986434937 |
||||
features/timelines/show.feature:4.93776273727417 |
||||
features/types/types_adminstration.feature:20.40826916694641 |
||||
features/users/user_project_access.feature:7.243958950042725 |
||||
features/wiki/wiki_rename.feature:3.488585948944092 |
||||
features/work_packages/create.feature:1.4752600193023682 |
||||
features/work_packages/log_time_on_update.feature:3.8278870582580566 |
||||
features/work_packages/preview.feature:4.523224115371704 |
||||
features/work_packages/work_package_textile_link.feature:10.034466743469238 |
||||
features/custom_fields/create_date.feature:6.6774070262908936 |
||||
features/custom_fields/create_text.feature:1.6597249507904053 |
||||
features/issues/issue_edit.feature:24.95867085456848 |
||||
features/issues/issue_show.feature:73.81519412994385 |
||||
features/issues/show.feature:4.266723155975342 |
||||
features/menu_items.feature:10.250272989273071 |
||||
features/projects/copy_project.feature:37.00779914855957 |
||||
features/projects/index_feed.feature:2.2133450508117676 |
||||
features/users/lock_user.feature:1.115311861038208 |
||||
features/wiki/wiki_add_edit.feature:16.09875988960266 |
||||
features/wiki/wiki_index.feature:2.774636745452881 |
||||
features/work_packages/editable_fields.feature:4.424482107162476 |
||||
features/work_packages/index_groupings.feature:1.3538601398468018 |
||||
features/custom_fields/create_int.feature:4.047360181808472 |
||||
features/custom_fields/edit_text.feature:11.943168878555298 |
||||
features/layout.feature:0.8569579124450684 |
||||
features/projects/create.feature:15.350144147872925 |
||||
features/roles/role_crud.feature:10.392412900924683 |
||||
features/timelines/timeline_filter_custom_fields.feature:53.22785496711731 |
||||
features/timelines/timeline_work_package_show_view.feature:7.8942320346832275 |
||||
features/users/brute_force_prevention.feature:11.917443037033081 |
||||
features/wiki/breadcrumb.feature:3.7399659156799316 |
||||
features/work_packages/attachments.feature:5.713495969772339 |
||||
features/work_packages/bulk.feature:58.23527383804321 |
||||
features/work_packages/index_move_columns.feature:2.68430495262146 |
||||
features/work_packages/moves/work_package_moves_new_copy.feature:13.66756010055542 |
||||
features/custom_fields/create_float.feature:10.152086019515991 |
||||
features/enumerations/administration.feature:2.9889941215515137 |
||||
features/issues/issue_new.feature:3.173460006713867 |
||||
features/issues/query.feature:1.7911748886108398 |
||||
features/menu_items/query_menu_items.feature:28.428421020507812 |
||||
features/messages/message.feature:21.245274782180786 |
||||
features/planning_elements/show.feature:4.53304123878479 |
||||
features/users/lost_password.feature:3.947967052459717 |
||||
features/users/password_expiry.feature:10.588953256607056 |
||||
features/work_packages/error_on_update.feature:6.589915037155151 |
||||
features/work_packages/localized_log_time.feature:5.800209999084473 |
||||
features/work_packages/update.feature:14.095234870910645 |
||||
features/work_packages/work_package_show.feature:83.98213696479797 |
||||
features/custom_fields/create_list.feature:13.42398476600647 |
||||
features/menu_items/wiki_menu_items.feature:62.65936994552612 |
||||
features/project_types/project_creation_with_type.feature:4.067986011505127 |
||||
features/reportings/reporting_administration.feature:33.99033284187317 |
||||
features/search/pagination.feature:16.74678325653076 |
||||
features/timelines/timeline_wiki_macro.feature:8.089543104171753 |
||||
features/users/former_passwords.feature:3.4739813804626465 |
||||
features/users/status.feature:15.692255020141602 |
||||
features/users/user_activation.feature:3.3909239768981934 |
||||
features/users/user_auth.feature:18.107865810394287 |
||||
features/users/user_registration.feature:3.107316017150879 |
||||
features/wiki/wiki_create_child.feature:5.420360803604126 |
||||
features/wiki/wiki_new_child.feature:3.489448308944702 |
||||
features/issues/relations.feature:1.1860320568084717 |
||||
features/projects/default_settings.feature:14.26863408088684 |
||||
features/projects/settings.feature:2.4463469982147217 |
||||
features/search/search.feature:23.503453969955444 |
||||
features/session/user_session.feature:34.25952196121216 |
||||
features/timelines/timeline_view.feature:26.201819896697998 |
||||
features/timelines/timeline_view_custom_fields.feature:105.09295701980591 |
||||
features/timelines/timeline_view_with_filters.feature:7.878263711929321 |
||||
features/types/types.feature:1.200028896331787 |
||||
features/wiki/wiki_links.feature:1.0075469017028809 |
||||
features/work_packages/destroy.feature:7.24234414100647 |
||||
features/work_packages/export.feature:0.5469858646392822 |
||||
features/work_packages/reports.feature:1.3116469383239746 |
@ -0,0 +1,443 @@ |
||||
spec/controllers/work_packages/bulk_controller_spec.rb:99.308038 |
||||
spec/models/work_package/work_package_scheduling_spec.rb:3.720126 |
||||
spec/lib/api/v3/formatter/txt_charset_spec.rb:0.021452 |
||||
spec/permissions/copy_projects_spec.rb:0.92576 |
||||
spec/models/work_package/work_package_custom_fields_spec.rb:5.968828 |
||||
spec/lib/api/utilities/property_name_converter_spec.rb:1.646691 |
||||
spec/requests/api/v3/versions/project_resource_spec.rb:8.200756 |
||||
spec/models/project_type_spec.rb:0.300143 |
||||
spec/helpers/work_packages_filter_helper_spec.rb:1.056052 |
||||
spec/models/work_package/work_package_relations_spec.rb:14.233324 |
||||
spec/features/categories/delete_spec.rb:3.767279 |
||||
spec/lib/open_project/themes/theme_finder_spec.rb:0.416195 |
||||
spec/controllers/api/v2/project_types_controller_spec.rb:0.505695 |
||||
spec/views/api/v2/reportings/index_api_json_spec.rb:0.53145 |
||||
spec/helpers/pagination_helper_spec.rb:0.550713 |
||||
spec/lib/api/v3/work_packages/schema/typed_work_package_schema_spec.rb:0.138517 |
||||
spec/models/planning_element_type_color_spec.rb:0.11658 |
||||
spec/lib/api/v3/utilities/custom_field_injector_spec.rb:2.369 |
||||
spec/models/mail_handler_spec.rb:0.571408 |
||||
spec/views/api/v2/project_associations/available_projects_api_json_spec.rb:0.475569 |
||||
spec/controllers/homescreen_controller_spec.rb:3.045273 |
||||
spec/lib/api/v3/projects/project_collection_representer_spec.rb:0.689504 |
||||
spec/views/api/v2/authentication/index_api_json_spec.rb:0.060686 |
||||
spec/models/timeline_spec.rb:0.103997 |
||||
spec/features/menu_items/admin_menu_item_spec.rb:0.342411 |
||||
spec/models/changeset_spec.rb:3.163388 |
||||
spec/lib/api/v3/users/user_representer_spec.rb:0.569778 |
||||
spec/requests/api/v3/types/types_by_project_resource_spec.rb:6.694846 |
||||
spec/views/api/v2/projects/show_api_json_spec.rb:3.404146 |
||||
spec/controllers/custom_fields_controller_spec.rb:0.987382 |
||||
spec/routing/admin_spec.rb:0.004387 |
||||
spec/helpers/timelines_helper_spec.rb:0.159103 |
||||
spec/routing/categories_spec.rb:0.019904 |
||||
spec/views/account/login.html.erb_spec.rb:0.292788 |
||||
spec/models/project/storage_spec.rb:8.477173 |
||||
spec/models/menu_item_spec.rb:0.1732 |
||||
spec/controllers/api/v2/planning_element_type_colors_controller_spec.rb:0.723309 |
||||
spec/controllers/api/v2/pagination/statuses_controller_spec.rb:0.040493 |
||||
spec/models/custom_value/version_strategy_spec.rb:0.314755 |
||||
spec/controllers/api/v2/project_associations_controller_spec.rb:4.544713 |
||||
spec/controllers/statuses_controller_spec.rb:3.491003 |
||||
spec/lib/open_project/plugins/module_handler_spec.rb:0.002694 |
||||
spec/controllers/project_types_controller_spec.rb:1.1399 |
||||
spec/controllers/authentication_spec.rb:0.082939 |
||||
spec/models/reporting_spec.rb:1.123389 |
||||
spec/controllers/users_controller_spec.rb:6.150856 |
||||
spec/workers/mail_notification_jobs/deliver_watcher_notification_job_spec.rb:1.139756 |
||||
spec/views/api/v2/project_types/index_api_json_spec.rb:0.027065 |
||||
spec/models/work_package/work_package_action_mailer_spec.rb:3.539816 |
||||
spec/controllers/reportings_controller_spec.rb:6.368339 |
||||
spec/permissions/work_packages_bulk_spec.rb:0.590634 |
||||
spec/lib/open_project/footer_spec.rb:0.009343 |
||||
spec/requests/api/v3/priority_resource_spec.rb:3.395324 |
||||
spec/lib/acts_as_list/acts_as_list_patch_spec.rb:0.016513 |
||||
spec/models/repository/subversion_spec.rb:10.255372 |
||||
spec/lib/open_project/content_type_detector_spec.rb:0.055394 |
||||
spec/routing/previews_routing_spec.rb:0.21598 |
||||
spec/lib/open_project/client_preference_extractor_spec.rb:0.0464 |
||||
spec/lib/open_project/omni_auth/authorization_spec.rb:0.056375 |
||||
spec/models/journal/aggregated_journal_spec.rb:15.18938 |
||||
spec/views/projects/settings.html.erb_spec.rb:0.394454 |
||||
spec/models/workflow_spec.rb:0.7356 |
||||
spec/features/members/roles_spec.rb:28.947552 |
||||
spec/controllers/members_controller_spec.rb:3.175401 |
||||
spec/requests/api/v3/status_resource_spec.rb:5.120934 |
||||
spec/views/api/experimental/versions/index_api_json_spec.rb:0.392903 |
||||
spec/controllers/my_controller_spec.rb:2.251532 |
||||
spec/models/work_package/work_package_planning_spec.rb:12.312333 |
||||
spec/views/search/index.html.erb_spec.rb:0.6206 |
||||
spec/requests/short_uri_wp_spec.rb:0.00947 |
||||
spec/lib/open_project/scm/adapters/git_adapter_spec.rb:1.700146 |
||||
spec/views/api/v2/authentication/index_api_xml_spec.rb:0.050683 |
||||
spec/lib/api/v3/users/user_collection_representer_spec.rb:0.231104 |
||||
spec/controllers/work_packages_controller_spec.rb:24.41532 |
||||
spec/services/add_attachment_service_spec.rb:2.933369 |
||||
spec/lib/api/v3/statuses/status_collection_representer_spec.rb:0.180904 |
||||
spec/controllers/api/v2/workflows_controller_spec.rb:6.83835 |
||||
spec/models/work_package/work_package_validations_spec.rb:7.127172 |
||||
spec/controllers/api/v2/users_controller_spec.rb:1.534868 |
||||
spec/controllers/api/v2/versions_controller_spec.rb:7.633275 |
||||
spec/requests/api/v3/projects/available_responsibles_api_spec.rb:7.744719 |
||||
spec/views/work_package/show.html.erb_spec.rb:1.528613 |
||||
spec/helpers/application_helper_spec.rb:3.370952 |
||||
spec/lib/api/v3/queries/query_representer_spec.rb:0.707311 |
||||
spec/controllers/project_associations_controller_spec.rb:5.466559 |
||||
spec/features/workflows/copy_spec.rb:0.310549 |
||||
spec/lib/api/v3/work_packages/work_package_payload_representer_spec.rb:8.894541 |
||||
spec/routing/work_package/calendars_routing_spec.rb:0.006696 |
||||
spec/requests/api/v3/authentication_spec.rb:3.073634 |
||||
spec/views/api/experimental/queries/available_columns_api_json_spec.rb:0.152834 |
||||
spec/app/services/scm/create_managed_repository_service_spec.rb:0.562465 |
||||
spec/routing/my_spec.rb:0.067017 |
||||
spec/features/members/error_messages_spec.rb:63.349423 |
||||
spec/lib/open_project/authentication/strategies/warden/global_basic_auth_spec.rb:0.032612 |
||||
spec/controllers/api/v2/statuses_controller_spec.rb:0.137511 |
||||
spec/permissions/manage_boards_spec.rb:0.791393 |
||||
spec/policies/redirect_policy_spec.rb:0.066476 |
||||
spec/permissions/export_work_packages_spec.rb:0.619033 |
||||
spec/routing/wiki_routing_spec.rb:0.020105 |
||||
spec/views/repositories/stats.html.erb_spec.rb:0.241457 |
||||
spec/controllers/wiki_menu_items_controller_spec.rb:1.862367 |
||||
spec/routing/search_spec.rb:0.003618 |
||||
spec/features/users/edit_users_spec.rb:16.242113 |
||||
spec/models/repository/git_spec.rb:33.339239 |
||||
spec/models/enabled_module_spec.rb:0.754045 |
||||
spec/controllers/copy_projects_controller_spec.rb:4.520659 |
||||
spec/permissions/edit_messages_spec.rb:0.328164 |
||||
spec/helpers/projects_helper_spec.rb:1.338794 |
||||
spec/controllers/journals_controller_spec.rb:2.56735 |
||||
spec/views/users/edit.html.erb_spec.rb:1.837561 |
||||
spec/requests/api/v3/activity_resource_spec.rb:12.670909 |
||||
spec/views/settings/_authentication.html.erb_spec.rb:0.255905 |
||||
spec/controllers/auth_sources_controller_spec.rb:1.652721 |
||||
spec/controllers/api/v2/pagination/reported_project_statuses_controller_spec.rb:0.055202 |
||||
spec/permissions/edit_work_packages_spec.rb:1.997864 |
||||
spec/lib/api/v3/work_packages/schema/specific_work_package_schema_spec.rb:1.455565 |
||||
spec/lib/api/v3/activities/activity_representer_spec.rb:7.697857 |
||||
spec/controllers/api/experimental/concerns/query_loading_spec.rb:0.26306 |
||||
spec/features/menu_items/top_menu_item_spec.rb:33.061262 |
||||
spec/lib/open_project/notifications_spec.rb:0.012448 |
||||
spec/views/layouts/base.html.erb_spec.rb:1.273679 |
||||
spec/routing/workflows_spec.rb:0.032106 |
||||
spec/models/work_package/work_package_acts_as_searchable_spec.rb:0.990979 |
||||
spec/lib/api/v3/types/type_representer_spec.rb:0.584216 |
||||
spec/features/auth/omniauth_spec.rb:4.438837 |
||||
spec/lib/api/v3/versions/version_representer_spec.rb:1.883125 |
||||
spec/lib/api/v3/work_packages/schema/work_package_schema_representer_spec.rb:75.732318 |
||||
spec/controllers/repositories_controller_spec.rb:3.984208 |
||||
spec/views/users/show.html.erb_spec.rb:0.458233 |
||||
spec/models/menu_items/wiki_menu_item_spec.rb:1.204603 |
||||
spec/models/custom_field_spec.rb:0.798909 |
||||
spec/views/api/v2/planning_elements/index_api_json_spec.rb:2.246778 |
||||
spec/requests/api/v3/types/type_resource_spec.rb:4.635973 |
||||
spec/models/work_package/work_package_status_spec.rb:4.612853 |
||||
spec/requests/api/v3/work_packages/work_packages_by_project_resource_spec.rb:27.94817 |
||||
spec/security/active_support_to_json_spec.rb:0.002711 |
||||
spec/services/set_localization_service_spec.rb:0.085571 |
||||
spec/permissions/add_messages_spec.rb:0.499467 |
||||
spec/views/api/v2/reported_project_statuses/show_api_json_spec.rb:0.143796 |
||||
spec/features/time_entry/csv_export_spec.rb:3.218654 |
||||
spec/requests/api/v3/watcher_resource_spec.rb:42.718018 |
||||
spec/helpers/previews_helper_spec.rb:0.007329 |
||||
spec/routing/homescreen_spec.rb:0.003158 |
||||
spec/routing/users_routing_spec.rb:0.027318 |
||||
spec/views/common/validation_error.html.erb_spec.rb:0.024872 |
||||
spec/controllers/wiki_controller_spec.rb:32.398348 |
||||
spec/models/news_spec.rb:5.584859 |
||||
spec/lib/open_project/themes/default_theme_spec.rb:0.060132 |
||||
spec/controllers/api/v2/reportings_controller_spec.rb:4.071956 |
||||
spec/lib/custom_field_form_builder_spec.rb:0.758605 |
||||
spec/views/api/v2/users/index_api_json_spec.rb:0.036961 |
||||
spec/workers/mail_notification_jobs/deliver_work_package_notification_job_spec.rb:5.112851 |
||||
spec/models/custom_value/int_strategy_spec.rb:0.020063 |
||||
spec/models/custom_value/user_strategy_spec.rb:0.047633 |
||||
spec/routing/api/v2/planning_element_priorities_routing_spec.rb:0.003882 |
||||
spec/models/principal_spec.rb:2.722756 |
||||
spec/lib/open_project/principal_allowance_evaluator/default_spec.rb:0.094879 |
||||
spec/models/work_package/work_package_acts_as_watchable_spec.rb:3.010864 |
||||
spec/models/query_spec.rb:0.882284 |
||||
spec/lib/open_project/before_delayed_job_spec.rb:0.004921 |
||||
spec/helpers/settings_helper_spec.rb:0.449173 |
||||
spec/views/api/v2/reported_project_statuses/index_api_json_spec.rb:0.036946 |
||||
spec/views/api/v2/statuses/index_api_json_spec.rb:0.03264 |
||||
spec/views/layouts/admin.html.erb_spec.rb:0.341824 |
||||
spec/models/custom_value_spec.rb:0.223067 |
||||
spec/models/custom_value/format_strategy_spec.rb:0.011586 |
||||
spec/controllers/api/v2/planning_elements_controller_spec.rb:42.751425 |
||||
spec/routing/api/v1_spec.rb:0.33479 |
||||
spec/controllers/api/v2/projects_controller_spec.rb:2.580679 |
||||
spec/models/work_package/work_package_visibility_spec.rb:2.492948 |
||||
spec/lib/api/v3/repositories/revision_representer_spec.rb:0.956074 |
||||
spec/lib/acts_as_watchable/lib/acts_as_watchable/routes_spec.rb:0.022558 |
||||
spec/models/work_package/work_package_reschedule_after_spec.rb:21.603916 |
||||
spec/controllers/search_controller_spec.rb:21.447626 |
||||
spec/controllers/api/v2/pagination/projects_controller_spec.rb:0.091845 |
||||
spec/requests/api/v3/work_packages/create_form_resource_spec.rb:1.912547 |
||||
spec/features/menu_items/query_menu_item_spec.rb:19.485524 |
||||
spec/models/group_spec.rb:1.439552 |
||||
spec/models/messages_spec.rb:2.010218 |
||||
spec/requests/api/v3/activities_by_work_package_resource_spec.rb:3.774064 |
||||
spec/models/work_package/planning_comparison_spec.rb:4.443698 |
||||
spec/lib/redcloth/redcloth_spec.rb:0.020554 |
||||
spec/views/api/experimental/work_packages/column_sums_api_json_spec.rb:0.045603 |
||||
spec/controllers/projects_controller_spec.rb:14.477271 |
||||
spec/models/work_package_spec.rb:68.809559 |
||||
spec/views/api/v2/planning_element_type_colors/show_api_json_spec.rb:0.050447 |
||||
spec/lib/acts_as_journalized/journaled_spec.rb:4.595938 |
||||
spec/models/user_password_spec.rb:0.111366 |
||||
spec/models/project/copy_spec.rb:12.506086 |
||||
spec/lib/api/v3/work_packages/work_package_collection_representer_spec.rb:59.994742 |
||||
spec/views/api/v2/statuses/show_api_json_spec.rb:0.028202 |
||||
spec/views/api/v2/planning_element_types/index_api_json_spec.rb:0.028041 |
||||
spec/controllers/timelog_controller_spec.rb:2.847921 |
||||
spec/helpers/sort_helper_spec.rb:0.026655 |
||||
spec/requests/api/v3/attachments/attachments_by_work_package_resource_spec.rb:32.124922 |
||||
spec/controllers/timelines_controller_spec.rb:10.412259 |
||||
spec/lib/open_project/scm/manager_spec.rb:0.006536 |
||||
spec/models/user_preference_spec.rb:0.009078 |
||||
spec/models/version_spec.rb:5.950683 |
||||
spec/models/attachment_spec.rb:3.367901 |
||||
spec/models/project_spec.rb:4.151617 |
||||
spec/views/api/v2/custom_fields/index_api_rabl_spec.rb:0.116459 |
||||
spec/models/custom_value/float_strategy_spec.rb:0.020288 |
||||
spec/models/menu_items/query_menu_item_spec.rb:0.131244 |
||||
spec/lib/api/v3/priorities/priority_collection_representer_spec.rb:0.132981 |
||||
spec/models/work_package/ask_before_destruction_spec.rb:13.409882 |
||||
spec/routing/settings_spec.rb:0.015308 |
||||
spec/views/api/v2/reportings/show_api_json_spec.rb:0.528269 |
||||
spec/requests/api/v3/activities_api_spec.rb:3.134775 |
||||
spec/controllers/api/experimental/groups_controller_spec.rb:1.187537 |
||||
spec/features/groups/groups_spec.rb:0.227934 |
||||
spec/lib/open_project/passwords_spec.rb:0.11591800000000001 |
||||
spec/decorators/api/experimental/work_package_decorator_spec.rb:0.144356 |
||||
spec/controllers/api/v2/pagination/principals_controller_spec.rb:0.027171 |
||||
spec/views/api/experimental/queries/grouped_api_json_spec.rb:0.075023 |
||||
spec/features/users/create_spec.rb:21.664397 |
||||
spec/controllers/application_controller_spec.rb:0.429966 |
||||
spec/lib/representable_spec.rb:0.007485 |
||||
spec/lib/journal_formatter/custom_field_spec.rb:0.20238 |
||||
spec/controllers/api/experimental/queries_controller_spec.rb:5.389787 |
||||
spec/controllers/api/experimental/users_controller_spec.rb:0.567282 |
||||
spec/controllers/api/experimental/work_packages_controller_spec.rb:11.569858 |
||||
spec/models/role_spec.rb:0.015243 |
||||
spec/controllers/types_controller_spec.rb:9.081033 |
||||
spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb:1.102798 |
||||
spec/models/wiki_spec.rb:2.127099 |
||||
spec/controllers/news_controller_spec.rb:4.474249 |
||||
spec/views/api/v2/versions/index_api_json_spec.rb:0.29338 |
||||
spec/lib/redmine/access_control_spec.rb:0.017074 |
||||
spec/views/my/page.html.erb_spec.rb:2.146018 |
||||
spec/lib/api/v3/categories/category_collection_representer_spec.rb:2.39424 |
||||
spec/requests/api/v3/projects/version_resource_spec.rb:7.604758 |
||||
spec/lib/open_project/files_spec.rb:0.053701 |
||||
spec/requests/api/v3/user_resource_spec.rb:3.312744 |
||||
spec/routing/status_routing_spec.rb:0.035108 |
||||
spec/features/accessibility/work_packages/work_package_query_spec.rb:164.053308 |
||||
spec/features/members/pagination_spec.rb:56.184391 |
||||
spec/requests/api/v3/user/userlock_resource_spec.rb:0.866135 |
||||
spec/models/queries/work_packages/filter_spec.rb:0.056821 |
||||
spec/views/api/experimental/projects/index_api_json_spec.rb:0.547933 |
||||
spec/controllers/settings_controller_spec.rb:4.897906 |
||||
spec/lib/api/decorators/formattable_spec.rb:0.047913 |
||||
spec/controllers/api/v2/planning_element_priorities_controller_spec.rb:0.461471 |
||||
spec/controllers/activities_controller_spec.rb:4.941392 |
||||
spec/models/wiki_page_spec.rb:1.968979 |
||||
spec/requests/api/v3/query_resource_spec.rb:11.706804 |
||||
spec/lib/open_project/plugins/acts_as_op_engine_spec.rb:0.017704 |
||||
spec/features/attachments/attachments_spec.rb:8.27895 |
||||
spec/controllers/concerns/omniauth_login_spec.rb:1.312297 |
||||
spec/routing/work_package_bulk_spec.rb:0.009306 |
||||
spec/controllers/attachments_controller_spec.rb:3.478276 |
||||
spec/lib/redmine/unified_diff_spec.rb:0.007393 |
||||
spec/requests/api/v3/projects/available_assignees_api_spec.rb:6.033197 |
||||
spec/routing/journals_spec.rb:0.009339 |
||||
spec/permissions/delete_work_packages_spec.rb:0.306033 |
||||
spec/permissions/manage_repositories_spec.rb:0.368767 |
||||
spec/lib/api/v3/attachments/attachment_representer_spec.rb:9.434732 |
||||
spec/controllers/api/experimental/versions_controller_spec.rb:2.10154 |
||||
spec/controllers/api/v2/pagination/project_types_controller_spec.rb:0.044854 |
||||
spec/requests/api/v3/version_resource_spec.rb:2.232249 |
||||
spec/permissions/add_work_packages_spec.rb:1.325141 |
||||
spec/lib/api/v3/attachments/attachment_metadata_representer_spec.rb:0.030393 |
||||
spec/models/permitted_params_spec.rb:0.50866 |
||||
spec/helpers/work_packages_helper_spec.rb:1.749106 |
||||
spec/features/work_packages/details/inplace_editor/subject_editor_spec.rb:103.179282 |
||||
spec/views/api/experimental/projects/show_api_json_spec.rb:0.299414 |
||||
spec/views/api/v2/project_associations/show_api_json_spec.rb:0.293076 |
||||
spec/lib/journal_formatter/attachment_spec.rb:1.002066 |
||||
spec/app/services/scm/repository_factory_service_spec.rb:0.166047 |
||||
spec/controllers/api/v2/custom_fields_controller_spec.rb:6.572072 |
||||
spec/lib/api/v3/priorities/priority_representer_spec.rb:0.057706 |
||||
spec/routing/repositories_routing_spec.rb:0.111144 |
||||
spec/lib/api/utilities/resource_link_parser_spec.rb:0.052445 |
||||
spec/models/system_user_spec.rb:0.39638 |
||||
spec/routing/work_package/auto_completes_routing_spec.rb:0.004203 |
||||
spec/controllers/api/experimental/projects_controller_spec.rb:0.979335 |
||||
spec/routing/work_packages_spec.rb:0.087341 |
||||
spec/models/journal_manager_spec.rb:3.200829 |
||||
spec/controllers/api/v2/planning_element_types_controller_spec.rb:5.543501 |
||||
spec/features/auth/login_spec.rb:2.611287 |
||||
spec/helpers/search_helper_spec.rb:0.796013 |
||||
spec/routing/api/v2/pagination_spec.rb:0.029344 |
||||
spec/helpers/users_helper_spec.rb:0.094999 |
||||
spec/services/move_work_package_service_spec.rb:32.159455 |
||||
spec/features/repositories/repository_settings_spec.rb:50.164637 |
||||
spec/models/work_package/work_package_nested_set_spec.rb:33.199842 |
||||
spec/lib/api/v3/work_packages/update_contract_spec.rb:3.181564 |
||||
spec/models/custom_value/date_strategy_spec.rb:0.022117 |
||||
spec/features/accessibility/work_packages/calendar_toggable_fieldsets_spec.rb:18.669838 |
||||
spec/lib/open_project/text_formatting_spec.rb:27.353966 |
||||
spec/models/available_project_status_spec.rb:0.287849 |
||||
spec/mailers/user_mailer_spec.rb:16.599687 |
||||
spec/permissions/edit_journals_spec.rb:0.882207 |
||||
spec/app/services/scm/checkout_instructions_service_spec.rb:0.493521 |
||||
spec/controllers/api/v2/planning_element_journals_controller_spec.rb:1.461652 |
||||
spec/permissions/manage_news_spec.rb:0.540332 |
||||
spec/features/boards/message_spec.rb:6.443044 |
||||
spec/views/api/experimental/work_packages/column_data_api_json_spec.rb:0.044956 |
||||
spec/routing/project_routing_spec.rb:0.113593 |
||||
spec/routing/api/v2/workflows_spec.rb:0.004452 |
||||
spec/models/member_spec.rb:3.393925 |
||||
spec/lib/api/v3/configuration/configuration_representer_spec.rb:0.074182 |
||||
spec/features/api/authentication_spec.rb:0.664103 |
||||
spec/lib/api/decorators/link_object_spec.rb:0.03981 |
||||
spec/requests/api/v3/work_packages/form/work_package_form_resource_spec.rb:192.160083 |
||||
spec/routing/roles_spec.rb:0.004646 |
||||
spec/views/api/v2/planning_element_type_colors/index_api_json_spec.rb:0.025634 |
||||
spec/views/work_package/auto_complete/index_spec.rb:0.12725 |
||||
spec/controllers/news/comments_controller_spec.rb:0.817986 |
||||
spec/models/custom_value/list_strategy_spec.rb:0.03351 |
||||
spec/lib/copy_model/copy_model_spec.rb:0.121108 |
||||
spec/lib/api/v3/work_packages/work_packages_shared_helpers_spec.rb:1.850368 |
||||
spec/requests/api/v3/repositories/revisions_by_work_package_resource_spec.rb:7.117097 |
||||
spec/controllers/boards_controller_spec.rb:2.179682 |
||||
spec/controllers/ldap_auth_sources_controller_spec.rb:0.18973 |
||||
spec/helpers/toolbar_helper_spec.rb:0.013764 |
||||
spec/lib/api/v3/categories/category_representer_spec.rb:1.591553 |
||||
spec/views/api/v2/projects/index_api_json_spec.rb:0.129094 |
||||
spec/views/api/v2/project_associations/index_api_json_spec.rb:0.531214 |
||||
spec/app/services/scm/delete_managed_repository_service_spec.rb:0.630804 |
||||
spec/services/create_work_package_service_spec.rb:1.011436 |
||||
spec/routing/timelog_spec.rb:0.003412 |
||||
spec/controllers/work_packages/calendars_controller_spec.rb:6.69359 |
||||
spec/lib/open_project/themes/theme_spec.rb:0.066844 |
||||
spec/decorators/single_spec.rb:0.227688 |
||||
spec/models/custom_value/bool_strategy_spec.rb:0.025016 |
||||
spec/controllers/work_packages/reports_controller_spec.rb:41.046944 |
||||
spec/policies/query_policy_spec.rb:0.366002 |
||||
spec/features/projects/delete_projects_spec.rb:8.7933 |
||||
spec/models/timelines_project_spec.rb:2.028941 |
||||
spec/views/api/v2/planning_elements/show_api_json_spec.rb:3.894438 |
||||
spec/views/api/v2/planning_elements/index_api_xml_spec.rb:0.276822 |
||||
spec/controllers/api/v2/pagination/users_controller_spec.rb:0.034969 |
||||
spec/requests/api/v3/root_resource_spec.rb:2.349805 |
||||
spec/requests/api/v3/locale_spec.rb:0.545431 |
||||
spec/views/api/v2/projects/show_api_xml_spec.rb:0.079676 |
||||
spec/models/custom_value/string_strategy_spec.rb:0.013353 |
||||
spec/views/api/experimental/groups/index_api_json_spec.rb:0.056683 |
||||
spec/permissions/view_work_packages_spec.rb:0.644323 |
||||
spec/features/accessibility/custom_fields_spec.rb:41.382265 |
||||
spec/lib/api/contracts/model_contract_spec.rb:0.05214 |
||||
spec/controllers/api/experimental/concerns/column_data_spec.rb:0.034266 |
||||
spec/requests/api/v3/projects/work_package_columns_resource_spec.rb:0.787533 |
||||
spec/controllers/categories_controller_spec.rb:9.718838 |
||||
spec/lib/open_project/configuration_spec.rb:0.051237 |
||||
spec/views/api/experimental/work_packages/index_api_json_spec.rb:3.056188 |
||||
spec/features/work_packages/saving_queries_spec.rb:0.001013 |
||||
spec/lib/api/v3/projects/project_representer_spec.rb:4.510719 |
||||
spec/controllers/wiki_menu_authentication_spec.rb:0.527026 |
||||
spec/permissions/edit_wiki_pages_spec.rb:0.530419 |
||||
spec/models/deleted_user_spec.rb:0.389781 |
||||
spec/models/reports_services_spec.rb:0.115777 |
||||
spec/controllers/api/v2/authentication_spec.rb:0.555701 |
||||
spec/requests/api/v3/project_resource_spec.rb:4.325029 |
||||
spec/models/project_association_spec.rb:1.723865 |
||||
spec/controllers/api/v2/reported_project_statuses_controller_spec.rb:1.585815 |
||||
spec/models/reported_project_status_spec.rb:0.363101 |
||||
spec/views/api/v2/planning_element_priorities/index_api_xml_spec.rb:0.255284 |
||||
spec/views/account/register.html.erb_spec.rb:0.315218 |
||||
spec/models/user_deletion_spec.rb:73.864086 |
||||
spec/features/work_packages/table_sorting_spec.rb:8.103008 |
||||
spec/requests/old_issue_2_wp_spec.rb:0.011256 |
||||
spec/controllers/api/experimental/roles_controller_spec.rb:0.63792 |
||||
spec/policies/work_package_policy_spec.rb:0.182723 |
||||
spec/requests/api/v3/category_resource_spec.rb:10.018845 |
||||
spec/models/setting_spec.rb:1.432976 |
||||
spec/lib/open_project/form_tag_helper_spec.rb:0.436246 |
||||
spec/requests/api/v3/repositories/revisions_resource_spec.rb:2.627811 |
||||
spec/routing/api/experimental/versions_spec.rb:0.006777 |
||||
spec/views/wiki/new.html.erb_spec.rb:0.159979 |
||||
spec/lib/open_project/storage_spec.rb:0.025681 |
||||
spec/controllers/work_packages/moves_controller_spec.rb:29.931878 |
||||
spec/routing/api/v2/project_specs_spec.rb:0.009884 |
||||
spec/lib/api/v3/root_representer_spec.rb:0.26333 |
||||
spec/routing/watchers_spec.rb:0.067911 |
||||
spec/features/groups/membership_spec.rb:48.76408 |
||||
spec/permissions/edit_own_messages_spec.rb:0.431157 |
||||
spec/controllers/sys_controller_spec.rb:12.457441 |
||||
spec/lib/redmine/i18n_spec.rb:0.343746 |
||||
spec/lib/api/v3/work_packages/work_package_representer_spec.rb:76.962801 |
||||
spec/features/work_packages/select_work_package_row_spec.rb:107.196845 |
||||
spec/requests/api/v3/render_resource_spec.rb:8.360196 |
||||
spec/routing/work_package/reports_routing_spec.rb:0.009855 |
||||
spec/requests/api/v3/attachments/attachment_resource_spec.rb:4.41174 |
||||
spec/models/query_column_spec.rb:0.017347 |
||||
spec/models/query/results_spec.rb:5.54435 |
||||
spec/models/user/authorization_spec.rb:0.939339 |
||||
spec/controllers/work_packages/auto_completes_controller_spec.rb:15.012008 |
||||
spec/lib/open_project/themes_spec.rb:0.121362 |
||||
spec/models/work_package/work_package_acts_as_event_spec.rb:0.206108 |
||||
spec/lib/api/v3/versions/version_collection_representer_spec.rb:1.905595 |
||||
spec/lib/api/v3/statuses/status_representer_spec.rb:0.112973 |
||||
spec/workers/mail_notification_jobs/enqueue_work_package_notification_job_spec.rb:6.465057 |
||||
spec/controllers/work_packages/creation_spec.rb:1.479588 |
||||
spec/helpers/avatar_helper_spec.rb:0.393939 |
||||
spec/lib/api/v3/work_packages/base_contract_spec.rb:11.222081 |
||||
spec/features/work_packages/select_query_spec.rb:25.175175 |
||||
spec/features/repositories/create_repository_spec.rb:68.139086 |
||||
spec/lib/api/v3/string_objects/string_object_representer_spec.rb:0.039102 |
||||
spec/controllers/account_controller_spec.rb:3.577881 |
||||
spec/features/work_packages/work_package_index_spec.rb:6.993247 |
||||
spec/models/journal_notification_mailer_spec.rb:10.190019 |
||||
spec/controllers/planning_element_type_colors_controller_spec.rb:0.9373 |
||||
spec/lib/api/v3/utilities/path_helper_spec.rb:0.411127 |
||||
spec/lib/journal_formatter/diff_spec.rb:0.096114 |
||||
spec/views/api/v2/project_types/show_api_json_spec.rb:0.047298 |
||||
spec/features/work_packages/details/inplace_editor/description_editor_spec.rb:128.490802 |
||||
spec/models/work_package/work_package_notifications_spec.rb:1.457767 |
||||
spec/models/board_spec.rb:1.466149 |
||||
spec/controllers/messages_controller_spec.rb:5.821735 |
||||
spec/lib/tabular_form_builder_spec.rb:1.571655 |
||||
spec/views/api/v2/workflows/index_api_xml_spec.rb:0.131217 |
||||
spec/routing/boards_routing_spec.rb:0.008439 |
||||
spec/workers/scm/create_repository_job_spec.rb:0.517115 |
||||
spec/lib/api/v3/work_packages/form_representer_spec.rb:2.02016 |
||||
spec/controllers/api/v2/pagination/types_controller_spec.rb:0.052796 |
||||
spec/lib/deprecated_alias_spec.rb:0.003059 |
||||
spec/lib/api/v3/work_packages/create_form_representer_spec.rb:3.903996 |
||||
spec/lib/api/v3/work_packages/update_form_representer_spec.rb:3.90014 |
||||
spec/features/work_packages/details/activity_comments_spec.rb:92.738631 |
||||
spec/helpers/custom_fields_helper_spec.rb:0.017219 |
||||
spec/routing/types_spec.rb:0.004806 |
||||
spec/features/groups/group_memberships_spec.rb:17.026232 |
||||
spec/models/user_spec.rb:2.094293 |
||||
spec/views/api/v2/planning_elements/destroy_api_json_spec.rb:0.181406 |
||||
spec/routing/account_spec.rb:0.01156 |
||||
spec/models/copy_project_job_spec.rb:1.894091 |
||||
spec/lib/api/v3/utilities/resource_link_generator_spec.rb:0.087959 |
||||
spec/requests/api/v3/work_package_resource_spec.rb:134.785301 |
||||
spec/lib/open_project/configuration/helpers_spec.rb:0.010972 |
||||
spec/requests/api/v3/string_objects_resource_spec.rb:0.147816 |
||||
spec/requests/auth/api_v2_spec.rb:0.963186 |
||||
spec/views/api/experimental/roles/index_api_json_spec.rb:0.029343 |
||||
spec/lib/api/v3/utilities/date_time_formatter_spec.rb:0.035731 |
||||
spec/models/work_package/work_package_acts_as_journalized_spec.rb:8.644679 |
||||
spec/views/api/v2/projects/level_list_api_json_spec.rb:0.10303 |
||||
spec/lib/open_project/themes/view_helpers_spec.rb:0.049764 |
||||
spec/views/api/v2/planning_element_types/show_api_json_spec.rb:0.018308 |
||||
spec/models/activity/work_package_activity_provider_spec.rb:4.356187 |
||||
spec/features/members/membership_spec.rb:121.733605 |
||||
spec/lib/open_project/file_command_content_type_detector_spec.rb:0.017398 |
||||
spec/controllers/versions_controller_spec.rb:4.891807 |
||||
spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb:1.526052 |
@ -0,0 +1,33 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
test: |
||||
adapter: mysql2 |
||||
database: travis_ci_test |
||||
username: travis |
||||
encoding: utf8 |
@ -0,0 +1,32 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
test: |
||||
adapter: postgresql |
||||
database: travis_ci_test |
||||
username: postgres |
@ -0,0 +1,126 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
require 'spec_helper' |
||||
require 'features/projects/projects_page' |
||||
|
||||
describe 'Projects', type: :feature do |
||||
let(:current_user) { FactoryGirl.create(:admin) } |
||||
|
||||
before do |
||||
allow(User).to receive(:current).and_return current_user |
||||
end |
||||
|
||||
describe 'creation', js: true do |
||||
let!(:project) { FactoryGirl.create(:project, name: 'Foo project', identifier: 'foo-project') } |
||||
|
||||
before do |
||||
visit admin_path |
||||
end |
||||
|
||||
it 'can create a project' do |
||||
click_on 'New project' |
||||
|
||||
fill_in 'project[name]', with: 'Foo bar' |
||||
click_on 'Advanced settings' |
||||
fill_in 'project[identifier]', with: 'foo' |
||||
click_on 'Create' |
||||
|
||||
expect(page).to have_content 'Successful creation.' |
||||
expect(page).to have_content 'Foo bar' |
||||
expect(current_path).to eq '/projects/foo/settings' |
||||
end |
||||
|
||||
it 'can create a subproject' do |
||||
click_on 'Foo project' |
||||
click_on 'New subproject' |
||||
|
||||
fill_in 'project[name]', with: 'Foo child' |
||||
click_on 'Create' |
||||
|
||||
expect(page).to have_content 'Successful creation.' |
||||
expect(current_path).to eq '/projects/foo-child/settings' |
||||
end |
||||
|
||||
it 'does not create a project with an already existing identifier' do |
||||
click_on 'New project' |
||||
|
||||
fill_in 'project[name]', with: 'Foo project' |
||||
click_on 'Create' |
||||
|
||||
expect(page).to have_content 'Identifier has already been taken' |
||||
expect(current_path).to eq '/projects' |
||||
end |
||||
end |
||||
|
||||
describe 'project types' do |
||||
let(:phase_type) { FactoryGirl.create(:type, name: 'Phase', is_default: true) } |
||||
let(:milestone_type) { FactoryGirl.create(:type, name: 'Milestone', is_default: false) } |
||||
let!(:project) { FactoryGirl.create(:project, name: 'Foo project', types: [phase_type, milestone_type]) } |
||||
|
||||
it "have the correct types checked for the project's types" do |
||||
visit admin_path |
||||
click_on 'Foo project' |
||||
click_on 'Types' |
||||
|
||||
field_checked = find_field('Phase', visible: false)['checked'] |
||||
expect(field_checked).to be_truthy |
||||
field_checked = find_field('Milestone', visible: false)['checked'] |
||||
expect(field_checked).to be_truthy |
||||
end |
||||
end |
||||
|
||||
describe 'deletion', js: true do |
||||
let(:project) { FactoryGirl.create(:project) } |
||||
let(:projects_page) { ProjectsPage.new(project) } |
||||
|
||||
before do |
||||
projects_page.visit_confirm_destroy |
||||
end |
||||
|
||||
describe 'disable delete w/o confirm' do |
||||
it { expect(page).to have_css('.danger-zone .button[disabled]') } |
||||
end |
||||
|
||||
describe 'disable delete with wrong input' do |
||||
let(:input) { find('.danger-zone input') } |
||||
it do |
||||
input.set 'Not the project name' |
||||
expect(page).to have_css('.danger-zone .button[disabled]') |
||||
end |
||||
end |
||||
|
||||
describe 'enable delete with correct input' do |
||||
let(:input) { find('.danger-zone input') } |
||||
it do |
||||
input.set project.name |
||||
expect(page).to have_css('.danger-zone .button:not([disabled])') |
||||
end |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,103 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
require 'spec_helper' |
||||
|
||||
describe ::API::V3::UserPreferences::UserPreferencesRepresenter do |
||||
include ::API::V3::Utilities::PathHelper |
||||
|
||||
let(:preference) { FactoryGirl.build(:user_preference) } |
||||
let(:user) { FactoryGirl.build_stubbed(:user, preference: preference) } |
||||
let(:representer) { described_class.new(preference, current_user: user) } |
||||
|
||||
before do |
||||
allow(preference).to receive(:user).and_return(user) |
||||
end |
||||
|
||||
context 'generation' do |
||||
subject(:generated) { representer.to_json } |
||||
|
||||
it { is_expected.to include_json('UserPreferences'.to_json).at_path('_type') } |
||||
it { is_expected.to have_json_path('hideMail') } |
||||
it { is_expected.to have_json_path('timeZone') } |
||||
it { is_expected.to have_json_path('theme') } |
||||
it { is_expected.to have_json_path('commentSortDescending') } |
||||
it { is_expected.to have_json_path('warnOnLeavingUnsaved') } |
||||
it { is_expected.to have_json_path('accessibilityMode') } |
||||
|
||||
describe 'timeZone' do |
||||
context 'no time zone set' do |
||||
let(:preference) { FactoryGirl.build(:user_preference, time_zone: '') } |
||||
|
||||
it 'shows the timeZone as nil' do |
||||
is_expected.to be_json_eql(nil.to_json).at_path('timeZone') |
||||
end |
||||
end |
||||
|
||||
context 'short timezone set' do |
||||
let(:preference) { FactoryGirl.build(:user_preference, time_zone: 'Berlin') } |
||||
|
||||
it 'shows the canonical time zone' do |
||||
is_expected.to be_json_eql('Europe/Berlin'.to_json).at_path('timeZone') |
||||
end |
||||
end |
||||
|
||||
context 'canonical timezone set' do |
||||
let(:preference) { FactoryGirl.build(:user_preference, time_zone: 'Europe/Paris') } |
||||
|
||||
it 'shows the canonical time zone' do |
||||
is_expected.to be_json_eql('Europe/Paris'.to_json).at_path('timeZone') |
||||
end |
||||
end |
||||
end |
||||
|
||||
describe '_links' do |
||||
it_behaves_like 'has an untitled link' do |
||||
let(:link) { 'self' } |
||||
let(:href) { api_v3_paths.my_preferences } |
||||
end |
||||
|
||||
it_behaves_like 'has a titled link' do |
||||
let(:link) { 'user' } |
||||
let(:title) { user.name } |
||||
let(:href) { api_v3_paths.user(user.id) } |
||||
end |
||||
|
||||
describe 'immediate update' do |
||||
it_behaves_like 'has an untitled link' do |
||||
let(:link) { 'updateImmediately' } |
||||
let(:href) { api_v3_paths.my_preferences } |
||||
end |
||||
|
||||
it 'is a patch link' do |
||||
is_expected.to be_json_eql('patch'.to_json).at_path('_links/updateImmediately/method') |
||||
end |
||||
end |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,141 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
require 'spec_helper' |
||||
require 'rack/test' |
||||
|
||||
describe 'API v3 UserPreferences resource', type: :request do |
||||
include Rack::Test::Methods |
||||
include ::API::V3::Utilities::PathHelper |
||||
|
||||
let(:user) { FactoryGirl.create(:user) } |
||||
let(:preference) { FactoryGirl.create(:user_preference, user: user) } |
||||
let(:representer) { described_class.new(preference, current_user: user) } |
||||
let(:preference_path) { api_v3_paths.my_preferences } |
||||
subject(:response) { last_response } |
||||
|
||||
before do |
||||
allow(User).to receive(:current).and_return user |
||||
allow(User).to receive(:preference).and_return preference |
||||
end |
||||
|
||||
describe '#GET' do |
||||
before do |
||||
get preference_path |
||||
end |
||||
|
||||
context 'when not logged in' do |
||||
let(:user) { User.anonymous } |
||||
it 'should respond with 401' do |
||||
expect(subject.status).to eq(401) |
||||
end |
||||
end |
||||
|
||||
context 'when logged in' do |
||||
it 'should respond with 200' do |
||||
expect(subject.status).to eq(200) |
||||
end |
||||
it 'should respond with a UserPreferences representer' do |
||||
expect(subject.body).to be_json_eql('UserPreferences'.to_json).at_path('_type') |
||||
end |
||||
end |
||||
end |
||||
|
||||
describe '#PATCH' do |
||||
before do |
||||
patch preference_path, params.to_json, 'CONTENT_TYPE' => 'application/json' |
||||
preference.reload |
||||
end |
||||
|
||||
context 'when not logged in' do |
||||
let(:user) { User.anonymous } |
||||
let(:params) do |
||||
{ whatever: true } |
||||
end |
||||
it 'should respond with 401' do |
||||
expect(subject.status).to eq(401) |
||||
end |
||||
end |
||||
|
||||
describe 'theme' do |
||||
context 'with invalid identifier' do |
||||
let(:params) do |
||||
{ theme: 'mycoolthemethatisnotavailableyet' } |
||||
end |
||||
|
||||
it_behaves_like 'constraint violation' do |
||||
let(:message) { 'Theme is not set to one of the allowed values.' } |
||||
end |
||||
end |
||||
|
||||
context 'with correct identifier' do |
||||
let(:params) do |
||||
{ theme: 'default' } |
||||
end |
||||
it 'should respond with a UserPreferences representer' do |
||||
expect(subject.body).to be_json_eql(:default.to_json).at_path('theme') |
||||
expect(preference.theme).to eq(:default) |
||||
end |
||||
end |
||||
end |
||||
|
||||
describe 'timezone' do |
||||
context 'with invalid timezone' do |
||||
let(:params) do |
||||
{ timeZone: 'Europe/Awesomeland' } |
||||
end |
||||
|
||||
it_behaves_like 'constraint violation' do |
||||
let(:message) { 'Time zone is not set to one of the allowed values.' } |
||||
end |
||||
end |
||||
|
||||
context 'with full time zone' do |
||||
let(:params) do |
||||
{ timeZone: 'Europe/Paris' } |
||||
end |
||||
it 'should respond with a UserPreferences representer' do |
||||
expect(subject.body).to be_json_eql('Europe/Paris'.to_json).at_path('timeZone') |
||||
expect(preference.time_zone).to eq('Europe/Paris') |
||||
end |
||||
end |
||||
|
||||
context 'with short time zone' do |
||||
let(:params) do |
||||
{ timeZone: 'Hawaii' } |
||||
end |
||||
|
||||
it 'should respond with a UserPreferences representer' do |
||||
expect(subject.body).to be_json_eql('Pacific/Honolulu'.to_json).at_path('timeZone') |
||||
expect(preference.time_zone).to eq('Hawaii') |
||||
expect(preference.canonical_time_zone).to eq('Pacific/Honolulu') |
||||
end |
||||
end |
||||
end |
||||
end |
||||
end |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue