mvcStudentXD 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -0
- data/Gemfile +22 -24
- data/README.md +35 -3
- data/{mvcStudentXD/lib → lib}/mvcStudentXD/version.rb +1 -1
- data/mvcStudentXD.gemspec +38 -0
- metadata +40 -92
- data/Gemfile.lock +0 -101
- data/Lab1/arr1_3.txt +0 -1
- data/Lab1/lb1_1.rb +0 -19
- data/Lab1/lb1_2.rb +0 -28
- data/Lab1/lb1_3.rb +0 -46
- data/Lab1/lb1_4.rb +0 -82
- data/Lab2/1Class.jpg +0 -0
- data/Lab2/Web/main.rb +0 -89
- data/Lab2/Web/views/add.html +0 -168
- data/Lab2/Web/views/main.html +0 -233
- data/Lab2/data_storage/students1.txt +0 -1
- data/Lab2/data_storage/studentsRead.json +0 -36
- data/Lab2/data_storage/studentsRead.txt +0 -3
- data/Lab2/data_storage/studentsRead.yaml +0 -26
- data/Lab2/data_storage/studentsWrite.json +0 -42
- data/Lab2/data_storage/studentsWrite.txt +0 -4
- data/Lab2/data_storage/studentsWrite.yaml +0 -31
- data/Lab2/examples/Strategy.rb +0 -38
- data/Lab2/examples/adapter.rb +0 -30
- data/Lab2/examples/database.rb +0 -15
- data/Lab2/examples/observer_example.rb +0 -51
- data/Lab2/examples/pattern_pattern.rb +0 -44
- data/Lab2/examples/site_example.rb +0 -21
- data/Lab2/examples/views/about.erb +0 -11
- data/Lab2/examples/views/contact.erb +0 -15
- data/Lab2/examples/views/index.erb +0 -11
- data/Lab2/main.rb +0 -6
- data/Lab2/main_window.rb +0 -31
- data/Lab2/student_input_form.rb +0 -71
- data/Lab2/tab_students.rb +0 -157
- data/Lab2/test/student_test.rb +0 -91
- data/mvcStudentXD/Gemfile +0 -22
- data/mvcStudentXD/Gemfile.lock +0 -97
- data/mvcStudentXD/README.md +0 -35
- data/mvcStudentXD/bin/console +0 -11
- data/mvcStudentXD/bin/setup +0 -8
- data/mvcStudentXD/mvcStudentXD-1.2.0.gem +0 -0
- data/mvcStudentXD/mvcStudentXD.gemspec +0 -15
- data/mvcStudentXD/pkg/mvcStudentXD-0.1.0.gem +0 -0
- data/mvcStudentXD/pkg/mvcStudentXD-1.0.1.gem +0 -0
- data/mvcStudentXD/pkg/mvcStudentXD-1.1.1.gem +0 -0
- data/mvcStudentXD/test/student_test.rb +0 -91
- data/mvcStudentXD/test/test_helper.rb +0 -6
- data/mvcStudentXD/test/test_mvcStudentXD.rb +0 -13
- /data/{mvcStudentXD/CHANGELOG.md → CHANGELOG.md} +0 -0
- /data/{mvcStudentXD/CODE_OF_CONDUCT.md → CODE_OF_CONDUCT.md} +0 -0
- /data/{mvcStudentXD/Rakefile → Rakefile} +0 -0
- /data/{mvcStudentXD/lib → lib}/mvcStudentXD.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/adapters/student_list_adapter.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/containers/Data_list.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/containers/Data_list_student_short.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/containers/Data_table.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/controllers/student_edit_form_controller.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/controllers/student_input_form_controller.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/controllers/student_list_controller.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/converters/Converter.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/converters/Converter_json.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/converters/Converter_txt.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/converters/Converter_yaml.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/database/scripts/create_table.sql +0 -0
- /data/{mvcStudentXD/lib → lib}/source/database/scripts/insert_data.sql +0 -0
- /data/{mvcStudentXD/lib → lib}/source/database/student_list_db.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/database/students_db.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/model/Student.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/model/StudentBase.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/model/Student_short.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/repositories/Student_list.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/repositories/student_list_adv.rb +0 -0
- /data/{mvcStudentXD/lib → lib}/source/util/LoggerHolder.rb +0 -0
- /data/{mvcStudentXD/sig → sig}/mvcStudentXD.rbs +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dac26f460cc0a196117b3e71d92bebeaf12c3c0abb8e0f33402851dc4dc958d2
|
4
|
+
data.tar.gz: 69947502e1b58e271311917b5fef5cd5401dccd643f6356d85d66929b865bdbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ea30dabf585d0fd1f5358f437d15e7801c236a785de81e11ccac2c9b60bd551f286763b3a3af20a84e0d5e3cb0d09a378725bb9235bc043d9db12833bd5cb4
|
7
|
+
data.tar.gz: dbc2ff28c507776a296f8d2f0d477f2f9a823e98095e75d4e484e98bf08a7c49710e2cc4707e3b67d9f64004a84d7b2a202766620dc88e00d96563cc38b33e52
|
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
@@ -1,24 +1,22 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
gem 'mvcStudentXD', '~> 1.2.0'
|
24
|
-
# gem "rails"
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in mvcStudentXD.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 13.0"
|
9
|
+
|
10
|
+
gem "minitest", "~> 5.0"
|
11
|
+
|
12
|
+
gem "rubocop", "~> 1.21"
|
13
|
+
|
14
|
+
gem "mysql2"
|
15
|
+
|
16
|
+
gem "glimmer-dsl-libui", '~> 0.7.4'
|
17
|
+
|
18
|
+
gem 'win32api'
|
19
|
+
|
20
|
+
gem 'sinatra', '~> 3.0', '>= 3.0.6'
|
21
|
+
|
22
|
+
gem 'thin', '~> 1.8', '>= 1.8.2'
|
data/README.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
1
|
+
# MvcStudentXD
|
2
|
+
|
3
|
+
TODO: Delete this and the text below, and describe your gem
|
4
|
+
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mvcStudentXD`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
+
|
11
|
+
Install the gem and add to the application's Gemfile by executing:
|
12
|
+
|
13
|
+
$ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
|
14
|
+
|
15
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
|
+
|
17
|
+
$ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mvcStudentXD. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/mvcStudentXD/blob/master/CODE_OF_CONDUCT.md).
|
32
|
+
|
33
|
+
## Code of Conduct
|
34
|
+
|
35
|
+
Everyone interacting in the MvcStudentXD project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/mvcStudentXD/blob/master/CODE_OF_CONDUCT.md).
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/mvcStudentXD/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "mvcStudentXD"
|
7
|
+
spec.version = MvcStudentXD::VERSION
|
8
|
+
spec.authors = ["papaSquid"]
|
9
|
+
spec.email = ["mrxameleonx@mail.ru"]
|
10
|
+
spec.license = "MIT"
|
11
|
+
spec.summary = "Gem with Student MC"
|
12
|
+
spec.description = "models and controllers"
|
13
|
+
spec.homepage = "https://github.com/KiTTeNqz/mvcStudentXD"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/KiTTeNqz/mvcStudentXD"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/KiTTeNqz/mvcStudentXD/blob/master/CHANGELOG.md"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(__dir__) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# Uncomment to register a new dependency of your gem
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
+
|
36
|
+
# For more information and examples about making a new gem, check out our
|
37
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
38
|
+
end
|
metadata
CHANGED
@@ -1,113 +1,61 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvcStudentXD
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- papaSquid
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2023-05-12 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
name: win32api
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
description: А simple ruby gem
|
12
|
+
dependencies: []
|
13
|
+
description: models and controllers
|
28
14
|
email:
|
29
|
-
-
|
15
|
+
- mrxameleonx@mail.ru
|
30
16
|
executables: []
|
31
17
|
extensions: []
|
32
18
|
extra_rdoc_files: []
|
33
19
|
files:
|
20
|
+
- ".rubocop.yml"
|
21
|
+
- CHANGELOG.md
|
22
|
+
- CODE_OF_CONDUCT.md
|
34
23
|
- Gemfile
|
35
|
-
- Gemfile.lock
|
36
|
-
- Lab1/arr1_3.txt
|
37
|
-
- Lab1/lb1_1.rb
|
38
|
-
- Lab1/lb1_2.rb
|
39
|
-
- Lab1/lb1_3.rb
|
40
|
-
- Lab1/lb1_4.rb
|
41
|
-
- Lab2/1Class.jpg
|
42
|
-
- Lab2/Web/main.rb
|
43
|
-
- Lab2/Web/views/add.html
|
44
|
-
- Lab2/Web/views/main.html
|
45
|
-
- Lab2/data_storage/students1.txt
|
46
|
-
- Lab2/data_storage/studentsRead.json
|
47
|
-
- Lab2/data_storage/studentsRead.txt
|
48
|
-
- Lab2/data_storage/studentsRead.yaml
|
49
|
-
- Lab2/data_storage/studentsWrite.json
|
50
|
-
- Lab2/data_storage/studentsWrite.txt
|
51
|
-
- Lab2/data_storage/studentsWrite.yaml
|
52
|
-
- Lab2/examples/Strategy.rb
|
53
|
-
- Lab2/examples/adapter.rb
|
54
|
-
- Lab2/examples/database.rb
|
55
|
-
- Lab2/examples/observer_example.rb
|
56
|
-
- Lab2/examples/pattern_pattern.rb
|
57
|
-
- Lab2/examples/site_example.rb
|
58
|
-
- Lab2/examples/views/about.erb
|
59
|
-
- Lab2/examples/views/contact.erb
|
60
|
-
- Lab2/examples/views/index.erb
|
61
|
-
- Lab2/main.rb
|
62
|
-
- Lab2/main_window.rb
|
63
|
-
- Lab2/student_input_form.rb
|
64
|
-
- Lab2/tab_students.rb
|
65
|
-
- Lab2/test/student_test.rb
|
66
24
|
- README.md
|
67
|
-
-
|
68
|
-
- mvcStudentXD
|
69
|
-
- mvcStudentXD/
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
-
|
80
|
-
-
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
91
|
-
- mvcStudentXD
|
92
|
-
- mvcStudentXD
|
93
|
-
- mvcStudentXD/lib/source/model/StudentBase.rb
|
94
|
-
- mvcStudentXD/lib/source/model/Student_short.rb
|
95
|
-
- mvcStudentXD/lib/source/repositories/Student_list.rb
|
96
|
-
- mvcStudentXD/lib/source/repositories/student_list_adv.rb
|
97
|
-
- mvcStudentXD/lib/source/util/LoggerHolder.rb
|
98
|
-
- mvcStudentXD/mvcStudentXD-1.2.0.gem
|
99
|
-
- mvcStudentXD/mvcStudentXD.gemspec
|
100
|
-
- mvcStudentXD/pkg/mvcStudentXD-0.1.0.gem
|
101
|
-
- mvcStudentXD/pkg/mvcStudentXD-1.0.1.gem
|
102
|
-
- mvcStudentXD/pkg/mvcStudentXD-1.1.1.gem
|
103
|
-
- mvcStudentXD/sig/mvcStudentXD.rbs
|
104
|
-
- mvcStudentXD/test/student_test.rb
|
105
|
-
- mvcStudentXD/test/test_helper.rb
|
106
|
-
- mvcStudentXD/test/test_mvcStudentXD.rb
|
25
|
+
- Rakefile
|
26
|
+
- lib/mvcStudentXD.rb
|
27
|
+
- lib/mvcStudentXD/version.rb
|
28
|
+
- lib/source/adapters/student_list_adapter.rb
|
29
|
+
- lib/source/containers/Data_list.rb
|
30
|
+
- lib/source/containers/Data_list_student_short.rb
|
31
|
+
- lib/source/containers/Data_table.rb
|
32
|
+
- lib/source/controllers/student_edit_form_controller.rb
|
33
|
+
- lib/source/controllers/student_input_form_controller.rb
|
34
|
+
- lib/source/controllers/student_list_controller.rb
|
35
|
+
- lib/source/converters/Converter.rb
|
36
|
+
- lib/source/converters/Converter_json.rb
|
37
|
+
- lib/source/converters/Converter_txt.rb
|
38
|
+
- lib/source/converters/Converter_yaml.rb
|
39
|
+
- lib/source/database/scripts/create_table.sql
|
40
|
+
- lib/source/database/scripts/insert_data.sql
|
41
|
+
- lib/source/database/student_list_db.rb
|
42
|
+
- lib/source/database/students_db.rb
|
43
|
+
- lib/source/model/Student.rb
|
44
|
+
- lib/source/model/StudentBase.rb
|
45
|
+
- lib/source/model/Student_short.rb
|
46
|
+
- lib/source/repositories/Student_list.rb
|
47
|
+
- lib/source/repositories/student_list_adv.rb
|
48
|
+
- lib/source/util/LoggerHolder.rb
|
49
|
+
- mvcStudentXD.gemspec
|
50
|
+
- sig/mvcStudentXD.rbs
|
107
51
|
homepage: https://github.com/KiTTeNqz/mvcStudentXD
|
108
52
|
licenses:
|
109
53
|
- MIT
|
110
|
-
metadata:
|
54
|
+
metadata:
|
55
|
+
allowed_push_host: https://rubygems.org
|
56
|
+
homepage_uri: https://github.com/KiTTeNqz/mvcStudentXD
|
57
|
+
source_code_uri: https://github.com/KiTTeNqz/mvcStudentXD
|
58
|
+
changelog_uri: https://github.com/KiTTeNqz/mvcStudentXD/blob/master/CHANGELOG.md
|
111
59
|
post_install_message:
|
112
60
|
rdoc_options: []
|
113
61
|
require_paths:
|
@@ -126,5 +74,5 @@ requirements: []
|
|
126
74
|
rubygems_version: 3.4.10
|
127
75
|
signing_key:
|
128
76
|
specification_version: 4
|
129
|
-
summary:
|
77
|
+
summary: Gem with Student MC
|
130
78
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
array_include_methods (1.4.0)
|
5
|
-
ast (2.4.2)
|
6
|
-
chunky_png (1.4.0)
|
7
|
-
color (1.8)
|
8
|
-
daemons (1.4.1)
|
9
|
-
equalizer (0.0.11)
|
10
|
-
eventmachine (1.2.7)
|
11
|
-
facets (3.1.0)
|
12
|
-
glimmer (2.7.3)
|
13
|
-
array_include_methods (~> 1.4.0)
|
14
|
-
facets (>= 3.1.0, < 4.0.0)
|
15
|
-
glimmer-dsl-libui (0.7.5)
|
16
|
-
chunky_png (~> 1.4.0)
|
17
|
-
color (~> 1.8)
|
18
|
-
equalizer (= 0.0.11)
|
19
|
-
glimmer (~> 2.7.3)
|
20
|
-
libui (~> 0.1.2.pre)
|
21
|
-
os (>= 1.0.0, < 2.0.0)
|
22
|
-
perfect-shape (~> 1.0.7)
|
23
|
-
rouge (>= 3.26.0, < 4.0.0)
|
24
|
-
super_module (~> 1.4.1)
|
25
|
-
json (2.6.3)
|
26
|
-
libui (0.1.2.pre-x64-mingw)
|
27
|
-
matrix (0.4.2)
|
28
|
-
method_source (1.0.0)
|
29
|
-
minitest (5.18.0)
|
30
|
-
multi_json (1.15.0)
|
31
|
-
mustermann (3.0.0)
|
32
|
-
ruby2_keywords (~> 0.0.1)
|
33
|
-
mvcStudentXD (1.2.0)
|
34
|
-
mysql2 (0.5.5)
|
35
|
-
os (1.1.4)
|
36
|
-
parallel (1.23.0)
|
37
|
-
parser (3.2.2.1)
|
38
|
-
ast (~> 2.4.1)
|
39
|
-
perfect-shape (1.0.7)
|
40
|
-
equalizer (>= 0.0.11, < 1.1.0)
|
41
|
-
matrix (>= 0.4.2, < 1.1.0)
|
42
|
-
rack (2.2.7)
|
43
|
-
rack-protection (3.0.6)
|
44
|
-
rack
|
45
|
-
rainbow (3.1.1)
|
46
|
-
rake (13.0.6)
|
47
|
-
regexp_parser (2.8.0)
|
48
|
-
rexml (3.2.5)
|
49
|
-
rouge (3.30.0)
|
50
|
-
rubocop (1.50.2)
|
51
|
-
json (~> 2.3)
|
52
|
-
parallel (~> 1.10)
|
53
|
-
parser (>= 3.2.0.0)
|
54
|
-
rainbow (>= 2.2.2, < 4.0)
|
55
|
-
regexp_parser (>= 1.8, < 3.0)
|
56
|
-
rexml (>= 3.2.5, < 4.0)
|
57
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
58
|
-
ruby-progressbar (~> 1.7)
|
59
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
60
|
-
rubocop-ast (1.28.1)
|
61
|
-
parser (>= 3.2.1.0)
|
62
|
-
ruby-progressbar (1.13.0)
|
63
|
-
ruby2_keywords (0.0.5)
|
64
|
-
sinatra (3.0.6)
|
65
|
-
mustermann (~> 3.0)
|
66
|
-
rack (~> 2.2, >= 2.2.4)
|
67
|
-
rack-protection (= 3.0.6)
|
68
|
-
tilt (~> 2.0)
|
69
|
-
sinatra-contrib (3.0.6)
|
70
|
-
multi_json
|
71
|
-
mustermann (~> 3.0)
|
72
|
-
rack-protection (= 3.0.6)
|
73
|
-
sinatra (= 3.0.6)
|
74
|
-
tilt (~> 2.0)
|
75
|
-
super_module (1.4.1)
|
76
|
-
method_source (>= 0.8.2, < 1.1.0)
|
77
|
-
thin (1.8.2)
|
78
|
-
daemons (~> 1.0, >= 1.0.9)
|
79
|
-
eventmachine (~> 1.0, >= 1.0.4)
|
80
|
-
rack (>= 1, < 3)
|
81
|
-
tilt (2.1.0)
|
82
|
-
unicode-display_width (2.4.2)
|
83
|
-
win32api (0.1.0)
|
84
|
-
|
85
|
-
PLATFORMS
|
86
|
-
x64-mingw-ucrt
|
87
|
-
|
88
|
-
DEPENDENCIES
|
89
|
-
glimmer-dsl-libui (~> 0.7.4)
|
90
|
-
minitest (~> 5.0)
|
91
|
-
mvcStudentXD (~> 1.2.0)
|
92
|
-
mysql2
|
93
|
-
rake (~> 13.0)
|
94
|
-
rubocop (~> 1.21)
|
95
|
-
sinatra (~> 3.0, >= 3.0.6)
|
96
|
-
sinatra-contrib
|
97
|
-
thin (~> 1.8, >= 1.8.2)
|
98
|
-
win32api
|
99
|
-
|
100
|
-
BUNDLED WITH
|
101
|
-
2.4.12
|
data/Lab1/arr1_3.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1 3 -4 6 8 -3 -5 10
|
data/Lab1/lb1_1.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
puts 'Hello World'
|
2
|
-
puts "Hello, #{ARGV[0]}."
|
3
|
-
puts "Какой твой любимый язык?"
|
4
|
-
|
5
|
-
r = STDIN.gets.chomp
|
6
|
-
case r
|
7
|
-
when 'ruby'
|
8
|
-
puts 'Подлиза'
|
9
|
-
else
|
10
|
-
puts 'Почему не руби?!'
|
11
|
-
end
|
12
|
-
|
13
|
-
puts 'Enter ruby command: '
|
14
|
-
comRuby = STDIN.gets.chomp
|
15
|
-
system "ruby -e \'#{comRuby}\'"
|
16
|
-
|
17
|
-
puts 'Enter OS command: '
|
18
|
-
comSys = STDIN.gets.chomp
|
19
|
-
puts `#{comSys}`
|
data/Lab1/lb1_2.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
#var2
|
2
|
-
def vzaimProst(num1, num2)
|
3
|
-
if(num1.gcd(num2)==1) then true
|
4
|
-
else false
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
def formArrDel(num)
|
9
|
-
return 1.upto(num).select{|e| num%e==0}
|
10
|
-
end
|
11
|
-
|
12
|
-
def meth1(num1)
|
13
|
-
return 2.upto(num1-1).count{|e| num1.gcd(e)==1}
|
14
|
-
end
|
15
|
-
|
16
|
-
def meth2(num)
|
17
|
-
return num.digits.select{|e| e%3==0}.sum
|
18
|
-
end
|
19
|
-
|
20
|
-
def meth3(num)
|
21
|
-
#formirovat massiv iz kol-va vzaimno-prostih s dannim
|
22
|
-
arr = formArrDel(num).map{|e| num.digits.count{|e1| e.gcd(e1)==1}}
|
23
|
-
return formArrDel(num)[arr.rindex(arr.max)]
|
24
|
-
end
|
25
|
-
|
26
|
-
puts meth1(16)
|
27
|
-
puts meth2(161718192023)
|
28
|
-
puts meth3(17)
|
data/Lab1/lb1_3.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
def minArr(arr)
|
2
|
-
minim=arr[0]
|
3
|
-
for i in 0..arr.length
|
4
|
-
if arr[i].to_i<minim
|
5
|
-
then minim=arr[i].to_i
|
6
|
-
end
|
7
|
-
end
|
8
|
-
return minim
|
9
|
-
end
|
10
|
-
|
11
|
-
def firstPos(arr)
|
12
|
-
for i in 0..arr.length
|
13
|
-
return i if arr[i].to_i>0
|
14
|
-
end
|
15
|
-
return -1
|
16
|
-
end
|
17
|
-
|
18
|
-
if ARGV.count<2
|
19
|
-
puts 'Введите 2 аргумента(метод, путь)!!!'
|
20
|
-
return
|
21
|
-
end
|
22
|
-
|
23
|
-
meth = ARGV[0]
|
24
|
-
path = ARGV[1]
|
25
|
-
|
26
|
-
file = File.open(path)
|
27
|
-
array = file.readline.split(' ').map(&:to_i)
|
28
|
-
file.close()
|
29
|
-
|
30
|
-
puts "Array: #{array}\n"
|
31
|
-
|
32
|
-
case meth
|
33
|
-
when 'minArr'
|
34
|
-
puts "Min in arr: #{minArr(array)}"
|
35
|
-
when 'fP'
|
36
|
-
puts "First positive in arr: #{firstPos(array)}"
|
37
|
-
else
|
38
|
-
puts "Unknown method"
|
39
|
-
end
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
#a=[1,3,-4,6,8,-3,-5, 10]
|
45
|
-
#puts minArr(a)
|
46
|
-
#puts firstPos(a)
|
data/Lab1/lb1_4.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
def idxMin(arr)
|
2
|
-
return arr.index(arr.min)
|
3
|
-
end
|
4
|
-
|
5
|
-
|
6
|
-
def countInterval(arr, a, b)
|
7
|
-
return arr.slice(a+1...b).length
|
8
|
-
end
|
9
|
-
|
10
|
-
|
11
|
-
def idxLastMin(arr)
|
12
|
-
return arr.rindex(arr.min)
|
13
|
-
end
|
14
|
-
|
15
|
-
def betweenMins(arr)
|
16
|
-
return countInterval(arr,idxMin(arr),idxLastMin(arr))
|
17
|
-
end
|
18
|
-
|
19
|
-
def countInNums(arr, a, b)
|
20
|
-
return arr.select{|e| e.between?(a,b)}.length
|
21
|
-
end
|
22
|
-
|
23
|
-
def differ2Arrs(arr1, arr2)
|
24
|
-
return arr1.find_all{|x| arr1.count(x)==1}.difference(arr2).union(arr2.find_all{|x| arr2.count(x)==1}.difference(arr1))
|
25
|
-
end
|
26
|
-
|
27
|
-
#a=[1,3,-4,-5,6,8,-3,-5,10,3]
|
28
|
-
#b=[2,8,-4,-7,6,12,-15,-3,1,1]
|
29
|
-
|
30
|
-
puts "Вечер добрый! Какую программу запустим?
|
31
|
-
|
32
|
-
2 - idxMin
|
33
|
-
14 - count in countInterval
|
34
|
-
26 - betweenMins
|
35
|
-
38 - countInNums
|
36
|
-
50 - differenceBetween2Arrs"
|
37
|
-
|
38
|
-
meth = gets.chomp.to_i
|
39
|
-
|
40
|
-
case meth
|
41
|
-
when meth = 2
|
42
|
-
puts "Введите массив для обработки"
|
43
|
-
arr = gets.chomp.split(' ').map(&:to_i)
|
44
|
-
puts "Введённый массив: #{arr.inspect}"
|
45
|
-
puts idxMin(arr)
|
46
|
-
when meth = 14
|
47
|
-
puts "Введите массив для обработки"
|
48
|
-
arr = gets.chomp.split(' ').map(&:to_i)
|
49
|
-
puts "Введите a"
|
50
|
-
a = gets.chomp.to_i
|
51
|
-
puts "Введите b"
|
52
|
-
b = gets.chomp.to_i
|
53
|
-
puts countInterval(arr,a,b)
|
54
|
-
when meth = 26
|
55
|
-
puts "Введите массив для обработки"
|
56
|
-
arr = gets.chomp.split(' ').map(&:to_i)
|
57
|
-
puts betweenMins(arr)
|
58
|
-
when meth = 38
|
59
|
-
puts "Введите массив для обработки"
|
60
|
-
arr = gets.chomp.split(' ').map(&:to_i)
|
61
|
-
puts "Введите a"
|
62
|
-
a = gets.chomp.to_i
|
63
|
-
puts "Введите b"
|
64
|
-
b = gets.chomp.to_i
|
65
|
-
puts countInNums(arr,a,b)
|
66
|
-
when meth = 50
|
67
|
-
puts "Введите 1 массив для обработки"
|
68
|
-
arr1 = gets.chomp.split(' ').map(&:to_i)
|
69
|
-
puts "Введите 2 массив для обработки"
|
70
|
-
arr2 = gets.chomp.split(' ').map(&:to_i)
|
71
|
-
puts differ2Arrs(arr1, arr2)
|
72
|
-
else
|
73
|
-
puts "Error"
|
74
|
-
end
|
75
|
-
|
76
|
-
|
77
|
-
#puts "Array: #{a}\n"
|
78
|
-
#puts idxMin(a)
|
79
|
-
#puts countInterval(a, 5, -1)
|
80
|
-
#puts betweenMins(a)
|
81
|
-
#puts countInNums(a, -1, 10)
|
82
|
-
#puts differ2Arrs(a, b)
|
data/Lab2/1Class.jpg
DELETED
Binary file
|