arithmos 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d01d502eb7a377bbbc187805ccabbafae3cd7ebbe4b5127080b2c06d18ec5f12
4
- data.tar.gz: d41df5c06fe53f2968de4125a7d7f322dbfe290321a12e4582ec231ae5f64356
3
+ metadata.gz: b284f5f95d8a4b9d79096775ea6ba1d31c28b87adf1a14f5ed683dfd5fd4ca42
4
+ data.tar.gz: 0ad01e0ae14fbbd97af5c6da9103b331846282e13610ca1da6b74233ca66fe87
5
5
  SHA512:
6
- metadata.gz: 14d5e8c66663f902130e1f6bfacf583f864901c8b60f7225b44d964b5a6e510b8e7f594a7f9efc8d41f8bb8f692aa4c43ae45b634a2ac9c0394c5689febfc6ec
7
- data.tar.gz: 5527447c508fe2c9e8c02b4d2dbcec5f9e1c81dffae41144bfe5c424d54c9cca2f1840c6d2c4034f1ac6813af95acfe823f2ec3501d71d53cb6452f0393bdde3
6
+ metadata.gz: f3d4bbd3a7df819ab916484b2feeae9bd12f6ebe148ae30142e78a02a755ae6a733696f5ed61fcead202c212d7d3f1b841ef86dc25c460ceded426004e6fc1ed
7
+ data.tar.gz: 0bc768b1da5bfb8c8726268d9516e28e9cbc0cb8a83ff01da00621c3f46c5cade118a62afcfe6003dd9c95a355e5da291e32397928d65c169bffe808542fe9aa
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # ignore gem releses
14
+ *.gem
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arithmos (0.1.0)
4
+ arithmos (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Arithmos
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/arithmos`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Convert numbers to [greek numerals](https://en.wikipedia.org/wiki/Greek_numerals#Table).
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,18 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ `Arithmos` is a module that is being included automatically to `Numeric` class. It adds a `#greek` method to each numeral:
24
+
25
+ ```
26
+ >> 274.greek
27
+ => "σοδ"
28
+ >> 666.greek
29
+ => "χξϛ"
30
+ >> 12.greek
31
+ => "ιβ"
32
+ >> 6.greek
33
+ => "ϛ"
34
+ ```
26
35
 
27
36
  ## Development
28
37
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = %q{Converts numbers to greek numerals.}
12
12
  spec.description = %q{Converts numbers to greek numerals.}
13
- #spec.homepage = "TODO: Put your gem's website or public repo URL here."
13
+ spec.homepage = "https://rubygems.org/gems/arithmos"
14
14
 
15
15
  if spec.respond_to?(:metadata)
16
16
  #spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
@@ -18,8 +18,7 @@ Gem::Specification.new do |spec|
18
18
  #spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
19
19
  #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
20
20
  else
21
- raise "RubyGems 2.0 or newer is required to protect against " \
22
- "public gem pushes."
21
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
22
  end
24
23
 
25
24
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
@@ -18,7 +18,7 @@ module Arithmos
18
18
  symbol = []
19
19
  GREEK_SYMBOLS.each_with_index do |(num, sym), count|
20
20
  symbol.push(sym * (multiplier / num))
21
- multiplier = multiplier % num
21
+ multiplier %= num
22
22
  end
23
23
  symbol.join
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module Arithmos
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arithmos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Placzyński
@@ -71,7 +71,7 @@ files:
71
71
  - bin/setup
72
72
  - lib/arithmos.rb
73
73
  - lib/arithmos/version.rb
74
- homepage:
74
+ homepage: https://rubygems.org/gems/arithmos
75
75
  licenses: []
76
76
  metadata: {}
77
77
  post_install_message: