numeronym 1.0.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1d908f5a92b6e7c2842c29c9fdf59b6f0b1599c37375e820829efa0405f06e56
4
+ data.tar.gz: 4d049b91edca3d0bc290c9d5fb0966f00d615f77a4549372090d6bfff71e5a09
5
+ SHA512:
6
+ metadata.gz: 4c1a372c8114a7bc2ac23e8682f405cc40e9eb4008522d5081496e95971bf1cb736d9ae924d21148a417f9b7cc3c029469b1834d62aa47ae59d0668164027b2e
7
+ data.tar.gz: 2cb41cbcf9acc416df71a75687ee47eb5dc4166d14a8ceeb5bbc23ffde2eaa810ec2fdae1a7d293df56bd6f28472253a93641c631f90ab5074a6c4b71329bda8
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,6 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.0
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0
4
+
5
+ - Implements Numeronym
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in numeronym.gemspec
6
+ gemspec
7
+
8
+ gem "pry"
9
+ gem "rspec"
10
+ gem "bundler"
11
+ gem "rake"
@@ -0,0 +1,41 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ numeronym (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ coderay (1.1.2)
10
+ diff-lcs (1.3)
11
+ method_source (0.9.0)
12
+ pry (0.11.3)
13
+ coderay (~> 1.1.0)
14
+ method_source (~> 0.9.0)
15
+ rake (12.3.1)
16
+ rspec (3.8.0)
17
+ rspec-core (~> 3.8.0)
18
+ rspec-expectations (~> 3.8.0)
19
+ rspec-mocks (~> 3.8.0)
20
+ rspec-core (3.8.0)
21
+ rspec-support (~> 3.8.0)
22
+ rspec-expectations (3.8.1)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.8.0)
25
+ rspec-mocks (3.8.0)
26
+ diff-lcs (>= 1.2.0, < 2.0)
27
+ rspec-support (~> 3.8.0)
28
+ rspec-support (3.8.0)
29
+
30
+ PLATFORMS
31
+ ruby
32
+
33
+ DEPENDENCIES
34
+ bundler
35
+ numeronym!
36
+ pry
37
+ rake
38
+ rspec
39
+
40
+ BUNDLED WITH
41
+ 1.16.5
@@ -0,0 +1,21 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Juanito Fatas
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.
@@ -0,0 +1,41 @@
1
+ # Numeronym
2
+
3
+ A [numeronym](https://en.wikipedia.org/wiki/Numeronym) is a number-based word.
4
+
5
+ > the letters between the first and last are replaced with a number representing the number of letters omitted, such as "i18n" for "internationalization".
6
+
7
+ ## Installation
8
+
9
+ ```ruby
10
+ gem "numeronym"
11
+ ```
12
+
13
+ or
14
+
15
+ ```
16
+ $ gem install numeronym
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```ruby
22
+ Numeronym.run "internationalization"
23
+ => "i18n"
24
+
25
+ # of course it also available as N7M:
26
+ N7M.run "localization"
27
+ => "l10n"
28
+ ```
29
+
30
+ Thank you for using `N7M`.
31
+
32
+ Feedback and improvement are welcome!
33
+
34
+ ## License, Contributor's Guidelines, Code of Conduct, and Credits
35
+
36
+ - [MIT license](LICENSE.md)
37
+ - [Moya Contributors Guidelines][moya] which TLDR: means we give out push access easily and often.
38
+ - [Code of Conduct](CODE_OF_CONDUCT.md)
39
+ - Notebook idea by [Nelson Elhage](https://blog.nelhage.com/about/)
40
+
41
+ [moya]: https://github.com/Moya/contributors
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+ require "bundler/gem_tasks"
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task default: :spec
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "numeronym"
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
@@ -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
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "numeronym/version"
4
+
5
+ module Numeronym
6
+ def self.run(word)
7
+ if word.size <= 2
8
+ word
9
+ else
10
+ %(#{word[0]}#{word.size-2}#{word[-1]})
11
+ end
12
+ end
13
+ end
14
+
15
+ N7M = Numeronym unless defined?(N7M)
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Numeronym
4
+ VERSION = "1.0.0"
5
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "numeronym/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "numeronym"
9
+ spec.version = Numeronym::VERSION
10
+ spec.authors = ["Juanito Fatas"]
11
+ spec.email = ["katehuang0320@gmail.com"]
12
+
13
+ spec.summary = "n7m"
14
+ spec.description = spec.summary
15
+ spec.homepage = "https://github.com/JuanitoFatas/numeronym"
16
+ spec.license = "MIT"
17
+
18
+ # Specify which files should be added to the gem when it is released.
19
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
21
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ end
23
+ spec.bindir = "exe"
24
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
+ spec.require_paths = ["lib"]
26
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: numeronym
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Juanito Fatas
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-11-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: n7m
14
+ email:
15
+ - katehuang0320@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - ".rspec"
22
+ - ".travis.yml"
23
+ - CHANGELOG.md
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - LICENSE.md
27
+ - README.md
28
+ - Rakefile
29
+ - bin/hack
30
+ - bin/setup
31
+ - lib/numeronym.rb
32
+ - lib/numeronym/version.rb
33
+ - numeronym.gemspec
34
+ homepage: https://github.com/JuanitoFatas/numeronym
35
+ licenses:
36
+ - MIT
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubyforge_project:
54
+ rubygems_version: 2.7.6
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: n7m
58
+ test_files: []