mb-math 0.0.0.usegit

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1fe11c98a3c92a9e8c09758ce3f3ca6673975271abd316541a1001b4aa3eb454
4
+ data.tar.gz: 4e180bed933f86806b5e3a3b57f1dde72673cd3ad5ec3f55dc3009c2dc766521
5
+ SHA512:
6
+ metadata.gz: cb46ef39edbe86af61b81e9a0c1b19be03efc8d5ab44c34227fcb3baed407b8c1ddaddec506d43a26358629cf9f513f564f8219648515d69d5a3213ebc4dd317
7
+ data.tar.gz: c74ba0ca56f39591b54f2eb22dcad08421c3d87c4331243104ae2aa5bc1e48130d7698d3f080bc4d987065474fc49774d650f1aa325f487211b5d50809059375
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ mb-math
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.3
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in mb-math.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,25 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mb-math (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.3)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ mb-math!
21
+ pry
22
+ rake (~> 13.0)
23
+
24
+ BUNDLED WITH
25
+ 2.1.4
data/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # mb-math
2
+
3
+ Mathematical functions such as range-clamping, interpolation, extrapolation,
4
+ etc. This is companion code to my [educational video series about code and
5
+ sound][0].
6
+
7
+ You might also be interested in [mb-sound][1], [mb-geometry][2], and [mb-util][3].
8
+
9
+ This code is reasonably well-tested, but I recommend using it for non-critical
10
+ tasks, not for making important decisions or for mission-critical data
11
+ 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-math
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-math in your own Ruby projects, add this Git repo to your
55
+ `Gemfile`:
56
+
57
+ ```ruby
58
+ # your-project/Gemfile
59
+ gem 'mb-math', git: 'https://github.com/mike-bourgeous/mb-math.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-util
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "mb/math"
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
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/mb/math.rb ADDED
@@ -0,0 +1,9 @@
1
+ require "mb/math/version"
2
+
3
+ module MB
4
+ module Math
5
+ class Error < StandardError; end
6
+
7
+ raise "Use Git rather than rubygems.org. See the mb-math project's README."
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module Mb
2
+ module Math
3
+ VERSION = "0.0.0.usegit"
4
+ end
5
+ end
data/mb-math.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ require_relative 'lib/mb/math/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "mb-math"
5
+ spec.version = Mb::Math::VERSION
6
+ spec.authors = ["Mike Bourgeous"]
7
+ spec.email = ["mike@mikebourgeous.com"]
8
+
9
+ spec.summary = %q{Mathematical functions for my personal projects.}
10
+ spec.homepage = "https://github.com/mike-bourgeous/mb-math"
11
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
12
+
13
+ spec.metadata["homepage_uri"] = spec.homepage
14
+ spec.metadata["source_code_uri"] = "https://github.com/mike-bourgeous/mb-math"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_development_dependency 'pry'
26
+ spec.add_development_dependency 'rake', '~> 13.0'
27
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mb-math
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: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ description:
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
+ - README.md
54
+ - Rakefile
55
+ - bin/console
56
+ - bin/setup
57
+ - lib/mb/math.rb
58
+ - lib/mb/math/version.rb
59
+ - mb-math.gemspec
60
+ homepage: https://github.com/mike-bourgeous/mb-math
61
+ licenses: []
62
+ metadata:
63
+ homepage_uri: https://github.com/mike-bourgeous/mb-math
64
+ source_code_uri: https://github.com/mike-bourgeous/mb-math
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 2.3.0
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">"
77
+ - !ruby/object:Gem::Version
78
+ version: 1.3.1
79
+ requirements: []
80
+ rubygems_version: 3.1.6
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Mathematical functions for my personal projects.
84
+ test_files: []