zip_dsl 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.idea/misc.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p194 [zip_dsl]" project-jdk-type="RUBY_SDK" />
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p429 [zip_dsl]" project-jdk-type="RUBY_SDK" />
4
4
  </project>
5
5
 
data/.idea/workspace.xml CHANGED
@@ -1,23 +1,48 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="aafa5aec-b597-47d5-af91-f7b63300321f" name="Default" comment="">
5
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.ruby-gemset" />
6
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.ruby-version" />
7
- <change type="DELETED" beforePath="$PROJECT_DIR$/.rvmrc" afterPath="" />
8
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
4
+ <list default="true" id="aafa5aec-b597-47d5-af91-f7b63300321f" name="Default" comment="Adding support for archive update.">
5
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/CHANGES" />
6
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/zip_dsl/zip_updater.rb" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test.zip" afterPath="$PROJECT_DIR$/test.zip" />
8
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.ruby-version" afterPath="$PROJECT_DIR$/.ruby-version" />
9
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
9
10
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/zip_dsl/version.rb" afterPath="$PROJECT_DIR$/lib/zip_dsl/version.rb" />
10
11
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
11
12
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/zip_builder_spec.rb" afterPath="$PROJECT_DIR$/spec/zip_builder_spec.rb" />
12
13
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/zip_dsl.iml" afterPath="$PROJECT_DIR$/.idea/zip_dsl.iml" />
14
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/zip_dsl.rb" afterPath="$PROJECT_DIR$/lib/zip_dsl.rb" />
13
15
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/zip_dsl/zip_dsl.rb" afterPath="$PROJECT_DIR$/lib/zip_dsl/zip_dsl.rb" />
14
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/zip_dsl/zip_reader.rb" afterPath="$PROJECT_DIR$/lib/zip_dsl/zip_reader.rb" />
15
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/zip_dsl/zip_writer.rb" afterPath="$PROJECT_DIR$/lib/zip_dsl/zip_writer.rb" />
16
16
  </list>
17
17
  <ignored path="zip_dsl.iws" />
18
18
  <ignored path=".idea/workspace.xml" />
19
- <file path="/Dummy.txt" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117187398" ignored="false" />
20
- <file path="/a.dummy" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117546371" ignored="false" />
19
+ <file path="/Dummy.txt" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1371500142092" ignored="false" />
20
+ <file path="/a.dummy" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117970780" ignored="false" />
21
+ <file path="$PROJECT_DIR$/../web_app_builder/Gemfile" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117888557" ignored="false" />
22
+ <file path="$PROJECT_DIR$/../web_app_builder/.ruby-version" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117774301" ignored="false" />
23
+ <file path="$PROJECT_DIR$/../web_app_builder/.ruby-gemset" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117786033" ignored="false" />
24
+ <file path="$PROJECT_DIR$/../web_app_builder/lib/web_app_builder/version.rb" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117806264" ignored="false" />
25
+ <file path="$PROJECT_DIR$/../web_app_builder/lib/web_app_builder/web_app_builder.rb" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368117986135" ignored="false" />
26
+ <file path="$PROJECT_DIR$/../web_app_builder/build/WEB-INF/jboss-web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
27
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/jboss-web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
28
+ <file path="$PROJECT_DIR$/../web_app_builder/build/META-INF/context.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
29
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/META-INF/context.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
30
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/templates/META-INF/context.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
31
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/templates/postgres-ds.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
32
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/context.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
33
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/templates/WEB-INF/jboss-web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
34
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
35
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/META-INF/context.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
36
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/WEB-INF/web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
37
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/WEB-INF/jboss-web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
38
+ <file path="$PROJECT_DIR$/../web_app_builder/build/WEB-INF/web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
39
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/jboss-web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
40
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
41
+ <file path="$PROJECT_DIR$/../web_app_builder/build/postgres-ds.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
42
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/postgres-ds.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
43
+ <file path="$PROJECT_DIR$/../web_app_builder/build/exploded/WEB-INF/config/templates/WEB-INF/web.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1368118068883" ignored="false" />
44
+ <file path="$PROJECT_DIR$/../web_app_builder/.idea/workspace.xml" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1371496242412" ignored="false" />
45
+ <file path="$USER_HOME$/work/ui/src/build2/META-INF/init.rb" changelist="aafa5aec-b597-47d5-af91-f7b63300321f" time="1371496050410" ignored="false" />
21
46
  <option name="TRACKING_ENABLED" value="true" />
22
47
  <option name="SHOW_DIALOG" value="false" />
23
48
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -37,94 +62,64 @@
37
62
  </component>
38
63
  <component name="FileEditorManager">
39
64
  <leaf>
