bilisim_sozlugu 0.0.2 → 2.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
- SHA1:
3
- metadata.gz: f25847a76600e63082fbfc6eedc61e25780ed38b
4
- data.tar.gz: 196c94fbf9c0f51fd2433392b8921b2f9eb57426
2
+ SHA256:
3
+ metadata.gz: 6dd0d2be97710eb6d9b84fa2ad2442b264bc66531f64a39035e56406b8f0710b
4
+ data.tar.gz: bb1e160ac90867e0e775cabe7fb5812b3fff624e768fd4beb8732ca142cc8676
5
5
  SHA512:
6
- metadata.gz: 81f9297fb6a72726eb790e3b18589960d8553412a6a3feb5c772b7f947375f7d1b7ef8d1dbf9a63b00847231982489f660cf79227349a7569665c9e1acc6ef50
7
- data.tar.gz: 477284e53771ae2a16592379db7c27ac9dd0f3515962b798c59e05097b7b5b4f0dc940a3c56d1aadd5d90308df9ad7cabc8e304e3fa807f8f710531b4a8f0f4f
6
+ metadata.gz: c4a040a5844c224ddd6de879c5a0e31bdb97c3a7f0c85f9b322087aab2159bb4e9fb2899bb416f2619a8e442cb5f153cefa5492e83ce7c3692d2a03db14d7cd1
7
+ data.tar.gz: bdd67da0e3abb284bf43ab4cf02970bb4e6f816acd7162d970acbe77662c7f6f457c73094f10be13278147eeb1bc2ddf37b86b3f651396b177f3c76c601270a5
data/Gemfile CHANGED
@@ -6,4 +6,7 @@ gemspec
6
6
  group :development, :test do
7
7
  gem 'pry', '~> 0.9.12'
8
8
  gem 'rspec', '>= 2.14'
9
- end
9
+ gem 'sorbet'
10
+ end
11
+
12
+ gem 'sorbet-runtime'
data/README.md CHANGED
@@ -20,9 +20,7 @@ Or install it yourself as:
20
20
  ## Usage
21
21
 
22
22
  ```
23
-
24
- $ require 'bilisim_sozlugu'
25
- $ BilisimSozlugu.search('memory')
23
+ $ sozluk memory
26
24
 
27
25
  # +---------------------------+-----------------------------+
28
26
  # | belleği derleyip toplama | memory compaction |
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = BilisimSozlugu::VERSION
9
9
  spec.authors = ["Ender Ahmet Yurt"]
10
10
  spec.email = ["enderyurt@gmail.com"]
11
- spec.summary = "Translate the word from English to Turkish."
12
- spec.description = "Translating English words which are used in computer world to Turkish from Informatics Association of Turkey offical website."
11
+ spec.summary = "Translate Computer Terms from English to Turkish."
12
+ spec.description = "Translating English terms related to Computer Sciences to Turkish from Informatics Association of Turkey's offical website."
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "nokogiri", "~> 1.6.0"
23
+ spec.add_development_dependency "nokogiri", ">= 1.10.8"
24
24
  spec.add_development_dependency "terminal-table"
25
25
  end
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
@@ -1,24 +1,29 @@
1
+ # typed: true
2
+
1
3
  require "rubygems"
2
4
  require "open-uri"
3
5
  require "nokogiri"
4
6
  require 'terminal-table'
5
-
6
7
  require "bilisim_sozlugu/version"
7
8
 
8
9
  module BilisimSozlugu
9
- URL = "http://www.tbd.org.tr/index.php?sayfa=sozluk&mi1&tipi=ara&harf=A&arama=".freeze
10
- CSS_SELECTOR = "table tbody tr".freeze
10
+ extend T::Sig
11
11
 
12
+ URL = T.let("http://eski.tbd.org.tr/index.php?sayfa=sozluk&mi1&tipi=ara&harf=A&arama=".freeze, String)
13
+ CSS_SELECTOR = T.let("table tbody tr".freeze, String)
14
+
15
+ sig {params(word: String).void}
12
16
  def self.search(word)
13
- call_url = URL + word
14
- page = Nokogiri::HTML(open(call_url))
15
- rows = page.css(CSS_SELECTOR)
16
- if rows.last.text == "Aranan Kelime "
17
+ call_url = T.let(URL + word, String)
18
+ page = Nokogiri::HTML(open(call_url))
19
+ rows = page.css(CSS_SELECTOR)
20
+
21
+ if rows.last.text.match("Aranan Kelime")
17
22
  puts "Aradığınız kelime bulunamadı."
18
23
  else
19
24
  words = rows.map { |row| [row.children.first.children.text, row.children.last.text] }
20
25
  table = Terminal::Table.new :rows => words.drop(2)
21
26
  puts table
22
- end
27
+ end
23
28
  end
24
29
  end
@@ -1,3 +1,4 @@
1
+ # typed: strict
1
2
  module BilisimSozlugu
2
- VERSION = "0.0.2"
3
+ VERSION = "2.0.0"
3
4
  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: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ender Ahmet Yurt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.6.0
47
+ version: 1.10.8
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.6.0
54
+ version: 1.10.8
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: terminal-table
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,8 +66,8 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Translating English words which are used in computer world to Turkish
70
- from Informatics Association of Turkey offical website.
69
+ description: Translating English terms related to Computer Sciences to Turkish from
70
+ Informatics Association of Turkey's offical website.
71
71
  email:
72
72
  - enderyurt@gmail.com
73
73
  executables:
@@ -88,7 +88,7 @@ homepage: ''
88
88
  licenses:
89
89
  - MIT
90
90
  metadata: {}
91
- post_install_message:
91
+ post_install_message:
92
92
  rdoc_options: []
93
93
  require_paths:
94
94
  - lib
@@ -103,10 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubyforge_project:
107
- rubygems_version: 2.2.2
108
- signing_key:
106
+ rubygems_version: 3.1.4
107
+ signing_key:
109
108
  specification_version: 4
110
- summary: Translate the word from English to Turkish.
109
+ summary: Translate Computer Terms from English to Turkish.
111
110
  test_files: []
112
- has_rdoc: