danger-swiftformat 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: 129504b9697fb37eb0dc46c0f2f2852667119e7f
4
- data.tar.gz: bc8d5744ddb99d28de270ebfee1244b58e9dcd44
3
+ metadata.gz: a6ee9731972b91a28abe4fc4b8c560508db30f76
4
+ data.tar.gz: 2f85cde2168bc1073d85e826a7b6645f43db271e
5
5
  SHA512:
6
- metadata.gz: eab4ef630332a2551cb8d75b61a9d60bb57b5e8d1f9d93e7f68d32841b9581aacfa93072cf672c9f35d3e0ed6782ca9ab9d90bfc732cff364d0eead0d76603b3
7
- data.tar.gz: 79038b5585e8150badcc6a4f46e1b758cbb4217e61e5de0308650c97d2d78a6d2cb9a451f913b58ae1ffb1e22dd17c622cc0e2653edb0ae64da57cb1adeba66c
6
+ metadata.gz: 3b1d0ff41b673f6c0cf6d0b97d17a70fb9721f858ab9d97f29a68af42e9e2089f37ee5dff6fe11edc80becd1c2222747146045040fc53b1777f55c0aeab91244
7
+ data.tar.gz: 5569c70f0570483713ee28a074cc07bf9027c04a29383651091a8fa8eab442c2bd42d466845411000e2af9021cc3137a80f6aee1fa2eb1efe28e4d3b9b58d6a1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-swiftformat (0.0.1)
4
+ danger-swiftformat (0.0.2)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,26 +1,39 @@
1
- # danger-swiftformat [![Build Status](https://travis-ci.org/garriguv/danger-ruby-swiftformat.svg?branch=master)](https://travis-ci.org/garriguv/danger-ruby-swiftformat)
1
+ # danger-swiftformat [![Build Status](https://travis-ci.org/garriguv/danger-ruby-swiftformat.svg?branch=master)](https://travis-ci.org/garriguv/danger-ruby-swiftformat) [![Gem Version](https://badge.fury.io/rb/danger-swiftformat.svg)](https://rubygems.org/gems/danger-swiftformat)
2
2
 
3
- A [danger] plugin to check Swift formatting using [SwiftFormat].
3
+ A [Danger] plugin to check Swift formatting using [SwiftFormat].
4
4
 
5
5
  This plugin is heavily inspired by [danger-swiftlint].
6
6
 
7
7
  ## Installation
8
8
 
9
- $ gem install danger-swiftformat
9
+ Add this line to your Gemfile:
10
+
11
+ require 'danger-swiftformat'
12
+
13
+ [SwiftFormat] also needs to be installed before you run Danger.
10
14
 
11
15
  ## Usage
12
16
 
13
- Add the following to your `Gemfile`
17
+ Add this to your `Dangerfile`
14
18
 
15
- require 'danger-swiftformat'
19
+ ```ruby
20
+ swiftformat.check_format
21
+ ```
16
22
 
17
- In your `Dangerfile`
23
+ By default, danger-swiftformat will check added and modified files.
24
+
25
+ If you want errors to fail Danger, you can use the `fail_on_error` option:
18
26
 
19
27
  ```ruby
20
- swiftformat.binary_path = "/path/to/swiftformat" # optional, but recommended ;)
21
28
  swiftformat.check_format(fail_on_error: true)
22
29
  ```
23
30
 
31
+ You can specify the `swiftformat` binary using the `binary_path` parameter:
32
+
33
+ ```ruby
34
+ swiftformat.binary_path = "/path/to/swiftformat"
35
+ ```
36
+
24
37
  ## Development
25
38
 
26
39
  1. Clone this repo
@@ -29,6 +42,6 @@ swiftformat.check_format(fail_on_error: true)
29
42
  4. Use `bundle exec guard` to automatically have tests run as you make changes.
30
43
  5. Make your changes.
31
44
 
32
- [danger]: https://danger.systems/ruby/
45
+ [Danger]: https://danger.systems/ruby/
33
46
  [SwiftFormat]: https://github.com/nicklockwood/SwiftFormat
34
47
  [danger-swiftlint]: https://github.com/ashfurrow/danger-ruby-swiftlint
@@ -1,3 +1,3 @@
1
1
  module Swiftformat
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
@@ -64,7 +64,7 @@ module Danger
64
64
  #
65
65
  # @return [SwiftFormat]
66
66
  def swiftformat
67
- @swiftformat ||= SwiftFormat.new(binary_path)
67
+ SwiftFormat.new(binary_path)
68
68
  end
69
69
  end
70
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-swiftformat
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
  - Vincent Garrigues