40
- <file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
41
- <entry file="file://$PROJECT_DIR$/Rakefile">
42
- <provider selected="true" editor-type-id="text-editor">
43
- <state line="36" column="15" selection-start="723" selection-end="723" vertical-scroll-proportion="0.0">
44
- <folding />
45
- </state>
46
- </provider>
47
- </entry>
48
- </file>
49
- <file leaf-file-name="directory_builder.rb" pinned="false" current="false" current-in-tab="false">
50
- <entry file="file://$PROJECT_DIR$/lib/directory_builder.rb">
51
- <provider selected="true" editor-type-id="text-editor">
52
- <state line="7" column="15" selection-start="136" selection-end="137" vertical-scroll-proportion="-4.3076925">
53
- <folding />
54
- </state>
55
- </provider>
56
- </entry>
57
- </file>
58
- <file leaf-file-name="zip_dsl.rb" pinned="false" current="false" current-in-tab="false">
59
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl.rb">
65
+ <file leaf-file-name="zip_builder_spec.rb" pinned="false" current="false" current-in-tab="false">
66
+ <entry file="file://$PROJECT_DIR$/spec/zip_builder_spec.rb">
60
67
  <provider selected="true" editor-type-id="text-editor">
61
- <state line="3" column="35" selection-start="84" selection-end="84" vertical-scroll-proportion="0.0">
68
+ <state line="75" column="38" selection-start="2127" selection-end="2127" vertical-scroll-proportion="0.0">
62
69
  <folding />
63
70
  </state>
64
71
  </provider>
65
72
  </entry>
66
73
  </file>
67
- <file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
74
+ <file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
68
75
  <entry file="file://$PROJECT_DIR$/lib/zip_dsl/version.rb">
69
76
  <provider selected="true" editor-type-id="text-editor">
70
- <state line="1" column="17" selection-start="31" selection-end="31" vertical-scroll-proportion="0.02698145">
77
+ <state line="1" column="16" selection-start="30" selection-end="30" vertical-scroll-proportion="0.0">
71
78
  <folding />
72
79
  </state>
73
80
  </provider>
74
81
  </entry>
75
82
  </file>
76
- <file leaf-file-name="directory_builder_spec.rb" pinned="false" current="false" current-in-tab="false">
77
- <entry file="file://$PROJECT_DIR$/spec/directory_builder_spec.rb">
83
+ <file leaf-file-name=".ruby-version" pinned="false" current="false" current-in-tab="false">
84
+ <entry file="file://$PROJECT_DIR$/.ruby-version">
78
85
  <provider selected="true" editor-type-id="text-editor">
79
- <state line="39" column="33" selection-start="1180" selection-end="1180" vertical-scroll-proportion="0.0">
86
+ <state line="0" column="10" selection-start="10" selection-end="10" vertical-scroll-proportion="0.0">
80
87
  <folding />
81
88
  </state>
82
89
  </provider>
83
90
  </entry>
84
91
  </file>
85
- <file leaf-file-name="zip_dsl.rb" pinned="false" current="false" current-in-tab="false">
86
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_dsl.rb">
92
+ <file leaf-file-name="CHANGES" pinned="false" current="true" current-in-tab="true">
93
+ <entry file="file://$PROJECT_DIR$/CHANGES">
87
94
  <provider selected="true" editor-type-id="text-editor">
88
- <state line="36" column="31" selection-start="1005" selection-end="1005" vertical-scroll-proportion="0.0">
95
+ <state line="8" column="2" selection-start="69" selection-end="69" vertical-scroll-proportion="0.20779221">
89
96
  <folding />
90
97
  </state>
91
98
  </provider>
92
99
  </entry>
93
100
  </file>
94
- <file leaf-file-name="zip_reader.rb" pinned="false" current="false" current-in-tab="false">
95
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_reader.rb">
101
+ <file leaf-file-name=".ruby-gemset" pinned="false" current="false" current-in-tab="false">
102
+ <entry file="file://$PROJECT_DIR$/.ruby-gemset">
96
103
  <provider selected="true" editor-type-id="text-editor">
97
- <state line="33" column="48" selection-start="550" selection-end="550" vertical-scroll-proportion="0.0">
104
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
98
105
  <folding />
99
106
  </state>
100
107
  </provider>
101
108
  </entry>
102
109
  </file>
103
- <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
104
- <entry file="file://$PROJECT_DIR$/README.md">
105
- <provider editor-type-id="MarkdownPreviewEditor">
106
- <state />
107
- </provider>
110
+ <file leaf-file-name="zip_updater.rb" pinned="false" current="false" current-in-tab="false">
111
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_updater.rb">
108
112
  <provider selected="true" editor-type-id="text-editor">
109
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.0">
113
+ <state line="70" column="0" selection-start="1769" selection-end="1769" vertical-scroll-proportion="0.0">
110
114
  <folding />
111
115
  </state>
112
116
  </provider>
113
117
  </entry>
114
118
  </file>
115
- <file leaf-file-name="zip_builder_spec.rb" pinned="false" current="false" current-in-tab="false">
116
- <entry file="file://$PROJECT_DIR$/spec/zip_builder_spec.rb">
119
+ <file leaf-file-name="zip_writer.rb" pinned="false" current="false" current-in-tab="false">
120
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_writer.rb">
117
121
  <provider selected="true" editor-type-id="text-editor">
118
- <state line="4" column="12" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0">
119
- <folding />
120
- </state>
121
- </provider>
122
- </entry>
123
- </file>
124
- <file leaf-file-name="spec_helper.rb" pinned="false" current="false" current-in-tab="false">
125
- <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
126
- <provider selected="true" editor-type-id="text-editor">
127
- <state line="1" column="28" selection-start="0" selection-end="59" vertical-scroll-proportion="0.0">
122
+ <state line="66" column="0" selection-start="1475" selection-end="1550" vertical-scroll-proportion="-10.692307">
128
123
  <folding />
