ubnt-usg-restore 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.idea/encodings.xml +4 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +7 -0
- data/.idea/modules.xml +8 -0
- data/.idea/ubnt-usg-restore.iml +11 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +302 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/ubnt-usg-restore +3 -0
- data/lib/ubnt/usg/restore.rb +10 -0
- data/lib/ubnt/usg/restore/dependency_check.rb +20 -0
- data/lib/ubnt/usg/restore/drive_creator.rb +10 -0
- data/lib/ubnt/usg/restore/file_copier.rb +2 -0
- data/lib/ubnt/usg/restore/image_extractor.rb +1 -0
- data/lib/ubnt/usg/restore/version.rb +7 -0
- data/ubnt-usg-restore.gemspec +42 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7a15d77b4f9d0f84786398e5681d3e906a6620ebdf5f42af12a1a21c9c430006
|
4
|
+
data.tar.gz: 77c802d4c6c437288675241e30f5d738e5fb1ba14e835e9d4393da2e30e7d48f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b0f60c28917ecf65bd021ef4c3c0ec5d228832b0bf5a9f24f719850b0ccbabb191294ad54397f981e0e536c9b31ff41f5b3984c6b9af77fb18f486c0f10ae108
|
7
|
+
data.tar.gz: '099c44223e5745037e98652d382061eb424b45fe859de02323468b713eb04044a8d16174c6ae15b4f68daa0916e978a5de4c757d9ae2c5fc4ea54f128874534e'
|
data/.gitignore
ADDED
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="JavaScriptSettings">
|
4
|
+
<option name="languageLevel" value="ES6" />
|
5
|
+
</component>
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.3.7-p456" project-jdk-type="RUBY_SDK" />
|
7
|
+
</project>
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/ubnt-usg-restore.iml" filepath="$PROJECT_DIR$/.idea/ubnt-usg-restore.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$" />
|
8
|
+
<orderEntry type="jdk" jdkName="ruby-2.6.1-p33" jdkType="RUBY_SDK" />
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
+
</component>
|
11
|
+
</module>
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,302 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="3e2b6770-d564-4b4f-8657-fb4499f6249d" name="Default Changelist" comment="">
|
5
|
+
<change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
6
|
+
<change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
|
7
|
+
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
|
8
|
+
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
9
|
+
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
|
10
|
+
<change afterPath="$PROJECT_DIR$/.idea/ubnt-usg-restore.iml" afterDir="false" />
|
11
|
+
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
|
12
|
+
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
13
|
+
<change afterPath="$PROJECT_DIR$/.rspec" afterDir="false" />
|
14
|
+
<change afterPath="$PROJECT_DIR$/.travis.yml" afterDir="false" />
|
15
|
+
<change afterPath="$PROJECT_DIR$/CODE_OF_CONDUCT.md" afterDir="false" />
|
16
|
+
<change afterPath="$PROJECT_DIR$/Gemfile" afterDir="false" />
|
17
|
+
<change afterPath="$PROJECT_DIR$/LICENSE.txt" afterDir="false" />
|
18
|
+
<change afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
19
|
+
<change afterPath="$PROJECT_DIR$/Rakefile" afterDir="false" />
|
20
|
+
<change afterPath="$PROJECT_DIR$/bin/console" afterDir="false" />
|
21
|
+
<change afterPath="$PROJECT_DIR$/bin/setup" afterDir="false" />
|
22
|
+
<change afterPath="$PROJECT_DIR$/exe/ubnt-usg-restore" afterDir="false" />
|
23
|
+
<change afterPath="$PROJECT_DIR$/lib/ubnt/usg/restore.rb" afterDir="false" />
|
24
|
+
<change afterPath="$PROJECT_DIR$/lib/ubnt/usg/restore/dependency_check.rb" afterDir="false" />
|
25
|
+
<change afterPath="$PROJECT_DIR$/lib/ubnt/usg/restore/drive_creator.rb" afterDir="false" />
|
26
|
+
<change afterPath="$PROJECT_DIR$/lib/ubnt/usg/restore/file_copier.rb" afterDir="false" />
|
27
|
+
<change afterPath="$PROJECT_DIR$/lib/ubnt/usg/restore/image_extractor.rb" afterDir="false" />
|
28
|
+
<change afterPath="$PROJECT_DIR$/lib/ubnt/usg/restore/version.rb" afterDir="false" />
|
29
|
+
<change afterPath="$PROJECT_DIR$/spec/spec_helper.rb" afterDir="false" />
|
30
|
+
<change afterPath="$PROJECT_DIR$/spec/ubnt/usg/restore_spec.rb" afterDir="false" />
|
31
|
+
<change afterPath="$PROJECT_DIR$/ubnt-usg-restore.gemspec" afterDir="false" />
|
32
|
+
</list>
|
33
|
+
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
34
|
+
<option name="SHOW_DIALOG" value="false" />
|
35
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
36
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
37
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
38
|
+
</component>
|
39
|
+
<component name="FileEditorManager">
|
40
|
+
<leaf>
|
41
|
+
<file pinned="false" current-in-tab="false">
|
42
|
+
<entry file="file://$PROJECT_DIR$/ubnt-usg-restore.gemspec">
|
43
|
+
<provider selected="true" editor-type-id="text-editor">
|
44
|
+
<state relative-caret-position="41">
|
45
|
+
<caret line="13" column="69" selection-start-line="13" selection-start-column="69" selection-end-line="13" selection-end-column="69" />
|
46
|
+
</state>
|
47
|
+
</provider>
|
48
|
+
</entry>
|
49
|
+
</file>
|
50
|
+
<file pinned="false" current-in-tab="false">
|
51
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore.rb">
|
52
|
+
<provider selected="true" editor-type-id="text-editor" />
|
53
|
+
</entry>
|
54
|
+
</file>
|
55
|
+
<file pinned="false" current-in-tab="false">
|
56
|
+
<entry file="file://$PROJECT_DIR$/exe/ubnt-usg-restore">
|
57
|
+
<provider selected="true" editor-type-id="text-editor" />
|
58
|
+
</entry>
|
59
|
+
</file>
|
60
|
+
<file pinned="false" current-in-tab="false">
|
61
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/drive_creator.rb">
|
62
|
+
<provider selected="true" editor-type-id="text-editor">
|
63
|
+
<state relative-caret-position="105">
|
64
|
+
<caret line="7" column="67" selection-start-line="7" selection-start-column="67" selection-end-line="7" selection-end-column="67" />
|
65
|
+
</state>
|
66
|
+
</provider>
|
67
|
+
</entry>
|
68
|
+
</file>
|
69
|
+
<file pinned="false" current-in-tab="false">
|
70
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/dependency_check.rb">
|
71
|
+
<provider selected="true" editor-type-id="text-editor">
|
72
|
+
<state relative-caret-position="285">
|
73
|
+
<caret line="19" column="3" selection-start-line="19" selection-start-column="3" selection-end-line="19" selection-end-column="3" />
|
74
|
+
</state>
|
75
|
+
</provider>
|
76
|
+
</entry>
|
77
|
+
</file>
|
78
|
+
<file pinned="false" current-in-tab="false">
|
79
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/file_copier.rb">
|
80
|
+
<provider selected="true" editor-type-id="text-editor">
|
81
|
+
<state relative-caret-position="15">
|
82
|
+
<caret line="1" column="1" selection-start-line="1" selection-start-column="1" selection-end-line="1" selection-end-column="1" />
|
83
|
+
</state>
|
84
|
+
</provider>
|
85
|
+
</entry>
|
86
|
+
</file>
|
87
|
+
<file pinned="false" current-in-tab="true">
|
88
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/image_extractor.rb">
|
89
|
+
<provider selected="true" editor-type-id="text-editor">
|
90
|
+
<state>
|
91
|
+
<caret column="103" selection-start-column="103" selection-end-column="103" />
|
92
|
+
</state>
|
93
|
+
</provider>
|
94
|
+
</entry>
|
95
|
+
</file>
|
96
|
+
<file pinned="false" current-in-tab="false">
|
97
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
98
|
+
<provider selected="true" editor-type-id="text-editor">
|
99
|
+
<state>
|
100
|
+
<caret column="7" selection-start-column="7" selection-end-column="29" />
|
101
|
+
</state>
|
102
|
+
</provider>
|
103
|
+
</entry>
|
104
|
+
</file>
|
105
|
+
</leaf>
|
106
|
+
</component>
|
107
|
+
<component name="Git.Settings">
|
108
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
109
|
+
</component>
|
110
|
+
<component name="IdeDocumentHistory">
|
111
|
+
<option name="CHANGED_PATHS">
|
112
|
+
<list>
|
113
|
+
<option value="$PROJECT_DIR$/ubnt-usg-restore.gemspec" />
|
114
|
+
<option value="$PROJECT_DIR$/lib/ubnt/usg/restore/dependency_check.rb" />
|
115
|
+
<option value="$PROJECT_DIR$/lib/ubnt/usg/restore/drive_creator.rb" />
|
116
|
+
<option value="$PROJECT_DIR$/lib/ubnt/usg/restore/file_copier.rb" />
|
117
|
+
<option value="$PROJECT_DIR$/lib/ubnt/usg/restore/image_extractor.rb" />
|
118
|
+
</list>
|
119
|
+
</option>
|
120
|
+
</component>
|
121
|
+
<component name="JsFlowSettings">
|
122
|
+
<service-enabled>true</service-enabled>
|
123
|
+
<exe-path />
|
124
|
+
<other-services-enabled>true</other-services-enabled>
|
125
|
+
<auto-save>true</auto-save>
|
126
|
+
</component>
|
127
|
+
<component name="ProjectFrameBounds" extendedState="6">
|
128
|
+
<option name="x" value="140" />
|
129
|
+
<option name="y" value="23" />
|
130
|
+
<option name="width" value="1400" />
|
131
|
+
<option name="height" value="950" />
|
132
|
+
</component>
|
133
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
134
|
+
<component name="ProjectView">
|
135
|
+
<navigator proportions="" version="1">
|
136
|
+
<foldersAlwaysOnTop value="true" />
|
137
|
+
</navigator>
|
138
|
+
<panes>
|
139
|
+
<pane id="ProjectPane">
|
140
|
+
<subPane>
|
141
|
+
<expand>
|
142
|
+
<path>
|
143
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
144
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
145
|
+
</path>
|
146
|
+
<path>
|
147
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
148
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
149
|
+
<item name="bin" type="462c0819:PsiDirectoryNode" />
|
150
|
+
</path>
|
151
|
+
<path>
|
152
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
153
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
154
|
+
<item name="exe" type="462c0819:PsiDirectoryNode" />
|
155
|
+
</path>
|
156
|
+
<path>
|
157
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
158
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
159
|
+
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
160
|
+
</path>
|
161
|
+
<path>
|
162
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
163
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
164
|
+
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
165
|
+
<item name="ubnt" type="462c0819:PsiDirectoryNode" />
|
166
|
+
</path>
|
167
|
+
<path>
|
168
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
169
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
170
|
+
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
171
|
+
<item name="ubnt" type="462c0819:PsiDirectoryNode" />
|
172
|
+
<item name="usg" type="462c0819:PsiDirectoryNode" />
|
173
|
+
</path>
|
174
|
+
<path>
|
175
|
+
<item name="ubnt-usg-restore" type="b2602c69:ProjectViewProjectNode" />
|
176
|
+
<item name="ubnt-usg-restore" type="462c0819:PsiDirectoryNode" />
|
177
|
+
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
178
|
+
<item name="ubnt" type="462c0819:PsiDirectoryNode" />
|
179
|
+
<item name="usg" type="462c0819:PsiDirectoryNode" />
|
180
|
+
<item name="restore" type="462c0819:PsiDirectoryNode" />
|
181
|
+
</path>
|
182
|
+
</expand>
|
183
|
+
<select />
|
184
|
+
</subPane>
|
185
|
+
</pane>
|
186
|
+
<pane id="Scope" />
|
187
|
+
</panes>
|
188
|
+
</component>
|
189
|
+
<component name="PropertiesComponent">
|
190
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
191
|
+
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
192
|
+
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
193
|
+
<property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
|
194
|
+
</component>
|
195
|
+
<component name="RunDashboard">
|
196
|
+
<option name="ruleStates">
|
197
|
+
<list>
|
198
|
+
<RuleState>
|
199
|
+
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
200
|
+
</RuleState>
|
201
|
+
<RuleState>
|
202
|
+
<option name="name" value="StatusDashboardGroupingRule" />
|
203
|
+
</RuleState>
|
204
|
+
</list>
|
205
|
+
</option>
|
206
|
+
</component>
|
207
|
+
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
|
208
|
+
<component name="SvnConfiguration">
|
209
|
+
<configuration />
|
210
|
+
</component>
|
211
|
+
<component name="TaskManager">
|
212
|
+
<task active="true" id="Default" summary="Default task">
|
213
|
+
<changelist id="3e2b6770-d564-4b4f-8657-fb4499f6249d" name="Default Changelist" comment="" />
|
214
|
+
<created>1554536562266</created>
|
215
|
+
<option name="number" value="Default" />
|
216
|
+
<option name="presentableId" value="Default" />
|
217
|
+
<updated>1554536562266</updated>
|
218
|
+
<workItem from="1554536563986" duration="1604000" />
|
219
|
+
</task>
|
220
|
+
<servers />
|
221
|
+
</component>
|
222
|
+
<component name="TimeTrackingManager">
|
223
|
+
<option name="totallyTimeSpent" value="1604000" />
|
224
|
+
</component>
|
225
|
+
<component name="ToolWindowManager">
|
226
|
+
<frame x="0" y="23" width="1680" height="990" extended-state="6" />
|
227
|
+
<layout>
|
228
|
+
<window_info id="Favorites" side_tool="true" />
|
229
|
+
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20695971" />
|
230
|
+
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
231
|
+
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
|
232
|
+
<window_info anchor="bottom" id="Database Changes" />
|
233
|
+
<window_info anchor="bottom" id="Version Control" />
|
234
|
+
<window_info anchor="bottom" id="Terminal" />
|
235
|
+
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
236
|
+
<window_info anchor="bottom" id="Message" order="0" />
|
237
|
+
<window_info anchor="bottom" id="Find" order="1" />
|
238
|
+
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.31514478" />
|
239
|
+
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
240
|
+
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
241
|
+
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
242
|
+
<window_info anchor="bottom" id="TODO" order="6" />
|
243
|
+
<window_info anchor="right" id="Database" />
|
244
|
+
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
245
|
+
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
246
|
+
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
247
|
+
</layout>
|
248
|
+
</component>
|
249
|
+
<component name="TypeScriptGeneratedFilesManager">
|
250
|
+
<option name="version" value="1" />
|
251
|
+
</component>
|
252
|
+
<component name="editorHistoryManager">
|
253
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
254
|
+
<provider selected="true" editor-type-id="text-editor">
|
255
|
+
<state>
|
256
|
+
<caret column="7" selection-start-column="7" selection-end-column="29" />
|
257
|
+
</state>
|
258
|
+
</provider>
|
259
|
+
</entry>
|
260
|
+
<entry file="file://$PROJECT_DIR$/ubnt-usg-restore.gemspec">
|
261
|
+
<provider selected="true" editor-type-id="text-editor">
|
262
|
+
<state relative-caret-position="41">
|
263
|
+
<caret line="13" column="69" selection-start-line="13" selection-start-column="69" selection-end-line="13" selection-end-column="69" />
|
264
|
+
</state>
|
265
|
+
</provider>
|
266
|
+
</entry>
|
267
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore.rb">
|
268
|
+
<provider selected="true" editor-type-id="text-editor" />
|
269
|
+
</entry>
|
270
|
+
<entry file="file://$PROJECT_DIR$/exe/ubnt-usg-restore">
|
271
|
+
<provider selected="true" editor-type-id="text-editor" />
|
272
|
+
</entry>
|
273
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/drive_creator.rb">
|
274
|
+
<provider selected="true" editor-type-id="text-editor">
|
275
|
+
<state relative-caret-position="105">
|
276
|
+
<caret line="7" column="67" selection-start-line="7" selection-start-column="67" selection-end-line="7" selection-end-column="67" />
|
277
|
+
</state>
|
278
|
+
</provider>
|
279
|
+
</entry>
|
280
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/dependency_check.rb">
|
281
|
+
<provider selected="true" editor-type-id="text-editor">
|
282
|
+
<state relative-caret-position="285">
|
283
|
+
<caret line="19" column="3" selection-start-line="19" selection-start-column="3" selection-end-line="19" selection-end-column="3" />
|
284
|
+
</state>
|
285
|
+
</provider>
|
286
|
+
</entry>
|
287
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/file_copier.rb">
|
288
|
+
<provider selected="true" editor-type-id="text-editor">
|
289
|
+
<state relative-caret-position="15">
|
290
|
+
<caret line="1" column="1" selection-start-line="1" selection-start-column="1" selection-end-line="1" selection-end-column="1" />
|
291
|
+
</state>
|
292
|
+
</provider>
|
293
|
+
</entry>
|
294
|
+
<entry file="file://$PROJECT_DIR$/lib/ubnt/usg/restore/image_extractor.rb">
|
295
|
+
<provider selected="true" editor-type-id="text-editor">
|
296
|
+
<state>
|
297
|
+
<caret column="103" selection-start-column="103" selection-end-column="103" />
|
298
|
+
</state>
|
299
|
+
</provider>
|
300
|
+
</entry>
|
301
|
+
</component>
|
302
|
+
</project>
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at rickmark@dropbox.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Rick Mark
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Ubnt::Usg::Restore
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ubnt/usg/restore`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'ubnt-usg-restore'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install ubnt-usg-restore
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ubnt-usg-restore. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Ubnt::Usg::Restore project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/ubnt-usg-restore/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "ubnt/usg/restore"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
class DependencyCheck
|
2
|
+
|
3
|
+
def has_partition_utils?
|
4
|
+
`which parted`.any?
|
5
|
+
end
|
6
|
+
|
7
|
+
def has_filesystem_utils?
|
8
|
+
`which mke2fs`
|
9
|
+
end
|
10
|
+
|
11
|
+
def has_extraction_utils?
|
12
|
+
`which unzip`
|
13
|
+
end
|
14
|
+
|
15
|
+
def has_dependencies?
|
16
|
+
[ :has_filesystem_utils?, :has_filesystem_utils? ].all do |check|
|
17
|
+
self.public_send(check)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class DriveCreator
|
2
|
+
def initialize(device)
|
3
|
+
@device = device.start_with? '/dev' ? device : "/dev/#{device}"
|
4
|
+
end
|
5
|
+
|
6
|
+
# clear partition table
|
7
|
+
# create fat partition for both original and current kernel
|
8
|
+
# create ext2 partition for squashfs.img (and configuration state, which doesn't have to be initialized)
|
9
|
+
# create final partition which is mounted inside the system for persistant data
|
10
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# USG original firmware https://dl.ubnt.com/unifi/firmware/UGW3/4.4.36.5146617/UGW3.v4.4.36.5146617.tar
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "ubnt/usg/restore/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ubnt-usg-restore"
|
8
|
+
spec.version = Ubnt::Usg::Restore::VERSION
|
9
|
+
spec.authors = ["Rick Mark"]
|
10
|
+
spec.email = ["rickmark@dropbox.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Create USB media to restore the Unifi USG}
|
13
|
+
spec.description = %q{The Unifi USG has a USB drive in the unit that can be restored by this utility}
|
14
|
+
spec.homepage = "https://github.com/rickmark/unifi-usg-restore"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
21
|
+
|
22
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
23
|
+
spec.metadata["source_code_uri"] = "https://github.com/rickmark/unifi-usg-restore"
|
24
|
+
spec.metadata["changelog_uri"] = "https://github.com/rickmark/unifi-usg-restore"
|
25
|
+
else
|
26
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
27
|
+
"public gem pushes."
|
28
|
+
end
|
29
|
+
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
32
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
33
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
end
|
35
|
+
spec.bindir = "exe"
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ["lib"]
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ubnt-usg-restore
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rick Mark
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-04-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: The Unifi USG has a USB drive in the unit that can be restored by this
|
56
|
+
utility
|
57
|
+
email:
|
58
|
+
- rickmark@dropbox.com
|
59
|
+
executables:
|
60
|
+
- ubnt-usg-restore
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".idea/encodings.xml"
|
66
|
+
- ".idea/inspectionProfiles/Project_Default.xml"
|
67
|
+
- ".idea/misc.xml"
|
68
|
+
- ".idea/modules.xml"
|
69
|
+
- ".idea/ubnt-usg-restore.iml"
|
70
|
+
- ".idea/vcs.xml"
|
71
|
+
- ".idea/workspace.xml"
|
72
|
+
- ".rspec"
|
73
|
+
- ".travis.yml"
|
74
|
+
- CODE_OF_CONDUCT.md
|
75
|
+
- Gemfile
|
76
|
+
- LICENSE.txt
|
77
|
+
- README.md
|
78
|
+
- Rakefile
|
79
|
+
- bin/console
|
80
|
+
- bin/setup
|
81
|
+
- exe/ubnt-usg-restore
|
82
|
+
- lib/ubnt/usg/restore.rb
|
83
|
+
- lib/ubnt/usg/restore/dependency_check.rb
|
84
|
+
- lib/ubnt/usg/restore/drive_creator.rb
|
85
|
+
- lib/ubnt/usg/restore/file_copier.rb
|
86
|
+
- lib/ubnt/usg/restore/image_extractor.rb
|
87
|
+
- lib/ubnt/usg/restore/version.rb
|
88
|
+
- ubnt-usg-restore.gemspec
|
89
|
+
homepage: https://github.com/rickmark/unifi-usg-restore
|
90
|
+
licenses:
|
91
|
+
- MIT
|
92
|
+
metadata:
|
93
|
+
allowed_push_host: https://rubygems.org
|
94
|
+
homepage_uri: https://github.com/rickmark/unifi-usg-restore
|
95
|
+
source_code_uri: https://github.com/rickmark/unifi-usg-restore
|
96
|
+
changelog_uri: https://github.com/rickmark/unifi-usg-restore
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubygems_version: 3.0.3
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Create USB media to restore the Unifi USG
|
116
|
+
test_files: []
|