rubbish_code 1.0.0 → 1.1.1

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
2
  SHA256:
3
- metadata.gz: 3ff6f894a469a5e30f9503c213a3a3bc722644f31c029a71be8fee6ccf374c0f
4
- data.tar.gz: f3974e72e1da817190175d4e6570cc1f31c079dacfd91d5cb7d8ad56cf9d6bc9
3
+ metadata.gz: 8977c1f85f3d3c5a73e2d51cdf33e7104520fb2e4a9a531e394e2e6645af8ff3
4
+ data.tar.gz: 84ba679d683b6a3f43b5bc3f488c793c199bba66480fb4844b9d31f8e8b2cbf4
5
5
  SHA512:
6
- metadata.gz: 8521e9757f7ac4f1051bab3b1ceb90174d240df639586ec644621308781374433060551621de84df2222be89b87acb593a16c7bf0122c55f8005e7931860a1db
7
- data.tar.gz: 23778ca852b39757f12b23ccd8da11c0c7ffdba28884050c567b6c3593e3176c43d9f82194fd55a03f84dd3b32d091b1124ea0c687e9079c6a8d1d558d2d6453
6
+ metadata.gz: 4c8ef12b68cab719993c6284ddfa5ba6dd7d8d2a4c9f8273cc31f53a248e807dbaf43739b84173eb06987057fd75e4c1ccf13cc5d30382f6c607f85c6928d096
7
+ data.tar.gz: dba57235d419c0645ca35bf425fefdfade42c187b22944b96288810f3110349ae60b78fb51040b92a4c90070f079c4dbed89afb0a173c05aad22f6bff530a546
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- ## [Unreleased]
2
-
3
- ## [0.1.0] - 2023-04-28
4
-
5
- - Initial release
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-04-28
4
+
5
+ - Initial release
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,84 +1,84 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at delta.null@vk.com. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at delta.null@vk.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile CHANGED
@@ -1,13 +1,13 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "mysql2"
6
- gem "glimmer-dsl-libui",'~> 0.7.4'
7
- gem 'win32api'
8
- gem "minitest"
9
- gem 'rubocop', group: 'development'
10
- gem 'rubbish_code', '~> 0.1.3'
11
- gem 'sinatra', '~> 3.0', '>= 3.0.6'
12
- gem 'thin', '~> 1.8', '>= 1.8.2'
13
- gem 'mc_delta'
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "mysql2"
6
+ gem "glimmer-dsl-libui",'~> 0.7.4'
7
+ gem 'win32api'
8
+ gem "minitest"
9
+ gem 'rubocop', group: 'development'
10
+ gem 'rubbish_code', '~> 0.1.3'
11
+ gem 'sinatra', '~> 3.0', '>= 3.0.6'
12
+ gem 'thin', '~> 1.8', '>= 1.8.2'
13
+ gem 'mc_delta'
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
- module RubbishCode
4
- VERSION = "1.0.0"
5
- end
1
+ # frozen_string_literal: true
2
+
3
+ module RubbishCode
4
+ VERSION = "1.1.1"
5
+ end
data/lib/rubbish_code.rb CHANGED
@@ -1,10 +1,10 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "rubbish_code/version"
4
-
5
- module RubbishCode
6
- Dir[File.dirname(__FILE__) + '/source/**/*.rb'].each { |file|
7
- puts file
8
- require file
9
- }
10
- end
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rubbish_code/version"
4
+
5
+ module RubbishCode
6
+ Dir[File.dirname(__FILE__) + '/source/**/*.rb'].each { |file|
7
+ puts file
8
+ require file
9
+ }
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- require './LabStudents/util/logger_holder'
2
+ require 'source/util/logger_holder'
3
3
  require 'win32api'
4
4
 
5
5
  class StudentInputFormControllerCreate
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require './LabStudents/util/logger_holder'
3
+ require 'source/util/logger_holder'
4
4
  require 'win32api'
5
5
 
6
6
  class StudentInputFormControllerEdit
@@ -26,7 +26,7 @@ class StudentInputFormControllerEdit
26
26
  on_db_conn_error(e)