129
124
  </state>
130
125
  </provider>
@@ -148,22 +143,22 @@
148
143
  <component name="IdeDocumentHistory">
149
144
  <option name="changedFiles">
150
145
  <list>
151
- <option value="$PROJECT_DIR$/.rvmrc" />
152
- <option value="$PROJECT_DIR$/lib/zip_dsl.rb" />
153
- <option value="$PROJECT_DIR$/spec/spec_helper.rb" />
154
- <option value="$PROJECT_DIR$/zip_dsl.gemspec.erb" />
155
146
  <option value="$PROJECT_DIR$/lib/directory_builder.rb" />
156
147
  <option value="$PROJECT_DIR$/Rakefile" />
157
148
  <option value="$PROJECT_DIR$/zip_dsl.gemspec" />
158
- <option value="$PROJECT_DIR$/spec/directory_builder_spec.rb" />
159
149
  <option value="$PROJECT_DIR$/.ruby_version" />
160
150
  <option value="$PROJECT_DIR$/.ruby-gemset" />
161
151
  <option value="$PROJECT_DIR$/Gemfile" />
162
152
  <option value="$PROJECT_DIR$/lib/zip_dsl/zip_reader.rb" />
163
153
  <option value="$PROJECT_DIR$/lib/zip_dsl/zip_writer.rb" />
164
- <option value="$PROJECT_DIR$/spec/zip_builder_spec.rb" />
154
+ <option value="$PROJECT_DIR$/spec/directory_builder_spec.rb" />
165
155
  <option value="$PROJECT_DIR$/lib/zip_dsl/zip_dsl.rb" />
156
+ <option value="$PROJECT_DIR$/lib/zip_dsl.rb" />
157
+ <option value="$PROJECT_DIR$/lib/zip_dsl/zip_updater.rb" />
158
+ <option value="$PROJECT_DIR$/spec/zip_builder_spec.rb" />
166
159
  <option value="$PROJECT_DIR$/lib/zip_dsl/version.rb" />
160
+ <option value="$PROJECT_DIR$/.ruby-version" />
161
+ <option value="$PROJECT_DIR$/CHANGES" />
167
162
  </list>
168
163
  </option>
169
164
  </component>
@@ -199,7 +194,6 @@
199
194
  <sortByType />
200
195
  </navigator>
201
196
  <panes>
202
- <pane id="Scope" />
203
197
  <pane id="ProjectPane">
204
198
  <subPane>
205
199
  <PATH>
@@ -218,20 +212,6 @@
218
212
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
219
213
  </PATH_ELEMENT>
220
214
  </PATH>
221
- <PATH>
222
- <PATH_ELEMENT>
223
- <option name="myItemId" value="zip_dsl" />
224
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
225
- </PATH_ELEMENT>
226
- <PATH_ELEMENT>
227
- <option name="myItemId" value="zip_dsl" />
228
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
229
- </PATH_ELEMENT>
230
- <PATH_ELEMENT>
231
- <option name="myItemId" value="spec" />
232
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
233
- </PATH_ELEMENT>
234
- </PATH>
235
215
  <PATH>
236
216
  <PATH_ELEMENT>
237
217
  <option name="myItemId" value="zip_dsl" />
@@ -266,12 +246,17 @@
266
246
  </PATH>
267
247
  </subPane>
268
248
  </pane>
249
+ <pane id="Scope" />
269
250
  </panes>
270
251
  </component>
271
252
  <component name="PropertiesComponent">
253
+ <property name="options.splitter.main.proportions" value="0.3" />
272
254
  <property name="WebServerToolWindowFactoryState" value="false" />
255
+ <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
273
256
  <property name="recentsLimit" value="5" />
274
257
  <property name="restartRequiresConfirmation" value="true" />
258
+ <property name="options.searchVisible" value="true" />
259
+ <property name="options.splitter.details.proportions" value="0.2" />
275
260
  <property name="GoToClass.includeJavaFiles" value="false" />
276
261
  </component>
277
262
  <component name="RecentsManager">
@@ -280,8 +265,8 @@
280
265
  <recent name="$PROJECT_DIR$/lib" />
281
266
  </key>
282
267
  </component>
283
- <component name="RunManager" selected="RSpec.directory_builder_spec">
284
- <configuration default="false" name="DirectoryBuilder should create new zip file with file created from string" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
268
+ <component name="RunManager" selected="RSpec.ZipDSL should update existing zip file">
269
+ <configuration default="false" name="DirectoryBuilder should display files in current directory" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
285
270
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
286
271
  <module name="zip_dsl" />
287
272
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
@@ -304,7 +289,7 @@
304
289
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_builder_spec.rb" />
305
290
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
306
291
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
307
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryBuilder should create new zip file with file created from string" />
292
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryBuilder should display files in current directory" />
308
293
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
309
294
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
310
295
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
@@ -317,7 +302,7 @@
317
302
  <ConfigurationWrapper RunnerId="RubyRunner" />
318
303
  <method />
319
304
  </configuration>
320
- <configuration default="false" name="DirectoryBuilder should create new zip file with new empty folder" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
305
+ <configuration default="false" name="directory_builder_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
321
306
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
322
307
  <module name="zip_dsl" />
