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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7721bbcbaec01abe3435af363b9e526706a363f39b3c252f064b92da32db95a8
4
- data.tar.gz: 59b6b5235b56e43f74c369525ece78a5103669dc6943e2012cc5d2cd18f72ed0
3
+ metadata.gz: 025674c3189fafc99498b820db987116846371c63517250a4d6efc2d98b08419
4
+ data.tar.gz: 2d4b13834fb420bd70e8381c5b1c56afe99ae04aa155368e22afdd47aee9ba54
5
5
  SHA512:
6
- metadata.gz: 0f7c7d1ed5a0b0e6ccb22c8f9c97b50fc29b0508f1f6038bba8d635a8cafb6d34c7722492fc18f5d0a43d7f070c1e89a4af5cae4c80ab22a91bf22cfa982d6d7
7
- data.tar.gz: 89d6500ca89306f57c3497e9e1bcfce9ae7bc08bb4351f6b3aa235dcaed0acc11701f2bc39b2481a993792748e568962411baeb2c76c6f7ad63f28ca83350267
6
+ metadata.gz: 3aca3708968bb2f2e54311a77b1158b0a677261fafa60a6b97d4427c4423234885a9445c1e3b6ee969bc1382091f91c2dc8692e54ae80784fbda5337538fc9ee
7
+ data.tar.gz: 9099570bc8d31ae1b8f9f63734e9d859081a15fd844885bc6967b2220c686fbc5dc32d05c7f72c931177a5dea005b0955423570fec733bef568542b068ad351f
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
1
  *.gem
2
2
 
3
3
  .idea/
4
+
5
+ Gemfile.lock
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.7.2
4
+ branches:
5
+ only:
6
+ - master
7
+ script:
8
+ - rake test
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org/'
2
+ ruby '2.7.2'
3
+ gemspec
data/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # kilya
2
+ **kilya** - It's just a simple example of your own gem.
3
+
4
+ ## It's include:
5
+ ```sh
6
+ ruby '2.7.2'
7
+ ```
8
+
9
+ ## How is it works?:
10
+ ```sh
11
+ require 'kilya'
12
+
13
+ Kilya.reverse("line")
14
+ ```
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.6'
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 pont
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.6
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-11 00:00:00.000000000 Z
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