hexlet-points 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +20 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +14 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +59 -0
- data/Makefile +8 -0
- data/README.md +28 -0
- data/hexlet-points.gemspec +25 -0
- data/lib/points.rb +0 -1
- data/lib/points/version.rb +3 -0
- metadata +25 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3323530c268dd5ea970e9c5144d504464d6724210068de51e8c3df9981b6bdf
|
4
|
+
data.tar.gz: f4e0c5135ba7f420c2335f457fc361a5e64ca64f058c0f308f5fdd0c54101891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0f9ba2dc7047b436ab1d4d8ae98ee8c589d3be6b6ad86771e98800da598d66507ec115fb906247c67e4b88add721cb6badeeab20778809384e731ffe976b02b
|
7
|
+
data.tar.gz: 5a45d595f9e60ae96177d747d802084bab4d172638aaddb2a3fb6ee2f4006a519357c957a9a7dafdedbfeaa6c55dee35a271c38ae8b3f57df2ad589e9bc7dd8d
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
- push
|
5
|
+
- pull_request
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 2.7.2
|
15
|
+
- name: Install
|
16
|
+
run: make install
|
17
|
+
- name: Run linter
|
18
|
+
run: make lint
|
19
|
+
- name: Run tests
|
20
|
+
run: make test
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "vendor/**/*"
|
4
|
+
- hexlet-points.gemspec
|
5
|
+
NewCops: enable
|
6
|
+
|
7
|
+
Style/FrozenStringLiteralComment:
|
8
|
+
Enabled: false
|
9
|
+
Style/Documentation:
|
10
|
+
Enabled: false
|
11
|
+
Naming/MethodParameterName:
|
12
|
+
Enabled: false
|
13
|
+
Style/GuardClause:
|
14
|
+
Enabled: false
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
hexlet-points (1.0.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.4.4)
|
11
|
+
hexlet-pairs (1.1.0)
|
12
|
+
parallel (1.20.1)
|
13
|
+
parser (3.0.1.0)
|
14
|
+
ast (~> 2.4.1)
|
15
|
+
rainbow (3.0.0)
|
16
|
+
regexp_parser (2.1.1)
|
17
|
+
rexml (3.2.5)
|
18
|
+
rspec (3.10.0)
|
19
|
+
rspec-core (~> 3.10.0)
|
20
|
+
rspec-expectations (~> 3.10.0)
|
21
|
+
rspec-mocks (~> 3.10.0)
|
22
|
+
rspec-core (3.10.0)
|
23
|
+
rspec-support (~> 3.10.0)
|
24
|
+
rspec-expectations (3.10.0)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.10.0)
|
27
|
+
rspec-mocks (3.10.0)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.10.0)
|
30
|
+
rspec-support (3.10.0)
|
31
|
+
rubocop (1.12.1)
|
32
|
+
parallel (~> 1.10)
|
33
|
+
parser (>= 3.0.0.0)
|
34
|
+
rainbow (>= 2.2.2, < 4.0)
|
35
|
+
regexp_parser (>= 1.8, < 3.0)
|
36
|
+
rexml
|
37
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
38
|
+
ruby-progressbar (~> 1.7)
|
39
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
40
|
+
rubocop-ast (1.4.1)
|
41
|
+
parser (>= 2.7.1.5)
|
42
|
+
rubocop-rspec (2.2.0)
|
43
|
+
rubocop (~> 1.0)
|
44
|
+
rubocop-ast (>= 1.1.0)
|
45
|
+
ruby-progressbar (1.11.0)
|
46
|
+
unicode-display_width (2.0.0)
|
47
|
+
|
48
|
+
PLATFORMS
|
49
|
+
ruby
|
50
|
+
|
51
|
+
DEPENDENCIES
|
52
|
+
hexlet-pairs (~> 1.1.0)
|
53
|
+
hexlet-points!
|
54
|
+
rspec (~> 3.10)
|
55
|
+
rubocop (~> 1.12.1)
|
56
|
+
rubocop-rspec (~> 2.2.0)
|
57
|
+
|
58
|
+
BUNDLED WITH
|
59
|
+
2.2.15
|
data/Makefile
ADDED
data/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# ruby-points
|
2
|
+
|
3
|
+
[![github action status](https://github.com/hexlet-components/ruby-points/workflows/CI/badge.svg)](https://github.com/hexlet-components/ruby-points/actions)
|
4
|
+
|
5
|
+
## Install
|
6
|
+
|
7
|
+
```sh
|
8
|
+
gem install hexlet-points
|
9
|
+
```
|
10
|
+
|
11
|
+
## Usage example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'points'
|
15
|
+
|
16
|
+
point = Point.make(4, 5)
|
17
|
+
|
18
|
+
puts get_x(point) # => 4
|
19
|
+
puts get_y(point) # => 5
|
20
|
+
|
21
|
+
puts get_quadrant(point) # => 1
|
22
|
+
|
23
|
+
puts to_string(point) # => '(4, 5)'
|
24
|
+
```
|
25
|
+
|
26
|
+
[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/hexletguides.github.io/master/images/hexlet_logo128.png)](https://ru.hexlet.io/pages/about?utm_source=github&utm_medium=link&utm_campaign=ruby-points)
|
27
|
+
|
28
|
+
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet (in Russian)](https://ru.hexlet.io/pages/about?utm_source=github&utm_medium=link&utm_campaign=ruby-points).
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'lib/points/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "hexlet-points"
|
5
|
+
spec.version = Point::VERSION
|
6
|
+
spec.authors = ["Hexlet"]
|
7
|
+
spec.email = ["info@hexlet.io"]
|
8
|
+
|
9
|
+
spec.summary = "Hexlet Ruby Point"
|
10
|
+
spec.description = "A SICP'ish Points implemented in Ruby using hexlet-pairs."
|
11
|
+
spec.homepage = "https://github.com/hexlet-components/ruby-points"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
|
+
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
+
spec.metadata["source_code_uri"] = "https://github.com/hexlet-components/ruby-points"
|
17
|
+
spec.metadata["changelog_uri"] = "https://github.com/hexlet-components/ruby-points"
|
18
|
+
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
end
|
data/lib/points.rb
CHANGED
metadata
CHANGED
@@ -1,27 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hexlet-points
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hexlet
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
email:
|
13
|
+
description: A SICP'ish Points implemented in Ruby using hexlet-pairs.
|
14
|
+
email:
|
15
|
+
- info@hexlet.io
|
15
16
|
executables: []
|
16
17
|
extensions: []
|
17
18
|
extra_rdoc_files: []
|
18
19
|
files:
|
20
|
+
- ".github/workflows/ci.yml"
|
21
|
+
- ".gitignore"
|
22
|
+
- ".rubocop.yml"
|
23
|
+
- Gemfile
|
24
|
+
- Gemfile.lock
|
25
|
+
- Makefile
|
26
|
+
- README.md
|
27
|
+
- hexlet-points.gemspec
|
19
28
|
- lib/points.rb
|
29
|
+
- lib/points/version.rb
|
20
30
|
homepage: https://github.com/hexlet-components/ruby-points
|
21
31
|
licenses:
|
22
32
|
- MIT
|
23
|
-
metadata:
|
24
|
-
|
33
|
+
metadata:
|
34
|
+
homepage_uri: https://github.com/hexlet-components/ruby-points
|
35
|
+
source_code_uri: https://github.com/hexlet-components/ruby-points
|
36
|
+
changelog_uri: https://github.com/hexlet-components/ruby-points
|
37
|
+
post_install_message:
|
25
38
|
rdoc_options: []
|
26
39
|
require_paths:
|
27
40
|
- lib
|
@@ -29,15 +42,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
42
|
requirements:
|
30
43
|
- - ">="
|
31
44
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
45
|
+
version: 2.3.0
|
33
46
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
47
|
requirements:
|
35
48
|
- - ">="
|
36
49
|
- !ruby/object:Gem::Version
|
37
50
|
version: '0'
|
38
51
|
requirements: []
|
39
|
-
rubygems_version: 3.0.
|
40
|
-
signing_key:
|
52
|
+
rubygems_version: 3.0.8
|
53
|
+
signing_key:
|
41
54
|
specification_version: 4
|
42
|
-
summary:
|
55
|
+
summary: Hexlet Ruby Point
|
43
56
|
test_files: []
|