27
27
  end
28
28
  @existing_student = @student_rep.student_by_id(@existing_student_id)
29
- @view.make_readonly(:git, :telegram, :email, :phone)
29
+ #@view.make_readonly(:git, :telegram, :email, :phone)
30
30
  populate_fields(@existing_student)
31
31
  end
32
32
 
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require './LabStudents/views/main_window'
4
- require './LabStudents/repositories/student_repository'
5
- require './LabStudents/repositories/adapters/db_source_adapter'
6
- require './LabStudents/repositories/containers/data_list_student_short'
7
- require './LabStudents/views/student_input_form'
8
- require './LabStudents/controllers/student_input_form/student_input_form_controller_create'
9
- require './LabStudents/controllers/student_input_form/student_input_form_controller_edit'
10
- require './LabStudents/util/logger_holder'
3
+ require 'source/views/main_window'
4
+ require 'source/repositories/student_repository'
5
+ require 'source/repositories/adapters/db_source_adapter'
6
+ require 'source/repositories/containers/data_list_student_short'
7
+ require 'source/views/student_input_form'
8
+ require 'source/controllers/student_input_form/student_input_form_controller_create'
9
+ require 'source/controllers/student_input_form/student_input_form_controller_edit'
10
+ require 'source/util/logger_holder'
11
11
  require 'win32api'
12
12
 
13
13
  class TabStudentsController
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require './LabStudents/repositories/data_sources/db_data_source'
4
- require './LabStudents/models/student'
5
- require './LabStudents/models/student_short'
6
- require './LabStudents/repositories/containers/data_list_student_short'
3
+ require 'source/repositories/data_sources/db_data_source'
4
+ require 'source/models/student'
5
+ require 'source/models/student_short'
6
+ require 'source/repositories/containers/data_list_student_short'
7
7
 
8
8
  class DBSourceAdapter
9
9
  def initialize
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require './LabStudents/repositories/containers/data_table'
3
+ require 'source/repositories/containers/data_table'
4
4
 
5
5
  class DataList
6
6
  # Это "абстрактный" класс
@@ -7,7 +7,8 @@ class DBDataSource
7
7
  @instance_mutex = Mutex.new
8
8
 
9
9
  def initialize
10
- db_config = YAML.load_file('./LabStudents/db_config/config.yaml').transform_keys(&:to_sym)
10
+ #тут изменить путь к своему конфигу
11
+ db_config = YAML.load_file('C:/Users/jakep/GitHub/Ruby_Moment/LabStudents/db_config/config.yaml').transform_keys(&:to_sym)
11
12
  @client = Mysql2::Client.new(db_config)
12
13
  @client.query_options.merge!(symbolize_keys: true)
13
14
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require './LabStudents/models/student'
4
- require './LabStudents/models/student_short'
5
- require './LabStudents/repositories/containers/data_list_student_short'
3
+ require 'source/models/student'
4
+ require 'source/models/student_short'
5
+ require 'source/repositories/containers/data_list_student_short'
6
6
 
7
7
  class FileDataSource