323
308
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
@@ -340,29 +325,29 @@
340
325
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_builder_spec.rb" />
341
326
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
342
327
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
343
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryBuilder should create new zip file with new empty folder" />
328
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
344
329
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
345
330
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
346
331
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
347
332
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
348
333
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
349
334
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
350
- <RunnerSettings RunnerId="RubyDebugRunner" />
351
- <ConfigurationWrapper RunnerId="RubyDebugRunner" />
335
+ <RunnerSettings RunnerId="RubyRunner" />
336
+ <ConfigurationWrapper RunnerId="RubyRunner" />
352
337
  <method />
353
338
  </configuration>
354
- <configuration default="false" name="DirectoryBuilder should display files in current directory" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
339
+ <configuration default="false" name="ZipDSL should create new zip file with files at particular folder" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
355
340
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
356
341
  <module name="zip_dsl" />
357
342
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
358
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
343
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
359
344
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
360
345
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
361
346
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
362
347
  <envs>
363
348
  <env name="JRUBY_OPTS" value="-X+O" />
364
349
  </envs>
365
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
350
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
366
351
  <EXTENSION ID="JRubyRunConfigurationExtension" />
367
352
  <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
368
353
  <COVERAGE_PATTERN ENABLED="true">
@@ -371,27 +356,25 @@
371
356
  </EXTENSION>
372
357
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
373
358
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
374
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_builder_spec.rb" />
359
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/zip_builder_spec.rb" />
375
360
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
376
361
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
377
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="DirectoryBuilder should display files in current directory" />
362
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="ZipDSL should create new zip file with files at particular folder" />
378
363
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
379
364
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
380
365
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
381
366
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
382
367
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
383
368
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
384
- <RunnerSettings RunnerId="RubyDebugRunner" />
385
369
  <RunnerSettings RunnerId="RubyRunner" />
386
- <ConfigurationWrapper RunnerId="RubyDebugRunner" />
387
370
  <ConfigurationWrapper RunnerId="RubyRunner" />
388
371
  <method />
389
372
  </configuration>
390
- <configuration default="false" name="zip_builder_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
373
+ <configuration default="false" name="ZipDSL should update existing zip file" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
391
374
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
392
375
  <module name="zip_dsl" />
393
376
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
394
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
377
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
395
378
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
396
379
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
397
380
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
@@ -410,22 +393,24 @@
410
393
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/zip_builder_spec.rb" />
411
394
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
412
395
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
413
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
396
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="ZipDSL should update existing zip file" />
414
397
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
415
398
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
416
399
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
417
400
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
418
401
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
419
402
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
403
+ <RunnerSettings RunnerId="RubyDebugRunner" />
420
404
  <RunnerSettings RunnerId="RubyRunner" />
405
+ <ConfigurationWrapper RunnerId="RubyDebugRunner" />
421
406
  <ConfigurationWrapper RunnerId="RubyRunner" />
422
407
  <method />
423
408
  </configuration>
424
- <configuration default="false" name="directory_builder_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
409
+ <configuration default="false" name="zip_builder_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
425
410
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
426
411
  <module name="zip_dsl" />
427
412
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
428
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
413
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
429
414
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
430
415
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
431
416
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
@@ -441,7 +426,7 @@
441
426
  </EXTENSION>
442
427
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
443
428
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
444
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/directory_builder_spec.rb" />
429
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/zip_builder_spec.rb" />
445
430
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
446
431
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
447
432
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
@@ -583,17 +568,17 @@
583
568
  </configuration>
584
569
  <list size="6">
585
570
  <item index="0" class="java.lang.String" itemvalue="Rake.rake" />
586
- <item index="1" class="java.lang.String" itemvalue="RSpec.DirectoryBuilder should create new zip file with file created from string" />
587
- <item index="2" class="java.lang.String" itemvalue="RSpec.DirectoryBuilder should create new zip file with new empty folder" />
588
- <item index="3" class="java.lang.String" itemvalue="RSpec.DirectoryBuilder should display files in current directory" />
589
- <item index="4" class="java.lang.String" itemvalue="RSpec.zip_builder_spec" />
590
- <item index="5" class="java.lang.String" itemvalue="RSpec.directory_builder_spec" />
571
+ <item index="1" class="java.lang.String" itemvalue="RSpec.DirectoryBuilder should display files in current directory" />
572
+ <item index="2" class="java.lang.String" itemvalue="RSpec.directory_builder_spec" />
573
+ <item index="3" class="java.lang.String" itemvalue="RSpec.ZipDSL should create new zip file with files at particular folder" />
574
+ <item index="4" class="java.lang.String" itemvalue="RSpec.ZipDSL should update existing zip file" />
575
+ <item index="5" class="java.lang.String" itemvalue="RSpec.zip_builder_spec" />
591
576
  </list>
592
577
  <recent_temporary>
593
578
  <list size="5">
594
- <item index="0" class="java.lang.String" itemvalue="RSpec.directory_builder_spec" />
579
+ <item index="0" class="java.lang.String" itemvalue="RSpec.ZipDSL should update existing zip file" />
595
580
  <item index="1" class="java.lang.String" itemvalue="RSpec.zip_builder_spec" />
596
- <item index="2" class="java.lang.String" itemvalue="RSpec.zip_builder_spec" />
581
+ <item index="2" class="java.lang.String" itemvalue="RSpec.ZipDSL should create new zip file with files at particular folder" />
597
582
  <item index="3" class="java.lang.String" itemvalue="RSpec.directory_builder_spec" />
598
583
  <item index="4" class="java.lang.String" itemvalue="RSpec.zip_builder_spec" />
599
584
  </list>
@@ -612,12 +597,11 @@
612
597
  <frame x="332" y="142" width="1588" height="1058" extended-state="0" />
613
598
  <editor active="true" />
614
599
  <layout>
615
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
600
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
616
601
  <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" />
617
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
618
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
602
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
619
603
  <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" />
620
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2535668" sideWeight="0.67013526" order="0" side_tool="false" content_ui="combo" />
604
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25680932" sideWeight="0.67013526" order="0" side_tool="false" content_ui="combo" />
621
605
  <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39958376" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
622
606
  <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" />
623
607
  <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" />
@@ -626,6 +610,7 @@
626
610
  <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" />
627
611
  <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" />
628
612
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
613
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
629
614
  <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" />
630
615
  <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
631
616
  <window_info id="CSS-X-Fire" 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" />
@@ -676,7 +661,7 @@
676
661
  <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
677
662
  <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
678
663
  <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
679
- <option name="LAST_COMMIT_MESSAGE" />
664
+ <option name="LAST_COMMIT_MESSAGE" value="Adding support for archive update." />
680
665
  <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
681
666
  <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
682
667
  <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
@@ -690,6 +675,7 @@
690
675
  <option name="UPDATE_FILTER_BY_SCOPE" value="false" />
691
676
  <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
692
677
  <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
678
+ <MESSAGE value="Adding support for archive update." />
693
679
  </component>
694
680
  <component name="XDebuggerManager">
695
681
  <breakpoint-manager>
@@ -727,120 +713,121 @@
727
713
  <line>17</line>
728
714
  </line-breakpoint>
729
715
  </breakpoints>
716
+ <option name="time" value="4" />
730
717
  </breakpoint-manager>
731
718
  </component>
732
719
  <component name="editorHistoryManager">
733
- <entry file="file://$PROJECT_DIR$/zip_dsl.gemspec.erb">
720
+ <entry file="file://$PROJECT_DIR$/README.md">
734
721
  <provider selected="true" editor-type-id="text-editor">
735
722
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
736
723
  <folding />
737
724
  </state>
738
725
  </provider>
726
+ <provider editor-type-id="MarkdownPreviewEditor">
727
+ <state />
728
+ </provider>
739
729
  </entry>
740
- <entry file="file://$PROJECT_DIR$/zip_dsl.gemspec">
730
+ <entry file="file://$PROJECT_DIR$/Gemfile">
741
731
  <provider selected="true" editor-type-id="text-editor">
742
- <state line="6" column="49" selection-start="217" selection-end="217" vertical-scroll-proportion="0.0">
732
+ <state line="0" column="0" selection-start="0" selection-end="29" vertical-scroll-proportion="0.0">
743
733
  <folding />
744
734
  </state>
745
735
  </provider>
746
736
  </entry>
747
- <entry file="file://$PROJECT_DIR$/.ruby-version">
737
+ <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p429@zip_dsl/gems/meta_methods-1.0.5/lib/meta_methods/meta_methods.rb">
748
738
  <provider selected="true" editor-type-id="text-editor">
749
- <state line="0" column="15" selection-start="15" selection-end="15" vertical-scroll-proportion="0.0">
739
+ <state line="35" column="6" selection-start="770" selection-end="770" vertical-scroll-proportion="0.3322091">
750
740
  <folding />
751
741
  </state>
752
742
  </provider>
753
743
  </entry>
754
- <entry file="file://$PROJECT_DIR$/.ruby-gemset">
744
+ <entry file="file://$PROJECT_DIR$/spec/directory_builder_spec.rb">
755
745
  <provider selected="true" editor-type-id="text-editor">
756
- <state line="1" column="33" selection-start="8" selection-end="8" vertical-scroll-proportion="0.0">
746
+ <state line="80" column="0" selection-start="2121" selection-end="2121" vertical-scroll-proportion="0.8181818">
757
747
  <folding />
758
748
  </state>
759
749
  </provider>
760
750
  </entry>
761
- <entry file="file://$PROJECT_DIR$/Gemfile">
751
+ <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p429@zip_dsl/gems/zip-2.0.2/lib/zip/zip.rb">
762
752
  <provider selected="true" editor-type-id="text-editor">
763
- <state line="16" column="37" selection-start="241" selection-end="241" vertical-scroll-proportion="0.2813187">
753
+ <state line="1345" column="8" selection-start="38851" selection-end="38851" vertical-scroll-proportion="-0.3685065">
764
754
  <folding />
765
755
  </state>
766
756
  </provider>
767
757
  </entry>
768
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_writer.rb">
758
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_reader.rb">
769
759
  <provider selected="true" editor-type-id="text-editor">
770
- <state line="2" column="9" selection-start="28" selection-end="28" vertical-scroll-proportion="0.0">
760
+ <state line="33" column="9" selection-start="550" selection-end="550" vertical-scroll-proportion="0.0">
771
761
  <folding />
