leash 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -9
  3. data/lib/leash/version.rb +1 -1
  4. metadata +10 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 738ec446001ff3512a56306c5b8bda0d80ce8ed2f4577c14b5c30399b9dab060
4
- data.tar.gz: 59b1fb3153aaacedc5828e862e921a600d2d6569e30ed5c21d668da93bf05aab
3
+ metadata.gz: 0f093dc6257e4b29e10bc90174aa9246859cc65dbf7f3c6cd22b997a13bda38a
4
+ data.tar.gz: 9b5baa0d3f5da30dd18abf5e0258687399a05037f4a975676af575f1190cf10f
5
5
  SHA512:
6
- metadata.gz: f2a5cf55d057f423a04ef84f4858c5cb7e2e673551706a9bcdff0d865379bd5d5c7970d0f9fa93094c152f4113bc86f35a8fb585f24484c1f1a34d7b66f11223
7
- data.tar.gz: 784840956677ea4b126e0cc2b429d418933901fcdfac312411f290d0fe420ec8d0a48c89c0a7847f436314ff7284ebed7d27436b8e19dccca1ce0b0d31309d33
6
+ metadata.gz: 9bb1e1e32786217df1406a991ce8abb884b9fac6c4bda783ebf016ce563c8590680d710c62d87f6e8664caa98c67529e8b2a7fd48fd253ac83cc92cd604ca94f
7
+ data.tar.gz: 82520de80c2f69353814514b44e31c99d430eb22361d2e20742b994a66ee741558518ac3e473bb7013225b92c33c4268321babec782d76b6c6d9dd629d9b5b14
data/README.md CHANGED
@@ -1,24 +1,56 @@
1
1
  # Leash
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ `Leash` provides a lightweight framework to implement "Do Nothing Scripting" with Ruby.
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/leash`. To experiment with that code, run `bin/console` for an interactive prompt.
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ $ gem install leash
18
16
 
19
17
  ## Usage
20
18
 
21
- TODO: Write usage instructions here
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/[USERNAME]/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/[USERNAME]/leash/blob/master/CODE_OF_CONDUCT.md).
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/[USERNAME]/leash/blob/master/CODE_OF_CONDUCT.md).
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leash
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.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-02 00:00:00.000000000 Z
11
+ date: 2024-05-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Do Nothing Scripting for Ruby
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: