te_reo_maori 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/te_reo_maori +5 -0
- data/lib/te_reo_maori.rb +4 -2
- data/lib/te_reo_maori/version.rb +1 -1
- data/lib/te_reo_maori/whakahua.rb +1 -1
- data/lib/te_reo_maori/whakahua_rorohiko.rb +12 -0
- data/lib/te_reo_maori/whakamatautau_pangarau.rb +2 -0
- metadata +2 -14
- data/.gitignore +0 -13
- data/.gitlab-ci.yml +0 -28
- data/.rspec +0 -3
- data/CODE_OF_CONDUCT.md +0 -74
- data/ChangeLog +0 -11
- data/Dockerfile +0 -10
- data/Gemfile +0 -11
- data/LICENSE.txt +0 -21
- data/README.md +0 -61
- data/Rakefile +0 -8
- data/bin/console +0 -15
- data/bin/setup +0 -8
- data/te_reo_maori.gemspec +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbb6a3a38a2729f7192c8341d17ac25db0e99b0c9fd0449861f19fa9d02c8fd7
|
4
|
+
data.tar.gz: 60e68ce341c57a804a293597a1d001d8f41c21bfbb5838bf03d7bd3988b260f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b216aa1ee469e515572994c6ceb2a915fc78624f6e83c701c3fa0b0aa30bbe99cd5a375e16680cb0cd44c67df968d6bf13eded16537716d7696672e255a1ee9d
|
7
|
+
data.tar.gz: 8af602fc826064236a6f8fe35c60b44b9760bac7af91f6e9aa01427287a71a9aece20d838c539d30589c891bca029aac1781f2d7545c7f642a0d098adf9c55c4
|
data/exe/te_reo_maori
CHANGED
@@ -23,6 +23,11 @@ end
|
|
23
23
|
puts 'If you type a number and press you will see Maori equivalent. Numbers > 10 must be wrapped in (). Greatest supported is 999'
|
24
24
|
puts 'Example of bigger numbers. 12: "tekau ma rua". Add 23 + 33: "(rua tekau ma toru) + (toru tekau ma toru)"'
|
25
25
|
puts 'See integer form by calling "tau", e.g., "((rua tekau ma toru) + (toru tekau ma toru)).tau" '
|
26
|
+
puts ''
|
27
|
+
puts 'Try programming with loops with "tena_ano" (to iterate) and "kupu" (speak).
|
28
|
+
E.g.,
|
29
|
+
(tahi..iwa).tena_ano { |tau| kupu tau }
|
30
|
+
%w[Maui Bob Sandy].tena_ano { |ingoa| kupu "Haerae Mai #{ingoa}" }'
|
26
31
|
puts 'If you have any ideas on how this can be improved add issue to https://gitlab.com/samuel-garratt/te_reo_maori/-/issues'
|
27
32
|
|
28
33
|
IRB.start(__FILE__)
|
data/lib/te_reo_maori.rb
CHANGED
@@ -3,8 +3,10 @@
|
|
3
3
|
require 'te_reo_maori/version'
|
4
4
|
require 'te_reo_maori/tau'
|
5
5
|
require 'te_reo_maori/whakamatautau_pangarau'
|
6
|
+
require_relative 'te_reo_maori/whakahua_rorohiko'
|
6
7
|
|
7
8
|
module TeReoMaori
|
8
|
-
class Error < StandardError; end
|
9
|
-
# Your code goes here...
|
9
|
+
class Error < StandardError; end
|
10
10
|
end
|
11
|
+
|
12
|
+
extend WhakahuaRorohiko
|
data/lib/te_reo_maori/version.rb
CHANGED
@@ -12,9 +12,11 @@ module WhakamatautauPangarau
|
|
12
12
|
whakautu = eval(gets).to_i
|
13
13
|
if whakautu == whakautu_tika
|
14
14
|
puts 'Ka pai. Correct!'
|
15
|
+
":)"
|
15
16
|
else
|
16
17
|
puts "Incorrect. You put '#{whakautu.inspect} (#{whakautu})'.
|
17
18
|
Correct answer is '#{whakautu_tika.inspect} (#{whakautu_tika})'"
|
19
|
+
":("
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: te_reo_maori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Garratt
|
@@ -18,25 +18,13 @@ executables:
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- ".gitignore"
|
22
|
-
- ".gitlab-ci.yml"
|
23
|
-
- ".rspec"
|
24
|
-
- CODE_OF_CONDUCT.md
|
25
|
-
- ChangeLog
|
26
|
-
- Dockerfile
|
27
|
-
- Gemfile
|
28
|
-
- LICENSE.txt
|
29
|
-
- README.md
|
30
|
-
- Rakefile
|
31
|
-
- bin/console
|
32
|
-
- bin/setup
|
33
21
|
- exe/te_reo_maori
|
34
22
|
- lib/te_reo_maori.rb
|
35
23
|
- lib/te_reo_maori/tau.rb
|
36
24
|
- lib/te_reo_maori/version.rb
|
37
25
|
- lib/te_reo_maori/whakahua.rb
|
26
|
+
- lib/te_reo_maori/whakahua_rorohiko.rb
|
38
27
|
- lib/te_reo_maori/whakamatautau_pangarau.rb
|
39
|
-
- te_reo_maori.gemspec
|
40
28
|
homepage: https://gitlab.com/samuel-garratt/te_reo_maori
|
41
29
|
licenses:
|
42
30
|
- MIT
|
data/.gitignore
DELETED
data/.gitlab-ci.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
image: ruby:2.6
|
2
|
-
|
3
|
-
test:
|
4
|
-
before_script:
|
5
|
-
- bundle install
|
6
|
-
script:
|
7
|
-
- rake
|
8
|
-
|
9
|
-
include:
|
10
|
-
- template: Code-Quality.gitlab-ci.yml
|
11
|
-
|
12
|
-
docker_build:
|
13
|
-
variables:
|
14
|
-
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
|
15
|
-
DOCKER_HOST: tcp://docker:2376
|
16
|
-
DOCKER_TLS_CERTDIR: "/certs"
|
17
|
-
stage: deploy # Part of a later stage
|
18
|
-
services:
|
19
|
-
- docker:19.03.5-dind
|
20
|
-
image: docker:19.03.5
|
21
|
-
script:
|
22
|
-
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
23
|
-
- docker pull --quiet $CI_REGISTRY_IMAGE:latest || true
|
24
|
-
- docker build -t $CI_REGISTRY_IMAGE:latest .
|
25
|
-
- docker push $CI_REGISTRY_IMAGE:latest
|
26
|
-
only:
|
27
|
-
- master
|
28
|
-
needs: ["test"]
|
data/.rspec
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at TODO: Write your email address. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: https://contributor-covenant.org
|
74
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
data/ChangeLog
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
* 0.1.7 - Fixed whitu and waru number mix up
|
2
|
-
* 0.1.6 - Allow input of macrons
|
3
|
-
- Fixed math test
|
4
|
-
- Use Ruby 2.7 in docker
|
5
|
-
* 0.1.5 - Added simple addition math test
|
6
|
-
* 0.1.4 - Pronounce integers on inspection for better terminal experience
|
7
|
-
- Handle up to 999 and accent marks
|
8
|
-
* 0.1.3 Bug fix. 'Whakahua' did not handle 'iwa' and numbers like toru tekau
|
9
|
-
* 0.1.2 whakahua method to pronounce numbers
|
10
|
-
* 0.1.1 Has docker image. Handle up to 99
|
11
|
-
* 0.1.0 Handles numbers 1-19
|
data/Dockerfile
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2020 TODO: Write your name
|
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/README.md
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
# TeReoMaori
|
2
|
-
|
3
|
-
Tool to aid one to learn Maori and enable one to program in Maori.
|
4
|
-
|
5
|
-
Learn Maori at https://maoridictionary.co.nz/
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Execute interactive terminal in docker
|
10
|
-
|
11
|
-
`docker run --rm -it registry.gitlab.com/samuel-garratt/te_reo_maori`
|
12
|
-
|
13
|
-
### As a ruby gem
|
14
|
-
|
15
|
-
Add this line to your application's Gemfile:
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
gem 'te_reo_maori'
|
19
|
-
```
|
20
|
-
|
21
|
-
And then execute:
|
22
|
-
|
23
|
-
$ bundle install
|
24
|
-
|
25
|
-
Or install it yourself as:
|
26
|
-
|
27
|
-
$ gem install te_reo_maori
|
28
|
-
|
29
|
-
## Usage
|
30
|
-
|
31
|
-
Count in maori
|
32
|
-
|
33
|
-
```ruby
|
34
|
-
tahi + rua
|
35
|
-
# Will give a result of 3
|
36
|
-
3.whakahua
|
37
|
-
# Will return 'toru'
|
38
|
-
whakahua(tahi + tahi)
|
39
|
-
# Will return 'rua'
|
40
|
-
```
|
41
|
-
|
42
|
-
Execute in interactive terminal. After installing type `te_reo_maori` on command prompt to open it.
|
43
|
-
|
44
|
-
## Development
|
45
|
-
|
46
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
47
|
-
|
48
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
49
|
-
|
50
|
-
## Contributing
|
51
|
-
|
52
|
-
Bug reports and pull requests are welcome on GitLab at https://gitlab.com/samuel-garratt/te_reo_maori. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://gitlab.com/samuel-garratt/te_reo_maori/blob/master/CODE_OF_CONDUCT.md).
|
53
|
-
|
54
|
-
|
55
|
-
## License
|
56
|
-
|
57
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
58
|
-
|
59
|
-
## Code of Conduct
|
60
|
-
|
61
|
-
Everyone interacting in the TeReoMaori project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/samuel-garratt/te_reo_maori/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'te_reo_maori'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/te_reo_maori.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'lib/te_reo_maori/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = 'te_reo_maori'
|
7
|
-
spec.version = TeReoMaori::VERSION
|
8
|
-
spec.authors = ['Samuel Garratt']
|
9
|
-
spec.email = ['samuel.garratt@integrationqa.com']
|
10
|
-
|
11
|
-
spec.summary = 'Tool to aid one to learn Maori and enable one to program in Maori.'
|
12
|
-
spec.description = 'Tool to aid one to learn Maori and enable one to program in Maori.'
|
13
|
-
spec.homepage = 'https://gitlab.com/samuel-garratt/te_reo_maori'
|
14
|
-
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
16
|
-
|
17
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
-
spec.metadata['source_code_uri'] = 'https://gitlab.com/samuel-garratt/te_reo_maori'
|
19
|
-
spec.metadata['changelog_uri'] = 'https://gitlab.com/samuel-garratt/te_reo_maori/ChangeLog'
|
20
|
-
|
21
|
-
# Specify which files should be added to the gem when it is released.
|
22
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
-
end
|
26
|
-
spec.bindir = 'exe'
|
27
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
-
spec.require_paths = ['lib']
|
29
|
-
end
|