8
8
  attr_writer :data_transformer
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'glimmer-dsl-libui'
4
+ require_relative 'tab_students'
5
+
6
+ class MainWindow
7
+ include Glimmer
8
+
9
+ def initialize
10
+ @view_tab_students = TabStudents.new
11
+ end
12
+
13
+ def create
14
+ window('Универ', 900, 200) {
15
+ tab {
16
+ tab_item('Студенты') {
17
+ @view_tab_students.create
18
+ }
19
+
20
+ tab_item('Вкладка 2') { }
21
+ tab_item('Вкладка 3') { }
22
+ }
23
+ }
24
+ end
25
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'glimmer-dsl-libui'
4
+ require 'source/controllers/student_input_form/student_input_form_controller_create'
5
+ require 'source/models/student_base'
6
+ require 'source/controllers/tab_students_controller'
7
+ require 'win32api'
8
+
9
+ class StudentInputForm
10
+ include Glimmer
11
+
12
+ def initialize(controller, existing_student = nil)
13
+ @existing_student = existing_student.to_hash unless existing_student.nil?
14
+ @controller = controller
15
+ @entries = {}
16
+ end
17
+
18
+ def on_create
19
+ @controller.on_view_created
20
+ end
21
+
22
+ def create
23
+ @root_container = window('Универ', 300, 150) {
24
+ resizable false
25
+
26
+ vertical_box {
27
+ @student_form = form {
28
+ stretchy false
29
+
30
+ fields = [[:last_name, 'Фамилия', false], [:first_name, 'Имя', false], [:father_name, 'Отчество', false], [:git, 'Гит', true], [:telegram, 'Телеграм', true], [:email, 'Почта', true], [:phone, 'Телефон', true]]
31
+
32
+ fields.each do |field|
33
+ @entries[field[0]] = entry {
34
+ label field[1]
35
+ }
36
+ end
37
+ }
38
+
39
+ button('Сохранить') {
40
+ stretchy false
41
+
42
+ on_clicked {
43
+ values = @entries.transform_values { |v| v.text.force_encoding("utf-8").strip }
44
+ values.transform_values! { |v| v.empty? ? nil : v}
45
+
46
+ @controller.process_fields(values)
47
+ @controller.refresh()
48
+ }
49
+ }
50
+ }
51
+ }
52
+ on_create
53
+ @root_container
54
+ end
55
+
56
+ def set_value(field, value)
57
+ return unless @entries.include?(field)
58
+
59
+ @entries[field].text = value
60
+ end
61
+
62
+ def make_readonly(*fields)
63
+ fields.each do |field|
64
+ @entries[field].read_only = true
65
+ end
66
+ end
67
+
68
+ def close
69
+ @root_container.destroy
70
+ end
71
+ end
@@ -0,0 +1,171 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'glimmer-dsl-libui'
4
+ require 'source/controllers/tab_students_controller'
5
+ require 'source/views/student_input_form'
6
+
7
+ class TabStudents
8
+ include Glimmer
9
+
10
+ STUDENTS_PER_PAGE = 20
11
+
12
+ def initialize
13
+ @controller = TabStudentsController.new(self)
14
+ @current_page = 1
15
+ @total_count = 0
16
+ end
17
+
18
+ def on_create
19
+ @controller.on_view_created
20
+ @controller.refresh_data(@current_page, STUDENTS_PER_PAGE)
21
+ end
22
+
23
+ # Метод наблюдателя datalist
24
+ def on_datalist_changed(new_table)
25
+ arr = new_table.to_2d_array
26
+ arr.map do |row|
27
+ row[3] = [row[3][:value], contact_color(row[3][:type])] unless row[3].nil?
28
+ end
29
+ @table.model_array = arr
30
+ end
31
+
32
+ def update_student_count(new_cnt)
33
+ @total_count = new_cnt
34
+ @page_label.text = "#{@current_page} / #{(@total_count / STUDENTS_PER_PAGE.to_f).ceil}"
35
+ end
36
+
37
+ def contact_color(type)
38
+ case type
39
+ when 'telegram'
40
+ '#00ADB5'
41
+ when 'email'
42
+ '#F08A5D'
43
+ when 'phone'
44
+ '#B83B5E'
45
+ else
46
+ '#000000'
47
+ end
48
+ end
49
+
50
+ def create
51
+ root_container = horizontal_box {
52
+ # Секция 1
53
+ vertical_box {
54
+ stretchy false
55
+
56
+ form {
57
+ stretchy false
58
+
59
+ @filter_last_name_initials = entry {
60
+ label 'Фамилия И. О.'
61
+ }
62
+
63
+ @filters = {}
64
+ fields = [[:git, 'Гит'], [:email, 'Почта'], [:phone, 'Телефон'], [:telegram, 'Телеграм']]
65
+
66
+ fields.each do |field|
67
+ @filters[field[0]] = {}
68
+
69
+ @filters[field[0]][:combobox] = combobox {
70
+ label "#{field[1]} имеется?"
71
+ items ['Не важно', 'Есть', 'Нет']
72
+ selected 0
73
+
74
+ on_selected do
75
+ if @filters[field[0]][:combobox].selected == 1
76
+ @filters[field[0]][:entry].read_only = false
77
+ else
78
+ @filters[field[0]][:entry].text = ''
79
+ @filters[field[0]][:entry].read_only = true
80
+ end
81
+ end
82
+ }
83
+
84
+ @filters[field[0]][:entry] = entry {
85
+ label field[1]
86
+ read_only true
87
+ }
88
+ end
89
+ }
90
+ }
91
+
92
+ # Секция 2
93
+ vertical_box {
94
+ @table = refined_table(
95
+ table_editable: false,
96
+ filter: lambda do |row_hash, query|
97
+ utf8_query = query.force_encoding("utf-8")
98
+ row_hash['Фамилия И. О'].include?(utf8_query)
99
+ end,
100
+ table_columns: {
101
+ '#' => :text,
102
+ 'Фамилия И. О' => :text,
103
+ 'Гит' => :text,
104
+ 'Контакт' => :text_color
105
+ },
106
+ per_page: STUDENTS_PER_PAGE
107
+ )
108
+
109
+ @pages = horizontal_box {
110
+ stretchy false
111
+
112
+ button("<") {
113
+ stretchy true
114
+
115
+ on_clicked do
116
+ @current_page = [@current_page - 1, 1].max
117
+ @controller.refresh_data(@current_page, STUDENTS_PER_PAGE)
118
+ end
119
+
120
+ }
121
+ @page_label = label("...") { stretchy false }
122
+ button(">") {
123
+ stretchy true
124
+
125
+ on_clicked do
126
+ @current_page = [@current_page + 1, (@total_count / STUDENTS_PER_PAGE.to_f).ceil].min
127
+ @controller.refresh_data(@current_page, STUDENTS_PER_PAGE)
128
+ end
129
+ }
130
+ }
131
+ }
132
+
133
+ # Секция 3
134
+ vertical_box {
135
+ stretchy false
136
+
137
+ button('Добавить') {
138
+ stretchy false
139
+
140
+ on_clicked {
141
+ @controller.show_modal_add
142
+ }
143
+ }
144
+ button('Изменить') {
145
+ stretchy false
146
+
147
+ on_clicked {
148
+ @controller.show_modal_edit(@current_page, STUDENTS_PER_PAGE, @table.selection) unless @table.selection.nil?
149
+ }
150
+ }
151
+ button('Удалить') {
152
+ stretchy false
153
+
154
+ on_clicked {
155
+ @controller.delete_selected(@current_page, STUDENTS_PER_PAGE, @table.selection) unless @table.selection.nil?
156
+ @controller.refresh_data(@current_page, STUDENTS_PER_PAGE)
157
+ }
158
+ }
159
+ button('Обновить') {
160
+ stretchy false
161
+
162
+ on_clicked {
163
+ @controller.refresh_data(@current_page, STUDENTS_PER_PAGE)
164
+ }
165
+ }
166
+ }
167
+ }
168
+ on_create
169
+ root_container
170
+ end
171
+ end
Binary file
data/sig/ribbish_code.rbs CHANGED
@@ -1,4 +1,4 @@
1
- module RubbishCode
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end
1
+ module RubbishCode
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubbish_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Epps
@@ -61,7 +61,10 @@ files:
61
61
  - lib/source/repositories/data_sources/transformers/data_transformer_yaml.rb
62
62
  - lib/source/repositories/student_repository.rb
63
63
  - lib/source/util/logger_holder.rb
64
- - rubbish_code-0.1.4.gem
64
+ - lib/source/views/main_window.rb
65
+ - lib/source/views/student_input_form.rb
66
+ - lib/source/views/tab_students.rb
67
+ - rubbish_code-1.1.0.gem
65
68
  - rubbish_code.gemspec
66
69
  - sig/ribbish_code.rbs
67
70
  homepage: https://github.com/Jakepps/Ruby_Moment
Binary file