Skip to content

Commit

Permalink
Update dependencies and README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
sarslanoglu committed Nov 21, 2020
1 parent 473768b commit 27bf663
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 40 deletions.
46 changes: 23 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@ GEM
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
diff-lcs (1.3)
diff-lcs (1.4.4)
docile (1.3.2)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
json (2.3.0)
parallel (1.19.2)
parser (2.7.1.4)
parallel (1.20.0)
parser (2.7.2.0)
ast (~> 2.4.1)
rainbow (3.0.0)
regexp_parser (1.7.1)
regexp_parser (1.8.2)
rexml (3.2.4)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
rubocop (0.88.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.0)
rubocop (1.3.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
parser (>= 2.7.1.5)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.1.0, < 1.0)
rubocop-ast (>= 1.1.1)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.2.0)
parser (>= 2.7.0.1)
rubocop-ast (1.1.1)
parser (>= 2.7.1.5)
ruby-progressbar (1.10.1)
simplecov (0.16.1)
docile (~> 1.1)
Expand All @@ -70,8 +70,8 @@ PLATFORMS
DEPENDENCIES
bundler (~> 2.1.4)
coveralls (~> 0.8.23)
rspec (~> 3.9.0)
rubocop (~> 0.88.0)
rspec (~> 3.10.0)
rubocop (~> 1.3.1)
turkish_cities!

BUNDLED WITH
Expand Down
51 changes: 40 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# 🏙️ Turkish Cities
[![Gem Version](https://badge.fury.io/rb/turkish_cities.svg)](https://rubygems.org/gems/turkish_cities)
[![Build Status](https://travis-ci.org/sarslanoglu/turkish_cities.svg?branch=master)](https://travis-ci.org/sarslanoglu/turkish_cities)
[![Coverage Status](https://coveralls.io/repos/github/sarslanoglu/turkish_cities/badge.svg?branch=master)](https://coveralls.io/github/sarslanoglu/turkish_cities?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/c1dbe0cef353b152956e/maintainability)](https://codeclimate.com/github/sarslanoglu/turkish_cities/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c1dbe0cef353b152956e/test_coverage)](https://codeclimate.com/github/sarslanoglu/turkish_cities/test_coverage)
[![Protected by Hound](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com)
[![License](https://img.shields.io/github/license/sarslanoglu/turkish_cities.svg)](https://opensource.org/licenses/MIT)

**turkish_cities** is a Ruby gem which makes searching and listing Turkish cities easy. https://rubygems.org/gems/turkish_cities
# ![TurkishCities](./public/assets/img/[email protected])

<p align="center">
<a href="https://rubygems.org/gems/turkish_cities">
<img src="https://badge.fury.io/rb/turkish_cities.svg" alt="GemVersion"/></a>
<a href="https://travis-ci.org/sarslanoglu/turkish_cities">
<img src="https://travis-ci.org/sarslanoglu/turkish_cities.svg?branch=master" alt="BuildStatus"/></a>
<a href="https://coveralls.io/github/sarslanoglu/turkish_cities?branch=master">
<img src="https://coveralls.io/repos/github/sarslanoglu/turkish_cities/badge.svg?branch=master" alt="CoverageStatus"/></a>
<a href="https://codeclimate.com/github/sarslanoglu/turkish_cities/maintainability">
<img src="https://api.codeclimate.com/v1/badges/c1dbe0cef353b152956e/maintainability" alt="Maintainability"/></a>
<a href="https://houndci.com">
<img src="https://img.shields.io/badge/Protected_by-Hound-a873d1.svg" alt="Hound"/></a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/github/license/sarslanoglu/turkish_cities.svg" alt="License"/></a>
</p>

**Turkish Cities** is a Ruby gem which makes listing and finding Turkish cities easy. Search can be via name, post code, plate number, district name etc. Also calculate your travel distance and travel time between cities via distance methods.
https://rubygems.org/gems/turkish_cities

## Table of Contents
* [Installation](#installation)
Expand Down Expand Up @@ -291,17 +300,37 @@ https://postakodu.ptt.gov.tr/

- TurkishCities heavily depends on ```:turkic``` case mapping support of Ruby string downcase method. Below Ruby version 2.5.1 some functions will run buggy/false or even won't run at all.

## Roadmap

- Add missing land travel method
- Add missing sea travel method
- Add localization to gem
- Refactor tests (seperate test suites with more edge case tests)

## Contributing

Contributing guidelines are available [here](CONTRIBUTING.md).

People behind the 💻
<table>
<tr>
<td align="center"><a href="https://enderahmetyurt.com/"><img src="https://avatars2.githubusercontent.com/u/447588" width="100px;" alt=""/><br /><sub><b>Ender Ahmet Yurt</b></sub></a><br /></td>
<td align="center"><a href="https://www.linkedin.com/in/serpilacar/"><img src="https://avatars0.githubusercontent.com/u/17191440" width="100px;" alt=""/><br /><sub><b>Serpil Acar</b></sub></a><br /></td>
<td align="center"><a href="https://www.linkedin.com/in/semiharslanoglu/"><img src="https://avatars2.githubusercontent.com/u/10260283" width="100px;" alt=""/><br /><sub><b>Semih Arslanoğlu</b></sub></a><br /></td>
</tr>
</table>

## Changelog

Changelog is available [here](CHANGELOG.md).

## Logo

TurkishCities's logo created by [Nebal Çolpan](https://www.behance.net/nebalcolpan)
TurkishCities's logo created by [Nebal Çolpan](https://www.behance.net/nebalcolpan). You can find the logo in various
formats [here](https://github.com/sarslanoglu/turkish_cities/tree/master/public/assets/img/).

The logo is licensed under a
[Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/deed.en_GB).

## Copyright

Expand Down
4 changes: 2 additions & 2 deletions lib/turkish_cities/distance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def distance_time_estimation(air_distance)
end

def description_text(travel_method, city_array, result_set)
travel_method + ' travel distance between ' + city_array[0]['name'] + ' and ' + city_array[1]['name'] + ' is ' +
result_set[0].to_s + ' km. Estimated air travel would take ' + result_set[1].to_s + ' minutes.'
"#{travel_method} travel distance between #{city_array[0]['name']} and #{city_array[1]['name']} is " \
"#{result_set[0]} km. Estimated air travel would take #{result_set[1]} minutes."
end
end
4 changes: 2 additions & 2 deletions lib/turkish_cities/helpers/decomposer_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def postcode_not_found_error(postcode_input)
end

def prepare_city_list(city_list, options)
if options.dig(:with)
if options[:with]
city_list.map do |city|
result = {}
result[:name] = city['name']
Expand All @@ -65,7 +65,7 @@ def prepare_city_list(city_list, options)
def sort_alphabetically(list, options = nil)
turkish_alphabet = ' -0123456789abcçdefgğhıijklmnoöprsştuüvyz'
list.sort_by do |item|
item_to_sort = if options.nil? || options.dig(:with).nil?
item_to_sort = if options.nil? || options[:with].nil?
item
else
item[:name]
Expand Down
4 changes: 2 additions & 2 deletions turkish_cities.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Gem::Specification.new do |s|

s.add_development_dependency 'bundler', '~> 2.1.4'
s.add_development_dependency 'coveralls', '~> 0.8.23'
s.add_development_dependency 'rspec', '~> 3.9.0'
s.add_development_dependency 'rubocop', '~> 0.88.0'
s.add_development_dependency 'rspec', '~> 3.10.0'
s.add_development_dependency 'rubocop', '~> 1.3.1'

if s.respond_to?(:metadata)
s.metadata['changelog_uri'] = 'https://github.com/sarslanoglu/turkish_cities/blob/master/CHANGELOG.md'
Expand Down

0 comments on commit 27bf663

Please sign in to comment.