Module: Danger
- Defined in:
- lib/danger/ci_source/appveyor.rb,
lib/danger.rb,
lib/danger/version.rb,
lib/danger/commands/pr.rb,
lib/danger/commands/init.rb,
lib/danger/ci_source/surf.rb,
lib/danger/ci_source/vsts.rb,
lib/danger/commands/local.rb,
lib/danger/ci_source/dotci.rb,
lib/danger/ci_source/drone.rb,
lib/danger/commands/runner.rb,
lib/danger/helpers/comment.rb,
lib/danger/ci_source/circle.rb,
lib/danger/ci_source/travis.rb,
lib/danger/commands/dry_run.rb,
lib/danger/commands/systems.rb,
lib/danger/ci_source/bitrise.rb,
lib/danger/ci_source/jenkins.rb,
lib/danger/ci_source/codeship.rb,
lib/danger/ci_source/teamcity.rb,
lib/danger/core_ext/file_list.rb,
lib/danger/ci_source/appcenter.rb,
lib/danger/ci_source/buildkite.rb,
lib/danger/ci_source/ci_source.rb,
lib/danger/ci_source/gitlab_ci.rb,
lib/danger/ci_source/semaphore.rb,
lib/danger/scm_source/git_repo.rb,
lib/danger/ci_source/buddybuild.rb,
lib/danger/ci_source/circle_api.rb,
lib/danger/ci_source/code_build.rb,
lib/danger/danger_core/executor.rb,
lib/danger/helpers/emoji_mapper.rb,
lib/danger/request_sources/vsts.rb,
lib/danger/ci_source/screwdriver.rb,
lib/danger/plugin_support/plugin.rb,
lib/danger/ci_source/xcode_server.rb,
lib/danger/danger_core/dangerfile.rb,
lib/danger/helpers/array_subclass.rb,
lib/danger/request_sources/gitlab.rb,
lib/danger/clients/rubygems_client.rb,
lib/danger/commands/dangerfile/gem.rb,
lib/danger/helpers/comments_helper.rb,
lib/danger/ci_source/github_actions.rb,
lib/danger/ci_source/local_git_repo.rb,
lib/danger/commands/dangerfile/init.rb,
lib/danger/commands/dangerfile/init.rb,
lib/danger/request_sources/vsts_api.rb,
lib/danger/danger_core/dangerfile_dsl.rb,
lib/danger/danger_core/standard_error.rb,
lib/danger/request_sources/local_only.rb,
lib/danger/ci_source/support/repo_info.rb,
lib/danger/commands/plugins/plugin_json.rb,
lib/danger/commands/plugins/plugin_lint.rb,
lib/danger/plugin_support/gems_resolver.rb,
lib/danger/plugin_support/plugin_linter.rb,
lib/danger/plugin_support/plugin_parser.rb,
lib/danger/ci_source/bitbucket_pipelines.rb,
lib/danger/ci_source/local_only_git_repo.rb,
lib/danger/danger_core/messages/markdown.rb,
lib/danger/request_sources/github/github.rb,
lib/danger/ci_source/support/no_repo_info.rb,
lib/danger/commands/plugins/plugin_readme.rb,
lib/danger/danger_core/messages/violation.rb,
lib/danger/request_sources/request_source.rb,
lib/danger/danger_core/environment_manager.rb,
lib/danger/helpers/comments_parsing_helper.rb,
lib/danger/request_sources/bitbucket_cloud.rb,
lib/danger/commands/local_helpers/pry_setup.rb,
lib/danger/danger_core/dangerfile_generator.rb,
lib/danger/request_sources/bitbucket_server.rb,
lib/danger/ci_source/support/no_pull_request.rb,
lib/danger/commands/init_helpers/interviewer.rb,
lib/danger/commands/local_helpers/http_cache.rb,
lib/danger/commands/local_helpers/local_setup.rb,
lib/danger/plugin_support/plugin_file_resolver.rb,
lib/danger/request_sources/bitbucket_cloud_api.rb,
lib/danger/ci_source/support/local_pull_request.rb,
lib/danger/request_sources/bitbucket_server_api.rb,
lib/danger/request_sources/github/github_review.rb,
lib/danger/ci_source/support/pull_request_finder.rb,
lib/danger/ci_source/support/remote_pull_request.rb,
lib/danger/ci_source/support/find_repo_info_from_url.rb,
lib/danger/danger_core/plugins/dangerfile_git_plugin.rb,
lib/danger/ci_source/support/find_repo_info_from_logs.rb,
lib/danger/danger_core/plugins/dangerfile_vsts_plugin.rb,
lib/danger/danger_core/plugins/dangerfile_danger_plugin.rb,
lib/danger/danger_core/plugins/dangerfile_github_plugin.rb,
lib/danger/danger_core/plugins/dangerfile_gitlab_plugin.rb,
lib/danger/request_sources/github/github_review_resolver.rb,
lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb,
lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb,
lib/danger/request_sources/github/github_review_unsupported.rb,
lib/danger/danger_core/plugins/dangerfile_bitbucket_cloud_plugin.rb,
lib/danger/danger_core/plugins/dangerfile_bitbucket_server_plugin.rb
Overview
Danger
Defined Under Namespace
Modules: Helpers, RequestSources Classes: AppVeyor, Appcenter, BitbucketPipelines, Bitrise, Buddybuild, Buildkite, CI, CIDocs, CircleAPI, CircleCI, CodeBuild, Codeship, Comment, DSLError, Dangerfile, DangerfileBitbucketCloudPlugin, DangerfileBitbucketServerPlugin, DangerfileCommand, DangerfileDangerPlugin, DangerfileGem, DangerfileGenerator, DangerfileGitHubPlugin, DangerfileGitLabPlugin, DangerfileGitPlugin, DangerfileInit, DangerfileLocalOnlyPlugin, DangerfileMessagingPlugin, DangerfileVSTSPlugin, DotCi, Drone, DryRun, EmojiMapper, EnvironmentManager, Executor, FileList, FindRepoInfoFromLogs, FindRepoInfoFromURL, GemsResolver, GitHubActions, GitLabCI, GitRepo, HTTPCache, Init, Interviewer, Jenkins, Local, LocalGitRepo, LocalOnlyGitRepo, LocalPullRequest, LocalSetup, Markdown, NoPullRequest, NoRepoInfo, PR, Plugin, PluginFileResolver, PluginJSON, PluginLint, PluginLinter, PluginParser, PluginReadme, PrySetup, PullRequestFinder, RemotePullRequest, RepoInfo, RubyGemsClient, Runner, Screwdriver, Semaphore, Surf, Systems, TeamCity, Travis, VSTS, Violation, XcodeServer
Constant Summary collapse
- GEM_NAME =
"danger".freeze
- VERSION =
"5.16.1".freeze
- DESCRIPTION =
"Like Unit Tests, but for your Team Culture.".freeze
Class Method Summary collapse
-
.danger_outdated? ⇒ String
Latest version of Danger on rubygems.org.
-
.gem_path ⇒ String
The path to the local gem directory.
Class Method Details
.danger_outdated? ⇒ String
Returns Latest version of Danger on rubygems.org.
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/danger.rb', line 32 def self.danger_outdated? require "danger/clients/rubygems_client" latest_version = RubyGemsClient.latest_danger_version if Gem::Version.new(latest_version) > Gem::Version.new(Danger::VERSION) latest_version else false end rescue StandardError => _e false end |
.gem_path ⇒ String
Returns The path to the local gem directory.
24 25 26 27 28 29 |
# File 'lib/danger.rb', line 24 def self.gem_path if Gem::Specification.find_all_by_name(GEM_NAME).empty? raise "Couldn't find gem directory for 'danger'" end return Gem::Specification.find_by_name(GEM_NAME).gem_dir end |