gooday 0.1.1

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: 65408ee099ca8031d0d68dd135af070791f6355200ec25f66948c71533330a7b
4
+ data.tar.gz: 935a418f59438ac1bb30a89b9ac43a7fd28a24feb8828b567428f1531762fa07
5
+ SHA512:
6
+ metadata.gz: b3f32797a736469b977b7bcc3790fe69921b2d86206c7acfc43df5e903bb9cdc78a5ed13b52bc6e7558f40f050ccb5532c6ec7550bba97708d52c8be9de51814
7
+ data.tar.gz: 24672d70ac24d37b511259263ac6a5121278105eea50ec0258651161489f563d95d1bf6ab570c477c3cee9662a4c133d9851413b581f4f588fed4ef168b922ce
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,3 @@
1
+ <component name="ProjectDictionaryState">
2
+ <dictionary name="raphc" />
3
+ </component>
data/.idea/discord.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DiscordProjectSettings">
4
+ <option name="show" value="PROJECT_FILES" />
5
+ <option name="description" value="Gooday: A date manager in ruby" />
6
+ </component>
7
+ </project>
data/.idea/gooday.iml ADDED
@@ -0,0 +1,60 @@
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="RVM: ruby-3.0.0" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-3.0.0) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-3.0.0) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-3.0.0) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-3.0.0) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-3.0.0) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-3.0.0) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.1, RVM: ruby-3.0.0) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-3.0.0) [gem]" level="application" />
26
+ </component>
27
+ <component name="RakeTasksCache">
28
+ <option name="myRootTask">
29
+ <RakeTaskImpl id="rake">
30
+ <subtasks>
31
+ <RakeTaskImpl description="Build gooday-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
32
+ <RakeTaskImpl id="build">
33
+ <subtasks>
34
+ <RakeTaskImpl description="Generate SHA512 checksum if gooday-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
35
+ </subtasks>
36
+ </RakeTaskImpl>
37
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
38
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
39
+ <RakeTaskImpl description="Build and install gooday-0.1.0.gem into system gems" fullCommand="install" id="install" />
40
+ <RakeTaskImpl id="install">
41
+ <subtasks>
42
+ <RakeTaskImpl description="Build and install gooday-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
43
+ </subtasks>
44
+ </RakeTaskImpl>
45
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push gooday-0.1.0.gem to 'https://rubygems.org/'" fullCommand="release[remote]" id="release[remote]" />
46
+ <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
47
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
48
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
49
+ <RakeTaskImpl id="release">
50
+ <subtasks>
51
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
52
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
53
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
54
+ </subtasks>
55
+ </RakeTaskImpl>
56
+ </subtasks>
57
+ </RakeTaskImpl>
58
+ </option>
59
+ </component>
60
+ </module>
@@ -0,0 +1,9 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="RubyResolve" enabled="true" level="INFORMATION" enabled_by_default="true">
5
+ <option name="warnImplicitResults" value="false" />
6
+ </inspection_tool>
7
+ <inspection_tool class="RubyTooManyInstanceVariablesInspection" enabled="true" level="INFORMATION" enabled_by_default="true" />
8
+ </profile>
9
+ </component>
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/gooday.iml" filepath="$PROJECT_DIR$/.idea/gooday.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,299 @@
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="1d14650a-8661-45f1-9165-65768d919dcc" name="Changes" comment="">
8
+ <change afterPath="$PROJECT_DIR$/gooday-0.1.0.gem" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/gooday.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/gooday.gemspec" afterDir="false" />
10
+ </list>
11
+ <option name="SHOW_DIALOG" value="false" />
12
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
+ <option name="LAST_RESOLUTION" value="IGNORE" />
15
+ </component>
16
+ <component name="FileTemplateManagerImpl">
17
+ <option name="RECENT_TEMPLATES">
18
+ <list>
19
+ <option value="Ruby File" />
20
+ </list>
21
+ </option>
22
+ </component>
23
+ <component name="Git.Settings">
24
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
25
+ </component>
26
+ <component name="GitSEFilterConfiguration">
27
+ <file-type-list>
28
+ <filtered-out-file-type name="LOCAL_BRANCH" />
29
+ <filtered-out-file-type name="REMOTE_BRANCH" />
30
+ <filtered-out-file-type name="TAG" />
31
+ <filtered-out-file-type name="COMMIT_BY_MESSAGE" />
32
+ </file-type-list>
33
+ </component>
34
+ <component name="HighlightingSettingsPerFile">
35
+ <setting file="file://$PROJECT_DIR$/lib/gooday/errors.rb" root0="FORCE_HIGHLIGHTING" />
36
+ <setting file="file://$PROJECT_DIR$/lib/gooday/locales/en.rb" root0="FORCE_HIGHLIGHTING" />
37
+ <setting file="file://$PROJECT_DIR$/lib/gooday/locales/fr.rb" root0="FORCE_HIGHLIGHTING" />
38
+ <setting file="file://$PROJECT_DIR$/lib/gooday/modules/string_parser.rb" root0="FORCE_HIGHLIGHTING" />
39
+ <setting file="file://$PROJECT_DIR$/lib/gooday/version.rb" root0="FORCE_HIGHLIGHTING" />
40
+ <setting file="file://$PROJECT_DIR$/lib/gooday/yaml_parser.rb" root0="FORCE_HIGHLIGHTING" />
41
+ <setting file="file://$PROJECT_DIR$/spec/gooday_spec.rb" root0="FORCE_HIGHLIGHTING" />
42
+ <setting file="file://$PROJECT_DIR$/spec/locales/fr.yml" root0="FORCE_HIGHLIGHTING" />
43
+ </component>
44
+ <component name="MarkdownSettingsMigration">
45
+ <option name="stateVersion" value="1" />
46
+ </component>
47
+ <component name="ProjectId" id="27fPp38kY9WXrIk3vnQgyBMCXJF" />
48
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true">
49
+ <ConfirmationsSetting value="2" id="Add" />
50
+ </component>
51
+ <component name="ProjectViewState">
52
+ <option name="hideEmptyMiddlePackages" value="true" />
53
+ <option name="showLibraryContents" value="true" />
54
+ </component>
55
+ <component name="PropertiesComponent"><![CDATA[{
56
+ "keyToString": {
57
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
58
+ "RunOnceActivity.ShowReadmeOnStart": "true",
59
+ "WebServerToolWindowFactoryState": "false",
60
+ "last_opened_file_path": "/home/raphael/RubymineProjects/Gooday",
61
+ "node.js.detected.package.eslint": "true",
62
+ "node.js.detected.package.tslint": "true",
63
+ "node.js.selected.package.eslint": "(autodetect)",
64
+ "node.js.selected.package.tslint": "(autodetect)",
65
+ "nodejs_package_manager_path": "npm",
66
+ "ruby.rails.projectView.checked": "true",
67
+ "settings.editor.selected.configurable": "org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable"
68
+ }
69
+ }]]></component>
70
+ <component name="RecentsManager">
71
+ <key name="MoveFile.RECENT_KEYS">
72
+ <recent name="E:\Programmation\ruby_code\gooday\lib\gooday" />
73
+ </key>
74
+ </component>
75
+ <component name="RunManager" selected="RSpec.Gooday string_parser">
76
+ <configuration name="Gooday add &amp; set" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true">
77
+ <module name="gooday" />
78
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
79
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
80
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
81
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
82
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
83
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
84
+ <envs>
85
+ <env name="JRUBY_OPTS" value="-X+O" />
86
+ </envs>
87
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
88
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
89
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" runner="rcov" />
90
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
91
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
92
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/gooday_spec.rb" />
93
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATHS" VALUE="" />
94
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
95
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
96
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Gooday add &amp; set" />
97
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
98
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
99
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
100
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
101
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
102
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
103
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
104
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
105
+ <method v="2" />
106
+ </configuration>
107
+ <configuration name="Gooday checks if an object is a gooday" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true">
108
+ <module name="gooday" />
109
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
110
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
111
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
112
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
113
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
114
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
115
+ <envs>
116
+ <env name="JRUBY_OPTS" value="-X+O" />
117
+ </envs>
118
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
119
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
120
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" runner="rcov" />
121
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
122
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
123
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/gooday_spec.rb" />
124
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATHS" VALUE="" />
125
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
126
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
127
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Gooday checks if an object is a gooday" />
128
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
129
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
130
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
131
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
132
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
133
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
134
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
135
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
136
+ <method v="2" />
137
+ </configuration>
138
+ <configuration name="Gooday string_parser" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true">
139
+ <module name="gooday" />
140
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
141
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
142
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
143
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
144
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
145
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
146
+ <envs>
147
+ <env name="JRUBY_OPTS" value="-X+O" />
148
+ </envs>
149
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
150
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
151
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" runner="rcov" />
152
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
153
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
154
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/gooday_spec.rb" />
155
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATHS" VALUE="" />
156
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
157
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
158
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Gooday string_parser" />
159
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
160
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
161
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
162
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
163
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
164
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
165
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
166
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
167
+ <method v="2" />
168
+ </configuration>
169
+ <configuration name="Gooday works" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true">
170
+ <module name="gooday" />
171
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
172
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
173
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
174
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
175
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
176
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
177
+ <envs>
178
+ <env name="JRUBY_OPTS" value="-X+O" />
179
+ </envs>
180
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
181
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
182
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" runner="rcov" />
183
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
184
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
185
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/gooday_spec.rb" />
186
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATHS" VALUE="" />
187
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
188
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
189
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Gooday works" />
190
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
191
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
192
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
193
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
194
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
195
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
196
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
197
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
198
+ <method v="2" />
199
+ </configuration>
200
+ <configuration name="Gooday" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true">
201
+ <module name="gooday" />
202
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
203
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
204
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
205
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
206
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
207
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
208
+ <envs>
209
+ <env name="JRUBY_OPTS" value="-X+O" />
210
+ </envs>
211
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
212
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
213
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" runner="rcov" />
214
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
215
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
216
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/gooday_spec.rb" />
217
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATHS" VALUE="" />
218
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
219
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
220
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Gooday" />
221
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
222
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
223
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
224
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
225
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
226
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
227
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
228
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
229
+ <method v="2" />
230
+ </configuration>
231
+ <recent_temporary>
232
+ <list>
233
+ <item itemvalue="RSpec.Gooday string_parser" />
234
+ <item itemvalue="RSpec.Gooday add &amp; set" />
235
+ <item itemvalue="RSpec.Gooday" />
236
+ <item itemvalue="RSpec.Gooday works" />
237
+ <item itemvalue="RSpec.Gooday checks if an object is a gooday" />
238
+ </list>
239
+ </recent_temporary>
240
+ </component>
241
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
242
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
243
+ <component name="TaskManager">
244
+ <task active="true" id="Default" summary="Default task">
245
+ <changelist id="1d14650a-8661-45f1-9165-65768d919dcc" name="Changes" comment="" />
246
+ <created>1649708347087</created>
247
+ <option name="number" value="Default" />
248
+ <option name="presentableId" value="Default" />
249
+ <updated>1649708347087</updated>
250
+ <workItem from="1649708348428" duration="2402000" />
251
+ <workItem from="1649749896220" duration="3786000" />
252
+ <workItem from="1649760125884" duration="16692000" />
253
+ <workItem from="1649854680660" duration="11372000" />
254
+ <workItem from="1649932410484" duration="864000" />
255
+ <workItem from="1649953130592" duration="3939000" />
256
+ <workItem from="1650013779921" duration="8916000" />
257
+ <workItem from="1650110974434" duration="15210000" />
258
+ <workItem from="1650314261289" duration="5760000" />
259
+ <workItem from="1650523608147" duration="4923000" />
260
+ <workItem from="1650623403928" duration="603000" />
261
+ <workItem from="1650673924513" duration="25376000" />
262
+ <workItem from="1651254850811" duration="1193000" />
263
+ <workItem from="1651324697590" duration="4187000" />
264
+ <workItem from="1651337835576" duration="1254000" />
265
+ <workItem from="1658765211170" duration="129000" />
266
+ </task>
267
+ <servers />
268
+ </component>
269
+ <component name="TypeScriptGeneratedFilesManager">
270
+ <option name="version" value="3" />
271
+ </component>
272
+ <component name="Vcs.Log.Tabs.Properties">
273
+ <option name="TAB_STATES">
274
+ <map>
275
+ <entry key="MAIN">
276
+ <value>
277
+ <State />
278
+ </value>
279
+ </entry>
280
+ </map>
281
+ </option>
282
+ </component>
283
+ <component name="VcsManagerConfiguration">
284
+ <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
285
+ </component>
286
+ <component name="com.intellij.coverage.CoverageDataManagerImpl">
287
+ <SUITE FILE_PATH="coverage/gooday@gooday.rcov" NAME="gooday Coverage Results" MODIFIED="1649708970885" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib" MODULE_NAME="gooday" />
288
+ <SUITE FILE_PATH="coverage/gooday@timestamps.rcov" NAME="timestamps Coverage Results" MODIFIED="1649846370584" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib/gooday/modules" MODULE_NAME="gooday" />
289
+ <SUITE FILE_PATH="coverage/Gooday@Gooday_string_parser.rcov" NAME="Gooday string_parser Coverage Results" MODIFIED="1658765260276" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
290
+ <SUITE FILE_PATH="coverage/gooday@Gooday_has_a_valid_duration_module.rcov" NAME="Gooday has a valid duration module Coverage Results" MODIFIED="1649925016507" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
291
+ <SUITE FILE_PATH="coverage/gooday@Gooday_YAML_parser.rcov" NAME="Gooday YAML parser Coverage Results" MODIFIED="1649881041639" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
292
+ <SUITE FILE_PATH="coverage/gooday@Gooday_add___set.rcov" NAME="Gooday add &amp; set Coverage Results" MODIFIED="1651338792675" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
293
+ <SUITE FILE_PATH="coverage/gooday@Gooday_string_parser.rcov" NAME="Gooday string_parser Coverage Results" MODIFIED="1650546785906" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
294
+ <SUITE FILE_PATH="coverage/gooday@Gooday.rcov" NAME="Gooday Coverage Results" MODIFIED="1651338850765" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
295
+ <SUITE FILE_PATH="coverage/gooday@Gooday_checks_if_an_object_is_a_gooday.rcov" NAME="Gooday checks if an object is a gooday Coverage Results" MODIFIED="1649925025051" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
296
+ <SUITE FILE_PATH="coverage/gooday@Gooday_has_a_valid_timestamp_module.rcov" NAME="Gooday has a valid timestamp module Coverage Results" MODIFIED="1649852000637" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
297
+ <SUITE FILE_PATH="coverage/gooday@Gooday_works.rcov" NAME="Gooday works Coverage Results" MODIFIED="1650994050799" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="gooday" />
298
+ </component>
299
+ </project>
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,44 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.5
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: 200
14
+
15
+ Style/HashSyntax:
16
+ Enabled: true
17
+ EnforcedStyle: hash_rockets
18
+
19
+ Layout/EndOfLine:
20
+ Enabled: false
21
+
22
+ Metrics/ModuleLength:
23
+ Enabled: false
24
+
25
+ Metrics/MethodLength:
26
+ Enabled: false
27
+
28
+ Lint/RedundantStringCoercion:
29
+ Enabled: false
30
+
31
+ Style/Documentation:
32
+ Enabled: false
33
+
34
+ Metrics/PerceivedComplexity:
35
+ Enabled: false
36
+
37
+ Metrics/AbcSize:
38
+ Enabled: false
39
+
40
+ Metrics/CyclomaticComplexity:
41
+ Enabled: false
42
+
43
+ Metrics/BlockLength:
44
+ Enabled: false
@@ -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 senchuuuu@gmail.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,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in gooday.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop"
data/Gemfile.lock ADDED
@@ -0,0 +1,56 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gooday (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ diff-lcs (1.5.0)
11
+ parallel (1.22.1)
12
+ parser (3.1.1.0)
13
+ ast (~> 2.4.1)
14
+ rainbow (3.1.1)
15
+ rake (13.0.6)
16
+ regexp_parser (2.3.0)
17
+ rexml (3.2.5)
18
+ rspec (3.11.0)
19
+ rspec-core (~> 3.11.0)
20
+ rspec-expectations (~> 3.11.0)
21
+ rspec-mocks (~> 3.11.0)
22
+ rspec-core (3.11.0)
23
+ rspec-support (~> 3.11.0)
24
+ rspec-expectations (3.11.0)
25
+ diff-lcs (>= 1.2.0, < 2.0)
26
+ rspec-support (~> 3.11.0)
27
+ rspec-mocks (3.11.1)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.11.0)
30
+ rspec-support (3.11.0)
31
+ rubocop (1.27.0)
32
+ parallel (~> 1.10)
33
+ parser (>= 3.1.0.0)
34
+ rainbow (>= 2.2.2, < 4.0)
35
+ regexp_parser (>= 1.8, < 3.0)
36
+ rexml
37
+ rubocop-ast (>= 1.16.0, < 2.0)
38
+ ruby-progressbar (~> 1.7)
39
+ unicode-display_width (>= 1.4.0, < 3.0)
40
+ rubocop-ast (1.17.0)
41
+ parser (>= 3.1.1.0)
42
+ ruby-progressbar (1.11.0)
43
+ unicode-display_width (2.1.0)
44
+
45
+ PLATFORMS
46
+ x64-mingw32
47
+ x86_64-linux
48
+
49
+ DEPENDENCIES
50
+ gooday!
51
+ rake (~> 13.0)
52
+ rspec (~> 3.0)
53
+ rubocop
54
+
55
+ BUNDLED WITH
56
+ 2.3.9
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Senchuu
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,35 @@
1
+ # Gooday
2
+
3
+ Gooday is a date manager written in ruby. It is a simple date manager that allows you to stringify dates in many languages.
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+
9
+ $ bundle add gooday
10
+
11
+ If bundler is not being used to manage dependencies, install the gem by executing:
12
+
13
+ $ gem install gooday
14
+
15
+ ## Usage
16
+
17
+ TODO: Write usage instructions here
18
+
19
+ ## Development
20
+
21
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
22
+
23
+ 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).
24
+
25
+ ## Contributing
26
+
27
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gooday. 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]/gooday/blob/main/CODE_OF_CONDUCT.md).
28
+
29
+ ## License
30
+
31
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
32
+
33
+ ## Code of Conduct
34
+
35
+ Everyone interacting in the Gooday project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/gooday/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task :default => :spec
data/exe/gooday ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "gooday"
data/gooday.gemspec ADDED
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/gooday/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "gooday"
7
+ spec.version = Gooday::VERSION
8
+ spec.authors = ["Senchuu"]
9
+ spec.email = ["senchuuuu@gmail.com"]
10
+
11
+ spec.summary = "Manage dates with ruby."
12
+ spec.description = "Gooday is a date manager written in ruby. It is a simple and easy to use."
13
+ spec.homepage = "https://github.com/Senchuu/gooday"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = spec.homepage
21
+ spec.metadata["changelog_uri"] = spec.homepage
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = "exe"
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ["lib"]
33
+
34
+ # Uncomment to register a new dependency of your gem
35
+ # spec.add_dependency "example-gem", "~> 1.0"
36
+
37
+ # For more information and examples about making a new gem, check out our
38
+ # guide at: https://bundler.io/guides/creating_gem.html
39
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gooday
4
+ # Constants
5
+ module Constants
6
+ YEAR = "year"
7
+ MONTH = "month"
8
+ DAY = "day"
9
+ HOUR = "hour"
10
+ MINUTE = "minute"
11
+ SECOND = "second"
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: false
2
+
3
+ module Gooday
4
+ class Error < StandardError
5
+ def initialize(msg = "Gooday Error")
6
+ super(msg.match?("Gooday Error") ? msg : (+"Gooday Error: ").concat(msg))
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,147 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "gooday/errors"
4
+ require "date"
5
+ require "time"
6
+
7
+ module Gooday
8
+ class Date
9
+ attr_accessor :context
10
+ attr_reader :translations
11
+
12
+ def initialize(context)
13
+ raise Gooday::Error, "#{context.inspect} is an invalid context" unless context.respond_to?(:to_datetime)
14
+
15
+ @context = context.to_datetime
16
+ init
17
+ locale("en")
18
+ end
19
+
20
+ def init(context = @context)
21
+ Date.attr_accessor :year, :month, :day, :wday, :hour, :min, :sec, :zone
22
+ @year = context.year
23
+ @month = context.month
24
+ @day = context.day
25
+ @wday = context.wday || @wday
26
+ @hour = context.hour
27
+ @min = context.min
28
+ @sec = context.sec
29
+ @zone = context.zone
30
+ end
31
+
32
+ def locale(locale, path: false, target: "ruby")
33
+ if target.downcase.match?(/^(yml|yaml)/)
34
+ raise Gooday::Error, "#{locale.inspect} doesn't exist as a YAML locale format" unless File.exist?(File.expand_path("#{locale}.yml", path))
35
+
36
+ require "gooday/yaml_parser"
37
+ @translations = YAMLParser.new(File.expand_path("#{locale}.yml", path))
38
+ .translations.transform_keys(&:to_sym)
39
+ else
40
+ raise Gooday::Error, "#{locale.inspect} doesn't exist as a RUBY locale format" unless File.exist?(path ? File.expand_path("#{locale}.rb", path) : "./lib/gooday/locales/#{locale}.rb")
41
+
42
+ file = if path
43
+ File.expand_path("#{locale}.rb", path)
44
+ else
45
+ File.expand_path("./locales/#{locale}.rb", File.dirname(__FILE__))
46
+ end
47
+ load file
48
+
49
+ missing_keys = %i[short long days months short_days short_months formats regexes].each_with_object([]) do |key, arr|
50
+ arr << key unless Gooday::Locales.method(locale.to_s.downcase).call[key]
51
+ end
52
+ raise Gooday::Error, "#{locale.inspect} is missing the following keys: #{missing_keys.join(", ")}" unless missing_keys.empty?
53
+
54
+ @translations = Gooday::Locales.method(locale.to_s.downcase).call
55
+ $LOAD_PATH.unshift(file)
56
+ end
57
+ end
58
+
59
+ def format(format_string)
60
+ raise Gooday::Error, "#{format_string.inspect} is not a valid format string" unless format_string.is_a?(String)
61
+
62
+ matches = Hash[
63
+ :YYYY => @year,
64
+ :YY => @year.to_s[-2..-1],
65
+ :M => @month,
66
+ :MM => @translations[:months][@month - 1],
67
+ :MMM => @translations[:short_months][@month - 1],
68
+ :D => @day,
69
+ :DD => @translations[:days][@wday],
70
+ :DDD => @translations[:short_days][@wday],
71
+ :hh => @hour,
72
+ :mm => @min,
73
+ :ss => @sec,
74
+ :z => @zone
75
+ ]
76
+
77
+ format_string.gsub(/\w+/) { |match| matches[match.to_sym] || match }
78
+ end
79
+
80
+ def set(year: nil, month: nil, day: nil, hour: nil, min: nil, sec: nil, zone: nil)
81
+ month = @translations[:months].index(month) + 1 || nil if month.is_a?(String)
82
+ init(Class.new(DateTime) do
83
+ def initialize(year, month, day, hour, min, sec, zone)
84
+ @year = year
85
+ @month = month
86
+ @day = day
87
+ @hour = hour
88
+ @min = min
89
+ @sec = sec
90
+ @zone = zone
91
+ end
92
+ end.new(year || @year, month || @month, day || @day, hour || @hour, min || @min, sec || @sec, zone || @zone))
93
+ end
94
+
95
+ def add(years: 0, months: 0, days: 0, hours: 0, mins: 0, secs: 0)
96
+ calculated_days = nil
97
+ loop do
98
+ month_days = Time.__send__(:month_days, @year, @month)
99
+ calculated_days ||= @day + days
100
+ break if month_days >= calculated_days
101
+
102
+ calculated_days -= month_days
103
+ if @month == 12
104
+ @year += 1
105
+ @month = 1
106
+ else
107
+ @month += 1
108
+ end
109
+ end
110
+
111
+ set(
112
+ :year => @year + years,
113
+ :month => @month + months,
114
+ :day => calculated_days || @day + days,
115
+ :hour => @hour + hours,
116
+ :min => @min + mins,
117
+ :sec => @sec + secs
118
+ )
119
+ end
120
+
121
+ def to_hash
122
+ Hash[
123
+ :year => @year,
124
+ :month => @month,
125
+ :day => @day,
126
+ :wday => @wday,
127
+ :hour => @hour,
128
+ :min => @min,
129
+ :sec => @sec,
130
+ :zone => @zone
131
+ ]
132
+ end
133
+
134
+ def clone
135
+ Date.new(DateTime.new(@year, @month, @day, @hour, @min, @sec))
136
+ end
137
+
138
+ def to_s
139
+ @context.to_s
140
+ end
141
+ end
142
+ end
143
+
144
+ def gooday?(object)
145
+ object.is_a?(Gooday::Date)
146
+ end
147
+
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gooday
4
+ module Locales
5
+ def self.en
6
+ formats = Hash[
7
+ :short => "en",
8
+ :long => "English",
9
+ :months => %w[
10
+ January
11
+ February
12
+ March
13
+ April
14
+ May
15
+ June
16
+ July
17
+ August
18
+ September
19
+ October
20
+ November
21
+ December
22
+ ],
23
+ :days => %w[
24
+ Sunday
25
+ Monday
26
+ Tuesday
27
+ Wednesday
28
+ Thursday
29
+ Friday
30
+ Saturday
31
+ ],
32
+ :formats => {
33
+ :default => "%a, %d %b %Y %H:%M:%S %z",
34
+ :short => "%d %b %H:%M",
35
+ :long => "%B %d, %Y %H:%M"
36
+ },
37
+ :regexes => [
38
+ %r{(?<day>\d{1,2})/(?<month>\d{1,2})/(?<year>\d{4}|\d{2})?}
39
+ ]
40
+ ]
41
+ formats.store(:short_days, formats[:days].map { |day| day[0, 3] })
42
+ formats.store(:short_months, formats[:months].map { |month| month.size <= 4 ? month : month[0, 3] })
43
+ formats[:regexes] << /((?<wday>#{formats[:days].join("|")})\s)?(?<day>\d{1,2})\s(?<month>#{formats[:months].join("|")})\s+?(?<year>\d{4}|\d{2})?/
44
+ formats
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gooday
4
+ module Locales
5
+ def self.fr
6
+ formats = Hash[
7
+ :short => "fr",
8
+ :long => "Français",
9
+ :months => %w[
10
+ Janvier
11
+ Février
12
+ Mars
13
+ Avril
14
+ Mai
15
+ Juin
16
+ Juillet
17
+ Août
18
+ Septembre
19
+ Octobre
20
+ Novembre
21
+ Décembre
22
+ ],
23
+ :days => %w[
24
+ Dimanche
25
+ Lundi
26
+ Mardi
27
+ Mercredi
28
+ Jeudi
29
+ Vendredi
30
+ Samedi
31
+ ],
32
+ :formats => {
33
+ :default => "%d %B %Y",
34
+ :short => "%d %b",
35
+ :long => "%d %B %Y"
36
+ },
37
+ :regexes => [
38
+ %r{(?<day>\d{1,2})/(?<month>\d{1,2})/(?<year>\d{4}|\d{2})?}
39
+ ]
40
+ ]
41
+
42
+ formats.store(:short_days, formats[:days].map { |day| day[0, 3] })
43
+ formats.store(:short_months, formats[:months].map { |month| month.size <= 4 ? month : month[0, 3] })
44
+ formats[:regexes] << /((?<wday>#{formats[:days].join("|")})\s)?(?<day>\d{1,2})\s(?<month>#{formats[:months].join("|")})\s+?(?<year>\d{4}|\d{2})?/
45
+ formats
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gooday
4
+ module Modules
5
+ module StringParser
6
+ def parse_string(string)
7
+ parsed = translations[:regexes].each_with_object([]) do |regex, arr|
8
+ arr << string.match(regex) if string.match?(regex)
9
+ end
10
+ return nil if parsed.empty?
11
+
12
+ parsed.map { |p| Gooday.new(DateTime.new(p["year"].to_i || Time.now.year, translations[:months].index(p["month"]) & +1 || p["month"].to_i, p["day"].to_i)) }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gooday
4
+ module Modules
5
+ module Timestamps
6
+ def to_timestamp
7
+ context.to_time.to_i
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ class Integer
14
+ def to_gooday
15
+ Gooday.new(Time.at(self))
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gooday
4
+ VERSION = "0.1.1"
5
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "yaml"
4
+
5
+ module Gooday
6
+ # Use YAML instead of Ruby to set a translation
7
+ class YAMLParser
8
+ AUTHORIZED_KEYS = %w[short long months days short_months short_days formats].freeze
9
+
10
+ def initialize(file)
11
+ @file = YAML.load_file(file)
12
+ end
13
+
14
+ def translations
15
+ @file.each_with_object({}) do |(key, value), hash|
16
+ hash[key] = value if AUTHORIZED_KEYS.include?(key)
17
+ end
18
+ end
19
+ end
20
+ end
data/lib/gooday.rb ADDED
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "gooday/version"
4
+ require "gooday/index"
5
+
6
+ module Gooday
7
+ def self.new(context)
8
+ Gooday::Date.new(context)
9
+ end
10
+
11
+ def self.module(module_name)
12
+ if module_name.is_a?(String)
13
+ Gooday::Date.include(Gooday::Modules.const_get(module_name))
14
+ else
15
+ Gooday::Date.include(module_name)
16
+ end
17
+ end
18
+ end
data/sig/gooday.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Gooday
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gooday
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Senchuu
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Gooday is a date manager written in ruby. It is a simple and easy to
14
+ use.
15
+ email:
16
+ - senchuuuu@gmail.com
17
+ executables:
18
+ - gooday
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - ".idea/.gitignore"
23
+ - ".idea/dictionaries/raphc.xml"
24
+ - ".idea/discord.xml"
25
+ - ".idea/gooday.iml"
26
+ - ".idea/inspectionProfiles/Project_Default.xml"
27
+ - ".idea/modules.xml"
28
+ - ".idea/vcs.xml"
29
+ - ".idea/workspace.xml"
30
+ - ".rspec"
31
+ - ".rubocop.yml"
32
+ - CODE_OF_CONDUCT.md
33
+ - Gemfile
34
+ - Gemfile.lock
35
+ - LICENSE.txt
36
+ - README.md
37
+ - Rakefile
38
+ - exe/gooday
39
+ - gooday.gemspec
40
+ - lib/gooday.rb
41
+ - lib/gooday/constants.rb
42
+ - lib/gooday/errors.rb
43
+ - lib/gooday/index.rb
44
+ - lib/gooday/locales/en.rb
45
+ - lib/gooday/locales/fr.rb
46
+ - lib/gooday/modules/string_parser.rb
47
+ - lib/gooday/modules/timestamps.rb
48
+ - lib/gooday/version.rb
49
+ - lib/gooday/yaml_parser.rb
50
+ - sig/gooday.rbs
51
+ homepage: https://github.com/Senchuu/gooday
52
+ licenses:
53
+ - MIT
54
+ metadata:
55
+ allowed_push_host: https://rubygems.org
56
+ homepage_uri: https://github.com/Senchuu/gooday
57
+ source_code_uri: https://github.com/Senchuu/gooday
58
+ changelog_uri: https://github.com/Senchuu/gooday
59
+ post_install_message:
60
+ rdoc_options: []
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 2.6.0
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ requirements: []
74
+ rubygems_version: 3.2.3
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Manage dates with ruby.
78
+ test_files: []