Skip to content

Commit

Permalink
Add license headers and Rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
dduvnjak authored and Haris Krajina committed Feb 5, 2016
1 parent e32a23a commit 5a60156
Show file tree
Hide file tree
Showing 862 changed files with 16,099 additions and 824 deletions.
15 changes: 15 additions & 0 deletions .license_header
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Copyright (C) 2010-2016 dtk contributors

This file is part of the dtk project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
desc "Add copyright headers"
task :headers do
require 'rubygems'
require 'copyright_header'

args = {
:license_file => '.license_header',
:add_path => 'application/:lib/:scripts/:server_side_files/:system/:utils/:docker/',
:output_dir => '.',
:guess_extension => true,
}

command_line = CopyrightHeader::CommandLine.new( args )
command_line.execute
end
19 changes: 18 additions & 1 deletion application/app.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# TODO: need to cleanup
# This file contains your application, it requires dependencies and necessary
# parts of the application.
Expand Down Expand Up @@ -88,4 +105,4 @@ module XYZ
# Initialize controllers and models

r8_require('model/init')
r8_require('controller/init')
r8_require('controller/init')
19 changes: 18 additions & 1 deletion application/app_migration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# TODO: this is broken now
# require 'bundler/setup'
require 'json'
Expand Down Expand Up @@ -53,4 +70,4 @@ module XYZ
# Initialize controllers and models

r8_require('model/init')
r8_require('controller/init')
r8_require('controller/init')
19 changes: 18 additions & 1 deletion application/config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# TODO: figure out how to use routing to select/define specific templates
# and action_set's to be used for a given route
r8_require('../../utils/internal/routes/routes')
Expand Down Expand Up @@ -353,4 +370,4 @@
post 'namespace/default_namespace_name' => 'namespace#default_namespace_name'
end

R8::Routes.freeze
R8::Routes.freeze
19 changes: 18 additions & 1 deletion application/config/setup_load_paths.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'rubygems'
require 'bundler/setup'
require 'bundler/setup'
19 changes: 18 additions & 1 deletion application/controller/account.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module DTK
class AccountController < AuthController
PUB_KEY_NAME_REGEX = /[a-zA-Z0-9_\-]*/
Expand Down Expand Up @@ -180,4 +197,4 @@ def rest__register_catalog_account


end
end
end
19 changes: 18 additions & 1 deletion application/controller/action_set.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'base64'

r8_require('../../utils/performance_service')
Expand Down Expand Up @@ -322,4 +339,4 @@ def controller_clazz(model_name)
end
end
end
end
end
19 changes: 18 additions & 1 deletion application/controller/assembly.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module DTK
class AssemblyController < AuthController
helper :assembly_helper
Expand Down Expand Up @@ -1038,4 +1055,4 @@ def get_assemblies_from_ids(ids)
assemblies
end
end
end
end
19 changes: 18 additions & 1 deletion application/controller/attribute.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# TODO: Marked for removal [Haris] - Move logic to other controller
module DTK
class AttributeController < AuthController
Expand All @@ -11,4 +28,4 @@ def rest__set
rest_ok_response(attribute_id: attribute_id)
end
end
end
end
19 changes: 18 additions & 1 deletion application/controller/component.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# TODO: Marked for removal [Haris]
module DTK
class ComponentController < AuthController
Expand All @@ -18,4 +35,4 @@ def rest__list
rest_ok_response Component::Template.list(project, opts)
end
end
end
end
19 changes: 18 additions & 1 deletion application/controller/component_module.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'eventmachine'

module DTK
Expand Down Expand Up @@ -400,4 +417,4 @@ def rest__remove_git_remote
rest_ok_response
end
end
end
end
17 changes: 17 additions & 0 deletions application/controller/dependency.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module XYZ
class DependencyController < AuthController
def rest__add_component_dependency
Expand Down
17 changes: 17 additions & 0 deletions application/controller/developer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright (C) 2010-2016 dtk contributors
#
# This file is part of the dtk project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'json'
require 'active_support/core_ext/hash/keys'

Expand Down
Loading

0 comments on commit 5a60156

Please sign in to comment.