minecraft-data 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bcef9a7351e55f67da1e423179789ada30bed46373b9bf659aacb28c9249d9df
4
+ data.tar.gz: 1d89cd0fa29a67d816ed0f3a64caa679518f6cf15a060c5410f59342b5139f5c
5
+ SHA512:
6
+ metadata.gz: ccbbc1b55d76efe2fbfd084e4f45c6dcce1b30e576c19fb9d46952570c390291f62dbbcc777ae41e61e7ea0b050fe86eedbc5ef6f68fa4e9ed2e641a6ed064b8
7
+ data.tar.gz: a807d8115d2c442022b0a8bddec260e70e7d8dbe3d7ff1fec9a016d09ce230c19962f961e03dbc607843ff6986bea0eee583a9e2f34afc7a6a28026bf16fdd13
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="CompassSettings">
4
+ <option name="compassExecutableFilePath" value="C:/Ruby/Ruby26-x64/lib/ruby/gems/2.6.0/gems/compass-0.12.2/bin/compass" />
5
+ </component>
6
+ <component name="ModuleRunConfigurationManager">
7
+ <shared />
8
+ </component>
9
+ <component name="NewModuleRootManager">
10
+ <content url="file://$MODULE_DIR$" />
11
+ <orderEntry type="jdk" jdkName="ruby-2.6.5-p114" jdkType="RUBY_SDK" />
12
+ <orderEntry type="sourceFolder" forTests="false" />
13
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, ruby-2.6.5-p114) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, ruby-2.6.5-p114) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.3.0, ruby-2.6.5-p114) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, ruby-2.6.5-p114) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.9.0, ruby-2.6.5-p114) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.9.2, ruby-2.6.5-p114) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.9.1, ruby-2.6.5-p114) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.1, ruby-2.6.5-p114) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.3, ruby-2.6.5-p114) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="uuidtools (v2.1.5, ruby-2.6.5-p114) [gem]" level="application" />
23
+ </component>
24
+ </module>
data/.idea/misc.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptSettings">
4
+ <option name="languageLevel" value="ES6" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.3.3-p222" project-jdk-type="RUBY_SDK" />
7
+ </project>
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/minecraft-data.iml" filepath="$PROJECT_DIR$/.idea/minecraft-data.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,475 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="96d8b70b-78b5-4449-bef6-c645fd7989ba" name="Default Changelist" comment="">
5
+ <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
6
+ <change afterPath="$PROJECT_DIR$/.idea/minecraft-data.iml" afterDir="false" />
7
+ <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
8
+ <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
11
+ <change afterPath="$PROJECT_DIR$/.rspec" afterDir="false" />
12
+ <change afterPath="$PROJECT_DIR$/.travis.yml" afterDir="false" />
13
+ <change afterPath="$PROJECT_DIR$/CODE_OF_CONDUCT.md" afterDir="false" />
14
+ <change afterPath="$PROJECT_DIR$/Gemfile" afterDir="false" />
15
+ <change afterPath="$PROJECT_DIR$/LICENSE.txt" afterDir="false" />
16
+ <change afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
17
+ <change afterPath="$PROJECT_DIR$/Rakefile" afterDir="false" />
18
+ <change afterPath="$PROJECT_DIR$/bin/console" afterDir="false" />
19
+ <change afterPath="$PROJECT_DIR$/bin/setup" afterDir="false" />
20
+ <change afterPath="$PROJECT_DIR$/lib/minecraft/data.rb" afterDir="false" />
21
+ <change afterPath="$PROJECT_DIR$/lib/minecraft/data/version.rb" afterDir="false" />
22
+ <change afterPath="$PROJECT_DIR$/minecraft-data.gemspec" afterDir="false" />
23
+ <change afterPath="$PROJECT_DIR$/spec/minecraft/data_spec.rb" afterDir="false" />
24
+ <change afterPath="$PROJECT_DIR$/spec/spec_helper.rb" afterDir="false" />
25
+ </list>
26
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
27
+ <option name="SHOW_DIALOG" value="false" />
28
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
29
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
30
+ <option name="LAST_RESOLUTION" value="IGNORE" />
31
+ </component>
32
+ <component name="FileEditorManager">
33
+ <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
34
+ <file pinned="false" current-in-tab="false">
35
+ <entry file="file://$PROJECT_DIR$/minecraft-data.gemspec">
36
+ <provider selected="true" editor-type-id="text-editor">
37
+ <state relative-caret-position="336">
38
+ <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
39
+ </state>
40
+ </provider>
41
+ </entry>
42
+ </file>
43
+ <file pinned="false" current-in-tab="false">
44
+ <entry file="file://$PROJECT_DIR$/lib/minecraft/data.rb">
45
+ <provider selected="true" editor-type-id="text-editor">
46
+ <state relative-caret-position="-1300">
47
+ <caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
48
+ </state>
49
+ </provider>
50
+ </entry>
51
+ </file>
52
+ <file pinned="false" current-in-tab="false">
53
+ <entry file="file://$PROJECT_DIR$/Gemfile.lock">
54
+ <provider selected="true" editor-type-id="text-editor" />
55
+ </entry>
56
+ </file>
57
+ <file pinned="false" current-in-tab="false">
58
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
59
+ <provider selected="true" editor-type-id="text-editor" />
60
+ </entry>
61
+ </file>
62
+ <file pinned="false" current-in-tab="true">
63
+ <entry file="file://$PROJECT_DIR$/spec/minecraft/data_spec.rb">
64
+ <provider selected="true" editor-type-id="text-editor">
65
+ <state relative-caret-position="528">
66
+ <caret line="22" column="90" selection-start-line="22" selection-start-column="90" selection-end-line="22" selection-end-column="90" />
67
+ </state>
68
+ </provider>
69
+ </entry>
70
+ </file>
71
+ <file pinned="false" current-in-tab="false">
72
+ <entry file="file://$PROJECT_DIR$/CODE_OF_CONDUCT.md">
73
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
74
+ <state split_layout="SPLIT">
75
+ <first_editor relative-caret-position="1776">
76
+ <caret line="74" lean-forward="true" selection-start-line="74" selection-end-line="74" />
77
+ </first_editor>
78
+ <second_editor />
79
+ </state>
80
+ </provider>
81
+ </entry>
82
+ </file>
83
+ <file pinned="false" current-in-tab="false">
84
+ <entry file="file://$PROJECT_DIR$/.gitignore">
85
+ <provider selected="true" editor-type-id="text-editor">
86
+ <state relative-caret-position="264">
87
+ <caret line="11" selection-start-line="11" selection-end-line="11" />
88
+ </state>
89
+ </provider>
90
+ </entry>
91
+ </file>
92
+ <file pinned="false" current-in-tab="false">
93
+ <entry file="file://$PROJECT_DIR$/lib/minecraft/data/version.rb">
94
+ <provider selected="true" editor-type-id="text-editor">
95
+ <state relative-caret-position="120">
96
+ <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
97
+ </state>
98
+ </provider>
99
+ </entry>
100
+ </file>
101
+ <file pinned="false" current-in-tab="false">
102
+ <entry file="file://$PROJECT_DIR$/Gemfile">
103
+ <provider selected="true" editor-type-id="text-editor">
104
+ <state relative-caret-position="96">
105
+ <caret line="4" selection-start-line="4" selection-end-line="4" />
106
+ </state>
107
+ </provider>
108
+ </entry>
109
+ </file>
110
+ </leaf>
111
+ </component>
112
+ <component name="Git.Settings">
113
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
114
+ </component>
115
+ <component name="IdeDocumentHistory">
116
+ <option name="CHANGED_PATHS">
117
+ <list>
118
+ <option value="$PROJECT_DIR$/minecraft-data.gemspec" />
119
+ <option value="$PROJECT_DIR$/lib/minecraft/data/version.rb" />
120
+ <option value="$PROJECT_DIR$/Gemfile" />
121
+ <option value="$PROJECT_DIR$/spec/minecraft/data_spec.rb" />
122
+ <option value="$PROJECT_DIR$/lib/minecraft/data.rb" />
123
+ </list>
124
+ </option>
125
+ </component>
126
+ <component name="ProjectFrameBounds" extendedState="6">
127
+ <option name="x" value="196" />
128
+ <option name="y" value="43" />
129
+ <option name="width" value="1542" />
130
+ <option name="height" value="885" />
131
+ </component>
132
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
133
+ <component name="ProjectView">
134
+ <navigator proportions="" version="1">
135
+ <foldersAlwaysOnTop value="true" />
136
+ </navigator>
137
+ <panes>
138
+ <pane id="ProjectPane">
139
+ <subPane>
140
+ <expand>
141
+ <path>
142
+ <item name="minecraft-data" type="b2602c69:ProjectViewProjectNode" />
143
+ <item name="minecraft-data" type="462c0819:PsiDirectoryNode" />
144
+ </path>
145
+ </expand>
146
+ <select />
147
+ </subPane>
148
+ </pane>
149
+ <pane id="Scope" />
150
+ </panes>
151
+ </component>
152
+ <component name="PropertiesComponent">
153
+ <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
154
+ <property name="WebServerToolWindowFactoryState" value="false" />
155
+ <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
156
+ <property name="nodejs_npm_path_reset_for_default_project" value="true" />
157
+ <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
158
+ </component>
159
+ <component name="RunDashboard">
160
+ <option name="ruleStates">
161
+ <list>
162
+ <RuleState>
163
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
164
+ </RuleState>
165
+ <RuleState>
166
+ <option name="name" value="StatusDashboardGroupingRule" />
167
+ </RuleState>
168
+ </list>
169
+ </option>
170
+ </component>
171
+ <component name="RunManager" selected="RSpec.Minecraft::Data: minecraft-data">
172
+ <configuration name="Minecraft::Data Tests converting minecraft uuids to latest usernames: minecraft-data" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
173
+ <module name="minecraft-data" />
174
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
175
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
176
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
177
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
178
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
179
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
180
+ <envs>
181
+ <env name="JRUBY_OPTS" value="-X+O" />
182
+ </envs>
183
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
184
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
185
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
186
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
187
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/minecraft/data_spec.rb" />
188
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
189
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="'**/*_spec.rb'" />
190
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Minecraft::Data Tests converting minecraft uuids to latest usernames" />
191
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
192
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
193
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
194
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
195
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
196
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
197
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
198
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
199
+ <method v="2" />
200
+ </configuration>
201
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a username: minecraft-data" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
202
+ <module name="minecraft-data" />
203
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
204
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
205
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
206
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
207
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
208
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
209
+ <envs>
210
+ <env name="JRUBY_OPTS" value="-X+O" />
211
+ </envs>
212
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
213
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
214
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
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/minecraft/data_spec.rb" />
217
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
218
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="'**/*_spec.rb'" />
219
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Minecraft::Data Tests retrieving a Minecraft name history from a username" />
220
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
221
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
222
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
223
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
224
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
225
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
226
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
227
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
228
+ <method v="2" />
229
+ </configuration>
230
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
231
+ <module name="minecraft-data" />
232
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
233
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
234
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
235
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
236
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
237
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
238
+ <envs>
239
+ <env name="JRUBY_OPTS" value="-X+O" />
240
+ </envs>
241
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
242
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
243
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
244
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
245
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/minecraft/data_spec.rb" />
246
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
247
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="'**/*_spec.rb'" />
248
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Minecraft::Data Tests retrieving a Minecraft name history from a uuid" />
249
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
250
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
251
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
252
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
253
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
254
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
255
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
256
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
257
+ <method v="2" />
258
+ </configuration>
259
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft skin head url: minecraft-data" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
260
+ <module name="minecraft-data" />
261
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
262
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
263
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
264
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
265
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
266
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
267
+ <envs>
268
+ <env name="JRUBY_OPTS" value="-X+O" />
269
+ </envs>
270
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
271
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
272
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
273
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
274
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/minecraft/data_spec.rb" />
275
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
276
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="'**/*_spec.rb'" />
277
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Minecraft::Data Tests retrieving a Minecraft skin head url" />
278
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
279
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
280
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
281
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
282
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
283
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
284
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
285
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
286
+ <method v="2" />
287
+ </configuration>
288
+ <configuration name="Minecraft::Data: minecraft-data" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
289
+ <module name="minecraft-data" />
290
+ <predefined_log_file enabled="true" id="RUBY_RSPEC" />
291
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
292
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
293
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
294
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
295
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
296
+ <envs>
297
+ <env name="JRUBY_OPTS" value="-X+O" />
298
+ </envs>
299
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
300
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
301
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
302
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
303
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/minecraft/data_spec.rb" />
304
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
305
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="'**/*_spec.rb'" />
306
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Minecraft::Data" />
307
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
308
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
309
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
310
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
311
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
312
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
313
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
314
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
315
+ <method v="2" />
316
+ </configuration>
317
+ <recent_temporary>
318
+ <list>
319
+ <item itemvalue="RSpec.Minecraft::Data: minecraft-data" />
320
+ <item itemvalue="RSpec.Minecraft::Data Tests retrieving a Minecraft skin head url: minecraft-data" />
321
+ <item itemvalue="RSpec.Minecraft::Data Tests retrieving a Minecraft name history from a username: minecraft-data" />
322
+ <item itemvalue="RSpec.Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data" />
323
+ <item itemvalue="RSpec.Minecraft::Data Tests converting minecraft uuids to latest usernames: minecraft-data" />
324
+ </list>
325
+ </recent_temporary>
326
+ </component>
327
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
328
+ <component name="SvnConfiguration">
329
+ <configuration />
330
+ </component>
331
+ <component name="TaskManager">
332
+ <task active="true" id="Default" summary="Default task">
333
+ <changelist id="96d8b70b-78b5-4449-bef6-c645fd7989ba" name="Default Changelist" comment="" />
334
+ <created>1588870027115</created>
335
+ <option name="number" value="Default" />
336
+ <option name="presentableId" value="Default" />
337
+ <updated>1588870027115</updated>
338
+ <workItem from="1588870029449" duration="4143000" />
339
+ <workItem from="1588891453001" duration="9145000" />
340
+ </task>
341
+ <servers />
342
+ </component>
343
+ <component name="TestHistory">
344
+ <history-entry file="Minecraft__Data_Tests_converting_minecraft_uuids_to_latest_usernames__minecraft-data - 2020.05.07 at 23h 29m 26s.xml">
345
+ <configuration name="Minecraft::Data Tests converting minecraft uuids to latest usernames: minecraft-data" configurationId="RSpecRunConfigurationType" />
346
+ </history-entry>
347
+ <history-entry file="Minecraft__Data__minecraft-data - 2020.05.07 at 23h 29m 37s.xml">
348
+ <configuration name="Minecraft::Data: minecraft-data" configurationId="RSpecRunConfigurationType" />
349
+ </history-entry>
350
+ <history-entry file="Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_uuid__minecraft-data - 2020.05.07 at 23h 38m 03s.xml">
351
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data" configurationId="RSpecRunConfigurationType" />
352
+ </history-entry>
353
+ <history-entry file="Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_uuid__minecraft-data - 2020.05.07 at 23h 39m 11s.xml">
354
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data" configurationId="RSpecRunConfigurationType" />
355
+ </history-entry>
356
+ <history-entry file="Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_uuid__minecraft-data - 2020.05.07 at 23h 39m 31s.xml">
357
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data" configurationId="RSpecRunConfigurationType" />
358
+ </history-entry>
359
+ <history-entry file="Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_uuid__minecraft-data - 2020.05.07 at 23h 40m 13s.xml">
360
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data" configurationId="RSpecRunConfigurationType" />
361
+ </history-entry>
362
+ <history-entry file="Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_username__minecraft-data - 2020.05.07 at 23h 40m 46s.xml">
363
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft name history from a username: minecraft-data" configurationId="RSpecRunConfigurationType" />
364
+ </history-entry>
365
+ <history-entry file="Minecraft__Data__minecraft-data - 2020.05.07 at 23h 40m 57s.xml">
366
+ <configuration name="Minecraft::Data: minecraft-data" configurationId="RSpecRunConfigurationType" />
367
+ </history-entry>
368
+ <history-entry file="Minecraft__Data_Tests_retrieving_a_Minecraft_skin_head_url__minecraft-data - 2020.05.07 at 23h 43m 45s.xml">
369
+ <configuration name="Minecraft::Data Tests retrieving a Minecraft skin head url: minecraft-data" configurationId="RSpecRunConfigurationType" />
370
+ </history-entry>
371
+ <history-entry file="Minecraft__Data__minecraft-data - 2020.05.07 at 23h 43m 59s.xml">
372
+ <configuration name="Minecraft::Data: minecraft-data" configurationId="RSpecRunConfigurationType" />
373
+ </history-entry>
374
+ </component>
375
+ <component name="TimeTrackingManager">
376
+ <option name="totallyTimeSpent" value="13288000" />
377
+ </component>
378
+ <component name="ToolWindowManager">
379
+ <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
380
+ <layout>
381
+ <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.10927505" />
382
+ <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
383
+ <window_info id="Favorites" order="2" side_tool="true" />
384
+ <window_info anchor="bottom" id="Message" order="0" />
385
+ <window_info anchor="bottom" id="Find" order="1" weight="0.32998884" />
386
+ <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49946696" weight="0.21404682" />
387
+ <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
388
+ <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
389
+ <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
390
+ <window_info anchor="bottom" id="TODO" order="6" />
391
+ <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
392
+ <window_info anchor="bottom" id="Database Changes" order="8" />
393
+ <window_info anchor="bottom" id="Version Control" order="9" />
394
+ <window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.32998884" />
395
+ <window_info anchor="bottom" id="Event Log" order="11" sideWeight="0.50053304" side_tool="true" weight="0.21404682" />
396
+ <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
397
+ <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
398
+ <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
399
+ <window_info anchor="right" id="Database" order="3" />
400
+ </layout>
401
+ </component>
402
+ <component name="TypeScriptGeneratedFilesManager">
403
+ <option name="version" value="1" />
404
+ </component>
405
+ <component name="com.intellij.coverage.CoverageDataManagerImpl">
406
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_username__minecraft_data.rcov" NAME="Minecraft::Data Tests retrieving a Minecraft name history from a username: minecraft-data Coverage Results" MODIFIED="1588905644366" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
407
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_does_something_useful__minecraft_data.rcov" NAME="Minecraft::Data does something useful: minecraft-data Coverage Results" MODIFIED="1588898440325" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
408
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_Tests_for_converting_minecraft_uuids_to_latests_usernames__minecraft_data.rcov" NAME="Minecraft::Data Tests for converting minecraft uuids to latests usernames: minecraft-data Coverage Results" MODIFIED="1588898601529" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
409
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_Tests_retrieving_a_Minecraft_skin_head_url__minecraft_data.rcov" NAME="Minecraft::Data Tests retrieving a Minecraft skin head url: minecraft-data Coverage Results" MODIFIED="1588905823568" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
410
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_has_a_version_number__minecraft_data.rcov" NAME="Minecraft::Data has a version number: minecraft-data Coverage Results" MODIFIED="1588902056833" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
411
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_Tests_converting_minecraft_uuids_to_latest_usernames__minecraft_data.rcov" NAME="Minecraft::Data Tests converting minecraft uuids to latest usernames: minecraft-data Coverage Results" MODIFIED="1588904964481" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
412
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data_Tests_retrieving_a_Minecraft_name_history_from_a_uuid__minecraft_data.rcov" NAME="Minecraft::Data Tests retrieving a Minecraft name history from a uuid: minecraft-data Coverage Results" MODIFIED="1588905610930" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
413
+ <SUITE FILE_PATH="coverage/minecraft_data@Minecraft__Data__minecraft_data.rcov" NAME="Minecraft::Data: minecraft-data Coverage Results" MODIFIED="1588905836595" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="minecraft-data" />
414
+ </component>
415
+ <component name="editorHistoryManager">
416
+ <entry file="file://$PROJECT_DIR$/.gitignore">
417
+ <provider selected="true" editor-type-id="text-editor">
418
+ <state relative-caret-position="264">
419
+ <caret line="11" selection-start-line="11" selection-end-line="11" />
420
+ </state>
421
+ </provider>
422
+ </entry>
423
+ <entry file="file://$PROJECT_DIR$/CODE_OF_CONDUCT.md">
424
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
425
+ <state split_layout="SPLIT">
426
+ <first_editor relative-caret-position="1776">
427
+ <caret line="74" lean-forward="true" selection-start-line="74" selection-end-line="74" />
428
+ </first_editor>
429
+ <second_editor />
430
+ </state>
431
+ </provider>
432
+ </entry>
433
+ <entry file="file://$PROJECT_DIR$/minecraft-data.gemspec">
434
+ <provider selected="true" editor-type-id="text-editor">
435
+ <state relative-caret-position="336">
436
+ <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
437
+ </state>
438
+ </provider>
439
+ </entry>
440
+ <entry file="file://$PROJECT_DIR$/Gemfile.lock">
441
+ <provider selected="true" editor-type-id="text-editor" />
442
+ </entry>
443
+ <entry file="file://$PROJECT_DIR$/Gemfile">
444
+ <provider selected="true" editor-type-id="text-editor">
445
+ <state relative-caret-position="96">
446
+ <caret line="4" selection-start-line="4" selection-end-line="4" />
447
+ </state>
448
+ </provider>
449
+ </entry>
450
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
451
+ <provider selected="true" editor-type-id="text-editor" />
452
+ </entry>
453
+ <entry file="file://$PROJECT_DIR$/lib/minecraft/data/version.rb">
454
+ <provider selected="true" editor-type-id="text-editor">
455
+ <state relative-caret-position="120">
456
+ <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
457
+ </state>
458
+ </provider>
459
+ </entry>
460
+ <entry file="file://$PROJECT_DIR$/lib/minecraft/data.rb">
461
+ <provider selected="true" editor-type-id="text-editor">
462
+ <state relative-caret-position="-1300">
463
+ <caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
464
+ </state>
465
+ </provider>
466
+ </entry>
467
+ <entry file="file://$PROJECT_DIR$/spec/minecraft/data_spec.rb">
468
+ <provider selected="true" editor-type-id="text-editor">
469
+ <state relative-caret-position="528">
470
+ <caret line="22" column="90" selection-start-line="22" selection-start-column="90" selection-end-line="22" selection-end-column="90" />
471
+ </state>
472
+ </provider>
473
+ </entry>
474
+ </component>
475
+ </project>
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.6.5
6
+ before_install: gem install bundler -v 2.1.4
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at bgmp00@protonmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in minecraft-data.gemspec
4
+ gemspec
5
+
6
+ gem 'rake', '~> 12.0'
7
+ gem 'rspec', '~> 3.0'
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 BGM
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,44 @@
1
+ # Minecraft::Data
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/minecraft/data`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'minecraft-data'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install minecraft-data
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ 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.
30
+
31
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/minecraft-data. 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]/minecraft-data/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+
42
+ ## Code of Conduct
43
+
44
+ Everyone interacting in the Minecraft::Data project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/minecraft-data/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "minecraft/data"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ module Minecraft
2
+ module Data
3
+ VERSION = '0.1.0'.freeze
4
+ end
5
+ end
@@ -0,0 +1,84 @@
1
+ require 'minecraft/data/version'
2
+
3
+ module Minecraft
4
+
5
+ # Module handling all data-gathering operations
6
+ module Data
7
+ require 'open-uri'
8
+ require 'net/http'
9
+ require 'json'
10
+
11
+ USERS_API = 'https://api.ashcon.app/mojang/v1/user'.freeze # https://github.com/Electroid/mojang-api
12
+ HEADS_API = 'https://crafatar.com/avatars'.freeze # https://crafatar.com/
13
+ STEVE_UUID = '8667ba71-b85a-4004-af54-457a9734eed7'.freeze # Steve <3
14
+
15
+ class Error < RuntimeError; end
16
+
17
+ class << self
18
+ attr_accessor :logger
19
+ attr_accessor :timeout
20
+
21
+ def log(msg)
22
+ logger&.debug(msg)
23
+ end
24
+
25
+ # Just gets a URL and wraps errors in Data::Error
26
+ def api_get(url, &block)
27
+ Timeout.timeout(timeout || 0) do
28
+ open(url, &block)
29
+ end
30
+ rescue OpenURI::HTTPError => e
31
+ log "Failed to get url #{url}: #{e}"
32
+ raise Error
33
+ rescue Timeout::Error
34
+ log "Timed out (#{timeout}) getting url #{url}"
35
+ raise Error
36
+ end
37
+
38
+ def normalize_uuid(uuid)
39
+ if uuid.is_a? UUIDTools::UUID
40
+ uuid.to_s
41
+ elsif uuid =~ /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/
42
+ uuid.downcase
43
+ elsif uuid =~ /\A(\h{8})(\h{4})(\h{4})(\h{4})(\h{12})\z/
44
+ "#{$1}-#{$2}-#{$3}-#{$4}-#{$5}".downcase
45
+ else
46
+ # Validation will catch it
47
+ uuid
48
+ end
49
+ end
50
+
51
+ def username_to_uuid(username)
52
+ api_get("#{USERS_API}/#{username}") do |io|
53
+ JSON.parse(io.read)['uuid']
54
+ end
55
+ end
56
+
57
+ def uuid_to_username(uuid)
58
+ api_get("#{USERS_API}/#{uuid}") do |io|
59
+ JSON.parse(io.read)['username']
60
+ end
61
+ end
62
+
63
+ def name_history_of_username(username)
64
+ api_get("#{USERS_API}/#{username}") do |io|
65
+ JSON.parse(io.read)['username_history']
66
+ end
67
+ end
68
+
69
+ def name_history_of_uuid(uuid)
70
+ api_get("#{USERS_API}/#{uuid}") do |io|
71
+ JSON.parse(io.read)['username_history']
72
+ end
73
+ end
74
+
75
+ def head_url_of(uuid, overlay)
76
+ if overlay
77
+ "#{HEADS_API}/#{uuid}?overlay"
78
+ else
79
+ "#{HEADS_API}/#{uuid}"
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/minecraft/data/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'minecraft-data'
7
+ spec.version = Minecraft::Data::VERSION
8
+ spec.authors = ["Jos\xC3\xA9 Benavente"]
9
+ spec.email = ['jose@bgmp.cl']
10
+
11
+ spec.summary = "Really simple gem to retrieve up-to-date, minecraft player profiles's information"
12
+ spec.homepage = 'https://github.com/BGMP/minecraft-skins'
13
+ spec.license = 'MIT'
14
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
15
+
16
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
17
+
18
+ spec.metadata['homepage_uri'] = spec.homepage
19
+ spec.metadata['source_code_uri'] = 'https://github.com/BGMP/minecraft-skins'
20
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ end
27
+ spec.bindir = 'exe'
28
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ['lib']
30
+ spec.add_runtime_dependency('json', '~> 2.3')
31
+ spec.add_runtime_dependency('uuidtools', '~> 2.1', '>= 2.1.5')
32
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: minecraft-data
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - José Benavente
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-05-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: uuidtools
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.1.5
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '2.1'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.1.5
47
+ description:
48
+ email:
49
+ - jose@bgmp.cl
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - ".gitignore"
55
+ - ".idea/minecraft-data.iml"
56
+ - ".idea/misc.xml"
57
+ - ".idea/modules.xml"
58
+ - ".idea/vcs.xml"
59
+ - ".idea/workspace.xml"
60
+ - ".rspec"
61
+ - ".travis.yml"
62
+ - CODE_OF_CONDUCT.md
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - bin/console
68
+ - bin/setup
69
+ - lib/minecraft/data.rb
70
+ - lib/minecraft/data/version.rb
71
+ - minecraft-data.gemspec
72
+ homepage: https://github.com/BGMP/minecraft-skins
73
+ licenses:
74
+ - MIT
75
+ metadata:
76
+ homepage_uri: https://github.com/BGMP/minecraft-skins
77
+ source_code_uri: https://github.com/BGMP/minecraft-skins
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 2.3.0
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubygems_version: 3.0.3
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Really simple gem to retrieve up-to-date, minecraft player profiles's information
97
+ test_files: []