danger-linear_history 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +16 -0
- data/Gemfile.lock +1 -1
- data/lib/danger_plugin.rb +1 -1
- data/lib/version.rb +1 -1
- data/spec/linear_history_spec.rb +6 -6
- metadata +2 -2
- data/circle.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8903905bd3a8d9f77d3e77c83e1392f04a3b4049
|
4
|
+
data.tar.gz: 5b6e49e801d0aecf256dcda3debf57813c7e2201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7384024d27b84d69bfc7190f7adcba4830153f26df7ae26334aeb6b8ce8121d2176810719c7b45a07097585b7839cb6aa8adee71137514b860aef200dd12a947
|
7
|
+
data.tar.gz: 82decb9113f6f211bd0f99e1e6616617f6efa50e8706ed17bfb5500c539fdd6e039c92c98171cede871c7bb35805bd42d01b16918682f455d092c12e6d2407cf
|
@@ -0,0 +1,16 @@
|
|
1
|
+
version: 2.0
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
docker:
|
5
|
+
- image: ruby:2.3
|
6
|
+
working_directory: ~/danger-linear_history
|
7
|
+
steps:
|
8
|
+
- checkout
|
9
|
+
- restore_cache:
|
10
|
+
key: << checksum "Gemfile.lock" >>
|
11
|
+
- run: bundle check --path=.bundle || bundle install --path=.bundle --jobs=4 --retry=3
|
12
|
+
- cache-save:
|
13
|
+
key: << checksum "Gemfile.lock" >>
|
14
|
+
paths:
|
15
|
+
- ~/danger-linear_history/.bundle
|
16
|
+
- run: bundle exec rake spec
|
data/Gemfile.lock
CHANGED
data/lib/danger_plugin.rb
CHANGED
@@ -25,7 +25,7 @@ module Danger
|
|
25
25
|
# @return [void]
|
26
26
|
#
|
27
27
|
def validate!(soft_fail: true)
|
28
|
-
return unless commits.any? { |commit| commit.parents.length > 1 }
|
28
|
+
return unless git.commits.any? { |commit| commit.parents.length > 1 }
|
29
29
|
|
30
30
|
message = 'Please rebase to get rid of the merge commits in this PR'
|
31
31
|
|
data/lib/version.rb
CHANGED
data/spec/linear_history_spec.rb
CHANGED
@@ -29,8 +29,8 @@ module Danger
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'does nothing' do
|
32
|
-
allow_any_instance_of(Danger::
|
33
|
-
receive(:commits).and_return @git.log
|
32
|
+
allow_any_instance_of(Danger::DangerfileGitPlugin).to \
|
33
|
+
receive(:commits).and_return @git.log.to_a
|
34
34
|
|
35
35
|
@my_plugin.validate!
|
36
36
|
|
@@ -54,8 +54,8 @@ module Danger
|
|
54
54
|
|
55
55
|
context 'soft_fail is false' do
|
56
56
|
it 'errors' do
|
57
|
-
allow_any_instance_of(Danger::
|
58
|
-
receive(:commits).and_return @git.log
|
57
|
+
allow_any_instance_of(Danger::DangerfileGitPlugin).to \
|
58
|
+
receive(:commits).and_return @git.log.to_a
|
59
59
|
|
60
60
|
@my_plugin.validate!(soft_fail: false)
|
61
61
|
|
@@ -67,8 +67,8 @@ module Danger
|
|
67
67
|
|
68
68
|
context 'soft_fail is true' do
|
69
69
|
it 'warns' do
|
70
|
-
allow_any_instance_of(Danger::
|
71
|
-
receive(:commits).and_return @git.log
|
70
|
+
allow_any_instance_of(Danger::DangerfileGitPlugin).to \
|
71
|
+
receive(:commits).and_return @git.log.to_a
|
72
72
|
|
73
73
|
@my_plugin.validate!(soft_fail: true)
|
74
74
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-linear_history
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexsander Akers
|
@@ -157,6 +157,7 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
+
- ".circleci/config.yml"
|
160
161
|
- ".gitignore"
|
161
162
|
- ".rubocop.yml"
|
162
163
|
- Gemfile
|
@@ -165,7 +166,6 @@ files:
|
|
165
166
|
- LICENSE.txt
|
166
167
|
- README.md
|
167
168
|
- Rakefile
|
168
|
-
- circle.yml
|
169
169
|
- danger-linear_history.gemspec
|
170
170
|
- lib/danger_plugin.rb
|
171
171
|
- lib/version.rb
|
data/circle.yml
DELETED