-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
93 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -------------------------------------------------------------------------------------------------------------------- | ||
# Has any changes happened inside the actual library code? | ||
# -------------------------------------------------------------------------------------------------------------------- | ||
has_app_changes = !git.modified_files.grep(/lib/).empty? | ||
has_spec_changes = !git.modified_files.grep(/spec/).empty? | ||
|
||
# -------------------------------------------------------------------------------------------------------------------- | ||
# You've made changes to lib, but didn't write any tests? | ||
# -------------------------------------------------------------------------------------------------------------------- | ||
if has_app_changes && !has_spec_changes | ||
warn("There're library changes, but not tests. That's OK as long as you're refactoring existing code.", sticky: false) | ||
end | ||
|
||
# -------------------------------------------------------------------------------------------------------------------- | ||
# You've made changes to specs, but no library code has changed? | ||
# -------------------------------------------------------------------------------------------------------------------- | ||
if !has_app_changes && has_spec_changes | ||
message('We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!', sticky: false) | ||
end | ||
|
||
# Mainly to encourage writing up some reasoning about the PR, rather than | ||
# just leaving a title | ||
if github.pr_body.length < 10 | ||
fail "Please provide a summary in the Pull Request description" | ||
end | ||
|
||
# -------------------------------------------------------------------------------------------------------------------- | ||
# Have you updated CHANGELOG.md? | ||
# -------------------------------------------------------------------------------------------------------------------- | ||
changelog.check |
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 |
---|---|---|
|
@@ -2,29 +2,31 @@ $LOAD_PATH.push File.expand_path('../lib', __FILE__) | |
|
||
require 'doorkeeper/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'doorkeeper' | ||
s.version = Doorkeeper.gem_version | ||
s.authors = ['Felipe Elias Philipp', 'Tute Costa', 'Jon Moss', 'Nikita Bulai'] | ||
s.email = %w([email protected]) | ||
s.homepage = 'https://github.com/doorkeeper-gem/doorkeeper' | ||
s.summary = 'OAuth 2 provider for Rails and Grape' | ||
s.description = 'Doorkeeper is an OAuth 2 provider for Rails and Grape.' | ||
s.license = 'MIT' | ||
Gem::Specification.new do |gem| | ||
gem.name = 'doorkeeper' | ||
gem.version = Doorkeeper.gem_version | ||
gem.authors = ['Felipe Elias Philipp', 'Tute Costa', 'Jon Moss', 'Nikita Bulai'] | ||
gem.email = %w([email protected]) | ||
gem.homepage = 'https://github.com/doorkeeper-gem/doorkeeper' | ||
gem.summary = 'OAuth 2 provider for Rails and Grape' | ||
gem.description = 'Doorkeeper is an OAuth 2 provider for Rails and Grape.' | ||
gem.license = 'MIT' | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- spec/*`.split("\n") | ||
s.require_paths = ['lib'] | ||
gem.files = `git ls-files`.split("\n") | ||
gem.test_files = `git ls-files -- spec/*`.split("\n") | ||
gem.require_paths = ['lib'] | ||
|
||
s.add_dependency 'railties', '>= 4.2' | ||
s.required_ruby_version = '>= 2.1' | ||
gem.add_dependency 'railties', '>= 4.2' | ||
gem.required_ruby_version = '>= 2.1' | ||
|
||
s.add_development_dependency 'capybara', '~> 2.18' | ||
s.add_development_dependency 'coveralls' | ||
s.add_development_dependency 'grape' | ||
s.add_development_dependency 'database_cleaner', '~> 1.6' | ||
s.add_development_dependency 'factory_bot', '~> 4.8' | ||
s.add_development_dependency 'generator_spec', '~> 0.9.3' | ||
s.add_development_dependency 'rake', '>= 11.3.0' | ||
s.add_development_dependency 'rspec-rails' | ||
gem.add_development_dependency 'capybara', '~> 2.18' | ||
gem.add_development_dependency 'coveralls' | ||
gem.add_development_dependency 'danger', '~> 5.0' | ||
gem.add_development_dependency 'danger-changelog', '~> 0.3' | ||
gem.add_development_dependency 'grape' | ||
gem.add_development_dependency 'database_cleaner', '~> 1.6' | ||
gem.add_development_dependency 'factory_bot', '~> 4.8' | ||
gem.add_development_dependency 'generator_spec', '~> 0.9.3' | ||
gem.add_development_dependency 'rake', '>= 11.3.0' | ||
gem.add_development_dependency 'rspec-rails' | ||
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
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,18 @@ | ||
module Doorkeeper | ||
class StaleRecordsCleaner | ||
CLEANER_CLASS = 'StaleRecordsCleaner'.freeze | ||
|
||
def self.for(base_scope) | ||
orm_adapter = "doorkeeper/orm/#{Doorkeeper.configuration.orm}".classify | ||
|
||
orm_cleaner = "#{orm_adapter}::#{CLEANER_CLASS}".constantize | ||
orm_cleaner.new(base_scope) | ||
rescue NameError | ||
raise NoOrmCleaner, "'#{Doorkeeper.configuration.orm}' ORM has no cleaner!" | ||
end | ||
|
||
def self.new(base_scope) | ||
self.for(base_scope) | ||
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
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