forked from dependabot/dependabot-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get moved python file fetcher specs passing
- Loading branch information
Showing
10 changed files
with
362 additions
and
241 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
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,7 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "dependabot-core", path: "../" | ||
|
||
gemspec |
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,22 @@ | ||
## `dependabot-terraform` | ||
|
||
Terraform support for [`dependabot-core`][core-repo]. | ||
|
||
### Running locally | ||
|
||
1. Install native helpers | ||
``` | ||
$ helpers/build helpers/install-dir/terraform | ||
``` | ||
|
||
2. Install Ruby dependencies | ||
``` | ||
$ bundle install | ||
``` | ||
|
||
3. Run tests | ||
``` | ||
$ bundle exec rspec spec | ||
``` | ||
|
||
[core-repo]: https://github.com/dependabot/dependabot-core |
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,44 @@ | ||
# frozen_string_literal: true | ||
|
||
require "find" | ||
|
||
Gem::Specification.new do |spec| | ||
core_gemspec = Bundler.load_gemspec_uncached("../dependabot-core.gemspec") | ||
|
||
spec.name = "dependabot-python" | ||
spec.summary = "Python support for dependabot-core" | ||
spec.version = core_gemspec.version | ||
spec.description = core_gemspec.description | ||
|
||
spec.author = core_gemspec.author | ||
spec.email = core_gemspec.email | ||
spec.homepage = core_gemspec.homepage | ||
spec.license = core_gemspec.license | ||
|
||
spec.require_path = "lib" | ||
spec.files = [] | ||
|
||
spec.required_ruby_version = core_gemspec.required_ruby_version | ||
spec.required_rubygems_version = core_gemspec.required_ruby_version | ||
|
||
spec.add_dependency "dependabot-core", Dependabot::VERSION | ||
|
||
core_gemspec.development_dependencies.each do |dep| | ||
spec.add_development_dependency dep.name, dep.requirement.to_s | ||
end | ||
|
||
next unless File.exist?("../.gitignore") | ||
|
||
ignores = File.readlines("../.gitignore").grep(/\S+/).map(&:chomp) | ||
|
||
next unless File.directory?("lib") && File.directory?("helpers") | ||
|
||
prefix = "/" + File.basename(File.expand_path(__dir__)) + "/" | ||
Find.find("lib", "helpers") do |path| | ||
if ignores.any? { |i| File.fnmatch(i, prefix + path, File::FNM_DOTMATCH) } | ||
Find.prune | ||
else | ||
spec.files << path unless File.directory?(path) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
install_dir=$1 | ||
if [ -z "$install_dir" ]; then | ||
echo "usage: $0 INSTALL_DIR" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "$install_dir/bin" ]; then | ||
mkdir -p "$install_dir/bin" | ||
fi | ||
|
||
helpers_dir="$(dirname "${BASH_SOURCE[0]}")" | ||
PYENV_VERSION=2.7.15 pyenv exec pip install -r "${helpers_dir}/requirements.txt" | ||
PYENV_VERSION=3.6.7 pyenv exec pip install -r "${helpers_dir}/requirements.txt" |
Oops, something went wrong.