mb-util 0.0.0.usegit
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +25 -0
- data/LICENSE +22 -0
- data/README.md +93 -0
- data/Rakefile +2 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/lib/mb-util.rb +1 -0
- data/lib/mb/util.rb +10 -0
- data/lib/mb/util/version.rb +5 -0
- data/mb-util.gemspec +28 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 99030d5a9504fe81de48cfbb16edd61c1bdb920c071a274c974ea90c66cbc0bc
|
4
|
+
data.tar.gz: 78e14e05024da38e1230eaed02856a3649410c82a15b1a59a8ef12d2a0d6b516
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7eba46430991e25512f37f97459ede1a82dc8a046b7a834aa45bec7f19c59a2c2e9fca496afdda0bd1fea3c0e3a94dbaffeb9481a7412d9bf49ba4d1378bbf35
|
7
|
+
data.tar.gz: 612f07868b24e058323b572419e3d7949eb740af52d8e79f3e620e1184b4b059e4a47bccffe7ed573646657dac2ccbe76e8bf9bae734a25451f9cadbe8aaab13
|
data/.gitignore
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
mb-util
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.3
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mb-util (0.0.0.usegit)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
coderay (1.1.3)
|
10
|
+
method_source (1.0.0)
|
11
|
+
pry (0.14.1)
|
12
|
+
coderay (~> 1.1)
|
13
|
+
method_source (~> 1.0)
|
14
|
+
rake (13.0.1)
|
15
|
+
|
16
|
+
PLATFORMS
|
17
|
+
ruby
|
18
|
+
|
19
|
+
DEPENDENCIES
|
20
|
+
mb-util!
|
21
|
+
pry
|
22
|
+
rake (~> 13.0)
|
23
|
+
|
24
|
+
BUNDLED WITH
|
25
|
+
2.1.4
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2021, Mike Bourgeous
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice,
|
8
|
+
this list of conditions and the following disclaimer.
|
9
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
14
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
15
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
16
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
17
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
18
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
19
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
20
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
21
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
22
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# mb-util
|
2
|
+
|
3
|
+
Utility functions for interacting with the operating system, manipulating data,
|
4
|
+
etc. Things that can't otherwise be categorized, or that are too small to
|
5
|
+
warrant their own project. This is companion code to my [educational video
|
6
|
+
series about code and sound][0].
|
7
|
+
|
8
|
+
You might also be interested in [mb-sound][1], [mb-geometry][2], and [mb-math][3].
|
9
|
+
|
10
|
+
I recommend using this code only for non-critical tasks, not for making
|
11
|
+
important decisions or for mission-critical data modeling.
|
12
|
+
|
13
|
+
## Installation and usage
|
14
|
+
|
15
|
+
This project contains some useful programs of its own, or you can use it as a
|
16
|
+
Gem (with Git source) in your own projects.
|
17
|
+
|
18
|
+
### Standalone usage and development
|
19
|
+
|
20
|
+
First, install a Ruby version manager like RVM. Using the system's Ruby is not
|
21
|
+
recommended -- that is only for applications that come with the system. You
|
22
|
+
should follow the instructions from https://rvm.io, but here are the basics:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
26
|
+
\curl -sSL https://get.rvm.io | bash -s stable
|
27
|
+
```
|
28
|
+
|
29
|
+
Next, install Ruby. RVM binary rubies are still broken on Ubuntu 20.04.x, so
|
30
|
+
use the `--disable-binary` option if you are running Ubuntu 20.04.x.
|
31
|
+
|
32
|
+
```bash
|
33
|
+
rvm install --disable-binary 2.7.3
|
34
|
+
```
|
35
|
+
|
36
|
+
You can tell RVM to isolate all your projects and switch Ruby versions
|
37
|
+
automatically by creating `.ruby-version` and `.ruby-gemset` files (already
|
38
|
+
present in this project):
|
39
|
+
|
40
|
+
```bash
|
41
|
+
cd mb-util
|
42
|
+
cat .ruby-gemset
|
43
|
+
cat .ruby-version
|
44
|
+
```
|
45
|
+
|
46
|
+
Now install dependencies:
|
47
|
+
|
48
|
+
```bash
|
49
|
+
bundle install
|
50
|
+
```
|
51
|
+
|
52
|
+
### Using the project as a Gem
|
53
|
+
|
54
|
+
To use mb-util in your own Ruby projects, add this Git repo to your
|
55
|
+
`Gemfile`:
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
# your-project/Gemfile
|
59
|
+
gem 'mb-util', git: 'https://github.com/mike-bourgeous/mb-util.git
|
60
|
+
```
|
61
|
+
|
62
|
+
## Examples
|
63
|
+
|
64
|
+
TODO
|
65
|
+
|
66
|
+
## Testing
|
67
|
+
|
68
|
+
Run `rspec`, or play with the included scripts under `bin/`.
|
69
|
+
|
70
|
+
## Contributing
|
71
|
+
|
72
|
+
Pull requests welcome, though development is focused specifically on the needs
|
73
|
+
of my video series.
|
74
|
+
|
75
|
+
## License
|
76
|
+
|
77
|
+
This project is released under a 2-clause BSD license. See the LICENSE file.
|
78
|
+
|
79
|
+
## See also
|
80
|
+
|
81
|
+
### Dependencies
|
82
|
+
|
83
|
+
TODO
|
84
|
+
|
85
|
+
### References
|
86
|
+
|
87
|
+
TODO
|
88
|
+
|
89
|
+
|
90
|
+
[0]: https://www.youtube.com/playlist?list=PLpRqC8LaADXnwve3e8gI239eDNRO3Nhya
|
91
|
+
[1]: https://github.com/mike-bourgeous/mb-sound
|
92
|
+
[2]: https://github.com/mike-bourgeous/mb-geometry
|
93
|
+
[3]: https://github.com/mike-bourgeous/mb-math
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "mb/util"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
require "pry"
|
11
|
+
Pry.start
|
data/bin/setup
ADDED
data/lib/mb-util.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'mb/util'
|
data/lib/mb/util.rb
ADDED
data/mb-util.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative 'lib/mb/util/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "mb-util"
|
5
|
+
spec.version = MB::Util::VERSION
|
6
|
+
spec.authors = ["Mike Bourgeous"]
|
7
|
+
spec.email = ["mike@mikebourgeous.com"]
|
8
|
+
|
9
|
+
spec.summary = %q{Miscellaneous utility functions for personal projects.}
|
10
|
+
spec.description = %q{Use directly from Git for now, rather than rubygems.}
|
11
|
+
spec.homepage = "https://github.com/mike-bourgeous/mb-util"
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.1")
|
13
|
+
|
14
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
15
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
27
|
+
spec.add_development_dependency 'pry'
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mb-util
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0.usegit
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Bourgeous
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-04-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '13.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '13.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
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: Use directly from Git for now, rather than rubygems.
|
42
|
+
email:
|
43
|
+
- mike@mikebourgeous.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".ruby-gemset"
|
50
|
+
- ".ruby-version"
|
51
|
+
- Gemfile
|
52
|
+
- Gemfile.lock
|
53
|
+
- LICENSE
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- bin/console
|
57
|
+
- bin/setup
|
58
|
+
- lib/mb-util.rb
|
59
|
+
- lib/mb/util.rb
|
60
|
+
- lib/mb/util/version.rb
|
61
|
+
- mb-util.gemspec
|
62
|
+
homepage: https://github.com/mike-bourgeous/mb-util
|
63
|
+
licenses: []
|
64
|
+
metadata:
|
65
|
+
homepage_uri: https://github.com/mike-bourgeous/mb-util
|
66
|
+
source_code_uri: https://github.com/mike-bourgeous/mb-util
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.7.1
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 1.3.1
|
81
|
+
requirements: []
|
82
|
+
rubygems_version: 3.1.6
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Miscellaneous utility functions for personal projects.
|
86
|
+
test_files: []
|