772
762
  </state>
773
763
  </provider>
774
764
  </entry>
775
- <entry file="file://$PROJECT_DIR$/lib/directory_builder.rb">
765
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl.rb">
776
766
  <provider selected="true" editor-type-id="text-editor">
777
- <state line="7" column="15" selection-start="136" selection-end="137" vertical-scroll-proportion="-4.3076925">
767
+ <state line="2" column="28" selection-start="86" selection-end="86" vertical-scroll-proportion="0.051948052">
778
768
  <folding />
779
769
  </state>
780
770
  </provider>
781
771
  </entry>
782
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl.rb">
772
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_dsl.rb">
783
773
  <provider selected="true" editor-type-id="text-editor">
784
- <state line="3" column="35" selection-start="84" selection-end="84" vertical-scroll-proportion="0.0">
774
+ <state line="24" column="0" selection-start="537" selection-end="537" vertical-scroll-proportion="0.6233766">
785
775
  <folding />
786
776
  </state>
787
777
  </provider>
788
778
  </entry>
789
- <entry file="file://$PROJECT_DIR$/spec/zip_builder_spec.rb">
779
+ <entry file="file://$PROJECT_DIR$/Rakefile">
790
780
  <provider selected="true" editor-type-id="text-editor">
791
- <state line="4" column="12" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0">
781
+ <state line="36" column="0" selection-start="723" selection-end="723" vertical-scroll-proportion="0.84415585">
792
782
  <folding />
793
783
  </state>
794
784
  </provider>
795
785
  </entry>
796
- <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
786
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_writer.rb">
797
787
  <provider selected="true" editor-type-id="text-editor">
798
- <state line="1" column="28" selection-start="0" selection-end="59" vertical-scroll-proportion="0.0">
788
+ <state line="66" column="0" selection-start="1475" selection-end="1550" vertical-scroll-proportion="-10.692307">
799
789
  <folding />
800
790
  </state>
801
791
  </provider>
802
792
  </entry>
803
- <entry file="file://$PROJECT_DIR$/spec/directory_builder_spec.rb">
793
+ <entry file="file://$PROJECT_DIR$/spec/zip_builder_spec.rb">
804
794
  <provider selected="true" editor-type-id="text-editor">
805
- <state line="39" column="33" selection-start="1180" selection-end="1180" vertical-scroll-proportion="0.0">
795
+ <state line="75" column="38" selection-start="2127" selection-end="2127" vertical-scroll-proportion="0.0">
806
796
  <folding />
807
797
  </state>
808
798
  </provider>
809
799
  </entry>
810
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_dsl.rb">
800
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_updater.rb">
811
801
  <provider selected="true" editor-type-id="text-editor">
812
- <state line="36" column="31" selection-start="1005" selection-end="1005" vertical-scroll-proportion="0.0">
802
+ <state line="70" column="0" selection-start="1769" selection-end="1769" vertical-scroll-proportion="0.0">
813
803
  <folding />
814
804
  </state>
815
805
  </provider>
816
806
  </entry>
817
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl/zip_reader.rb">
807
+ <entry file="file://$PROJECT_DIR$/lib/zip_dsl/version.rb">
818
808
  <provider selected="true" editor-type-id="text-editor">
819
- <state line="33" column="48" selection-start="550" selection-end="550" vertical-scroll-proportion="0.0">
809
+ <state line="1" column="16" selection-start="30" selection-end="30" vertical-scroll-proportion="0.0">
820
810
  <folding />
821
811
  </state>
822
812
  </provider>
823
813
  </entry>
824
- <entry file="file://$PROJECT_DIR$/README.md">
825
- <provider editor-type-id="MarkdownPreviewEditor">
826
- <state />
827
- </provider>
814
+ <entry file="file://$PROJECT_DIR$/.ruby-gemset">
828
815
  <provider selected="true" editor-type-id="text-editor">
829
816
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
830
817
  <folding />
831
818
  </state>
832
819
  </provider>
833
820
  </entry>
834
- <entry file="file://$PROJECT_DIR$/Rakefile">
821
+ <entry file="file://$PROJECT_DIR$/.ruby-version">
835
822
  <provider selected="true" editor-type-id="text-editor">
836
- <state line="36" column="15" selection-start="723" selection-end="723" vertical-scroll-proportion="0.0">
823
+ <state line="0" column="10" selection-start="10" selection-end="10" vertical-scroll-proportion="0.0">
837
824
  <folding />
838
825
  </state>
839
826
  </provider>
840
827
  </entry>
841
- <entry file="file://$PROJECT_DIR$/lib/zip_dsl/version.rb">
828
+ <entry file="file://$PROJECT_DIR$/CHANGES">
842
829
  <provider selected="true" editor-type-id="text-editor">
843
- <state line="1" column="17" selection-start="31" selection-end="31" vertical-scroll-proportion="0.02698145">
830
+ <state line="8" column="2" selection-start="69" selection-end="69" vertical-scroll-proportion="0.20779221">
844
831
  <folding />
845
832
  </state>
846
833
  </provider>
