vimgolf-finder 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
+ SHA1:
3
+ metadata.gz: 5a95d2c55bd77ebe847673940c03659c369a4630
4
+ data.tar.gz: 30c5f2fd71a43b2364729db7a2bd8732fac6e634
5
+ SHA512:
6
+ metadata.gz: 7b14525aa974b7a6c9da12b8f4e3821da5fa17312b6f0597e532cc1d616ff03ef8dab5fafdae087b61061f1a02bf74fc4466386eb28c6b4b07a6d46af4351ff8
7
+ data.tar.gz: 10aca4ae6845c843f0e386cfb020a2b422d6fda974e3f73c1a8b33072f96e75898c499171e387b0acbb216150b9163f55299a19bc0b83799596e4be763e1e04c
data/.gitignore ADDED
@@ -0,0 +1,52 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
51
+
52
+ Gemfile.lock
data/.idea/.name ADDED
@@ -0,0 +1 @@
1
+ vimgolf-finder
data/.idea/misc.xml ADDED
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
4
+ <OptionsSetting value="true" id="Add" />
5
+ <OptionsSetting value="true" id="Remove" />
6
+ <OptionsSetting value="true" id="Checkout" />
7
+ <OptionsSetting value="true" id="Update" />
8
+ <OptionsSetting value="true" id="Status" />
9
+ <OptionsSetting value="true" id="Edit" />
10
+ <ConfirmationsSetting value="0" id="Add" />
11
+ <ConfirmationsSetting value="0" id="Remove" />
12
+ </component>
13
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.0.0-p451" project-jdk-type="RUBY_SDK" />
14
+ </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/vimgolf-finder.iml" filepath="$PROJECT_DIR$/.idea/vimgolf-finder.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="" vcs="" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="jdk" jdkName="rbenv: 2.2.2" jdkType="RUBY_SDK" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.0.0, rbenv: 2.2.2) [gem]" level="application" />
8
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.7.2, rbenv: 2.2.2) [gem]" level="application" />
9
+ <orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, rbenv: 2.2.2) [gem]" level="application" />
10
+ </component>
11
+ </module>
@@ -0,0 +1,482 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="de3526f1-f8e9-4958-aa23-61f5e5965f57" name="Default" comment="" />
5
+ <ignored path="vimgolf-finder.iws" />
6
+ <ignored path=".idea/workspace.xml" />
7
+ <ignored path=".idea/dataSources.local.xml" />
8
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
+ <option name="TRACKING_ENABLED" value="true" />
10
+ <option name="SHOW_DIALOG" value="false" />
11
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+ <option name="LAST_RESOLUTION" value="IGNORE" />
14
+ </component>
15
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
16
+ <component name="CreatePatchCommitExecutor">
17
+ <option name="PATCH_PATH" value="" />
18
+ </component>
19
+ <component name="FavoritesManager">
20
+ <favorites_list name="vimgolf-finder" />
21
+ </component>
22
+ <component name="FileEditorManager">
23
+ <leaf>
24
+ <file leaf-file-name="parser.rb" pinned="false" current-in-tab="false">
25
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/parser.rb">
26
+ <provider selected="true" editor-type-id="text-editor">
27
+ <state vertical-scroll-proportion="0.0">
28
+ <caret line="16" column="9" selection-start-line="16" selection-start-column="9" selection-end-line="16" selection-end-column="9" />
29
+ <folding />
30
+ </state>
31
+ </provider>
32
+ </entry>
33
+ </file>
34
+ <file leaf-file-name="cli.rb" pinned="false" current-in-tab="false">
35
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/cli.rb">
36
+ <provider selected="true" editor-type-id="text-editor">
37
+ <state vertical-scroll-proportion="0.0">
38
+ <caret line="79" column="11" selection-start-line="79" selection-start-column="11" selection-end-line="79" selection-end-column="11" />
39
+ <folding />
40
+ </state>
41
+ </provider>
42
+ </entry>
43
+ </file>
44
+ <file leaf-file-name="challenge.rb" pinned="false" current-in-tab="false">
45
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/challenge.rb">
46
+ <provider selected="true" editor-type-id="text-editor">
47
+ <state vertical-scroll-proportion="0.0">
48
+ <caret line="52" column="0" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
49
+ <folding />
50
+ </state>
51
+ </provider>
52
+ </entry>
53
+ </file>
54
+ <file leaf-file-name="vimgolf_finder.rb" pinned="false" current-in-tab="false">
55
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder.rb">
56
+ <provider selected="true" editor-type-id="text-editor">
57
+ <state vertical-scroll-proportion="0.0">
58
+ <caret line="4" column="8" selection-start-line="4" selection-start-column="8" selection-end-line="4" selection-end-column="8" />
59
+ <folding />
60
+ </state>
61
+ </provider>
62
+ </entry>
63
+ </file>
64
+ <file leaf-file-name="vimgolf-finder.gemspec" pinned="false" current-in-tab="false">
65
+ <entry file="file://$PROJECT_DIR$/vimgolf-finder.gemspec">
66
+ <provider selected="true" editor-type-id="text-editor">
67
+ <state vertical-scroll-proportion="0.0">
68
+ <caret line="25" column="3" selection-start-line="25" selection-start-column="3" selection-end-line="25" selection-end-column="3" />
69
+ <folding />
70
+ </state>
71
+ </provider>
72
+ </entry>
73
+ </file>
74
+ <file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
75
+ <entry file="file://$PROJECT_DIR$/Gemfile">
76
+ <provider selected="true" editor-type-id="text-editor">
77
+ <state vertical-scroll-proportion="0.0">
78
+ <caret line="2" column="7" selection-start-line="2" selection-start-column="7" selection-end-line="2" selection-end-column="7" />
79
+ <folding />
80
+ </state>
81
+ </provider>
82
+ </entry>
83
+ </file>
84
+ <file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
85
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/version.rb">
86
+ <provider selected="true" editor-type-id="text-editor">
87
+ <state vertical-scroll-proportion="0.034013607">
88
+ <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
89
+ <folding />
90
+ </state>
91
+ </provider>
92
+ </entry>
93
+ </file>
94
+ <file leaf-file-name="ui.rb" pinned="false" current-in-tab="false">
95
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/ui.rb">
96
+ <provider selected="true" editor-type-id="text-editor">
97
+ <state vertical-scroll-proportion="0.0">
98
+ <caret line="2" column="12" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
99
+ <folding />
100
+ </state>
101
+ </provider>
102
+ </entry>
103
+ </file>
104
+ </leaf>
105
+ </component>
106
+ <component name="IdeDocumentHistory">
107
+ <option name="CHANGED_PATHS">
108
+ <list>
109
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/vimgolf_finder.rb" />
110
+ <option value="$PROJECT_DIR$/vimgolf_finder.rb" />
111
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/logger.rb" />
112
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/ui.rb" />
113
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/parser.rb" />
114
+ <option value="$PROJECT_DIR$/bin/file.txt" />
115
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/cli.rb" />
116
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/challenge.rb" />
117
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder.rb" />
118
+ <option value="$PROJECT_DIR$/Gemfile" />
119
+ <option value="$PROJECT_DIR$/bin/vimgolf-finder" />
120
+ <option value="$PROJECT_DIR$/vimgolf-finder.gemspec" />
121
+ <option value="$PROJECT_DIR$/lib/vimgolf_finder/version.rb" />
122
+ </list>
123
+ </option>
124
+ </component>
125
+ <component name="JsBuildToolGruntFileManager" detection-done="true" />
126
+ <component name="JsGulpfileManager">
127
+ <detection-done>true</detection-done>
128
+ </component>
129
+ <component name="NamedScopeManager">
130
+ <order />
131
+ </component>
132
+ <component name="ProjectFrameBounds">
133
+ <option name="y" value="23" />
134
+ <option name="width" value="1280" />
135
+ <option name="height" value="773" />
136
+ </component>
137
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
138
+ <OptionsSetting value="true" id="Add" />
139
+ <OptionsSetting value="true" id="Remove" />
140
+ <OptionsSetting value="true" id="Checkout" />
141
+ <OptionsSetting value="true" id="Update" />
142
+ <OptionsSetting value="true" id="Status" />
143
+ <OptionsSetting value="true" id="Edit" />
144
+ <ConfirmationsSetting value="0" id="Add" />
145
+ <ConfirmationsSetting value="0" id="Remove" />
146
+ </component>
147
+ <component name="ProjectView">
148
+ <navigator currentView="ProjectPane" proportions="" version="1">
149
+ <flattenPackages />
150
+ <showMembers />
151
+ <showModules />
152
+ <showLibraryContents />
153
+ <hideEmptyPackages />
154
+ <abbreviatePackageNames />
155
+ <autoscrollToSource />
156
+ <autoscrollFromSource />
157
+ <sortByType />
158
+ </navigator>
159
+ <panes>
160
+ <pane id="Scratches">
161
+ <subPane />
162
+ </pane>
163
+ <pane id="ProjectPane">
164
+ <subPane>
165
+ <PATH>
166
+ <PATH_ELEMENT>
167
+ <option name="myItemId" value="vimgolf-finder" />
168
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
169
+ </PATH_ELEMENT>
170
+ </PATH>
171
+ <PATH>
172
+ <PATH_ELEMENT>
173
+ <option name="myItemId" value="vimgolf-finder" />
174
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
175
+ </PATH_ELEMENT>
176
+ <PATH_ELEMENT>
177
+ <option name="myItemId" value="vimgolf-finder" />
178
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
179
+ </PATH_ELEMENT>
180
+ </PATH>
181
+ <PATH>
182
+ <PATH_ELEMENT>
183
+ <option name="myItemId" value="vimgolf-finder" />
184
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
185
+ </PATH_ELEMENT>
186
+ <PATH_ELEMENT>
187
+ <option name="myItemId" value="vimgolf-finder" />
188
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
189
+ </PATH_ELEMENT>
190
+ <PATH_ELEMENT>
191
+ <option name="myItemId" value="lib" />
192
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
193
+ </PATH_ELEMENT>
194
+ </PATH>
195
+ <PATH>
196
+ <PATH_ELEMENT>
197
+ <option name="myItemId" value="vimgolf-finder" />
198
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
199
+ </PATH_ELEMENT>
200
+ <PATH_ELEMENT>
201
+ <option name="myItemId" value="vimgolf-finder" />
202
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
203
+ </PATH_ELEMENT>
204
+ <PATH_ELEMENT>
205
+ <option name="myItemId" value="lib" />
206
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
207
+ </PATH_ELEMENT>
208
+ <PATH_ELEMENT>
209
+ <option name="myItemId" value="vimgolf_finder" />
210
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
211
+ </PATH_ELEMENT>
212
+ </PATH>
213
+ <PATH>
214
+ <PATH_ELEMENT>
215
+ <option name="myItemId" value="vimgolf-finder" />
216
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
217
+ </PATH_ELEMENT>
218
+ <PATH_ELEMENT>
219
+ <option name="myItemId" value="vimgolf-finder" />
220
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
221
+ </PATH_ELEMENT>
222
+ <PATH_ELEMENT>
223
+ <option name="myItemId" value="bin" />
224
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
225
+ </PATH_ELEMENT>
226
+ </PATH>
227
+ </subPane>
228
+ </pane>
229
+ <pane id="Scope" />
230
+ </panes>
231
+ </component>
232
+ <component name="PropertiesComponent">
233
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
234
+ <property name="WebServerToolWindowFactoryState" value="false" />
235
+ <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
236
+ <property name="settings.editor.splitter.proportion" value="0.2" />
237
+ </component>
238
+ <component name="RecentsManager">
239
+ <key name="MoveFile.RECENT_KEYS">
240
+ <recent name="$PROJECT_DIR$/lib/vimgolf_finder" />
241
+ <recent name="$PROJECT_DIR$/lib" />
242
+ </key>
243
+ </component>
244
+ <component name="RunManager">
245
+ <configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
246
+ <predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
247
+ <module name="" />
248
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
249
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
250
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
251
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
252
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
253
+ <envs />
254
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
255
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
256
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
257
+ <COVERAGE_PATTERN ENABLED="true">
258
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
259
+ </COVERAGE_PATTERN>
260
+ </EXTENSION>
261
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
262
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
263
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
264
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
265
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
266
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
267
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
268
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
269
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
270
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
271
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
272
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
273
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
274
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
275
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
276
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
277
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
278
+ <method />
279
+ </configuration>
280
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
281
+ <method />
282
+ </configuration>
283
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
284
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
285
+ <module name="" />
286
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
287
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
288
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
289
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
290
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
291
+ <envs />
292
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
293
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
294
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
295
+ <COVERAGE_PATTERN ENABLED="true">
296
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
297
+ </COVERAGE_PATTERN>
298
+ </EXTENSION>
299
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
300
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
301
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
302
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
303
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
304
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
305
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
306
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
307
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
308
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
309
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
310
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
311
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
312
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
313
+ <method />
314
+ </configuration>
315
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
316
+ <module name="" />
317
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
318
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
319
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
320
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
321
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
322
+ <envs />
323
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
324
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
325
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
326
+ <COVERAGE_PATTERN ENABLED="true">
327
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
328
+ </COVERAGE_PATTERN>
329
+ </EXTENSION>
330
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
331
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
332
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
333
+ <method />
334
+ </configuration>
335
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
336
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
337
+ <module name="" />
338
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
339
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
340
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
341
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
342
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
343
+ <envs />
344
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
345
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
346
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
347
+ <COVERAGE_PATTERN ENABLED="true">
348
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
349
+ </COVERAGE_PATTERN>
350
+ </EXTENSION>
351
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
352
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
353
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
354
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
355
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
356
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
357
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
358
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
359
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
360
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
361
+ <method />
362
+ </configuration>
363
+ <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
364
+ <method />
365
+ </configuration>
366
+ </component>
367
+ <component name="ShelveChangesManager" show_recycled="false" />
368
+ <component name="TaskManager">
369
+ <task active="true" id="Default" summary="Default task">
370
+ <changelist id="de3526f1-f8e9-4958-aa23-61f5e5965f57" name="Default" comment="" />
371
+ <created>1472629309860</created>
372
+ <option name="number" value="Default" />
373
+ <updated>1472629309860</updated>
374
+ </task>
375
+ <servers />
376
+ </component>
377
+ <component name="ToolWindowManager">
378
+ <frame x="0" y="23" width="1280" height="773" extended-state="6" />
379
+ <editor active="true" />
380
+ <layout>
381
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.35753426" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
382
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
383
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.329927" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
384
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
385
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
386
+ <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
387
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26796874" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
388
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
389
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
390
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
391
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
392
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
393
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
394
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
395
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
396
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
397
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="combo" />
398
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
399
+ </layout>
400
+ </component>
401
+ <component name="VcsContentAnnotationSettings">
402
+ <option name="myLimit" value="2678400000" />
403
+ </component>
404
+ <component name="XDebuggerManager">
405
+ <breakpoint-manager />
406
+ <watches-manager />
407
+ </component>
408
+ <component name="editorHistoryManager">
409
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/parser.rb">
410
+ <provider selected="true" editor-type-id="text-editor">
411
+ <state vertical-scroll-proportion="0.0">
412
+ <caret line="16" column="9" selection-start-line="16" selection-start-column="9" selection-end-line="16" selection-end-column="9" />
413
+ <folding />
414
+ </state>
415
+ </provider>
416
+ </entry>
417
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/cli.rb">
418
+ <provider selected="true" editor-type-id="text-editor">
419
+ <state vertical-scroll-proportion="0.0">
420
+ <caret line="79" column="11" selection-start-line="79" selection-start-column="11" selection-end-line="79" selection-end-column="11" />
421
+ <folding />
422
+ </state>
423
+ </provider>
424
+ </entry>
425
+ <entry file="file://$PROJECT_DIR$/bin/vimgolf-finder">
426
+ <provider selected="true" editor-type-id="text-editor">
427
+ <state vertical-scroll-proportion="0.5072464">
428
+ <caret line="14" column="3" selection-start-line="14" selection-start-column="3" selection-end-line="14" selection-end-column="3" />
429
+ <folding />
430
+ </state>
431
+ </provider>
432
+ </entry>
433
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/challenge.rb">
434
+ <provider selected="true" editor-type-id="text-editor">
435
+ <state vertical-scroll-proportion="0.0">
436
+ <caret line="52" column="0" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
437
+ <folding />
438
+ </state>
439
+ </provider>
440
+ </entry>
441
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder.rb">
442
+ <provider selected="true" editor-type-id="text-editor">
443
+ <state vertical-scroll-proportion="0.0">
444
+ <caret line="4" column="8" selection-start-line="4" selection-start-column="8" selection-end-line="4" selection-end-column="8" />
445
+ <folding />
446
+ </state>
447
+ </provider>
448
+ </entry>
449
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/ui.rb">
450
+ <provider selected="true" editor-type-id="text-editor">
451
+ <state vertical-scroll-proportion="0.0">
452
+ <caret line="2" column="12" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
453
+ <folding />
454
+ </state>
455
+ </provider>
456
+ </entry>
457
+ <entry file="file://$PROJECT_DIR$/vimgolf-finder.gemspec">
458
+ <provider selected="true" editor-type-id="text-editor">
459
+ <state vertical-scroll-proportion="0.0">
460
+ <caret line="25" column="3" selection-start-line="25" selection-start-column="3" selection-end-line="25" selection-end-column="3" />
461
+ <folding />
462
+ </state>
463
+ </provider>
464
+ </entry>
465
+ <entry file="file://$PROJECT_DIR$/Gemfile">
466
+ <provider selected="true" editor-type-id="text-editor">
467
+ <state vertical-scroll-proportion="0.0">
468
+ <caret line="2" column="7" selection-start-line="2" selection-start-column="7" selection-end-line="2" selection-end-column="7" />
469
+ <folding />
470
+ </state>
471
+ </provider>
472
+ </entry>
473
+ <entry file="file://$PROJECT_DIR$/lib/vimgolf_finder/version.rb">
474
+ <provider selected="true" editor-type-id="text-editor">
475
+ <state vertical-scroll-proportion="0.034013607">
476
+ <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
477
+ <folding />
478
+ </state>
479
+ </provider>
480
+ </entry>
481
+ </component>
482
+ </project>
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Lee Sun-Hyoup
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # vimgolf-finder
2
+ Simple VimGolf challenge finder.
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
4
+ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
5
+
6
+ require 'vimgolf_finder'
7
+
8
+ begin
9
+ VimGolfFinder::CLI.start(ARGV)
10
+ rescue Interrupt => e
11
+ puts
12
+ VimGolfFinder.ui.error(e)
13
+ VimGolf.ui.say("Quitting...")
14
+ exit(1)
15
+ end
@@ -0,0 +1,8 @@
1
+ require 'nokogiri'
2
+ require 'open-uri'
3
+ require 'thor'
4
+
5
+ require 'vimgolf_finder/challenge'
6
+ require 'vimgolf_finder/parser'
7
+ require 'vimgolf_finder/ui'
8
+ require 'vimgolf_finder/cli'
@@ -0,0 +1,57 @@
1
+ module VimGolfFinder
2
+ class Challenge
3
+ attr_accessor :id, :title, :entries
4
+ attr_accessor :description
5
+ attr_accessor :start_file, :end_file, :view_diff
6
+
7
+ def print(index)
8
+ if self.solved?
9
+ VimGolfFinder.ui.log "#{index}. \e[37m#{self.title}\e[0m - #{self.entries} entries (\e[33m#{self.id}\e[0m) [\u2713]"
10
+ else
11
+ VimGolfFinder.ui.log "#{index}. \e[37m#{self.title}\e[0m - #{self.entries} entries (\e[33m#{self.id}\e[0m)"
12
+ end
13
+
14
+ end
15
+
16
+ def print_detail
17
+ VimGolfFinder.ui.say "#{self.title}", :white
18
+ self.description.scan(/.{1,70}/).each do |string|
19
+ VimGolfFinder.ui.log "#{string}\n"
20
+ end
21
+
22
+ VimGolfFinder.ui.log '-' * 50
23
+ VimGolfFinder.ui.info 'Start File'
24
+ VimGolfFinder.ui.log "#{self.start_file}"
25
+ VimGolfFinder.ui.log '-' * 50
26
+ VimGolfFinder.ui.info 'End File'
27
+ VimGolfFinder.ui.log "#{self.end_file}"
28
+ VimGolfFinder.ui.log '-' * 50
29
+ end
30
+
31
+ def solved?
32
+ path = "#{Dir.home}/.vimgolf_solves"
33
+ unless File.exist?(path)
34
+ file = File.new(path, File::CREAT|File::TRUNC|File::RDWR, 0644)
35
+ else
36
+ file = File.new(path)
37
+ end
38
+
39
+ file.readlines.each do |line|
40
+ if line.eql?(self.id)
41
+ return true
42
+ end
43
+ end
44
+
45
+ return false
46
+ end
47
+
48
+ def self.solve(id)
49
+ path = "#{Dir.home}/.vimgolf_solves"
50
+ unless File.exist?(path)
51
+ File.new(path, File::CREAT|File::TRUNC|File::RDWR, 0644)
52
+ end
53
+
54
+ File.open(path, 'a') { |file| file.write(id) }
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,103 @@
1
+ module VimGolfFinder
2
+ class << self
3
+ attr_accessor :ui
4
+ attr_accessor :parser
5
+
6
+ def ui
7
+ @ui ||= VimGolfFinder::CLI::UI.new
8
+ end
9
+
10
+ def parser
11
+ @parser ||= VimGolfFinder::Parser.new
12
+ end
13
+ end
14
+
15
+ class CLI < Thor
16
+ include Thor::Actions
17
+
18
+ def self.start(*)
19
+ Thor::Base.shell = VimGolfFinder::CLI::UI
20
+ super
21
+ end
22
+
23
+ desc 'list', 'Show VimGolf challenges'
24
+ long_desc <<-LONGDESC
25
+ Show VimGolf challenges from 'http://vimgolf.com/'.
26
+ LONGDESC
27
+ option :order, :default => 'entries', :aliases => :o, :type => :string
28
+ option :desc, :default => true, :aliases => :d, :type => :boolean
29
+ option :limit, :default => 10, :aliases => :l
30
+ option :page, :default => 1, :aliases => :p
31
+ def list
32
+ order = options[:order]
33
+ desc = options[:desc]
34
+ limit = options[:limit].to_i
35
+ page = options[:page].to_i
36
+
37
+ challenges = VimGolfFinder.parser.fetch_challenges
38
+
39
+ case order
40
+ when 'title'
41
+ challenges.sort! { |a, b| b.title <=> a.title } if desc
42
+ challenges.sort! { |a, b| a.title <=> b.title } if !desc
43
+ when 'entries'
44
+ challenges.sort! { |a, b| b.entries <=> a.entries } if desc
45
+ challenges.sort! { |a, b| a.entries <=> b.entries } if !desc
46
+ when 'id'
47
+ challenges.sort! { |a, b| b.id <=> a.id } if desc
48
+ challenges.sort! { |a, b| a.id <=> b.id } if !desc
49
+ end
50
+ challenges = challenges[(limit * (page-1))...(limit * page)]
51
+ challenges.each_with_index do |challenge, index|
52
+ challenge.print(index)
53
+ end
54
+
55
+ number = VimGolfFinder.ui.ask 'Choose challenge number.'
56
+ number = number.to_i
57
+ if number.instance_of? Fixnum
58
+ if number < 1 or number > limit
59
+ VimGolfFinder.ui.error 'Invalid number'
60
+ return
61
+ end
62
+
63
+ id = challenges[number-1].id
64
+ print_challenge(id)
65
+ play(id)
66
+ end
67
+ end
68
+
69
+ desc 'random', 'Pick one at random from VimGolf challenges'
70
+ def random
71
+ challenges = VimGolfFinder.parser.fetch_challenges
72
+ challenge = challenges.shuffle.first
73
+ challenge.print(challenge.id)
74
+
75
+ id = challenge.id
76
+ print_challenge(id)
77
+ play(id)
78
+ end
79
+
80
+ private
81
+ def print_challenge(id)
82
+ VimGolfFinder.ui.log ''
83
+ VimGolfFinder.ui.warn 'Waiting...'
84
+ challenge = VimGolfFinder.parser.get_challenge(id)
85
+ challenge.print_detail
86
+ end
87
+
88
+ def play(id)
89
+ result = VimGolfFinder.ui.ask 'Do you want to play? (y/n)'
90
+
91
+ if result.eql?('y')
92
+ system("vimgolf put #{id}")
93
+
94
+ solves = VimGolfFinder.ui.ask 'Solves? (y/n)'
95
+
96
+ if solves
97
+ VimGolfFinder::Challenge.solve(id)
98
+ VimGolfFinder.ui.info "[\u2713] Checked!"
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,39 @@
1
+ module VimGolfFinder
2
+ class Parser
3
+ BASE_URL = 'http://vimgolf.com'
4
+
5
+ def fetch_challenges
6
+ challenges = []
7
+
8
+ doc = Nokogiri::HTML(open(BASE_URL))
9
+ doc.css('.grid_7 > div').each do |div|
10
+ challengeDOM = div.at_css('h5.challenge')
11
+ aTAG = challengeDOM.at_css('a')
12
+ challenge = VimGolfFinder::Challenge.new
13
+ challenge.id = aTAG['href'][12..-1]
14
+ challenge.title = aTAG.content
15
+ challenge.entries = challengeDOM.content.match(/- (\d*) entries/).captures.first.to_i
16
+ challenges << challenge
17
+ end
18
+
19
+ challenges
20
+ end
21
+
22
+ def get_challenge(id)
23
+ challenge = VimGolfFinder::Challenge.new
24
+
25
+ doc = Nokogiri::HTML(open("#{BASE_URL}/challenges/#{id}", 'Accept' => 'text/html'))
26
+
27
+ doc.css('.grid_7:not(#about)').each do |dom|
28
+ challenge.id = id
29
+ challenge.title = dom.at_css('h3 b').content
30
+ challenge.description = dom.at_css('p').content
31
+ challenge.start_file = dom.at_css('.prettyprint').content
32
+ challenge.end_file = dom.css('.prettyprint')[1].content
33
+ challenge.view_diff = dom.at_css('pre.diff').content
34
+ end
35
+
36
+ challenge
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,29 @@
1
+ module VimGolfFinder
2
+ class CLI < Thor
3
+ class UI < Thor::Base.shell
4
+ def initialize
5
+ super
6
+ end
7
+
8
+ def error(message)
9
+ say message, :red
10
+ end
11
+
12
+ def info(message)
13
+ say message, :green
14
+ end
15
+
16
+ def warn(message)
17
+ say message, :yellow
18
+ end
19
+
20
+ def log(message)
21
+ say message
22
+ end
23
+
24
+ def debug(message)
25
+ say message, :cyan
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,3 @@
1
+ module VimGolfFinder
2
+ VERSION = '0.1.1'
3
+ end
@@ -0,0 +1,26 @@
1
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
+ require 'vimgolf_finder/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'vimgolf-finder'
6
+ s.version = VimGolfFinder::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ['Lee Sun-Hyoup']
9
+ s.email = ['kciter@naver.com']
10
+
11
+ s.homepage = 'https://github.com/kciter/vimgolf-finder'
12
+ s.licenses = ['MIT']
13
+ s.summary = %q{VimGolf challenge finder.}
14
+ s.description = %q{Simple VimGolf challenge finder.}
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency 'nokogiri', '~> 1.6'
21
+ s.add_dependency 'thor', '~> 0.19.1'
22
+
23
+ s.add_development_dependency 'bundler', '~> 0'
24
+ s.add_development_dependency 'rake', '~> 0'
25
+ s.add_development_dependency 'rspec', '~> 0'
26
+ end
metadata ADDED
@@ -0,0 +1,133 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vimgolf-finder
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Lee Sun-Hyoup
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.19.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.19.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Simple VimGolf challenge finder.
84
+ email:
85
+ - kciter@naver.com
86
+ executables:
87
+ - vimgolf-finder
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".gitignore"
92
+ - ".idea/.name"
93
+ - ".idea/misc.xml"
94
+ - ".idea/modules.xml"
95
+ - ".idea/vcs.xml"
96
+ - ".idea/vimgolf-finder.iml"
97
+ - ".idea/workspace.xml"
98
+ - Gemfile
99
+ - LICENSE
100
+ - README.md
101
+ - bin/vimgolf-finder
102
+ - lib/vimgolf_finder.rb
103
+ - lib/vimgolf_finder/challenge.rb
104
+ - lib/vimgolf_finder/cli.rb
105
+ - lib/vimgolf_finder/parser.rb
106
+ - lib/vimgolf_finder/ui.rb
107
+ - lib/vimgolf_finder/version.rb
108
+ - vimgolf-finder.gemspec
109
+ homepage: https://github.com/kciter/vimgolf-finder
110
+ licenses:
111
+ - MIT
112
+ metadata: {}
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubyforge_project:
129
+ rubygems_version: 2.5.2
130
+ signing_key:
131
+ specification_version: 4
132
+ summary: VimGolf challenge finder.
133
+ test_files: []