Skip to content

Commit

Permalink
Fix misspelling word separator (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-antonelli authored Jul 24, 2021
1 parent c185fe9 commit 397a50d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Inputs

- `msg`: String to split
- `seperator`: The delimiter to split the string. Default: `' '` (whitespace)
- `separator`: The delimiter to split the string. Default: `' '` (whitespace)
- `maxsplit`: Maximum number of splits. Default: `-1` (no limit)

## Outputs
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
msg:
required: true
description: String to split
seperator:
separator:
required: false
default: ' '
description: The delimiter to split the string
Expand Down Expand Up @@ -223,5 +223,5 @@ runs:
image: docker://winterjung/split:v1
args:
- ${{ inputs.msg }}
- ${{ inputs.seperator }}
- ${{ inputs.separator }}
- ${{ inputs.maxsplit }}
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def to_outputs(results: List[str]) -> Dict[str, str]:

def main():
msg = get_action_input('msg', required=True)
seperator = get_action_input('seperator', required=False, default=' ')
separator = get_action_input('separator', required=False, default=' ')
maxsplit = int(get_action_input('maxsplit', required=False, default='-1'))

results = split(msg, seperator, maxsplit)
results = split(msg, separator, maxsplit)
outputs = to_outputs(results)
for k, v in outputs.items():
set_action_output(k, v)
Expand Down
4 changes: 2 additions & 2 deletions test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class TestSplit:
(' /release split v1 ', ' ', ['', '/release', 'split', 'v1', '']),
],
)
def test_seperator(self, msg, sep, expected):
def test_separator(self, msg, sep, expected):
assert split(msg, sep=sep) == expected

def test_empty_seperator(self):
def test_empty_separator(self):
with pytest.raises(ValueError):
split('must fail', sep='')

Expand Down

0 comments on commit 397a50d

Please sign in to comment.