ract 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48ebc9d97681afc2240e5001650e74d7250e76d20eb181955b402192377c8ca8
4
- data.tar.gz: 8c121a49a43a61beff3a8f5f068997585951fbb4acd6e4432b89e8cad571ba0d
3
+ metadata.gz: bdcd0b50628836af0d73557e4ed0b80f0830c7640dca4a135a66ab4df3ac2d3d
4
+ data.tar.gz: a578255030f0f2dc32da32f74ed1f25ee87c30cea681d18ea54916b3f543e810
5
5
  SHA512:
6
- metadata.gz: 4b82bcf08d12aa28ffd6ac36f66572cb9b40a6a82e5f364d09eb37adbf0e79a7d7ac9f32a608dbd04dd62439487193ddd32ac3bca5d5a07f5d31de1306f8633b
7
- data.tar.gz: b6cf72683bd4a7bdf7b7fd7756af98726627c56321ca65938663d47bd8469d8982031d97b2786f347ad4894f27eb255a43ef6766e2870a71cb1f4c42738e4284
6
+ metadata.gz: 533bd81a23a4c29c62ccbb740e28f7373231f7d8b09dec4717d6967a191eb49d5e30a7eba6a1b20ba1859cb6f55002cec2b4301f0558b22bcde9124188518252
7
+ data.tar.gz: c42e55c294a61562c2c60255a31c01216faa27cab97730495e42cd2c24ceba2d7def0ce01a0de34fd70181ccff013bdacce01a00fbb3fcbc56ed33fb1b879ae2
data/Gemfile CHANGED
@@ -14,5 +14,4 @@ group :test do
14
14
  gem 'rspec'
15
15
  gem 'simplecov', '~> 0.22.0', require: false
16
16
  gem 'simplecov-console', '~> 0.9.3', require: false
17
- gem 'standard', '~> 1.49'
18
17
  end
data/README.md CHANGED
@@ -1,10 +1,23 @@
1
- <h1 style="z-index: 999;">Ract</h1>
1
+ <div href="#" style="text-align: center; width: 50%; margin: 0 auto;">
2
+ <img src="./images/ract-no-bg.png" alt="Ract Logo" style="position: relative; margin-top: -50px; z-index: 1; display: flex; align-items: center; justify-content: center; text-align: center; mix-blend-mode: overlay;">
3
+ </div>
2
4
 
3
- <center>
4
- <img src="./images/ract-no-bg.png" alt="Ract Logo" width="65%" style="position: relative; margin-top: -50px; z-index: -1; mix-blend-mode: overlay;">
5
- </center>
5
+ <h1 style="z-index: 999; text-align: center;">Ract</h1>
6
6
 
7
- Ract is a lightweight Promise implementation for Ruby, providing a clean and intuitive way to handle asynchronous operations. It follows a similar pattern to JavaScript Promises, making it easy to write non-blocking code with proper error handling.
7
+ Ract is a lightweight Promise implementation for Ruby, simliar color promises in JavaScript providing a clean and intuitive way to handle asynchronous operations.
8
+
9
+ > [!NOTE]
10
+ > This is dont use Ractor, we just Threads to handle async operations
11
+ > Enjoy with us!
12
+
13
+ [![CI](https://github.com/thadeu/ract/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/thadeu/ract/actions/workflows/ci.yml)
14
+
15
+ # Features
16
+
17
+ - Thread-safe
18
+ - Similar to JavaScript Promises
19
+ - Clean and intuitive API
20
+ - Easy to use
8
21
 
9
22
  ## Installation
10
23
 
data/lib/ract/ract.rb CHANGED
@@ -113,7 +113,7 @@ class Ract
113
113
  alias catch rescue
114
114
 
115
115
  class << self
116
- include SingleMethods
116
+ include SingletonMethods
117
117
  end
118
118
 
119
119
  private
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true # :rdoc
2
2
 
3
3
  class Ract
4
- module SingleMethods
4
+ module SingletonMethods
5
5
  def resolve(value = nil, auto_execute: false)
6
6
  new(auto_execute: true) { value }.await
7
7
  end
data/lib/ract/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true # :rdoc
2
2
 
3
3
  class Ract
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/ract.rb CHANGED
@@ -5,7 +5,7 @@ require 'ract/batch'
5
5
  require 'ract/result'
6
6
  require 'ract/settled'
7
7
  require 'ract/async'
8
- require 'ract/single_methods'
8
+ require 'ract/singleton_methods'
9
9
  require 'ract/ract'
10
10
 
11
11
  # A lightweight Promise implementation for Ruby
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ract
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
  - Thadeu Esteves Jr
@@ -34,15 +34,15 @@ files:
34
34
  - lib/ract/ract.rb
35
35
  - lib/ract/result.rb
36
36
  - lib/ract/settled.rb
37
- - lib/ract/single_methods.rb
37
+ - lib/ract/singleton_methods.rb
38
38
  - lib/ract/version.rb
39
- homepage: https://github.com/thadeu/ract-rb
39
+ homepage: https://github.com/thadeu/ract
40
40
  licenses:
41
41
  - MIT
42
42
  metadata:
43
- homepage_uri: https://github.com/thadeu/ract-rb
44
- source_code_uri: https://github.com/thadeu/ract-rb
45
- changelog_uri: https://github.com/thadeu/ract-rb/blob/main/CHANGELOG.md
43
+ homepage_uri: https://github.com/thadeu/ract
44
+ source_code_uri: https://github.com/thadeu/ract
45
+ changelog_uri: https://github.com/thadeu/ract/blob/main/CHANGELOG.md
46
46
  rdoc_options: []
47
47
  require_paths:
48
48
  - lib