acme-heisenberg 0.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 +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +50 -0
- data/Rakefile +1 -0
- data/acme-heisenberg.gemspec +23 -0
- data/lib/acme/heisenberg.rb +22 -0
- data/lib/acme/heisenberg/version.rb +5 -0
- metadata +81 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d94afd066f314844d101097824ffac561720ec01
|
4
|
+
data.tar.gz: 925275db03b4fbc59bf6b6bf7fddd8f1cc3c1969
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 94da9322202543785775d5a44936fea9d3b423b2db2f20d3ef3032e28dafe8dce311dde951eaed5313597cf341fdff4576c156fd9fe0c3ae34c20d05fff0eb82
|
7
|
+
data.tar.gz: 636b596ee2bfb9618b92caf59ee418018c5b0b63e0cceef480079c47a33357116e111d27add755bc0d01061928026e2b6eabec5b88fcb1fda09757c4f0851665
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Jason King
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Acme::Heisenberg
|
2
|
+
|
3
|
+
When you're ready to live in more of an uncertain world. Just require this
|
4
|
+
module, and when you observe true or false values then their values might
|
5
|
+
change.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Install it with:
|
10
|
+
|
11
|
+
$ gem install acme-heisenberg
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
[1] pry(main)> require 'acme/heisenberg'
|
16
|
+
=> false
|
17
|
+
[2] pry(main)> 1==1
|
18
|
+
=> false
|
19
|
+
[3] pry(main)> 1==1
|
20
|
+
=> false
|
21
|
+
[4] pry(main)> 1==1
|
22
|
+
=> false
|
23
|
+
[5] pry(main)> 1==1
|
24
|
+
=> true
|
25
|
+
[6] pry(main)> 1==1
|
26
|
+
=> false
|
27
|
+
[7] pry(main)> 1==1
|
28
|
+
=> true
|
29
|
+
[8] pry(main)>
|
30
|
+
|
31
|
+
Perhaps the most surprising is that only the observation of the boolean is
|
32
|
+
affected:
|
33
|
+
|
34
|
+
[9] pry(main)> b = 1==1; puts "Outputs: #{b}" if b
|
35
|
+
Outputs: false
|
36
|
+
=> nil
|
37
|
+
[10] pry(main)> b = 1==1; puts "Outputs: #{b}" if b
|
38
|
+
Outputs: true
|
39
|
+
=> nil
|
40
|
+
|
41
|
+
So the boolean still operates as if it's true, even though when you look at it
|
42
|
+
it can be either true or false. Holy Schrödinger's Cat!
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
1. Fork it
|
47
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
48
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
49
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
50
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'acme/heisenberg/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "acme-heisenberg"
|
8
|
+
spec.version = Acme::Heisenberg::VERSION
|
9
|
+
spec.authors = ["Jason King"]
|
10
|
+
spec.email = ["jk@handle.it"]
|
11
|
+
spec.description = %q{When you're ready to live in more of an uncertain world. Just require this module, and when you observe true or false values then their values might change.}
|
12
|
+
spec.summary = %q{When there's altogether too much certainty}
|
13
|
+
spec.homepage = "https://github.com/smathy/acme-heisenberg"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require "acme/heisenberg/version"
|
2
|
+
|
3
|
+
module Acme
|
4
|
+
module Heisenberg
|
5
|
+
class ::TrueClass
|
6
|
+
def to_s
|
7
|
+
rand(0..1) == 1 ? "true" : "false"
|
8
|
+
end
|
9
|
+
def inspect
|
10
|
+
"#{to_s}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
class ::FalseClass
|
14
|
+
def to_s
|
15
|
+
rand(0..1) == 1 ? "false" : "true"
|
16
|
+
end
|
17
|
+
def inspect
|
18
|
+
"#{to_s}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: acme-heisenberg
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jason King
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-05-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: When you're ready to live in more of an uncertain world. Just require
|
42
|
+
this module, and when you observe true or false values then their values might change.
|
43
|
+
email:
|
44
|
+
- jk@handle.it
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- .gitignore
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- acme-heisenberg.gemspec
|
55
|
+
- lib/acme/heisenberg.rb
|
56
|
+
- lib/acme/heisenberg/version.rb
|
57
|
+
homepage: https://github.com/smathy/acme-heisenberg
|
58
|
+
licenses:
|
59
|
+
- MIT
|
60
|
+
metadata: {}
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options: []
|
63
|
+
require_paths:
|
64
|
+
- lib
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 2.0.0
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: When there's altogether too much certainty
|
81
|
+
test_files: []
|