danger-swiftformat 0.1.0 → 0.2.0

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: 375ea947e323e0f7e27fc180969cd1b7f0228d9f
4
- data.tar.gz: 5266c96a6d360af8651220a7b6f29132e35505af
3
+ metadata.gz: 878adc127e7cfa90ea5e96b3fcbd1c6cf9ea66c3
4
+ data.tar.gz: d7acc8b4be1678a16af24585e187729e99066a05
5
5
  SHA512:
6
- metadata.gz: 731725453eaa2221908d99a3ce79457f21e43dd233197ec72765527fb594f5b31dac3e7a71cfafc89d21688b18a7e78240e108a6eafb3d0de1d0ca88398469b0
7
- data.tar.gz: 677b404b8451886b45e72c14623a0b63e9effc5443e015100c968e3dd07122c23792bfe2b5e63f02a31b4b191ddba40cf3633737df3d6401b60eff940b10435a
6
+ metadata.gz: e9a04d379f2619634d565702e7fbffced3b67759b2a486132d6900420277089b3c570a0d1aeb886a9bd04718f7a2df9e4d8cb8e3a860332c99c82bca79a61778
7
+ data.tar.gz: 016ef2f96e85863824e34dc1e0a420244e39430557e961f6b877831ec6c631239b92e984057f2b86d6f1db2f74fcb9216df7498724e1225c6b85b83bf6ddc4df
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-swiftformat (0.1.0)
4
+ danger-swiftformat (0.2.0)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -34,10 +34,10 @@ You can specify the `swiftformat` binary using the `binary_path` parameter:
34
34
  swiftformat.binary_path = "/path/to/swiftformat"
35
35
  ```
36
36
 
37
- You can specify additional `swiftformat` arguments using the `additional_swiftformat_args` parameter:
37
+ You can specify additional `swiftformat` arguments using the `additional_args` parameter:
38
38
 
39
39
  ```ruby
40
- swiftformat.additional_swiftformat_args = "--indent tab --self insert"
40
+ swiftformat.additional_args = "--indent tab --self insert"
41
41
  ```
42
42
 
43
43
  ## Development
@@ -1,3 +1,3 @@
1
1
  module Swiftformat
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.2.0".freeze
3
3
  end
@@ -17,7 +17,7 @@ module Danger
17
17
  # Additional swiftformat command line arguments
18
18
  #
19
19
  # @return [String]
20
- attr_accessor :additional_swiftformat_args
20
+ attr_accessor :additional_args
21
21
 
22
22
  # Runs swiftformat
23
23
  #
@@ -36,7 +36,7 @@ module Danger
36
36
  return if swift_files.empty?
37
37
 
38
38
  # Run swiftformat
39
- results = swiftformat.check_format(swift_files, additional_swiftformat_args)
39
+ results = swiftformat.check_format(swift_files, additional_args)
40
40
 
41
41
  # Stop processing if the errors array is empty
42
42
  return if results[:errors].empty?
@@ -31,8 +31,8 @@ module Danger
31
31
  end
32
32
  end
33
33
 
34
- context "with additional_swiftformat_args" do
35
- let(:additional_swiftformat_args) { "--indent tab --self insert" }
34
+ context "with additional_args" do
35
+ let(:additional_args) { "--indent tab --self insert" }
36
36
  let(:success_output) { { errors: [], stats: { run_time: "0.08s" } } }
37
37
 
38
38
  it "should pass the additional flags to swiftformat" do
@@ -41,10 +41,10 @@ module Danger
41
41
  allow(@sut.git).to receive(:deleted_files).and_return(["Deleted.swift"])
42
42
  allow_any_instance_of(SwiftFormat).to receive(:installed?).and_return(true)
43
43
  allow_any_instance_of(SwiftFormat).to receive(:check_format)
44
- .with(%w(Added.swift Modified.swift), additional_swiftformat_args)
44
+ .with(%w(Added.swift Modified.swift), additional_args)
45
45
  .and_return(success_output)
46
46
 
47
- @sut.additional_swiftformat_args = additional_swiftformat_args
47
+ @sut.additional_args = additional_args
48
48
 
49
49
  @sut.check_format(fail_on_error: true)
50
50
 
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Garrigues