grc 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 33f42c2f3cce5a611445d087bfe408478ba9ca86c899c3f026f92d5c563b5fcf
4
+ data.tar.gz: 98bbf88dd5d17d4e64f0d03200e17223aa65c98cae32bec7d4f38f05a1c60c4a
5
+ SHA512:
6
+ metadata.gz: 01d3b549332a501b1d9303631e485683dae2010648c953aa1de0e85ded0d7824a60f232a59a4c167f3fc0c972a490f7dc65a056cd360f4b5b83ca8d135067398
7
+ data.tar.gz: 736bf4fddadd919c2d8295b980e59e98522fff0d98033eef51ff5d59dec9a5f99f0f4f86fb98db455225e6822e7bca65d317d1e7e1b0f69ecce015d1f873bc98
data/.idea/grc.iml ADDED
@@ -0,0 +1,72 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="rbenv: 3.1.0" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, rbenv: 3.1.0) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.17, rbenv: 3.1.0) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.6.2, rbenv: 3.1.0) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.16.2, rbenv: 3.1.0) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, rbenv: 3.1.0) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.0, rbenv: 3.1.0) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, rbenv: 3.1.0) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.1.0) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.5.0, rbenv: 3.1.0) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, rbenv: 3.1.0) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.31.2, rbenv: 3.1.0) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.19.1, rbenv: 3.1.0) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, rbenv: 3.1.0) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.2.0, rbenv: 3.1.0) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="unicode-name (v1.10.0, rbenv: 3.1.0) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="unicode-types (v1.7.0, rbenv: 3.1.0) [gem]" level="application" />
30
+ </component>
31
+ <component name="RakeTasksCache">
32
+ <option name="myRootTask">
33
+ <RakeTaskImpl id="rake">
34
+ <subtasks>
35
+ <RakeTaskImpl description="Build grc-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
36
+ <RakeTaskImpl id="build">
37
+ <subtasks>
38
+ <RakeTaskImpl description="Generate SHA512 checksum if grc-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
39
+ </subtasks>
40
+ </RakeTaskImpl>
41
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
42
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
43
+ <RakeTaskImpl description="Build and install grc-0.1.0.gem into system gems" fullCommand="install" id="install" />
44
+ <RakeTaskImpl id="install">
45
+ <subtasks>
46
+ <RakeTaskImpl description="Build and install grc-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
47
+ </subtasks>
48
+ </RakeTaskImpl>
49
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push grc-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
50
+ <RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
51
+ <RakeTaskImpl id="rubocop">
52
+ <subtasks>
53
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (only when it's safe)" fullCommand="rubocop:autocorrect" id="autocorrect" />
54
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (safe and unsafe)" fullCommand="rubocop:autocorrect_all" id="autocorrect_all" />
55
+ <RakeTaskImpl description="" fullCommand="rubocop:auto_correct" id="auto_correct" />
56
+ </subtasks>
57
+ </RakeTaskImpl>
58
+ <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
59
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
60
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
61
+ <RakeTaskImpl id="release">
62
+ <subtasks>
63
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
64
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
65
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
66
+ </subtasks>
67
+ </RakeTaskImpl>
68
+ </subtasks>
69
+ </RakeTaskImpl>
70
+ </option>
71
+ </component>
72
+ </module>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/grc.iml" filepath="$PROJECT_DIR$/.idea/grc.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,205 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="0af4ebef-9f59-4a85-9f65-0d8163baa737" name="Changes" comment="2022-07-12-01-01">
8
+ <change beforePath="$PROJECT_DIR$/grc.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/grc.gemspec" afterDir="false" />
9
+ </list>
10
+ <option name="SHOW_DIALOG" value="false" />
11
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+ <option name="LAST_RESOLUTION" value="IGNORE" />
14
+ </component>
15
+ <component name="Git.Settings">
16
+ <option name="PUSH_TAGS">
17
+ <GitPushTagMode>
18
+ <option name="argument" value="--tags" />
19
+ <option name="title" value="All" />
20
+ </GitPushTagMode>
21
+ </option>
22
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
23
+ </component>
24
+ <component name="MarkdownSettingsMigration">
25
+ <option name="stateVersion" value="1" />
26
+ </component>
27
+ <component name="ProjectId" id="2BpGG8Ozqc6QCfM8qaLq7L6pxlH" />
28
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
29
+ <component name="ProjectViewState">
30
+ <option name="hideEmptyMiddlePackages" value="true" />
31
+ <option name="showLibraryContents" value="true" />
32
+ </component>
33
+ <component name="PropertiesComponent"><![CDATA[{
34
+ "keyToString": {
35
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
36
+ "RunOnceActivity.ShowReadmeOnStart": "true",
37
+ "nodejs_package_manager_path": "npm",
38
+ "ruby.rails.projectView.checked": "true"
39
+ }
40
+ }]]></component>
41
+ <component name="RunManager" selected="Test::Unit/Shoulda/Minitest.test_grc.rb">
42
+ <configuration name="grc" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
43
+ <module name="grc" />
44
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
45
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$" />
46
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
47
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
48
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
49
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
50
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
51
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
52
+ <COVERAGE_PATTERN ENABLED="true">
53
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
54
+ </COVERAGE_PATTERN>
55
+ </EXTENSION>
56
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
57
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/grc.rb" />
58
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
59
+ <method v="2" />
60
+ </configuration>
61
+ <configuration name="test_grc.rb" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
62
+ <module name="grc" />
63
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
64
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
65
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
66
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
67
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
68
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
69
+ <envs>
70
+ <env name="JRUBY_OPTS" value="-X+O" />
71
+ </envs>
72
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
73
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
74
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
75
+ <COVERAGE_PATTERN ENABLED="true">
76
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
77
+ </COVERAGE_PATTERN>
78
+ </EXTENSION>
79
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
80
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
81
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/test_grc.rb" />
82
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$MODULE_DIR$/test/test_grc.rb" />
83
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
84
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
85
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
86
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
87
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
88
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
89
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
90
+ <method v="2" />
91
+ </configuration>
92
+ <configuration name="test_unicode_name" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
93
+ <module name="grc" />
94
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
95
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
96
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
97
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
98
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
99
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
100
+ <envs>
101
+ <env name="JRUBY_OPTS" value="-X+O" />
102
+ </envs>
103
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
104
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
105
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
106
+ <COVERAGE_PATTERN ENABLED="true">
107
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
108
+ </COVERAGE_PATTERN>
109
+ </EXTENSION>
110
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
111
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
112
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/test_grc.rb" />
113
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$MODULE_DIR$/test/test_grc.rb" />
114
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
115
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_unicode_name$" />
116
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
117
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
118
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
119
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
120
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
121
+ <method v="2" />
122
+ </configuration>
123
+ <recent_temporary>
124
+ <list>
125
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_grc.rb" />
126
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_unicode_name" />
127
+ <item itemvalue="Ruby.grc" />
128
+ </list>
129
+ </recent_temporary>
130
+ </component>
131
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
132
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
133
+ <component name="TaskManager">
134
+ <task active="true" id="Default" summary="Default task">
135
+ <changelist id="0af4ebef-9f59-4a85-9f65-0d8163baa737" name="Changes" comment="" />
136
+ <created>1657595515095</created>
137
+ <option name="number" value="Default" />
138
+ <option name="presentableId" value="Default" />
139
+ <updated>1657595515095</updated>
140
+ <workItem from="1657595516239" duration="3552000" />
141
+ </task>
142
+ <task id="LOCAL-00001" summary="Initial commit">
143
+ <created>1657596693848</created>
144
+ <option name="number" value="00001" />
145
+ <option name="presentableId" value="LOCAL-00001" />
146
+ <option name="project" value="LOCAL" />
147
+ <updated>1657596693848</updated>
148
+ </task>
149
+ <task id="LOCAL-00002" summary="Initial commit">
150
+ <created>1657596711649</created>
151
+ <option name="number" value="00002" />
152
+ <option name="presentableId" value="LOCAL-00002" />
153
+ <option name="project" value="LOCAL" />
154
+ <updated>1657596711649</updated>
155
+ </task>
156
+ <task id="LOCAL-00003" summary="2022-07-12-00-43">
157
+ <created>1657597386711</created>
158
+ <option name="number" value="00003" />
159
+ <option name="presentableId" value="LOCAL-00003" />
160
+ <option name="project" value="LOCAL" />
161
+ <updated>1657597386711</updated>
162
+ </task>
163
+ <task id="LOCAL-00004" summary="2022-07-12-01-01">
164
+ <created>1657598473240</created>
165
+ <option name="number" value="00004" />
166
+ <option name="presentableId" value="LOCAL-00004" />
167
+ <option name="project" value="LOCAL" />
168
+ <updated>1657598473240</updated>
169
+ </task>
170
+ <task id="LOCAL-00005" summary="2022-07-12-01-01">
171
+ <created>1657598672563</created>
172
+ <option name="number" value="00005" />
173
+ <option name="presentableId" value="LOCAL-00005" />
174
+ <option name="project" value="LOCAL" />
175
+ <updated>1657598672563</updated>
176
+ </task>
177
+ <option name="localTasksCounter" value="6" />
178
+ <servers />
179
+ </component>
180
+ <component name="TypeScriptGeneratedFilesManager">
181
+ <option name="version" value="3" />
182
+ </component>
183
+ <component name="Vcs.Log.Tabs.Properties">
184
+ <option name="TAB_STATES">
185
+ <map>
186
+ <entry key="MAIN">
187
+ <value>
188
+ <State />
189
+ </value>
190
+ </entry>
191
+ </map>
192
+ </option>
193
+ </component>
194
+ <component name="VcsManagerConfiguration">
195
+ <MESSAGE value="Initial commit" />
196
+ <MESSAGE value="2022-07-12-00-43" />
197
+ <MESSAGE value="2022-07-12-01-01" />
198
+ <option name="LAST_COMMIT_MESSAGE" value="2022-07-12-01-01" />
199
+ </component>
200
+ <component name="com.intellij.coverage.CoverageDataManagerImpl">
201
+ <SUITE FILE_PATH="coverage/grc@test_grc_rb.rcov" NAME="test_grc.rb Coverage Results" MODIFIED="1657596424790" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="grc" />
202
+ <SUITE FILE_PATH="coverage/grc@test_unicode_name.rcov" NAME="test_unicode_name Coverage Results" MODIFIED="1657596419433" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="grc" />
203
+ <SUITE FILE_PATH="coverage/grc@grc.rcov" NAME="grc Coverage Results" MODIFIED="1657596407748" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="grc" />
204
+ </component>
205
+ </project>
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ #Style/StringLiterals:
5
+ # Enabled: true
6
+ # EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 480
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-07-12
4
+
5
+ - Initial release
@@ -0,0 +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 35749099+bcdavasconcelos@users.noreply.github.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 ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in grc.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 13.0'
9
+
10
+ gem 'minitest', '~> 5.0'
11
+
12
+ gem 'rubocop', '~> 1.21'
13
+
14
+ gem 'unicode-name', '~> 1.10.0'
data/Gemfile.lock ADDED
@@ -0,0 +1,51 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ grc (0.1.0)
5
+ minitest (~> 5.0)
6
+ rake (~> 13.0)
7
+ unicode-name (~> 1.10.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ast (2.4.2)
13
+ json (2.6.2)
14
+ minitest (5.16.2)
15
+ parallel (1.22.1)
16
+ parser (3.1.2.0)
17
+ ast (~> 2.4.1)
18
+ rainbow (3.1.1)
19
+ rake (13.0.6)
20
+ regexp_parser (2.5.0)
21
+ rexml (3.2.5)
22
+ rubocop (1.31.2)
23
+ json (~> 2.3)
24
+ parallel (~> 1.10)
25
+ parser (>= 3.1.0.0)
26
+ rainbow (>= 2.2.2, < 4.0)
27
+ regexp_parser (>= 1.8, < 3.0)
28
+ rexml (>= 3.2.5, < 4.0)
29
+ rubocop-ast (>= 1.18.0, < 2.0)
30
+ ruby-progressbar (~> 1.7)
31
+ unicode-display_width (>= 1.4.0, < 3.0)
32
+ rubocop-ast (1.19.1)
33
+ parser (>= 3.1.1.0)
34
+ ruby-progressbar (1.11.0)
35
+ unicode-display_width (2.2.0)
36
+ unicode-name (1.10.0)
37
+ unicode-types (~> 1.7)
38
+ unicode-types (1.7.0)
39
+
40
+ PLATFORMS
41
+ arm64-darwin-21
42
+
43
+ DEPENDENCIES
44
+ grc!
45
+ minitest (~> 5.0)
46
+ rake (~> 13.0)
47
+ rubocop (~> 1.21)
48
+ unicode-name (~> 1.10.0)
49
+
50
+ BUNDLED WITH
51
+ 2.3.17
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Bernardo C.D.A. Vasconcelos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Grc
2
+
3
+ ## Installation
4
+
5
+ Install the gem and add to the application's Gemfile by executing:
6
+
7
+ $ bundle add grc
8
+
9
+ If bundler is not being used to manage dependencies, install the gem by executing:
10
+
11
+ $ gem install grc
12
+
13
+ ## Usage
14
+
15
+
16
+ ## Development
17
+
18
+ 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.
19
+
20
+ 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).
21
+
22
+ ## Contributing
23
+
24
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/grc. 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]/grc/blob/Main/CODE_OF_CONDUCT.md).
25
+
26
+ ## License
27
+
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
29
+
30
+ ## Code of Conduct
31
+
32
+ Everyone interacting in the Grc project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/grc/blob/Main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Grc
4
+ VERSION = '0.1.0'
5
+ end
data/lib/grc.rb ADDED
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'grc/version'
4
+
5
+ # Methods for working with ancient greek in ruby
6
+ module Grc
7
+ class Error < StandardError; end
8
+
9
+ def grc?
10
+ !scan(/(\p{Greek})/).empty?
11
+ end
12
+
13
+ def no_downcase_diacritics
14
+ tr('ἀἄᾄἂᾂἆᾆᾀἁἅᾅἃᾃἇᾇᾁάάᾴὰᾲᾰᾶᾷᾱᾳἐἔἒἑἕἓέέὲἠἤᾔἢᾒἦᾖᾐἡἥᾕἣᾓἧᾗᾑήήῄὴῂῆῇῃἰἴἲἶἱἵἳἷίίὶῐῖϊϊΐῒῗῑὀὄὂὁὅὃόόὸῤῥὐὔὒὖὑὕὓὗύύὺῠῦϋΰΰΰῢῧῡὠὤᾤὢᾢὦᾦᾠὡὥᾥὣᾣὧᾧᾡώώῴὼῲῶῷῳ',
15
+ 'ααααααααααααααααααααααααααεεεεεεεεεηηηηηηηηηηηηηηηηηηηηηηηηιιιιιιιιιιιιιιιιιιιοοοοοοοοορρυυυυυυυυυυυυυυυυυυυυωωωωωωωωωωωωωωωωωωωωωωωω')
16
+ end
17
+
18
+ def no_upcase_diacritics
19
+ tr('ἈἌἌΙἊἊΙἎἎΙἈΙἉἍἍΙἋἋΙἏἏΙἉΙΆΆΆΙᾺᾺΙᾸΑ͂Α͂ΙᾹΑΙἘἜἚἙἝἛΈΈῈἨἬἬΙἪἪΙἮἮΙἨΙἩἭἭΙἫἫΙἯἯΙἩΙΉΉΉΙῊῊΙΗ͂Η͂ΙΗΙἸἼἺἾἹἽἻἿΊΊῚῘΙ͂ΪΪΪ́Ϊ̀Ϊ͂ῙὈὌὊὉὍὋΌΌῸΡ̓ῬΥ̓Υ̓́Υ̓̀Υ̓͂ὙὝὛὟΎΎῪῨΥ͂ΫΫ́Ϋ́Ϋ́Ϋ̀Ϋ͂ῩὨὬὬΙὪὪΙὮὮΙὨΙὩὭὭΙὫὫΙὯὯΙὩΙΏΏΏΙῺῺΙΩ͂Ω͂ΙΩΙ',
20
+ 'ΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΕΕΕΕΕΕΕΕΕΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΟΟΟΟΟΟΟΟΟΡΡΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩ')
21
+ end
22
+
23
+ def no_diacritics
24
+ tr('ἀἄᾄἂᾂἆᾆᾀἁἅᾅἃᾃἇᾇᾁάάᾴὰᾲᾰᾶᾷᾱᾳἐἔἒἑἕἓέέὲἠἤᾔἢᾒἦᾖᾐἡἥᾕἣᾓἧᾗᾑήήῄὴῂῆῇῃἰἴἲἶἱἵἳἷίίὶῐῖϊϊΐῒῗῑὀὄὂὁὅὃόόὸῤῥὐὔὒὖὑὕὓὗύύὺῠῦϋΰΰΰῢῧῡὠὤᾤὢᾢὦᾦᾠὡὥᾥὣᾣὧᾧᾡώώῴὼῲῶῷῳἈἌἌΙἊἊΙἎἎΙἈΙἉἍἍΙἋἋΙἏἏΙἉΙΆΆΆΙᾺᾺΙᾸΑ͂Α͂ΙᾹΑΙἘἜἚἙἝἛΈΈῈἨἬἬΙἪἪΙἮἮΙἨΙἩἭἭΙἫἫΙἯἯΙἩΙΉΉΉΙῊῊΙΗ͂Η͂ΙΗΙἸἼἺἾἹἽἻἿΊΊῚῘΙ͂ΪΪΪ́Ϊ̀Ϊ͂ῙὈὌὊὉὍὋΌΌῸΡ̓ῬΥ̓Υ̓́Υ̓̀Υ̓͂ὙὝὛὟΎΎῪῨΥ͂ΫΫ́Ϋ́Ϋ́Ϋ̀Ϋ͂ῩὨὬὬΙὪὪΙὮὮΙὨΙὩὭὭΙὫὫΙὯὯΙὩΙΏΏΏΙῺῺΙΩ͂Ω͂ΙΩΙ',
25
+ 'ααααααααααααααααααααααααααεεεεεεεεεηηηηηηηηηηηηηηηηηηηηηηηηιιιιιιιιιιιιιιιιιιιοοοοοοοοορρυυυυυυυυυυυυυυυυυυυυωωωωωωωωωωωωωωωωωωωωωωωωΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑΕΕΕΕΕΕΕΕΕΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΗΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΙΟΟΟΟΟΟΟΟΟΡΡΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΥΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩΩ')
26
+ end
27
+
28
+ def tonos_to_oxia
29
+ tr('ΆΈΉΊΎΌΏάέήίΐύΰόώ',
30
+ 'ΆΈΉΊΎΌΏάέήίΐύΰόώ')
31
+ end
32
+
33
+ def oxia_to_tonos
34
+ tr('ΆΈΉΊΎΌΏάέήίΐύΰόώ',
35
+ 'ΆΈΉΊΎΌΏάέήίΐύΰόώ')
36
+ end
37
+
38
+ def acute_to_grave
39
+ tr('ἄᾄἅᾅάάᾴἔἕέέἤᾔἥᾕήήῄἴἵίίΐὄὅόόὔὕύύΰΰὤᾤὥᾥώῴ',
40
+ 'ἂᾂἃᾃὰὰᾲἒἓὲὲἢᾒἣᾓὴὴῂἲἳὶὶῒὂὃὸὸὒὓὺὺῢῢὢᾢὣᾣὼῲ')
41
+ end
42
+
43
+ def grave_to_acute
44
+ tr('ἂᾂἃᾃὰὰᾲἒἓὲὲἢᾒἣᾓὴὴῂἲἳὶὶῒὂὃὸὸὒὓὺὺῢῢὢᾢὣᾣὼῲ',
45
+ 'ἄᾄἅᾅάάᾴἔἕέέἤᾔἥᾕήήῄἴἵίίΐὄὅόόὔὕύύΰΰὤᾤὥᾥώῴ')
46
+ end
47
+
48
+ def tokenize
49
+ gsub(/([[:punct:]]|·|·|‧|⸱|𐄁|\.|;|;)/, ' \1').split
50
+ end
51
+
52
+ def unicode_char
53
+ each_char.map(&:to_s)
54
+ end
55
+
56
+ def unicode_name
57
+ require 'unicode/name'
58
+ each_char.map { |character| Unicode::Name.of character }
59
+ end
60
+
61
+ def unicode_points
62
+ unpack('U*').map { |i| "\\u#{i.to_s(16).rjust(4, "0").upcase}" }
63
+ end
64
+
65
+ def hash_dump
66
+ hash = {}
67
+ each_char do |character|
68
+ hash[character] = character.dump
69
+ end
70
+ hash
71
+ end
72
+
73
+ def nfc
74
+ unicode_normalize(:nfc)
75
+ end
76
+
77
+ def nfd
78
+ unicode_normalize(:nfd)
79
+ end
80
+ end
81
+
82
+ class String
83
+ include Grc
84
+ end
data/sig/grc.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Grc
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Bernardo C.D.A. Vasconcelos
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: unicode-name
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.10.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.10.0
55
+ description: 'This gem provides some methods for working with Ancient Greek in Ruby. '
56
+ email:
57
+ - 35749099+bcdavasconcelos@users.noreply.github.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".idea/grc.iml"
63
+ - ".idea/modules.xml"
64
+ - ".idea/vcs.xml"
65
+ - ".idea/workspace.xml"
66
+ - ".rubocop.yml"
67
+ - CHANGELOG.md
68
+ - CODE_OF_CONDUCT.md
69
+ - Gemfile
70
+ - Gemfile.lock
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - lib/grc.rb
75
+ - lib/grc/version.rb
76
+ - sig/grc.rbs
77
+ homepage: https://github.com/bcdavasconcelos/grc
78
+ licenses:
79
+ - MIT
80
+ metadata:
81
+ homepage_uri: https://github.com/bcdavasconcelos/grc
82
+ source_code_uri: https://github.com/bcdavasconcelos/grc.git
83
+ changelog_uri: https://github.com/bcdavasconcelos/grc/blob/Main/CHANGELOG.md
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 2.6.0
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubygems_version: 3.3.17
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Methods in Ruby for working with Ancient Greek
103
+ test_files: []