ocassionally 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 +5 -5
- data/README.md +8 -18
- data/lib/ocassionally/version.rb +1 -1
- data/ocassionally.gemspec +2 -2
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 879bad8f88fc1c7441289f15d31506179e4bfad6703c6f2b79ff59d2a3e13453
|
4
|
+
data.tar.gz: 2688757dd9b629280a7e1bf2d115b14e24d99bad327fc04bbc69bdce9ceaad0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 104fe6e8ced29966ceacc354058cea5532e51cd3e828abae0e15e7ab70ee63090d67f78d075e9260644c7367d5bd88467f3ff47005a484c56b471291dcc52ea3
|
7
|
+
data.tar.gz: 942d56d994070a39cfa4a77cfabb6d39075dde9166a5262b5982f2157727bbf69b6d8440c05a22301f7f49ffd7665a2486537f61167f27d2fcbeed78e1217d0e
|
data/README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
# ocassionally
|
2
2
|
|
3
|
-
|
4
|
-
your program work the same way every time? That is boring.
|
5
|
-
Add some spice to your code. Make debugging it harder.
|
6
|
-
Model real-world things with fuzzy conditionals.
|
3
|
+
We all make mistakes occasionally. Your code should be allowed to as well. I don't mean the bugs/defects that you occasionally let loose by accident. I mean on purpose. Doesn't it feel sometimes like your code is out to get you, or is it just me? Maybe it is.
|
7
4
|
|
8
|
-
|
9
|
-
|
5
|
+
ocassionally it works; and, ocassionally it doesn't. Why should your program work the same way every time? You don't. That is boring. Add some spice to your code. Make debugging it harder. Model real-world things with fuzzy conditionals.
|
6
|
+
|
7
|
+
Conditional blocks of the 'if' and 'unless' are so black-and-white. Add some color to your code with ocassionally.
|
10
8
|
|
11
9
|
## Installation
|
12
10
|
|
@@ -50,9 +48,7 @@ ocassionally("sleep(5)") { puts "Sorry I was sleeping. What do you want?" }
|
|
50
48
|
|
51
49
|
```
|
52
50
|
|
53
|
-
The order of the two parameters does not matter. The default for
|
54
|
-
the rate is 25% the default for the conditional is true. So that
|
55
|
-
means you can also do this:
|
51
|
+
The order of the two parameters does not matter. The default for the rate is 25% the default for the conditional is true. So that means you can also do this:
|
56
52
|
|
57
53
|
```ruby
|
58
54
|
ocassionally do
|
@@ -64,19 +60,13 @@ ocassionally(95) do
|
|
64
60
|
end
|
65
61
|
```
|
66
62
|
|
67
|
-
If you get tired of ocassionally doing things. Try
|
68
|
-
doing them #sometimes, #seldom, #often, #very_often, #every_time or #never.
|
63
|
+
If you get tired of ocassionally doing things. Try doing them #sometimes, #seldom, #often, #very_often, #every_time or #never.
|
69
64
|
|
70
|
-
If you don't like the simplistic #__probability_function(rate)
|
71
|
-
then over-ride it with your own. Its Ruby. Its your
|
72
|
-
play ground.
|
65
|
+
If you don't like the simplistic #__probability_function(rate) then over-ride it with your own. Its Ruby. Its your play ground.
|
73
66
|
|
74
67
|
## Take a look at this other gem
|
75
68
|
|
76
|
-
I originally called this library maybe; but, that got co-opted by
|
77
|
-
folks who can't handle nil. Then I called it sometimes; but, someone else
|
78
|
-
already had that gem name which does something similar. Take a look
|
79
|
-
at this one:
|
69
|
+
I originally called this library maybe; but, that got co-opted by folks who can't handle nil. Then I called it sometimes; but, someone else already had that gem name which does something similar. Take a look at this one:
|
80
70
|
|
81
71
|
https://github.com/sudara/sometimes
|
82
72
|
|
data/lib/ocassionally/version.rb
CHANGED
data/ocassionally.gemspec
CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler"
|
22
|
-
spec.add_development_dependency "rake"
|
21
|
+
spec.add_development_dependency "bundler"
|
22
|
+
spec.add_development_dependency "rake"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocassionally
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dewayne VanHoozer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
description: Probabilistic conditionals for fuzziness.
|
42
42
|
email:
|
43
43
|
- dvanhoozer@gmail.com
|
@@ -57,7 +57,7 @@ homepage: http://github.com/MadBomber/ocassionally
|
|
57
57
|
licenses:
|
58
58
|
- You want it, its yours
|
59
59
|
metadata: {}
|
60
|
-
post_install_message:
|
60
|
+
post_install_message:
|
61
61
|
rdoc_options: []
|
62
62
|
require_paths:
|
63
63
|
- lib
|
@@ -72,9 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
|
76
|
-
|
77
|
-
signing_key:
|
75
|
+
rubygems_version: 3.3.17
|
76
|
+
signing_key:
|
78
77
|
specification_version: 4
|
79
78
|
summary: Ocassionally it works; and, ocassionally it doesn't
|
80
79
|
test_files: []
|