s3_tree 0.0.1 → 0.0.2
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 +4 -4
- data/.idea/.rakeTasks +7 -0
- data/.idea/misc.xml +14 -0
- data/.idea/modules.xml +8 -0
- data/.idea/s3_tree.iml +14 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +548 -0
- data/lib/s3_tree/directory.rb +60 -0
- data/lib/s3_tree/file.rb +44 -0
- data/lib/s3_tree/version.rb +1 -1
- data/s3_tree-0.0.1.gem +0 -0
- metadata +10 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb72a5c34a54d979f215647e714eaa17f14d8fc8
|
4
|
+
data.tar.gz: 15960ef0ee89ba79e8786cecb9d83de1cc7d3167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3e039daeddfb072f97a491a688b46e3ce8d27b3e98c7ca0268360846c773856b03bbd4f39fa44f6a360e7f097f1144bc9967719d86507dfee6fdf65fece97d
|
7
|
+
data.tar.gz: 39e6b7dcc7e6ddbc39a2d5a8ed3270ec8e135156d9e32c27fd48d01bcd739cbf0b6ceb4ca7d67e1382dfb0645a1b73b5e16f0e0a8c1332e3d89beeae6a512262
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build s3_tree-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install s3_tree-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.1.0 and build and push s3_tree-0.1.0.gem to Rubygems" fullCmd="release" taksId="release" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /></RakeGroup></Settings>
|
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="RVM: ruby-1.9.3-p551 [G8way]" project-jdk-type="RUBY_SDK" />
|
14
|
+
</project>
|
data/.idea/modules.xml
ADDED
data/.idea/s3_tree.iml
ADDED
@@ -0,0 +1,14 @@
|
|
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="inheritedJdk" />
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
+
<orderEntry type="library" scope="PROVIDED" name="aws-sdk (v2.8.7, RVM: ruby-1.9.3-p551 [G8way]) [gem]" level="application" />
|
8
|
+
<orderEntry type="library" scope="PROVIDED" name="aws-sdk-core (v2.8.7, RVM: ruby-1.9.3-p551 [G8way]) [gem]" level="application" />
|
9
|
+
<orderEntry type="library" scope="PROVIDED" name="aws-sdk-resources (v2.8.7, RVM: ruby-1.9.3-p551 [G8way]) [gem]" level="application" />
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="aws-sigv4 (v1.0.0, RVM: ruby-1.9.3-p551 [G8way]) [gem]" level="application" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="jmespath (v1.3.1, RVM: ruby-1.9.3-p551 [G8way]) [gem]" level="application" />
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.0.3, RVM: ruby-1.9.3-p551 [G8way]) [gem]" level="application" />
|
13
|
+
</component>
|
14
|
+
</module>
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,548 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="8a1a0fd1-99be-47e0-b98c-0d9e3079dcfa" name="Default" comment="">
|
5
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/s3_tree/directory.rb" afterPath="$PROJECT_DIR$/lib/s3_tree/directory.rb" />
|
6
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/s3_tree/file.rb" afterPath="$PROJECT_DIR$/lib/s3_tree/file.rb" />
|
7
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/s3_tree/version.rb" afterPath="$PROJECT_DIR$/lib/s3_tree/version.rb" />
|
8
|
+
</list>
|
9
|
+
<ignored path="s3_tree.iws" />
|
10
|
+
<ignored path=".idea/workspace.xml" />
|
11
|
+
<ignored path=".idea/dataSources.local.xml" />
|
12
|
+
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
13
|
+
<option name="TRACKING_ENABLED" value="true" />
|
14
|
+
<option name="SHOW_DIALOG" value="false" />
|
15
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
16
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
17
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
18
|
+
</component>
|
19
|
+
<component name="CreatePatchCommitExecutor">
|
20
|
+
<option name="PATCH_PATH" value="" />
|
21
|
+
</component>
|
22
|
+
<component name="FavoritesManager">
|
23
|
+
<favorites_list name="s3_tree" />
|
24
|
+
</component>
|
25
|
+
<component name="FileEditorManager">
|
26
|
+
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
27
|
+
<file leaf-file-name="s3_tree.gemspec" pinned="false" current-in-tab="false">
|
28
|
+
<entry file="file://$PROJECT_DIR$/s3_tree.gemspec">
|
29
|
+
<provider selected="true" editor-type-id="text-editor">
|
30
|
+
<state relative-caret-position="162">
|
31
|
+
<caret line="9" column="56" selection-start-line="9" selection-start-column="56" selection-end-line="9" selection-end-column="56" />
|
32
|
+
<folding />
|
33
|
+
</state>
|
34
|
+
</provider>
|
35
|
+
</entry>
|
36
|
+
</file>
|
37
|
+
<file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
|
38
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/version.rb">
|
39
|
+
<provider selected="true" editor-type-id="text-editor">
|
40
|
+
<state relative-caret-position="54">
|
41
|
+
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
42
|
+
<folding />
|
43
|
+
</state>
|
44
|
+
</provider>
|
45
|
+
</entry>
|
46
|
+
</file>
|
47
|
+
<file leaf-file-name="directory.rb" pinned="false" current-in-tab="false">
|
48
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/directory.rb">
|
49
|
+
<provider selected="true" editor-type-id="text-editor">
|
50
|
+
<state relative-caret-position="520">
|
51
|
+
<caret line="58" column="5" selection-start-line="58" selection-start-column="5" selection-end-line="58" selection-end-column="5" />
|
52
|
+
<folding />
|
53
|
+
</state>
|
54
|
+
</provider>
|
55
|
+
</entry>
|
56
|
+
</file>
|
57
|
+
<file leaf-file-name="file.rb" pinned="false" current-in-tab="false">
|
58
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/file.rb">
|
59
|
+
<provider selected="true" editor-type-id="text-editor">
|
60
|
+
<state relative-caret-position="552">
|
61
|
+
<caret line="43" column="3" selection-start-line="43" selection-start-column="3" selection-end-line="43" selection-end-column="3" />
|
62
|
+
<folding />
|
63
|
+
</state>
|
64
|
+
</provider>
|
65
|
+
</entry>
|
66
|
+
</file>
|
67
|
+
<file leaf-file-name="s3_tree.rb" pinned="false" current-in-tab="false">
|
68
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree.rb">
|
69
|
+
<provider selected="true" editor-type-id="text-editor">
|
70
|
+
<state relative-caret-position="18">
|
71
|
+
<caret line="1" column="27" selection-start-line="1" selection-start-column="26" selection-end-line="1" selection-end-column="27" />
|
72
|
+
<folding />
|
73
|
+
</state>
|
74
|
+
</provider>
|
75
|
+
</entry>
|
76
|
+
</file>
|
77
|
+
<file leaf-file-name="setup" pinned="false" current-in-tab="false">
|
78
|
+
<entry file="file://$PROJECT_DIR$/bin/setup">
|
79
|
+
<provider selected="true" editor-type-id="text-editor">
|
80
|
+
<state relative-caret-position="0">
|
81
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
82
|
+
<folding />
|
83
|
+
</state>
|
84
|
+
</provider>
|
85
|
+
</entry>
|
86
|
+
</file>
|
87
|
+
<file leaf-file-name="console" pinned="false" current-in-tab="false">
|
88
|
+
<entry file="file://$PROJECT_DIR$/bin/console">
|
89
|
+
<provider selected="true" editor-type-id="text-editor">
|
90
|
+
<state relative-caret-position="0">
|
91
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
92
|
+
<folding />
|
93
|
+
</state>
|
94
|
+
</provider>
|
95
|
+
</entry>
|
96
|
+
</file>
|
97
|
+
<file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
|
98
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
99
|
+
<provider selected="true" editor-type-id="text-editor">
|
100
|
+
<state relative-caret-position="90">
|
101
|
+
<caret line="5" column="21" selection-start-line="5" selection-start-column="21" selection-end-line="5" selection-end-column="21" />
|
102
|
+
<folding />
|
103
|
+
</state>
|
104
|
+
</provider>
|
105
|
+
</entry>
|
106
|
+
</file>
|
107
|
+
</leaf>
|
108
|
+
</component>
|
109
|
+
<component name="Git.Settings">
|
110
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
111
|
+
</component>
|
112
|
+
<component name="IdeDocumentHistory">
|
113
|
+
<option name="CHANGED_PATHS">
|
114
|
+
<list>
|
115
|
+
<option value="$PROJECT_DIR$/Gemfile" />
|
116
|
+
<option value="$PROJECT_DIR$/lib/s3_tree.rb" />
|
117
|
+
<option value="$PROJECT_DIR$/README.md" />
|
118
|
+
<option value="$PROJECT_DIR$/s3_tree.gemspec" />
|
119
|
+
<option value="$PROJECT_DIR$/lib/s3_tree/directory.rb" />
|
120
|
+
<option value="$PROJECT_DIR$/lib/s3_tree/file.rb" />
|
121
|
+
<option value="$PROJECT_DIR$/lib/s3_tree/version.rb" />
|
122
|
+
</list>
|
123
|
+
</option>
|
124
|
+
</component>
|
125
|
+
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
126
|
+
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
127
|
+
<component name="JsGulpfileManager">
|
128
|
+
<detection-done>true</detection-done>
|
129
|
+
<sorting>DEFINITION_ORDER</sorting>
|
130
|
+
</component>
|
131
|
+
<component name="ProjectFrameBounds">
|
132
|
+
<option name="x" value="65" />
|
133
|
+
<option name="y" value="-4" />
|
134
|
+
<option name="width" value="1301" />
|
135
|
+
<option name="height" value="772" />
|
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
|
+
<manualOrder />
|
159
|
+
<foldersAlwaysOnTop value="true" />
|
160
|
+
</navigator>
|
161
|
+
<panes>
|
162
|
+
<pane id="Scratches" />
|
163
|
+
<pane id="ProjectPane">
|
164
|
+
<subPane>
|
165
|
+
<PATH>
|
166
|
+
<PATH_ELEMENT>
|
167
|
+
<option name="myItemId" value="s3_tree" />
|
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="s3_tree" />
|
174
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
175
|
+
</PATH_ELEMENT>
|
176
|
+
<PATH_ELEMENT>
|
177
|
+
<option name="myItemId" value="s3_tree" />
|
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="s3_tree" />
|
184
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
185
|
+
</PATH_ELEMENT>
|
186
|
+
<PATH_ELEMENT>
|
187
|
+
<option name="myItemId" value="s3_tree" />
|
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="s3_tree" />
|
198
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
199
|
+
</PATH_ELEMENT>
|
200
|
+
<PATH_ELEMENT>
|
201
|
+
<option name="myItemId" value="s3_tree" />
|
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="s3_tree" />
|
210
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
211
|
+
</PATH_ELEMENT>
|
212
|
+
</PATH>
|
213
|
+
</subPane>
|
214
|
+
</pane>
|
215
|
+
<pane id="Scope" />
|
216
|
+
</panes>
|
217
|
+
</component>
|
218
|
+
<component name="PropertiesComponent">
|
219
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../Demo/s3_tree_demo" />
|
220
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
221
|
+
<property name="js-jscs-nodeInterpreter" value="/usr/local/bin/node" />
|
222
|
+
</component>
|
223
|
+
<component name="RunManager">
|
224
|
+
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
|
225
|
+
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
226
|
+
<module name="" />
|
227
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
228
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
229
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
230
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
231
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
232
|
+
<envs />
|
233
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
234
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
235
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
236
|
+
<COVERAGE_PATTERN ENABLED="true">
|
237
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
238
|
+
</COVERAGE_PATTERN>
|
239
|
+
</EXTENSION>
|
240
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
|
241
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
242
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
243
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
244
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
|
245
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
|
246
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
|
247
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
248
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
249
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
|
250
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
251
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
252
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
253
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
|
254
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
|
255
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
|
256
|
+
<method />
|
257
|
+
</configuration>
|
258
|
+
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
259
|
+
<method />
|
260
|
+
</configuration>
|
261
|
+
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
262
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
263
|
+
<module name="" />
|
264
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
265
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
266
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
267
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
268
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
269
|
+
<envs />
|
270
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
271
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
272
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
273
|
+
<COVERAGE_PATTERN ENABLED="true">
|
274
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
275
|
+
</COVERAGE_PATTERN>
|
276
|
+
</EXTENSION>
|
277
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
278
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
279
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
280
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
281
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
282
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
283
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
284
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
285
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
286
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
287
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
288
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
289
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
290
|
+
<method />
|
291
|
+
</configuration>
|
292
|
+
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
293
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
294
|
+
<module name="" />
|
295
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
296
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
297
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
298
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
299
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
300
|
+
<envs />
|
301
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
302
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
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
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
309
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
310
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
311
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
312
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
313
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
314
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
315
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
316
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
317
|
+
<method />
|
318
|
+
</configuration>
|
319
|
+
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
320
|
+
<node-interpreter>project</node-interpreter>
|
321
|
+
<node-options />
|
322
|
+
<gulpfile />
|
323
|
+
<tasks />
|
324
|
+
<arguments />
|
325
|
+
<envs />
|
326
|
+
<method />
|
327
|
+
</configuration>
|
328
|
+
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
|
329
|
+
<command value="run-script" />
|
330
|
+
<scripts />
|
331
|
+
<node-interpreter value="project" />
|
332
|
+
<envs />
|
333
|
+
<method />
|
334
|
+
</configuration>
|
335
|
+
</component>
|
336
|
+
<component name="ShelveChangesManager" show_recycled="false">
|
337
|
+
<option name="remove_strategy" value="false" />
|
338
|
+
</component>
|
339
|
+
<component name="TaskManager">
|
340
|
+
<task active="true" id="Default" summary="Default task">
|
341
|
+
<changelist id="8a1a0fd1-99be-47e0-b98c-0d9e3079dcfa" name="Default" comment="" />
|
342
|
+
<created>1496037248756</created>
|
343
|
+
<option name="number" value="Default" />
|
344
|
+
<option name="presentableId" value="Default" />
|
345
|
+
<updated>1496037248756</updated>
|
346
|
+
<workItem from="1496037250257" duration="15388000" />
|
347
|
+
<workItem from="1496120894259" duration="8241000" />
|
348
|
+
</task>
|
349
|
+
<servers />
|
350
|
+
</component>
|
351
|
+
<component name="TimeTrackingManager">
|
352
|
+
<option name="totallyTimeSpent" value="23629000" />
|
353
|
+
</component>
|
354
|
+
<component name="ToolWindowManager">
|
355
|
+
<frame x="65" y="-4" width="1301" height="772" extended-state="6" />
|
356
|
+
<editor active="true" />
|
357
|
+
<layout>
|
358
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1944223" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
359
|
+
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
360
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
361
|
+
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
362
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
363
|
+
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
364
|
+
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
365
|
+
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
366
|
+
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
367
|
+
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
368
|
+
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
369
|
+
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
370
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
371
|
+
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
372
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
373
|
+
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
374
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
375
|
+
</layout>
|
376
|
+
</component>
|
377
|
+
<component name="Vcs.Log.UiProperties">
|
378
|
+
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
379
|
+
<collection />
|
380
|
+
</option>
|
381
|
+
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
382
|
+
<collection />
|
383
|
+
</option>
|
384
|
+
</component>
|
385
|
+
<component name="VcsContentAnnotationSettings">
|
386
|
+
<option name="myLimit" value="2678400000" />
|
387
|
+
</component>
|
388
|
+
<component name="XDebuggerManager">
|
389
|
+
<breakpoint-manager />
|
390
|
+
<watches-manager />
|
391
|
+
</component>
|
392
|
+
<component name="editorHistoryManager">
|
393
|
+
<entry file="file://$PROJECT_DIR$/s3_tree.gemspec">
|
394
|
+
<provider selected="true" editor-type-id="text-editor">
|
395
|
+
<state relative-caret-position="252">
|
396
|
+
<caret line="14" column="28" selection-start-line="14" selection-start-column="28" selection-end-line="14" selection-end-column="28" />
|
397
|
+
<folding />
|
398
|
+
</state>
|
399
|
+
</provider>
|
400
|
+
</entry>
|
401
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/version.rb">
|
402
|
+
<provider selected="true" editor-type-id="text-editor">
|
403
|
+
<state relative-caret-position="54">
|
404
|
+
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
405
|
+
<folding />
|
406
|
+
</state>
|
407
|
+
</provider>
|
408
|
+
</entry>
|
409
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/directory.rb">
|
410
|
+
<provider selected="true" editor-type-id="text-editor">
|
411
|
+
<state relative-caret-position="954">
|
412
|
+
<caret line="53" column="26" selection-start-line="53" selection-start-column="26" selection-end-line="53" selection-end-column="26" />
|
413
|
+
<folding />
|
414
|
+
</state>
|
415
|
+
</provider>
|
416
|
+
</entry>
|
417
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/file.rb">
|
418
|
+
<provider selected="true" editor-type-id="text-editor">
|
419
|
+
<state relative-caret-position="360">
|
420
|
+
<caret line="20" column="47" selection-start-line="20" selection-start-column="47" selection-end-line="20" selection-end-column="47" />
|
421
|
+
<folding />
|
422
|
+
</state>
|
423
|
+
</provider>
|
424
|
+
</entry>
|
425
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree.rb">
|
426
|
+
<provider selected="true" editor-type-id="text-editor">
|
427
|
+
<state relative-caret-position="0">
|
428
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
429
|
+
<folding />
|
430
|
+
</state>
|
431
|
+
</provider>
|
432
|
+
</entry>
|
433
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
434
|
+
<provider selected="true" editor-type-id="text-editor">
|
435
|
+
<state relative-caret-position="90">
|
436
|
+
<caret line="5" column="21" selection-start-line="5" selection-start-column="21" selection-end-line="5" selection-end-column="21" />
|
437
|
+
<folding />
|
438
|
+
</state>
|
439
|
+
</provider>
|
440
|
+
</entry>
|
441
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
442
|
+
<provider selected="true" editor-type-id="text-editor">
|
443
|
+
<state relative-caret-position="90">
|
444
|
+
<caret line="5" column="21" selection-start-line="5" selection-start-column="21" selection-end-line="5" selection-end-column="21" />
|
445
|
+
<folding />
|
446
|
+
</state>
|
447
|
+
</provider>
|
448
|
+
</entry>
|
449
|
+
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
450
|
+
<provider selected="true" editor-type-id="text-editor">
|
451
|
+
<state relative-caret-position="0">
|
452
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
453
|
+
</state>
|
454
|
+
</provider>
|
455
|
+
</entry>
|
456
|
+
<entry file="file://$PROJECT_DIR$/CODE_OF_CONDUCT.md">
|
457
|
+
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
458
|
+
<state split_layout="SPLIT">
|
459
|
+
<first_editor relative-caret-position="0">
|
460
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
461
|
+
</first_editor>
|
462
|
+
<second_editor />
|
463
|
+
</state>
|
464
|
+
</provider>
|
465
|
+
</entry>
|
466
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
467
|
+
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
468
|
+
<state split_layout="SPLIT">
|
469
|
+
<first_editor relative-caret-position="-76">
|
470
|
+
<caret line="104" column="37" selection-start-line="104" selection-start-column="37" selection-end-line="104" selection-end-column="37" />
|
471
|
+
<folding>
|
472
|
+
<marker date="1496137058565" expanded="true" signature="636:660" ph=" ... end" />
|
473
|
+
<marker date="1496137058565" expanded="true" signature="636:786" ph=" ... end" />
|
474
|
+
<marker date="1496137058565" expanded="true" signature="672:782" ph=" ... end" />
|
475
|
+
<marker date="1496137058565" expanded="true" signature="782:786" ph=" ... end" />
|
476
|
+
<marker date="1496137058565" expanded="true" signature="827:1474" ph="..." />
|
477
|
+
<marker date="1496137058565" expanded="true" signature="839:950" ph="..." />
|
478
|
+
<marker date="1496137058565" expanded="true" signature="850:937" ph="..." />
|
479
|
+
<marker date="1496137058565" expanded="true" signature="962:1433" ph="..." />
|
480
|
+
<marker date="1496137058565" expanded="true" signature="1006:1418" ph="..." />
|
481
|
+
<marker date="1496137058565" expanded="true" signature="1021:1251" ph="..." />
|
482
|
+
<marker date="1496137058565" expanded="true" signature="1278:1332" ph="..." />
|
483
|
+
<marker date="1496137058565" expanded="true" signature="1359:1404" ph="..." />
|
484
|
+
<marker date="1496137058565" expanded="true" signature="1987:1988" ph="for ... end" />
|
485
|
+
</folding>
|
486
|
+
</first_editor>
|
487
|
+
<second_editor />
|
488
|
+
</state>
|
489
|
+
</provider>
|
490
|
+
</entry>
|
491
|
+
<entry file="file://$PROJECT_DIR$/s3_tree.gemspec">
|
492
|
+
<provider selected="true" editor-type-id="text-editor">
|
493
|
+
<state relative-caret-position="162">
|
494
|
+
<caret line="9" column="56" selection-start-line="9" selection-start-column="56" selection-end-line="9" selection-end-column="56" />
|
495
|
+
<folding />
|
496
|
+
</state>
|
497
|
+
</provider>
|
498
|
+
</entry>
|
499
|
+
<entry file="file://$PROJECT_DIR$/bin/setup">
|
500
|
+
<provider selected="true" editor-type-id="text-editor">
|
501
|
+
<state relative-caret-position="0">
|
502
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
503
|
+
<folding />
|
504
|
+
</state>
|
505
|
+
</provider>
|
506
|
+
</entry>
|
507
|
+
<entry file="file://$PROJECT_DIR$/bin/console">
|
508
|
+
<provider selected="true" editor-type-id="text-editor">
|
509
|
+
<state relative-caret-position="0">
|
510
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
511
|
+
<folding />
|
512
|
+
</state>
|
513
|
+
</provider>
|
514
|
+
</entry>
|
515
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree.rb">
|
516
|
+
<provider selected="true" editor-type-id="text-editor">
|
517
|
+
<state relative-caret-position="18">
|
518
|
+
<caret line="1" column="27" selection-start-line="1" selection-start-column="26" selection-end-line="1" selection-end-column="27" />
|
519
|
+
<folding />
|
520
|
+
</state>
|
521
|
+
</provider>
|
522
|
+
</entry>
|
523
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/directory.rb">
|
524
|
+
<provider selected="true" editor-type-id="text-editor">
|
525
|
+
<state relative-caret-position="520">
|
526
|
+
<caret line="58" column="5" selection-start-line="58" selection-start-column="5" selection-end-line="58" selection-end-column="5" />
|
527
|
+
<folding />
|
528
|
+
</state>
|
529
|
+
</provider>
|
530
|
+
</entry>
|
531
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/file.rb">
|
532
|
+
<provider selected="true" editor-type-id="text-editor">
|
533
|
+
<state relative-caret-position="552">
|
534
|
+
<caret line="43" column="3" selection-start-line="43" selection-start-column="3" selection-end-line="43" selection-end-column="3" />
|
535
|
+
<folding />
|
536
|
+
</state>
|
537
|
+
</provider>
|
538
|
+
</entry>
|
539
|
+
<entry file="file://$PROJECT_DIR$/lib/s3_tree/version.rb">
|
540
|
+
<provider selected="true" editor-type-id="text-editor">
|
541
|
+
<state relative-caret-position="54">
|
542
|
+
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
543
|
+
<folding />
|
544
|
+
</state>
|
545
|
+
</provider>
|
546
|
+
</entry>
|
547
|
+
</component>
|
548
|
+
</project>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module S3Tree
|
2
|
+
class Directory
|
3
|
+
include ActionView::Helpers::NumberHelper
|
4
|
+
attr_reader :path
|
5
|
+
|
6
|
+
def initialize(bucket, path)
|
7
|
+
@bucket = bucket
|
8
|
+
@path = path
|
9
|
+
end
|
10
|
+
|
11
|
+
def name
|
12
|
+
URI.decode(path_pieces.last).gsub('+', ' ')
|
13
|
+
end
|
14
|
+
|
15
|
+
def parent
|
16
|
+
parent_path = path_pieces[0..-2].join('/')
|
17
|
+
S3Tree::Directory.new(@bucket, parent_path) unless parent_path.blank?
|
18
|
+
end
|
19
|
+
|
20
|
+
def children
|
21
|
+
subdirectories + files
|
22
|
+
end
|
23
|
+
|
24
|
+
def subdirectories
|
25
|
+
@subdirectories ||= list_objects['common_prefixes'].collect do |prefix|
|
26
|
+
S3Tree::Directory.new(@bucket, prefix.prefix)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def files
|
31
|
+
@files ||= list_objects['contents'].collect do |object|
|
32
|
+
S3Tree::File.new(@bucket, s3_object: object) unless object.key.ends_with?('/')
|
33
|
+
end.compact
|
34
|
+
(@files.sort_by &:last_modified).reverse!
|
35
|
+
end
|
36
|
+
|
37
|
+
def size
|
38
|
+
number_to_human_size(@bucket.objects(prefix: @path.gsub('+', ' ')).inject(0) { |sum, s3_object| sum + s3_object.content_length })
|
39
|
+
end
|
40
|
+
|
41
|
+
def last_modified
|
42
|
+
(@bucket.objects(prefix: @path.gsub('+', ' ')).inject([]) { |date, s3_object| date.push(s3_object.last_modified) }).max
|
43
|
+
end
|
44
|
+
private
|
45
|
+
|
46
|
+
def path_pieces
|
47
|
+
@path_pieces ||= path ? path.split('/') : []
|
48
|
+
end
|
49
|
+
|
50
|
+
def list_objects
|
51
|
+
@list_objects ||= @bucket.client.list_objects({
|
52
|
+
prefix: @path.blank? ? '' : @path,
|
53
|
+
delimiter: '/',
|
54
|
+
bucket: @bucket.name,
|
55
|
+
encoding_type: 'url'
|
56
|
+
})
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
data/lib/s3_tree/file.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
module S3Tree
|
2
|
+
class File
|
3
|
+
include ActionView::Helpers::NumberHelper
|
4
|
+
attr_reader :path
|
5
|
+
|
6
|
+
def initialize(bucket, path)
|
7
|
+
@bucket = bucket
|
8
|
+
@path = path
|
9
|
+
end
|
10
|
+
|
11
|
+
def name
|
12
|
+
@name ||= File.basename(@path[:s3_object].key)
|
13
|
+
URI.decode(@name).gsub('+', ' ')
|
14
|
+
end
|
15
|
+
|
16
|
+
def extension
|
17
|
+
@extension ||= File.extname(@path[:s3_object].key)
|
18
|
+
end
|
19
|
+
|
20
|
+
def directory
|
21
|
+
@directory ||= begin
|
22
|
+
dir = File.dirname(@path[:s3_object].key)
|
23
|
+
dir = nil if dir == '.'
|
24
|
+
S3Tree::Directory.new(@bucket, dir)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def size
|
29
|
+
number_to_human_size(@path[:s3_object].size)
|
30
|
+
end
|
31
|
+
|
32
|
+
def last_modified
|
33
|
+
@path[:s3_object].last_modified
|
34
|
+
end
|
35
|
+
|
36
|
+
def s3_object
|
37
|
+
@s3_object ||= @bucket.object(@path)
|
38
|
+
end
|
39
|
+
|
40
|
+
def url
|
41
|
+
@bucket.object(URI.decode(@path[:s3_object].key).gsub('+', ' ')).presigned_url(:get)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/s3_tree/version.rb
CHANGED
data/s3_tree-0.0.1.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hardik Upadhyay
|
@@ -60,6 +60,12 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- ".idea/.rakeTasks"
|
64
|
+
- ".idea/misc.xml"
|
65
|
+
- ".idea/modules.xml"
|
66
|
+
- ".idea/s3_tree.iml"
|
67
|
+
- ".idea/vcs.xml"
|
68
|
+
- ".idea/workspace.xml"
|
63
69
|
- ".rspec"
|
64
70
|
- ".travis.yml"
|
65
71
|
- CODE_OF_CONDUCT.md
|
@@ -70,7 +76,10 @@ files:
|
|
70
76
|
- bin/console
|
71
77
|
- bin/setup
|
72
78
|
- lib/s3_tree.rb
|
79
|
+
- lib/s3_tree/directory.rb
|
80
|
+
- lib/s3_tree/file.rb
|
73
81
|
- lib/s3_tree/version.rb
|
82
|
+
- s3_tree-0.0.1.gem
|
74
83
|
- s3_tree.gemspec
|
75
84
|
homepage: http://rubygems.org/gems/s3_tree
|
76
85
|
licenses:
|