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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8a9b163daf733675fdad5119a9e2848e0a24460
4
- data.tar.gz: 6b4f17cbe8fb8843b3e909c0ecb54eb05eb28937
3
+ metadata.gz: 8903905bd3a8d9f77d3e77c83e1392f04a3b4049
4
+ data.tar.gz: 5b6e49e801d0aecf256dcda3debf57813c7e2201
5
5
  SHA512:
6
- metadata.gz: 1589964249937f149be6636f25b1e91ca9bebed15fbc040dfbc97c4401591b6062cd2bd19b87d4a1422002b665e65abb34cce9f4d5f1611647164ee2bd18e47f
7
- data.tar.gz: 048c777eebe5c2f76591d06333b9cc680faf19892f72d4ed7ddbc8c5d5f5b5f178a2cfe32532d6267d5fabcd1b7f23f33f37bed3ae3c4e4f3d96d4e7ff140e00
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-linear_history (0.0.1)
4
+ danger-linear_history (0.0.2)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
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
@@ -1,3 +1,3 @@
1
1
  module LinearHistory
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
@@ -29,8 +29,8 @@ module Danger
29
29
  end
30
30
 
31
31
  it 'does nothing' do
32
- allow_any_instance_of(Danger::LinearHistory).to \
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::LinearHistory).to \
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::LinearHistory).to \
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.1
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
@@ -1,3 +0,0 @@
1
- test:
2
- override:
3
- - bundle exec rake spec