Sha256: cce5cadb168061006455de8c5c9c7b5c52f465b8b21895c9cc5cd2ac50dc144c

Contents?: true

Size: 1.84 KB

Versions: 45

Compression:

Stored size: 1.84 KB

Contents

#
# Copyright:: Copyright 2016, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# 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 "license_scout/dependency"
require "license_scout/license_file_analyzer"

module LicenseScout
  module DependencyManager
    class Base

      POSSIBLE_LICENSE_FILES = %w{
        LICENSE
        LICENSE.txt
        LICENSE.TXT
        LICENSE.md
        LICENSE.mkd
        LICENSE.rdoc
        License
        License.text
        License.txt
        License.md
        License.rdoc
        Licence.rdoc
        Licence.md
        license
        LICENCE
        licence
        license.md
        licence.md
        APACHE.LICENSE
        MIT-LICENSE
        MIT-LICENSE.txt
        LICENSE.MIT
        LICENSE-MIT
        LICENSE-MIT.txt
        LGPL-2.1
        COPYING.txt
        COPYING
        BSD_LICENSE
        LICENSE.BSD
        UNLICENSE
      }.freeze

      attr_reader :project_dir
      attr_reader :options

      def initialize(project_dir, options)
        @project_dir = project_dir
        @options = options
      end

      def create_dependency(dep_name, version, license, license_files, dep_mgr_name = name)
        # add name of the dependency manager `name` to the dependency we are
        # creating.
        Dependency.new(dep_name, version, license, license_files, dep_mgr_name)
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
license_scout-1.3.16 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.15 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.14 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.11 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.10 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.9 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.8 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.7 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.6 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.5 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.4 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.3 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.2 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.1 lib/license_scout/dependency_manager/base.rb
license_scout-1.3.0 lib/license_scout/dependency_manager/base.rb
license_scout-1.2.16 lib/license_scout/dependency_manager/base.rb
license_scout-1.2.15 lib/license_scout/dependency_manager/base.rb
license_scout-1.2.14 lib/license_scout/dependency_manager/base.rb
license_scout-1.2.13 lib/license_scout/dependency_manager/base.rb
license_scout-1.2.12 lib/license_scout/dependency_manager/base.rb