Skip to content

Commit

Permalink
Initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
greysteil committed Dec 14, 2018
1 parent 7881f3c commit e5c606a
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gradle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.bundle/
/.env
/tmp
/dependabot-*.gem
Gemfile.lock
1 change: 1 addition & 0 deletions gradle/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inherit_from: ../config/rubocop-default.yml
7 changes: 7 additions & 0 deletions gradle/Gemfile
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
17 changes: 17 additions & 0 deletions gradle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## `dependabot-gradle`

Gradle support for [`dependabot-core`][core-repo].

### Running locally

1. Install Ruby dependencies
```
$ bundle install
```

2. Run tests
```
$ bundle exec rspec spec
```

[core-repo]: https://github.com/dependabot/dependabot-core
29 changes: 29 additions & 0 deletions gradle/dependabot-gradle.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# frozen_string_literal: true

require "find"

Gem::Specification.new do |spec|
core_gemspec = Bundler.load_gemspec_uncached("../dependabot-core.gemspec")

spec.name = "dependabot-gradle"
spec.summary = "Gradle 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 = Dir["lib/**/*"]

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
end
11 changes: 11 additions & 0 deletions gradle/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

def common_dir
@common_dir ||= Gem::Specification.find_by_name("dependabot-core").gem_dir
end

def require_common_spec(path)
require "#{common_dir}/spec/dependabot/#{path}"
end

require "#{common_dir}/spec/spec_helper.rb"

0 comments on commit e5c606a

Please sign in to comment.