stravid-fraction 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: cc108ee6fe2a385dc2146ae7701d92eaf64d64708793fccb7a9f39b470bf375c
4
+ data.tar.gz: 8b717dfba66f2a23916e2e808dd823f47cfb000583f5a93d4bd195cf6ccf9f2e
5
+ SHA512:
6
+ metadata.gz: ff6abfb19b527a8d6e77338be4549c4e6c3f3841c550bfd72ca84eaa1274afd0f6b92dcaa317590f63d44180dbe735135e8d9c91d2072f2f3c999c65db37c8cf
7
+ data.tar.gz: 22a52fd7021db42815cb2649f3b810c829fd7398d39dca2bc104f15100f35b25a231f82d261b92171742aafc93597d2a113650ba9a916226f0b035228b4ced6b
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-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.3
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in stravid-fraction.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,22 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ stravid-fraction (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.13.0)
10
+ rake (10.5.0)
11
+
12
+ PLATFORMS
13
+ ruby
14
+
15
+ DEPENDENCIES
16
+ bundler (~> 2.0)
17
+ minitest (= 5.13.0)
18
+ rake (~> 10.0)
19
+ stravid-fraction!
20
+
21
+ BUNDLED WITH
22
+ 2.0.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 David Strauß
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Makefile ADDED
@@ -0,0 +1,9 @@
1
+ UNIT_TEST_FILES:= $(wildcard tests/unit/*_test.rb)
2
+
3
+ .PHONY: unit-tests
4
+ unit-tests:
5
+ @ruby -I $(CURDIR) $(foreach file, $(UNIT_TEST_FILES), -r $(file)) -e exit
6
+
7
+ .PHONY: test
8
+ test:
9
+ @scripts/test-watcher.sh
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
data/bin/rake ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rake", "rake")
data/bin/watchexec ADDED
Binary file
@@ -0,0 +1,5 @@
1
+ module Stravid
2
+ module Fraction
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ require "stravid/fraction/version"
2
+
3
+ module Stravid
4
+ module Fraction
5
+ class Error < StandardError; end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+ set -o pipefail
6
+
7
+ make unit-tests
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+ set -o pipefail
6
+
7
+ bin/watchexec --restart -w lib -w tests scripts/test-runner.sh
@@ -0,0 +1,31 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'stravid/fraction/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'stravid-fraction'
7
+ spec.version = Stravid::Fraction::VERSION
8
+ spec.authors = ['David Strauß']
9
+ spec.email = ['david@strauss.io']
10
+
11
+ spec.summary = 'Easy to use fraction value object.'
12
+ spec.homepage = 'https://github.com/stravid/ruby-fraction'
13
+ spec.license = 'MIT'
14
+
15
+ spec.metadata['homepage_uri'] = spec.homepage
16
+ spec.metadata['source_code_uri'] = 'https://github.com/stravid/ruby-fraction'
17
+ spec.metadata['changelog_uri'] = 'https://github.com/stravid/ruby-fraction'
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
+ end
24
+ spec.bindir = 'exe'
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.add_development_dependency 'bundler', '~> 2.0'
29
+ spec.add_development_dependency 'rake', '~> 10.0'
30
+ spec.add_development_dependency 'minitest', '5.13.0'
31
+ end
@@ -0,0 +1,10 @@
1
+ require_relative '../unit_helper'
2
+ require 'stravid/fraction'
3
+
4
+ class DummyTitle < UnitTest
5
+ include Stravid
6
+
7
+ def test_dummy
8
+ assert_equal Fraction.new('1/2') + Fraction.new('1/2'), Fraction.new('1/1')
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
+
3
+ require 'minitest/autorun'
4
+ require 'minitest/hell'
5
+
6
+ class UnitTest < Minitest::Test
7
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stravid-fraction
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - David Strauß
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-11-17 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: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.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: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 5.13.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 5.13.0
55
+ description:
56
+ email:
57
+ - david@strauss.io
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".ruby-version"
64
+ - Gemfile
65
+ - Gemfile.lock
66
+ - LICENSE.txt
67
+ - Makefile
68
+ - Rakefile
69
+ - bin/rake
70
+ - bin/watchexec
71
+ - lib/stravid/fraction.rb
72
+ - lib/stravid/fraction/version.rb
73
+ - scripts/test-runner.sh
74
+ - scripts/test-watcher.sh
75
+ - stravid-fraction.gemspec
76
+ - tests/unit/dummy_test.rb
77
+ - tests/unit_helper.rb
78
+ homepage: https://github.com/stravid/ruby-fraction
79
+ licenses:
80
+ - MIT
81
+ metadata:
82
+ homepage_uri: https://github.com/stravid/ruby-fraction
83
+ source_code_uri: https://github.com/stravid/ruby-fraction
84
+ changelog_uri: https://github.com/stravid/ruby-fraction
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubygems_version: 3.0.3
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: Easy to use fraction value object.
104
+ test_files: []