kilya 0.0.6 → 0.0.7
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 +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +8 -0
- data/Gemfile +3 -0
- data/README.md +14 -0
- data/kilya.gemspec +2 -1
- data/lib/kilya.rb +9 -2
- data/lib/services/requester.rb +12 -0
- metadata +21 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025674c3189fafc99498b820db987116846371c63517250a4d6efc2d98b08419
|
4
|
+
data.tar.gz: 2d4b13834fb420bd70e8381c5b1c56afe99ae04aa155368e22afdd47aee9ba54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aca3708968bb2f2e54311a77b1158b0a677261fafa60a6b97d4427c4423234885a9445c1e3b6ee969bc1382091f91c2dc8692e54ae80784fbda5337538fc9ee
|
7
|
+
data.tar.gz: 9099570bc8d31ae1b8f9f63734e9d859081a15fd844885bc6967b2220c686fbc5dc32d05c7f72c931177a5dea005b0955423570fec733bef568542b068ad351f
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
data/kilya.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.rubygems_version = '2.7'
|
8
8
|
s.required_ruby_version = '>=2.2'
|
9
9
|
s.name = 'kilya'
|
10
|
-
s.version = '0.0.
|
10
|
+
s.version = '0.0.7'
|
11
11
|
s.executables << 'kilya'
|
12
12
|
s.license = 'MIT'
|
13
13
|
s.summary = 'Simple first Ruby gem'
|
@@ -16,4 +16,5 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.email = 'ilyafulleveline@gmail.com'
|
17
17
|
s.homepage = 'https://github.com/ikondratev/kilya'
|
18
18
|
s.files = `git ls-files`.split($RS)
|
19
|
+
s.add_dependency 'faraday', '2.2'
|
19
20
|
end
|
data/lib/kilya.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
# main
|
1
|
+
# main point
|
2
2
|
require 'services/string_builder'
|
3
|
+
require 'services/requester'
|
3
4
|
|
4
5
|
class Kilya
|
5
6
|
# It's my first simple gem
|
@@ -7,10 +8,16 @@ class Kilya
|
|
7
8
|
# Example:
|
8
9
|
# >> Kilya.reverse("abcd")
|
9
10
|
# => "dcba"
|
10
|
-
#
|
11
|
+
# >> Kilya.request("http://example.com")
|
12
|
+
# =><HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"> ...
|
11
13
|
# Arguments:
|
12
14
|
# line: (String)
|
13
15
|
class << self
|
14
16
|
include Services::StringBuilder
|
17
|
+
|
18
|
+
def request(path)
|
19
|
+
requester = Services::Requester.new
|
20
|
+
requester.request(url: path)
|
21
|
+
end
|
15
22
|
end
|
16
23
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
|
3
|
+
module Services
|
4
|
+
class Requester
|
5
|
+
# @param [String] method: default get
|
6
|
+
# @param [String] url: example: "http://example.com"
|
7
|
+
# @return [String] response
|
8
|
+
def request(method: :get, url:)
|
9
|
+
Faraday.send(method, url)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kilya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Kondratev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
12
|
-
dependencies:
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.2'
|
13
27
|
description: Class Kilya for test new gem.
|
14
28
|
email: ilyafulleveline@gmail.com
|
15
29
|
executables:
|
@@ -18,10 +32,14 @@ extensions: []
|
|
18
32
|
extra_rdoc_files: []
|
19
33
|
files:
|
20
34
|
- ".gitignore"
|
35
|
+
- ".travis.yml"
|
36
|
+
- Gemfile
|
37
|
+
- README.md
|
21
38
|
- Rakefile
|
22
39
|
- bin/kilya
|
23
40
|
- kilya.gemspec
|
24
41
|
- lib/kilya.rb
|
42
|
+
- lib/services/requester.rb
|
25
43
|
- lib/services/string_builder.rb
|
26
44
|
- test/test_kilya.rb
|
27
45
|
homepage: https://github.com/ikondratev/kilya
|