-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from opiethehokie/kestrel
remove nowin, use kestrel instead
- Loading branch information
Showing
37 changed files
with
700 additions
and
519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gem 'rspec', '~> 3.3.0' | ||
gem 'rake', '~> 10.4.2' | ||
|
||
gem 'rubocop', '~> 0.33.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
|
||
|
||
require 'rake' | ||
require 'rspec/core/rake_task' | ||
|
||
require 'rubocop/rake_task' | ||
RuboCop::RakeTask.new | ||
|
||
RSpec::Core::RakeTask.new(:spec) do |t| | ||
t.pattern = Dir.glob('spec/**/*_spec.rb') | ||
end | ||
|
||
task :default => :spec | ||
task default: [:spec] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.4.0 | ||
0.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,3 @@ if AspNet5Buildpack.compile(build_dir, cache_dir) | |
else | ||
exit 1 | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'rspec', '~> 3.1.0' | ||
gem 'buildpack-packager', github: 'cf-buildpacks/buildpack-packager', tag: 'v2.2.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,3 @@ PLATFORMS | |
|
||
DEPENDENCIES | ||
buildpack-packager! | ||
rspec (~> 3.1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Encoding: utf-8 | ||
# ASP.NET 5 Buildpack | ||
# Copyright 2015 the original author or authors. | ||
# | ||
# 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 AspNet5Buildpack | ||
class AppDir | ||
DEPLOYMENT_FILE_NAME = '.deployment'.freeze | ||
|
||
def initialize(dir, out) | ||
@dir = dir | ||
@out = out | ||
end | ||
|
||
def root | ||
@dir | ||
end | ||
|
||
def release_yml_path | ||
File.join(@dir, 'aspnet5-buildpack-release.yml') | ||
end | ||
|
||
def startup_script_path | ||
File.join(@dir, '.profile.d', 'startup.sh') | ||
end | ||
|
||
def with_command(cmd) | ||
with_project_json.select { |d| !commands(d)[cmd].nil? && commands(d)[cmd] != '' } | ||
end | ||
|
||
def with_project_json | ||
Dir.glob(File.join(@dir, '**', 'project.json')).map do |d| | ||
Pathname.new(File.dirname(d)).relative_path_from(Pathname.new(@dir)) | ||
end | ||
end | ||
|
||
def project_json(dir) | ||
File.join(@dir, dir, 'project.json') | ||
end | ||
|
||
def commands(dir) | ||
JSON.load(IO.read(project_json(dir), encoding: 'bom|utf-8')).fetch('commands', {}) | ||
end | ||
|
||
def deployment_file_project | ||
paths = with_project_json | ||
deployment_file = File.expand_path(File.join(@dir, DEPLOYMENT_FILE_NAME)) | ||
File.foreach(deployment_file) do |line| | ||
m = /project = (.*)/.match(line) | ||
if m | ||
path = Pathname.new(m[1]) | ||
return path if paths.include?(path) | ||
end | ||
end if File.exist?(deployment_file) | ||
nil | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Encoding: utf-8 | ||
# ASP.NET 5 Buildpack | ||
# Copyright 2015 the original author or authors. | ||
# | ||
# 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' | ||
|
||
module AspNet5Buildpack | ||
class DnxVersion | ||
DNX_VERSION_FILE_NAME = 'global.json'.freeze | ||
DEFAULT_DNX_VERSION = 'latest'.freeze | ||
|
||
def version(dir, out) | ||
dnx_version = DEFAULT_DNX_VERSION | ||
version_file = File.expand_path(File.join(dir, DNX_VERSION_FILE_NAME)) | ||
if File.exist?(version_file) | ||
begin | ||
global_props = JSON.parse(File.read(version_file, encoding: 'bom|utf-8')) | ||
if global_props.key?('sdk') | ||
sdk = global_props['sdk'] | ||
dnx_version = sdk['version'] if sdk.key?('version') | ||
end | ||
rescue | ||
out.warn("File #{version_file} is not valid JSON") | ||
end | ||
end | ||
dnx_version | ||
end | ||
end | ||
end |
Oops, something went wrong.