leash 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -9
- data/lib/leash/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f093dc6257e4b29e10bc90174aa9246859cc65dbf7f3c6cd22b997a13bda38a
|
4
|
+
data.tar.gz: 9b5baa0d3f5da30dd18abf5e0258687399a05037f4a975676af575f1190cf10f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bb1e1e32786217df1406a991ce8abb884b9fac6c4bda783ebf016ce563c8590680d710c62d87f6e8664caa98c67529e8b2a7fd48fd253ac83cc92cd604ca94f
|
7
|
+
data.tar.gz: 82520de80c2f69353814514b44e31c99d430eb22361d2e20742b994a66ee741558518ac3e473bb7013225b92c33c4268321babec782d76b6c6d9dd629d9b5b14
|
data/README.md
CHANGED
@@ -1,24 +1,56 @@
|
|
1
1
|
# Leash
|
2
2
|
|
3
|
-
|
3
|
+
`Leash` provides a lightweight framework to implement "Do Nothing Scripting" with Ruby.
|
4
4
|
|
5
|
-
|
5
|
+
A "do nothing script" is a script that encodes instructions of a manual procedure and encapsulating each step in a function. Making it easier to start small and gradually increase the level of automation.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
9
|
Install the gem and add to the application's Gemfile by executing:
|
12
10
|
|
13
|
-
$ bundle add
|
11
|
+
$ bundle add leash
|
14
12
|
|
15
13
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
14
|
|
17
|
-
$ gem install
|
15
|
+
$ gem install leash
|
18
16
|
|
19
17
|
## Usage
|
20
18
|
|
21
|
-
|
19
|
+
Define steps for your procedure by `Leash::Procedure#step`.
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'leash'
|
23
|
+
|
24
|
+
procedure = Leash::Procedure.new("My Procedure") do
|
25
|
+
step "Creates a manual step, which only contains a description."
|
26
|
+
|
27
|
+
step "Creates an automated step by providing a block, run: `bundle install`" do
|
28
|
+
system("bundle install")
|
29
|
+
end
|
30
|
+
|
31
|
+
step "Or by passing a callable object as the second argument, run: `echo Hello!`", -> { system("echo Hello!") }
|
32
|
+
end
|
33
|
+
|
34
|
+
```
|
35
|
+
|
36
|
+
Execute the defined procedure by `Leash::Procedure#run`.
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
# Executes each step by pressing `Enter`.
|
40
|
+
procedure.run
|
41
|
+
```
|
42
|
+
|
43
|
+
Render a text report by `Leash::Procedure#render`.
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
# Renders a text report for the procedure
|
47
|
+
puts procedure.render
|
48
|
+
|
49
|
+
# > My Procedure
|
50
|
+
# > (1/3): Creates a manual step, which only contains a description.
|
51
|
+
# > (2/3): Creates an automated step by providing a block, run: `bundle install`
|
52
|
+
# > (3/3): Or by passing a callable object as the second argument, run: `echo Hello!`
|
53
|
+
```
|
22
54
|
|
23
55
|
## Development
|
24
56
|
|
@@ -28,7 +60,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
28
60
|
|
29
61
|
## Contributing
|
30
62
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
63
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/TonyCTHsu/leash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/TonyCTHsu/leash/blob/master/CODE_OF_CONDUCT.md).
|
32
64
|
|
33
65
|
## License
|
34
66
|
|
@@ -36,4 +68,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
36
68
|
|
37
69
|
## Code of Conduct
|
38
70
|
|
39
|
-
Everyone interacting in the Leash project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
71
|
+
Everyone interacting in the Leash project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/TonyCTHsu/leash/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/leash/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Hsu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: |2
|
14
|
+
Leash provides a lightweight framework to implement "Do Nothing Scripting" with Ruby.
|
15
|
+
|
16
|
+
A "do nothing script" is a script that encodes instructions of a manual procedure and encapsulates each step in a function.
|
17
|
+
Making it easier to start small and gradually increase the level of automation.
|
14
18
|
email:
|
15
19
|
- tonyc.t.hsu@gmail.com
|
16
20
|
executables: []
|
@@ -30,11 +34,13 @@ files:
|
|
30
34
|
- lib/leash/step.rb
|
31
35
|
- lib/leash/version.rb
|
32
36
|
- sig/leash.rbs
|
33
|
-
homepage:
|
37
|
+
homepage: https://github.com/TonyCTHsu/leash
|
34
38
|
licenses:
|
35
39
|
- MIT
|
36
40
|
metadata:
|
37
41
|
allowed_push_host: https://rubygems.org
|
42
|
+
homepage_uri: https://github.com/TonyCTHsu/leash
|
43
|
+
source_code_uri: https://github.com/TonyCTHsu/leash
|
38
44
|
post_install_message:
|
39
45
|
rdoc_options: []
|
40
46
|
require_paths:
|