data/.idea/zip_dsl.iml CHANGED
@@ -13,6 +13,19 @@
13
13
  <content url="file://$MODULE_DIR$" />
14
14
  <orderEntry type="inheritedJdk" />
15
15
  <orderEntry type="sourceFolder" forTests="false" />
16
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.1, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.6, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.0.5, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="meta_methods (v1.0.5, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.1, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="mocha (v0.10.3, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v2.9.0, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.9.0, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.9.1, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.9.0, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="zip (v2.0.2, RVM: ruby-1.9.3-p429 [zip_dsl]) [gem]" level="application" />
16
29
  </component>
17
30
  </module>
18
31
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-1.9.3-p392
1
+ ruby-1.9.3
data/CHANGES ADDED
@@ -0,0 +1,9 @@
1
+ = Zip DSL
2
+
3
+ == Version 1.0.0
4
+
5
+ * Initial release.
6
+
7
+ == Version 1.2.0
8
+
9
+ * Adding support for archive update.
@@ -1,3 +1,3 @@
1
1
  module ZipDSL
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -3,6 +3,8 @@ require 'meta_methods'
3
3
  class ZipDSL
4
4
  include MetaMethods
5
5
 
6
+ attr_reader :name, :basedir
7
+
6
8
  def initialize name, basedir
7
9
  @name = File.expand_path(name)
8
10
  @basedir = File.expand_path(basedir)
@@ -17,6 +19,15 @@ class ZipDSL
17
19
  evaluate_dsl(create_block, destroy_block, execute_block)
18
20
  end
19
21
 
22
+ def update(name=nil, &execute_block)
23
+ name = name.nil? ? @name : name
24
+
25
+ create_block = lambda { ZipUpdater.new(name, @basedir) }
26
+ destroy_block = lambda {|updater| updater.close }
27
+
28
+ evaluate_dsl(create_block, destroy_block, execute_block)
29
+ end
30
+
20
31
  def entry_exist? entry_name
21
32
  create_block = lambda { ZipReader.new(@name) }
22
33
  destroy_block = lambda {|reader| reader.close }
@@ -0,0 +1,105 @@
1
+ require 'zip/zip'
2
+
3
+ class ZipUpdater
4
+
5
+ def initialize file_name, basedir
6
+ @zipfile = Zip::ZipFile.open(file_name)
7
+ @basedir = basedir
8
+ end
9
+
10
+ def close
11
+ @zipfile.close
12
+ end
13
+
14
+ def file params
15
+ to_dir = params[:to_dir].nil? ? File.dirname(params[:name]) : strip_dot(params[:to_dir])
16
+
17
+ add_or_replace_file full_name(params[:name]), "#{to_dir}/#{params[:name]}"
18
+ end
19
+
20
+ def content params
21
+ to_dir = params[:to_dir].nil? ? File.dirname(params[:name]) : params[:to_dir]
22
+
23
+ add_or_replace_file params[:name], to_dir, params[:source]
24
+ end
25
+
26
+ def directory params
27
+ if params[:from_dir].nil?
28
+ add_empty_directory params[:to_dir]
29
+ else
30
+ if params[:to_dir].nil?
31
+ to_dir = params[:from_dir]
32
+ else
33
+ to_dir = params[:to_dir]
34
+ end
35
+
36
+ filter = params[:filter].nil? ? "**/*" : params[:filter]
37
+
38
+ add_directory params[:from_dir], to_dir, filter
39
+ end
40
+
41
+ #Dir["spec/stubs/**/*.*"].each do |name|
42
+ # if File.file? name
43
+ # add_or_replace(zipfile, "WEB-INF/spec/stubs/#{name['spec/stubs'.size+1..-1]}", name)
44
+ # end
45
+ #end
46
+ end
47
+
48
+ private
49
+
50
+ def add_or_replace_file from_name, to_name
51
+ begin
52
+ @zipfile.add to_name, from_name
53
+ rescue Zip::ZipEntryExistsError
54
+ @zipfile.replace to_name, from_name
55
+ end
56
+ end
57
+
58
+ def add_directory from_dir, to_dir, filter="**/*"
59
+ patterns = filter.kind_of?(String) ? [filter] : filter
60
+
61
+ patterns.each do |pattern|
62
+ files = pattern_to_files full_name(from_dir), pattern
63
+
64
+ files.each do |from_name|
65
+ suffix = File.dirname(from_name)[full_name(from_dir).size+1..-1]
66
+ dir = suffix.nil? ? to_dir : "#{to_dir}/#{suffix}"
67
+
68
+ if File.file?(from_name)
69
+ to_name = "#{dir}/#{from_name[full_name(dir).size+1..-1]}"
70
+
71
+ add_or_replace_file from_name, to_name
72
+ end
73
+ end
74
+ end
75
+ end
76
+
77
+ def add_empty_directory(name)
78
+ puts "adding empty dir: #{name}"
79
+
80
+ #entry = Zip::ZipStreamableDirectory.new "", "#{name}/"
81
+ #
82
+ #@zos.put_next_entry entry
83
+ end
84
+
85
+ def pattern_to_files dir, pattern
86
+ Dir.glob("#{dir}/#{pattern}")
87
+ end
88
+
89
+ def strip_dot name
90
+ if name[name.length-2..-1] == "/."
91
+ name = name[0..name.length-3]
92
+ end
93
+
94
+ name
95
+ end
96
+
97
+ def full_name? name
98
+ File.expand_path(name) == name
99
+ end
100
+
101
+ def full_name name
102
+ full_name?(name) ? name : "#@basedir/#{name}"
103
+ end
104
+
105
+ end
data/lib/zip_dsl.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'zip_dsl/zip_reader'
2
2
  require 'zip_dsl/zip_writer'
3
+ require 'zip_dsl/zip_updater'
3
4
  require 'zip_dsl/zip_dsl'
@@ -5,7 +5,7 @@ require 'zip_dsl'
5
5
  describe ZipDSL do
6
6
  let(:basedir) { "#{File.dirname(__FILE__)}/.." }
7
7
 
8
- subject { ZipDSL.new "../test.zip", basedir }
8
+ subject { ZipDSL.new "test.zip", basedir }
9
9
 
10
10
  it "should create new zip file with files at particular folder" do
11
11
  subject.build do
@@ -58,6 +58,24 @@ describe ZipDSL do
58
58
  subject.entries_size.should > 1
59
59
  end
60
60
 
61
+ it "should update existing zip file" do
62
+ subject.build do
63
+ file :name => "Gemfile"
64
+ end
65
+
66
+ File.exist?(subject.name).should be_true
67
+ subject.entry_exist?("Gemfile").should be_true
68
+
69
+ subject.update do
70
+ file :name => "README.md"
71
+ directory :from_dir => "lib"
72
+ end
73
+
74
+ subject.entry_exist?("Gemfile").should be_true
75
+ subject.entry_exist?("README.md").should be_true
76
+ subject.entry_exist?("lib/zip_dsl/version.rb").should be_true
77
+ end
78
+
61
79
  it "should display files in current directory" do
62
80
  subject.build do
63
81
  directory :from_dir => "spec"
data/test.zip CHANGED
Binary file
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zip_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Alexander Shvets
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-05-09 00:00:00.000000000 Z
12
+ date: 2013-06-17 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: meta_methods
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: zip
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: file_utils
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: gemspec_deps_gen
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: gemcutter
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -99,6 +110,7 @@ files:
99
110
  - .idea/zip_dsl.iml
100
111
  - .ruby-gemset
101
112
  - .ruby-version
113
+ - CHANGES
102
114
  - Gemfile
103
115
  - LICENSE
104
116
  - README.md
@@ -108,6 +120,7 @@ files:
108
120
  - lib/zip_dsl/version.rb
109
121
  - lib/zip_dsl/zip_dsl.rb
110
122
  - lib/zip_dsl/zip_reader.rb
123
+ - lib/zip_dsl/zip_updater.rb
111
124
  - lib/zip_dsl/zip_writer.rb
112
125
  - spec/directory_builder_spec.rb
113
126
  - spec/spec_helper.rb
@@ -117,26 +130,27 @@ files:
117
130
  - zip_dsl.gemspec.erb
118
131
  homepage: http://github.com/shvets/zip_dsl
119
132
  licenses: []
120
- metadata: {}
121
133
  post_install_message:
122
134
  rdoc_options: []
123
135
  require_paths:
124
136
  - lib
125
137
  required_ruby_version: !ruby/object:Gem::Requirement
138
+ none: false
126
139
  requirements:
127
140
  - - ! '>='
128
141
  - !ruby/object:Gem::Version
129
142
  version: '0'
130
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
+ none: false
131
145
  requirements:
132
146
  - - ! '>='
133
147
  - !ruby/object:Gem::Version
134
148
  version: '0'
135
149
  requirements: []
136
150
  rubyforge_project:
137
- rubygems_version: 2.0.3
151
+ rubygems_version: 1.8.25
138
152
  signing_key:
139
- specification_version: 4
153
+ specification_version: 3
140
154
  summary: Library for working with zip file in DSL-way
141
155
  test_files:
142
156
  - spec/directory_builder_spec.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NTQwNzE2NjA2NDk4NTQ2YTE0NDk1OGFjYzczZGI3Y2U3MjliYmQyYg==
5
- data.tar.gz: !binary |-
6
- NGNjMTljYzZkOWViMmI1MDY5MTViNTE0Mzg5YWZiMmM2MGEzNmU1MQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NThiYjI2MjFlNTg3OTZiNjA0MzUwZDQ4MjBlYjVjZmY0YTIxYThmOTA0OGQ1
10
- ZTlkZTljMDM0ODI0NTY5MGI0ZGE5MzBhOGQwNDVmNWY3M2I5ZjAxM2I4ZGU1
11
- YTE0ZmMwOGI3ZGU2OGVlNzdjZThkZmMxNzA3N2U4MTJmMGZlMjU=
12
- data.tar.gz: !binary |-
13
- NDg2ZjMxMDIyNzllNGQ0MGRlOTI4MDIwZjBiMjhkZTE1OTQwNGU3YzRhMWVh
14
- Y2RkMThlN2I5OWNiY2U5ZGE5NmMxYjk1YTczNjY2OTVkNWQ1YmRjOGU3YjBh
15
- YmI2ZmJhN2I5NDYxZGRmZTZiN2Y1NjJlNDZkMDk5OWJjNjgyNWQ=