therefore 1.0.0 → 1.0.1

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: b48be7ef4ee5a7ab3ace829843bc2f53129feb056f01e4697c752351aee5434c
4
- data.tar.gz: 0631270b4eb1b7b3d116957083af143e1c7e7866b1717cf21101abe619ef761e
3
+ metadata.gz: cde2ad4b634cd0840fe0f13cc9a4c44a5a5aba39fdaab8a4a06a8d1fa7b1f837
4
+ data.tar.gz: fa254e95d0954056d2baefbceb5af4d80b3ee146a4bb814880d64190d7b74632
5
5
  SHA512:
6
- metadata.gz: d51de8f98f23b3877165d6af60aabb12273bf8525c124eac96967e7ea95347838b165bd0788872cf6b5dc32505b88624d1a7bb286854a5cf90e818094f78b135
7
- data.tar.gz: cefd3f2f6658fa5898d968f0cb32da6edd7aacb49f915ed637fd63d4d1e1a1b9f3e23be7ee81f15a471b9ff76dd8bffee8401f2a94ab14223f038cf0642a49fe
6
+ metadata.gz: c2bcbbc471d55240369fed7cfac8520cbcc0306608727d0661409955d4391222305f904ed649ffaead4a24a387a093842a64ea0824af6797069746772b72e57b
7
+ data.tar.gz: e7e5048347332140a1d1c40e42a11fe35de4044f39f9f75db89e1d80e99f35719e2f3bacec61c4de959fffb195bd7cfb10323ec2bd53e74d5a45303c5cf7930f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ <!--[//]: # (
4
+ ## <Release number> <Date YYYY-MM-DD>
5
+ ### Breaking changes
6
+ ### Deprecations
7
+ ### New features
8
+ ### Bug fixes
9
+ )-->
10
+
11
+ ## 1.0.1 2025-02-24
12
+
13
+ ### New features
14
+
15
+ - Added type signatures for the methods.
16
+
3
17
  ## 1.0.0 2023-05-04
4
18
 
5
19
  First release. Refer to [README.md](README.md) for the full documentation.
data/Rakefile CHANGED
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new :spec
7
4
 
8
5
  require 'rubocop/rake_task'
9
6
 
@@ -1,3 +1,3 @@
1
1
  module Therefore
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
data/sig/therefore.rbs ADDED
@@ -0,0 +1,26 @@
1
+ class NilClass
2
+ def therefore: () { (self) -> void } -> self
3
+ | () -> Enumerator[nil]
4
+
5
+ def otherwise: [T] () { (self) -> T } -> T
6
+ | () -> Enumerator[class]
7
+ | (untyped) -> untyped
8
+ end
9
+
10
+ class FalseClass
11
+ def therefore: () { (self) -> void } -> self
12
+ | () -> Enumerator[nil]
13
+
14
+ def otherwise: [T] () { (self) -> T } -> T
15
+ | () -> Enumerator[class]
16
+ | (untyped) -> untyped
17
+ end
18
+
19
+ module Kernel
20
+ def therefore: [T] () { (self) -> T } -> T
21
+ | () -> Enumerator[self]
22
+
23
+ def otherwise: () { (self) -> void } -> self
24
+ | () -> Enumerator[nil]
25
+ | (untyped) -> untyped
26
+ end
data/therefore.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ require_relative 'lib/therefore/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'therefore'
5
+ spec.version = Therefore::VERSION
6
+ spec.authors = ['Moku S.r.l.', 'Riccardo Agatea']
7
+ spec.email = ['info@moku.io']
8
+ spec.license = 'MIT'
9
+
10
+ spec.summary = 'A simple wrapper for if conditionals, what each is for while loops.'
11
+ spec.description = "Just like each, therefore relies on block semantics, so it's essentially an if " \
12
+ 'conditional with a scope, a closure, and the ability to be chained with other methods.'
13
+ spec.homepage = 'https://github.com/moku-io/therefore'
14
+ spec.required_ruby_version = '>= 2.6.0'
15
+
16
+ spec.metadata['homepage_uri'] = spec.homepage
17
+ spec.metadata['source_code_uri'] = 'https://github.com/moku-io/therefore'
18
+ spec.metadata['changelog_uri'] = 'https://github.com/moku-io/therefore/blob/master/CHANGELOG.md'
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir __dir__ do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
25
+ end
26
+ end
27
+ spec.bindir = 'exe'
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ['lib']
30
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: therefore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moku S.r.l.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-05-04 00:00:00.000000000 Z
12
+ date: 2025-02-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Just like each, therefore relies on block semantics, so it's essentially
15
15
  an if conditional with a scope, a closure, and the ability to be chained with other
@@ -20,7 +20,6 @@ executables: []
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
- - ".rspec"
24
23
  - ".rubocop.yml"
25
24
  - CHANGELOG.md
26
25
  - Gemfile
@@ -32,6 +31,8 @@ files:
32
31
  - lib/therefore/kernel_patch.rb
33
32
  - lib/therefore/nil_class_patch.rb
34
33
  - lib/therefore/version.rb
34
+ - sig/therefore.rbs
35
+ - therefore.gemspec
35
36
  homepage: https://github.com/moku-io/therefore
36
37
  licenses:
37
38
  - MIT
@@ -54,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
55
  - !ruby/object:Gem::Version
55
56
  version: '0'
56
57
  requirements: []
57
- rubygems_version: 3.4.6
58
+ rubygems_version: 3.5.22
58
59
  signing_key:
59
60
  specification_version: 4
60
61
  summary: A simple wrapper for if conditionals, what each is for while loops.
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper