bilisim_sozlugu 0.0.2 → 1.0.0

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
  SHA1:
3
- metadata.gz: f25847a76600e63082fbfc6eedc61e25780ed38b
4
- data.tar.gz: 196c94fbf9c0f51fd2433392b8921b2f9eb57426
3
+ metadata.gz: 3984ac925d7e3be93e6ca52df1d626f889ca3da4
4
+ data.tar.gz: 415ae4b16edcfa5ab67612c78db9273c40096d48
5
5
  SHA512:
6
- metadata.gz: 81f9297fb6a72726eb790e3b18589960d8553412a6a3feb5c772b7f947375f7d1b7ef8d1dbf9a63b00847231982489f660cf79227349a7569665c9e1acc6ef50
7
- data.tar.gz: 477284e53771ae2a16592379db7c27ac9dd0f3515962b798c59e05097b7b5b4f0dc940a3c56d1aadd5d90308df9ad7cabc8e304e3fa807f8f710531b4a8f0f4f
6
+ metadata.gz: 8bfe8737a9191b6c2784feff3378fdb8866fbf6f8cda7c39b049feccda9a868ad0ebe2659b29788ca1145b979b872e133c1006ba4f528cc7ef73c82c8432ca06
7
+ data.tar.gz: b09027bd4b79374021ef081ac1dfdccf22106ed2bf54f9d73bccecf2f378fe49b6f9ddf1b4df95281673bfc870b542d979f089f99f5e944c1f6316a8c79d7436
data/bin/sozluk CHANGED
@@ -2,8 +2,8 @@
2
2
  require 'bilisim_sozlugu'
3
3
 
4
4
  if ARGV.empty?
5
- puts "Lütfen geçerli bir komut giriniz."
5
+ puts "Lütfen geçerli bir komut giriniz."
6
6
  else
7
- puts "Lütfen bekleyiniz...\n"
8
- BilisimSozlugu.search(ARGV[0])
7
+ puts "Lütfen bekleyiniz...\n"
8
+ BilisimSozlugu.search(ARGV[0])
9
9
  end
@@ -2,23 +2,23 @@ require "rubygems"
2
2
  require "open-uri"
3
3
  require "nokogiri"
4
4
  require 'terminal-table'
5
-
6
5
  require "bilisim_sozlugu/version"
7
6
 
8
7
  module BilisimSozlugu
9
- URL = "http://www.tbd.org.tr/index.php?sayfa=sozluk&mi1&tipi=ara&harf=A&arama=".freeze
8
+ URL = "http://eski.tbd.org.tr/index.php?sayfa=sozluk&mi1&tipi=ara&harf=A&arama=".freeze
10
9
  CSS_SELECTOR = "table tbody tr".freeze
11
10
 
12
11
  def self.search(word)
13
12
  call_url = URL + word
14
- page = Nokogiri::HTML(open(call_url))
15
- rows = page.css(CSS_SELECTOR)
16
- if rows.last.text == "Aranan Kelime "
13
+ page = Nokogiri::HTML(open(call_url))
14
+ rows = page.css(CSS_SELECTOR)
15
+
16
+ if rows.last.text.match("Aranan Kelime")
17
17
  puts "Aradığınız kelime bulunamadı."
18
18
  else
19
19
  words = rows.map { |row| [row.children.first.children.text, row.children.last.text] }
20
20
  table = Terminal::Table.new :rows => words.drop(2)
21
21
  puts table
22
- end
22
+ end
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module BilisimSozlugu
2
- VERSION = "0.0.2"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bilisim_sozlugu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ender Ahmet Yurt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,9 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.2.2
107
+ rubygems_version: 2.6.8
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Translate the word from English to Turkish.
111
111
  test_files: []
112
- has_rdoc: