emoji_translate 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c6c83a6b140a24136788956972055e935b01438
4
+ data.tar.gz: '092078e4ab12539ed16bb6f83664cbb9b5203277'
5
+ SHA512:
6
+ metadata.gz: 6d68fad30066633744084b2498cf0604d3c47b038864b2648dc8167ebee6e5dce4593a7000ed9b7dca1d1ca7ff2fb2cce8988c392fdefb2bf9230bf1990a491c
7
+ data.tar.gz: 4ac92673c2ce941f2589da739ed1683fca1ba57b05b6bd283884400123d033fb4bc683790394036a9ab498f93ff1de8b4ce4e252b26ad96c96b52e7ec2203aa2
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ Excludes:
3
+ - spec/*.rb
4
+ - bin/*
5
+ - Rakefile
6
+ - Gemfile
7
+ - emoji_translate.gemspec
8
+ - lib/emoji_translate/version.rb
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.15.4
data/Gemfile ADDED
@@ -0,0 +1,6 @@
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 emoji_translate.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright for portions of original "emoji-translate" npm module are held by Monica Dinculescu, 2015.
4
+ All other copyright for "emoji_translate" ruby gem are held by Vyacheslav Pukhanov, 2017.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # EmojiTranslate
2
+
3
+ EmojiTranslate Ruby gem allows you to 📚 translate text to ✨ emoji ✨
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'emoji_translate'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install emoji_translate
20
+
21
+ ## Usage
22
+
23
+ Require the gem and use `EmojiTranslate#translate(text)` to replace words with emojis. Make sure your development environment supports Unicode.
24
+
25
+ require 'emoji_translate'
26
+
27
+ EmojiTranslate.translate "A quick brown fox jumped over a lazy dog"
28
+ => "🅰️ quick 🐴 fox jumped over 🅰️ lazy 🐶"
29
+
30
+ All punctuation and line breaks are preserved in the result string.
31
+
32
+ EmojiTranslate.translate "Hello, world!"
33
+ => "👋, 🌎!"
34
+
35
+ ## Development
36
+
37
+ 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.
38
+
39
+ ## Contributing
40
+
41
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vpukhanov/emoji_translate.
42
+
43
+ I am new to Ruby, so any help with making the code more idiomatic (and cleaning it up in general) would be of great help and really appreciated!
44
+
45
+ ## License
46
+
47
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec