file_utils 1.0.0 → 1.0.1
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.
- data/.idea/workspace.xml +334 -13
- data/lib/file_utils/directory_scanner.rb +14 -4
- data/lib/file_utils/version.rb +1 -1
- data/spec/directory_scanner_spec.rb +7 -7
- metadata +2 -2
data/.idea/workspace.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="5aea4d68-4507-4177-a112-c280e0c8edfa" name="Default" comment="">
|
5
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR
|
5
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/file_utils/version.rb" afterPath="$PROJECT_DIR$/lib/file_utils/version.rb" />
|
6
6
|
</list>
|
7
7
|
<ignored path="file_utils.iws" />
|
8
8
|
<ignored path=".idea/workspace.xml" />
|
@@ -33,10 +33,46 @@
|
|
33
33
|
</provider>
|
34
34
|
</entry>
|
35
35
|
</file>
|
36
|
-
<file leaf-file-name="Rakefile" pinned="false" current="
|
36
|
+
<file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
|
37
37
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
38
38
|
<provider selected="true" editor-type-id="text-editor">
|
39
|
-
<state line="
|
39
|
+
<state line="11" column="38" selection-start="206" selection-end="206" vertical-scroll-proportion="0.0">
|
40
|
+
<folding />
|
41
|
+
</state>
|
42
|
+
</provider>
|
43
|
+
</entry>
|
44
|
+
</file>
|
45
|
+
<file leaf-file-name="directory_scanner_spec.rb" pinned="false" current="false" current-in-tab="false">
|
46
|
+
<entry file="file://$PROJECT_DIR$/spec/directory_scanner_spec.rb">
|
47
|
+
<provider selected="true" editor-type-id="text-editor">
|
48
|
+
<state line="23" column="49" selection-start="551" selection-end="551" vertical-scroll-proportion="0.0">
|
49
|
+
<folding />
|
50
|
+
</state>
|
51
|
+
</provider>
|
52
|
+
</entry>
|
53
|
+
</file>
|
54
|
+
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
55
|
+
<entry file="file://$PROJECT_DIR$/lib/file_utils/version.rb">
|
56
|
+
<provider selected="true" editor-type-id="text-editor">
|
57
|
+
<state line="1" column="18" selection-start="35" selection-end="35" vertical-scroll-proportion="0.02909091">
|
58
|
+
<folding />
|
59
|
+
</state>
|
60
|
+
</provider>
|
61
|
+
</entry>
|
62
|
+
</file>
|
63
|
+
<file leaf-file-name="subject.rb" pinned="false" current="false" current-in-tab="false">
|
64
|
+
<entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p194@file_utils/gems/rspec-core-2.9.0/lib/rspec/core/subject.rb">
|
65
|
+
<provider selected="true" editor-type-id="text-editor">
|
66
|
+
<state line="33" column="0" selection-start="1141" selection-end="1141" vertical-scroll-proportion="0.0">
|
67
|
+
<folding />
|
68
|
+
</state>
|
69
|
+
</provider>
|
70
|
+
</entry>
|
71
|
+
</file>
|
72
|
+
<file leaf-file-name="directory_scanner.rb" pinned="false" current="false" current-in-tab="false">
|
73
|
+
<entry file="file://$PROJECT_DIR$/lib/file_utils/directory_scanner.rb">
|
74
|
+
<provider selected="true" editor-type-id="text-editor">
|
75
|
+
<state line="4" column="0" selection-start="65" selection-end="65" vertical-scroll-proportion="0.0">
|
40
76
|
<folding />
|
41
77
|
</state>
|
42
78
|
</provider>
|
@@ -44,6 +80,11 @@
|
|
44
80
|
</file>
|
45
81
|
</leaf>
|
46
82
|
</component>
|
83
|
+
<component name="FindManager">
|
84
|
+
<FindUsagesManager>
|
85
|
+
<setting name="OPEN_NEW_TAB" value="false" />
|
86
|
+
</FindUsagesManager>
|
87
|
+
</component>
|
47
88
|
<component name="Git.Settings">
|
48
89
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
49
90
|
</component>
|
@@ -52,12 +93,15 @@
|
|
52
93
|
<list>
|
53
94
|
<option value="$PROJECT_DIR$/.rvmrc" />
|
54
95
|
<option value="$PROJECT_DIR$/Rakefile" />
|
96
|
+
<option value="$PROJECT_DIR$/lib/file_utils/directory_scanner.rb" />
|
97
|
+
<option value="$PROJECT_DIR$/spec/directory_scanner_spec.rb" />
|
98
|
+
<option value="$PROJECT_DIR$/lib/file_utils/version.rb" />
|
55
99
|
</list>
|
56
100
|
</option>
|
57
101
|
</component>
|
58
102
|
<component name="ProjectFrameBounds">
|
59
|
-
<option name="x" value="
|
60
|
-
<option name="y" value="
|
103
|
+
<option name="x" value="240" />
|
104
|
+
<option name="y" value="142" />
|
61
105
|
<option name="width" value="1588" />
|
62
106
|
<option name="height" value="1058" />
|
63
107
|
</component>
|
@@ -105,6 +149,20 @@
|
|
105
149
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
106
150
|
</PATH_ELEMENT>
|
107
151
|
</PATH>
|
152
|
+
<PATH>
|
153
|
+
<PATH_ELEMENT>
|
154
|
+
<option name="myItemId" value="file_utils" />
|
155
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
156
|
+
</PATH_ELEMENT>
|
157
|
+
<PATH_ELEMENT>
|
158
|
+
<option name="myItemId" value="file_utils" />
|
159
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
160
|
+
</PATH_ELEMENT>
|
161
|
+
<PATH_ELEMENT>
|
162
|
+
<option name="myItemId" value="spec" />
|
163
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
164
|
+
</PATH_ELEMENT>
|
165
|
+
</PATH>
|
108
166
|
<PATH>
|
109
167
|
<PATH_ELEMENT>
|
110
168
|
<option name="myItemId" value="file_utils" />
|
@@ -128,15 +186,189 @@
|
|
128
186
|
<pane id="Scope" />
|
129
187
|
</panes>
|
130
188
|
</component>
|
131
|
-
<component name="
|
132
|
-
<
|
189
|
+
<component name="PropertiesComponent">
|
190
|
+
<property name="recentsLimit" value="5" />
|
191
|
+
</component>
|
192
|
+
<component name="RunManager" selected="RSpec.directory_scanner_spec">
|
193
|
+
<configuration default="false" name="DirectoryScanner" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
194
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
195
|
+
<module name="file_utils" />
|
196
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
197
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
|
198
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
199
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
200
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
201
|
+
<envs>
|
202
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
203
|
+
</envs>
|
204
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
205
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
206
|
+
<COVERAGE_PATTERN ENABLED="true">
|
207
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
208
|
+
</COVERAGE_PATTERN>
|
209
|
+
</EXTENSION>
|
210
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
211
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_scanner_spec.rb" />
|
212
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
213
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
214
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryScanner" />
|
215
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
216
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
217
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
218
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
219
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
220
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
221
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
222
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
223
|
+
<method />
|
224
|
+
</configuration>
|
225
|
+
<configuration default="false" name="DirectoryScanner should return files in particular dir" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
226
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
227
|
+
<module name="file_utils" />
|
228
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
229
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
|
230
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
231
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
232
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
233
|
+
<envs>
|
234
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
235
|
+
</envs>
|
236
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
237
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
238
|
+
<COVERAGE_PATTERN ENABLED="true">
|
239
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
240
|
+
</COVERAGE_PATTERN>
|
241
|
+
</EXTENSION>
|
242
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
243
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_scanner_spec.rb" />
|
244
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
245
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
246
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryScanner should return files in particular dir" />
|
247
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
248
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
249
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
250
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
251
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
252
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
253
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
254
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
255
|
+
<method />
|
256
|
+
</configuration>
|
257
|
+
<configuration default="false" name="DirectoryScanner should apply 'includes' filter" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
258
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
259
|
+
<module name="file_utils" />
|
260
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
261
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
|
262
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
263
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
264
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
265
|
+
<envs>
|
266
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
267
|
+
</envs>
|
268
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
269
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
270
|
+
<COVERAGE_PATTERN ENABLED="true">
|
271
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
272
|
+
</COVERAGE_PATTERN>
|
273
|
+
</EXTENSION>
|
274
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
275
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_scanner_spec.rb" />
|
276
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
277
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
278
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryScanner should apply 'includes' filter" />
|
279
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
280
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
281
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
282
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
283
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
284
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
285
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
286
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
287
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
288
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
289
|
+
<method />
|
290
|
+
</configuration>
|
291
|
+
<configuration default="false" name="directory_scanner_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
292
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
293
|
+
<module name="file_utils" />
|
294
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
295
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
|
296
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
297
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
298
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
299
|
+
<envs>
|
300
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
301
|
+
</envs>
|
302
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
303
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
304
|
+
<COVERAGE_PATTERN ENABLED="true">
|
305
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
306
|
+
</COVERAGE_PATTERN>
|
307
|
+
</EXTENSION>
|
308
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
309
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_scanner_spec.rb" />
|
310
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
311
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
312
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
313
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
314
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
315
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
316
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
317
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
318
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
319
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
320
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
321
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
322
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
323
|
+
<method />
|
324
|
+
</configuration>
|
325
|
+
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
326
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
327
|
+
<module name="" />
|
328
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
329
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
330
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
331
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
332
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
333
|
+
<envs />
|
334
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
335
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
336
|
+
<COVERAGE_PATTERN ENABLED="true">
|
337
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
338
|
+
</COVERAGE_PATTERN>
|
339
|
+
</EXTENSION>
|
340
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
341
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
342
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
343
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
344
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
345
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
346
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
347
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
348
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
349
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
350
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
351
|
+
<method />
|
352
|
+
</configuration>
|
353
|
+
<list size="4">
|
354
|
+
<item index="0" class="java.lang.String" itemvalue="RSpec.DirectoryScanner" />
|
355
|
+
<item index="1" class="java.lang.String" itemvalue="RSpec.DirectoryScanner should return files in particular dir" />
|
356
|
+
<item index="2" class="java.lang.String" itemvalue="RSpec.DirectoryScanner should apply 'includes' filter" />
|
357
|
+
<item index="3" class="java.lang.String" itemvalue="RSpec.directory_scanner_spec" />
|
358
|
+
</list>
|
133
359
|
<recent_temporary>
|
134
|
-
<list size="
|
360
|
+
<list size="5">
|
361
|
+
<item index="0" class="java.lang.String" itemvalue="RSpec.directory_scanner_spec" />
|
362
|
+
<item index="1" class="java.lang.String" itemvalue="RSpec.DirectoryScanner should apply 'includes' filter" />
|
363
|
+
<item index="2" class="java.lang.String" itemvalue="RSpec.DirectoryScanner should return files in particular dir" />
|
364
|
+
<item index="3" class="java.lang.String" itemvalue="RSpec.DirectoryScanner" />
|
365
|
+
<item index="4" class="java.lang.String" itemvalue="RSpec.directory_scanner_spec" />
|
366
|
+
</list>
|
135
367
|
</recent_temporary>
|
136
368
|
</component>
|
137
369
|
<component name="ShelveChangesManager" show_recycled="false" />
|
138
370
|
<component name="ToolWindowManager">
|
139
|
-
<frame x="
|
371
|
+
<frame x="240" y="142" width="1588" height="1058" extended-state="0" />
|
140
372
|
<editor active="true" />
|
141
373
|
<layout>
|
142
374
|
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
@@ -144,11 +376,11 @@
|
|
144
376
|
<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" />
|
145
377
|
<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="true" content_ui="tabs" />
|
146
378
|
<window_info id="jenkinsBrowser" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
147
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.
|
148
|
-
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="
|
379
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.60041624" order="0" side_tool="false" content_ui="combo" />
|
380
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.39958376" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
149
381
|
<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" />
|
150
382
|
<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="7" side_tool="true" content_ui="tabs" />
|
151
|
-
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.
|
383
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
152
384
|
<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="7" side_tool="false" content_ui="tabs" />
|
153
385
|
<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="4" side_tool="false" content_ui="tabs" />
|
154
386
|
<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="0" side_tool="false" content_ui="tabs" />
|
@@ -223,6 +455,27 @@
|
|
223
455
|
</state>
|
224
456
|
</provider>
|
225
457
|
</entry>
|
458
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
459
|
+
<provider selected="true" editor-type-id="text-editor">
|
460
|
+
<state line="11" column="38" selection-start="206" selection-end="206" vertical-scroll-proportion="0.0">
|
461
|
+
<folding />
|
462
|
+
</state>
|
463
|
+
</provider>
|
464
|
+
</entry>
|
465
|
+
<entry file="file://$PROJECT_DIR$/spec/directory_scanner_spec.rb">
|
466
|
+
<provider selected="true" editor-type-id="text-editor">
|
467
|
+
<state line="13" column="49" selection-start="315" selection-end="315" vertical-scroll-proportion="0.0">
|
468
|
+
<folding />
|
469
|
+
</state>
|
470
|
+
</provider>
|
471
|
+
</entry>
|
472
|
+
<entry file="file://$PROJECT_DIR$/lib/file_utils/directory_scanner.rb">
|
473
|
+
<provider selected="true" editor-type-id="text-editor">
|
474
|
+
<state line="1" column="24" selection-start="47" selection-end="47" vertical-scroll-proportion="0.0">
|
475
|
+
<folding />
|
476
|
+
</state>
|
477
|
+
</provider>
|
478
|
+
</entry>
|
226
479
|
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
227
480
|
<provider selected="true" editor-type-id="text-editor">
|
228
481
|
<state line="3" column="27" selection-start="81" selection-end="81" vertical-scroll-proportion="0.0">
|
@@ -232,7 +485,75 @@
|
|
232
485
|
</entry>
|
233
486
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
234
487
|
<provider selected="true" editor-type-id="text-editor">
|
235
|
-
<state line="
|
488
|
+
<state line="11" column="38" selection-start="206" selection-end="206" vertical-scroll-proportion="0.0">
|
489
|
+
<folding />
|
490
|
+
</state>
|
491
|
+
</provider>
|
492
|
+
</entry>
|
493
|
+
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
494
|
+
<provider selected="true" editor-type-id="text-editor">
|
495
|
+
<state line="3" column="27" selection-start="81" selection-end="81" vertical-scroll-proportion="0.0">
|
496
|
+
<folding />
|
497
|
+
</state>
|
498
|
+
</provider>
|
499
|
+
</entry>
|
500
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
501
|
+
<provider selected="true" editor-type-id="text-editor">
|
502
|
+
<state line="29" column="6" selection-start="489" selection-end="489" vertical-scroll-proportion="0.0">
|
503
|
+
<folding />
|
504
|
+
</state>
|
505
|
+
</provider>
|
506
|
+
</entry>
|
507
|
+
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
508
|
+
<provider selected="true" editor-type-id="text-editor">
|
509
|
+
<state line="3" column="27" selection-start="81" selection-end="81" vertical-scroll-proportion="0.0">
|
510
|
+
<folding />
|
511
|
+
</state>
|
512
|
+
</provider>
|
513
|
+
</entry>
|
514
|
+
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
515
|
+
<provider selected="true" editor-type-id="text-editor">
|
516
|
+
<state line="3" column="27" selection-start="81" selection-end="81" vertical-scroll-proportion="0.0">
|
517
|
+
<folding />
|
518
|
+
</state>
|
519
|
+
</provider>
|
520
|
+
</entry>
|
521
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
522
|
+
<provider selected="true" editor-type-id="text-editor">
|
523
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
524
|
+
</provider>
|
525
|
+
</entry>
|
526
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
527
|
+
<provider selected="true" editor-type-id="text-editor">
|
528
|
+
<state line="11" column="38" selection-start="206" selection-end="206" vertical-scroll-proportion="0.0">
|
529
|
+
<folding />
|
530
|
+
</state>
|
531
|
+
</provider>
|
532
|
+
</entry>
|
533
|
+
<entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p194@file_utils/gems/rspec-core-2.9.0/lib/rspec/core/subject.rb">
|
534
|
+
<provider selected="true" editor-type-id="text-editor">
|
535
|
+
<state line="33" column="0" selection-start="1141" selection-end="1141" vertical-scroll-proportion="0.0">
|
536
|
+
<folding />
|
537
|
+
</state>
|
538
|
+
</provider>
|
539
|
+
</entry>
|
540
|
+
<entry file="file://$PROJECT_DIR$/lib/file_utils/directory_scanner.rb">
|
541
|
+
<provider selected="true" editor-type-id="text-editor">
|
542
|
+
<state line="4" column="0" selection-start="65" selection-end="65" vertical-scroll-proportion="0.0">
|
543
|
+
<folding />
|
544
|
+
</state>
|
545
|
+
</provider>
|
546
|
+
</entry>
|
547
|
+
<entry file="file://$PROJECT_DIR$/spec/directory_scanner_spec.rb">
|
548
|
+
<provider selected="true" editor-type-id="text-editor">
|
549
|
+
<state line="23" column="49" selection-start="551" selection-end="551" vertical-scroll-proportion="0.0">
|
550
|
+
<folding />
|
551
|
+
</state>
|
552
|
+
</provider>
|
553
|
+
</entry>
|
554
|
+
<entry file="file://$PROJECT_DIR$/lib/file_utils/version.rb">
|
555
|
+
<provider selected="true" editor-type-id="text-editor">
|
556
|
+
<state line="1" column="18" selection-start="35" selection-end="35" vertical-scroll-proportion="0.02909091">
|
236
557
|
<folding />
|
237
558
|
</state>
|
238
559
|
</provider>
|
@@ -1,26 +1,32 @@
|
|
1
1
|
class DirectoryScanner
|
2
|
-
def scan dir,
|
2
|
+
def scan dir, params={}
|
3
3
|
files = []
|
4
4
|
|
5
|
-
scan_with_files dir,
|
5
|
+
scan_with_files dir, tokenize(params[:includes]), tokenize(params[:excludes]), files
|
6
6
|
|
7
7
|
normalize(files, dir)
|
8
8
|
end
|
9
9
|
|
10
10
|
private
|
11
11
|
|
12
|
+
def tokenize s
|
13
|
+
return [] if s.nil?
|
14
|
+
|
15
|
+
s.split(/\s+|,/).reject {|t| t.length == 0}
|
16
|
+
end
|
17
|
+
|
12
18
|
def scan_with_files dir, includes, excludes, files
|
13
19
|
Dir.new(dir).each do |file_name|
|
14
20
|
if file_name != '.' and file_name != '..'
|
15
21
|
full_name = dir + '/' + file_name
|
16
22
|
|
17
23
|
if File.directory? full_name
|
18
|
-
if check_name(
|
24
|
+
if check_name(file_name, includes, excludes)
|
19
25
|
files << full_name
|
20
26
|
scan_with_files(full_name, includes, excludes, files)
|
21
27
|
end
|
22
28
|
else # file
|
23
|
-
if check_name(
|
29
|
+
if check_name(file_name, includes, excludes)
|
24
30
|
files << full_name
|
25
31
|
end
|
26
32
|
end
|
@@ -54,4 +60,8 @@ class DirectoryScanner
|
|
54
60
|
false
|
55
61
|
end
|
56
62
|
|
63
|
+
def blank? s
|
64
|
+
s.nil? or s.strip.length == 0
|
65
|
+
end
|
66
|
+
|
57
67
|
end
|
data/lib/file_utils/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
|
-
require 'directory_scanner'
|
3
|
+
require 'file_utils/directory_scanner'
|
4
4
|
|
5
5
|
class FileUtilsTest
|
6
6
|
include FileUtils
|
@@ -9,21 +9,21 @@ end
|
|
9
9
|
describe DirectoryScanner do
|
10
10
|
|
11
11
|
it "should return files in particular dir" do
|
12
|
-
result = subject.scan "
|
12
|
+
result = subject.scan "../lib"
|
13
13
|
|
14
|
-
result.should include "
|
14
|
+
result.should include "file_utils/version.rb"
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should apply 'includes' filter" do
|
18
|
-
result = subject.scan "
|
18
|
+
result = subject.scan "..", :includes => ".md"
|
19
19
|
|
20
|
-
result.should include "
|
20
|
+
result.should include "README.md"
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should apply 'excludes' filter" do
|
24
|
-
result = subject.scan "
|
24
|
+
result = subject.scan "..", :excludes => ".md"
|
25
25
|
|
26
|
-
result.should_not include "
|
26
|
+
result.should_not include "README.md"
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Collection of methods to work with files and directories
|
15
15
|
email: alexander.shvets@gmail.com
|