tb_release 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
@@ -0,0 +1 @@
1
+ tb_release
@@ -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 tb_release-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install tb_release-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push tb_release-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
5
+
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DependencyValidationManager">
4
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.8.7-p352" project-jdk-type="RUBY_SDK" />
7
+ </project>
8
+
@@ -0,0 +1,9 @@
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/tb_release.iml" filepath="$PROJECT_DIR$/.idea/tb_release.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
9
+
@@ -0,0 +1,10 @@
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="bundler (v1.0.21, RVM: ruby-1.8.7-p352) [gem]" level="application" />
8
+ </component>
9
+ </module>
10
+
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
7
+
@@ -0,0 +1,363 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="BookmarkManager">
4
+ <bookmark url="file://$PROJECT_DIR$/lib/tb_release/capistrano.rb" line="24" mnemonic="7" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="0d2b47ff-9f1d-4257-817d-19d331ad1154" name="Default" comment="" />
8
+ <ignored path="tb_release.iws" />
9
+ <ignored path=".idea/workspace.xml" />
10
+ <option name="TRACKING_ENABLED" value="true" />
11
+ <option name="SHOW_DIALOG" value="false" />
12
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
+ <option name="LAST_RESOLUTION" value="IGNORE" />
15
+ </component>
16
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
17
+ <component name="CreatePatchCommitExecutor">
18
+ <option name="PATCH_PATH" value="" />
19
+ <option name="REVERSE_PATCH" value="false" />
20
+ </component>
21
+ <component name="DaemonCodeAnalyzer">
22
+ <disable_hints />
23
+ </component>
24
+ <component name="FavoritesManager">
25
+ <favorites_list name="tb_release" />
26
+ </component>
27
+ <component name="FileEditorManager">
28
+ <leaf>
29
+ <file leaf-file-name="tb_release.rb" pinned="false" current="true" current-in-tab="true">
30
+ <entry file="file://$PROJECT_DIR$/lib/tb_release.rb">
31
+ <provider selected="true" editor-type-id="text-editor">
32
+ <state line="215" column="26" selection-start="6135" selection-end="6135" vertical-scroll-proportion="0.97161776">
33
+ <folding />
34
+ </state>
35
+ </provider>
36
+ </entry>
37
+ </file>
38
+ <file leaf-file-name="command.rb" pinned="false" current="false" current-in-tab="false">
39
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/command.rb">
40
+ <provider selected="true" editor-type-id="text-editor">
41
+ <state line="1" column="9" selection-start="26" selection-end="33" vertical-scroll-proportion="0.0">
42
+ <folding />
43
+ </state>
44
+ </provider>
45
+ </entry>
46
+ </file>
47
+ <file leaf-file-name="capistrano.rb" pinned="false" current="false" current-in-tab="false">
48
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/capistrano.rb">
49
+ <provider selected="true" editor-type-id="text-editor">
50
+ <state line="0" column="20" selection-start="20" selection-end="20" vertical-scroll-proportion="0.0">
51
+ <folding />
52
+ </state>
53
+ </provider>
54
+ </entry>
55
+ </file>
56
+ <file leaf-file-name="release_version.rb" pinned="false" current="false" current-in-tab="false">
57
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/release_version.rb">
58
+ <provider selected="true" editor-type-id="text-editor">
59
+ <state line="5" column="23" selection-start="85" selection-end="85" vertical-scroll-proportion="0.0">
60
+ <folding />
61
+ </state>
62
+ </provider>
63
+ </entry>
64
+ </file>
65
+ </leaf>
66
+ </component>
67
+ <component name="FindManager">
68
+ <FindUsagesManager>
69
+ <setting name="OPEN_NEW_TAB" value="false" />
70
+ </FindUsagesManager>
71
+ </component>
72
+ <component name="Git.Settings">
73
+ <option name="CHECKOUT_INCLUDE_TAGS" value="false" />
74
+ <option name="UPDATE_CHANGES_POLICY" value="STASH" />
75
+ </component>
76
+ <component name="IdeDocumentHistory">
77
+ <option name="changedFiles">
78
+ <list>
79
+ <option value="$PROJECT_DIR$/lib/tb_release.thor" />
80
+ <option value="$PROJECT_DIR$/bin/tbrelease" />
81
+ <option value="$PROJECT_DIR$/bund.rb" />
82
+ <option value="$PROJECT_DIR$/tb_release.gemspec" />
83
+ <option value="$PROJECT_DIR$/lib/command.rb" />
84
+ <option value="$PROJECT_DIR$/lib/tb_release/command.rb" />
85
+ <option value="$PROJECT_DIR$/lib/tb_release/git.rb" />
86
+ <option value="$PROJECT_DIR$/lib/tb_release.rb" />
87
+ <option value="$PROJECT_DIR$/lib/tb_release/capistrano.rb" />
88
+ </list>
89
+ </option>
90
+ </component>
91
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
92
+ <OptionsSetting value="true" id="Add" />
93
+ <OptionsSetting value="true" id="Remove" />
94
+ <OptionsSetting value="true" id="Checkout" />
95
+ <OptionsSetting value="true" id="Update" />
96
+ <OptionsSetting value="true" id="Status" />
97
+ <OptionsSetting value="true" id="Edit" />
98
+ <ConfirmationsSetting value="0" id="Add" />
99
+ <ConfirmationsSetting value="0" id="Remove" />
100
+ </component>
101
+ <component name="ProjectReloadState">
102
+ <option name="STATE" value="0" />
103
+ </component>
104
+ <component name="ProjectView">
105
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
106
+ <flattenPackages />
107
+ <showMembers />
108
+ <showModules />
109
+ <showLibraryContents />
110
+ <hideEmptyPackages />
111
+ <abbreviatePackageNames />
112
+ <autoscrollToSource />
113
+ <autoscrollFromSource />
114
+ <sortByType />
115
+ </navigator>
116
+ <panes>
117
+ <pane id="Favorites" />
118
+ <pane id="Scope" />
119
+ <pane id="ProjectPane">
120
+ <subPane>
121
+ <PATH>
122
+ <PATH_ELEMENT>
123
+ <option name="myItemId" value="tb_release" />
124
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
125
+ </PATH_ELEMENT>
126
+ </PATH>
127
+ <PATH>
128
+ <PATH_ELEMENT>
129
+ <option name="myItemId" value="tb_release" />
130
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
131
+ </PATH_ELEMENT>
132
+ <PATH_ELEMENT>
133
+ <option name="myItemId" value="tb_release" />
134
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
135
+ </PATH_ELEMENT>
136
+ </PATH>
137
+ <PATH>
138
+ <PATH_ELEMENT>
139
+ <option name="myItemId" value="tb_release" />
140
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
141
+ </PATH_ELEMENT>
142
+ <PATH_ELEMENT>
143
+ <option name="myItemId" value="tb_release" />
144
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
145
+ </PATH_ELEMENT>
146
+ <PATH_ELEMENT>
147
+ <option name="myItemId" value="lib" />
148
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
149
+ </PATH_ELEMENT>
150
+ </PATH>
151
+ <PATH>
152
+ <PATH_ELEMENT>
153
+ <option name="myItemId" value="tb_release" />
154
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
155
+ </PATH_ELEMENT>
156
+ <PATH_ELEMENT>
157
+ <option name="myItemId" value="tb_release" />
158
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
159
+ </PATH_ELEMENT>
160
+ <PATH_ELEMENT>
161
+ <option name="myItemId" value="lib" />
162
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
163
+ </PATH_ELEMENT>
164
+ <PATH_ELEMENT>
165
+ <option name="myItemId" value="tb_release" />
166
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
167
+ </PATH_ELEMENT>
168
+ </PATH>
169
+ <PATH>
170
+ <PATH_ELEMENT>
171
+ <option name="myItemId" value="tb_release" />
172
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
173
+ </PATH_ELEMENT>
174
+ <PATH_ELEMENT>
175
+ <option name="myItemId" value="tb_release" />
176
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
177
+ </PATH_ELEMENT>
178
+ <PATH_ELEMENT>
179
+ <option name="myItemId" value="bin" />
180
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
181
+ </PATH_ELEMENT>
182
+ </PATH>
183
+ </subPane>
184
+ </pane>
185
+ </panes>
186
+ </component>
187
+ <component name="PropertiesComponent">
188
+ <property name="WebServerToolWindowFactoryState" value="false" />
189
+ </component>
190
+ <component name="RunManager">
191
+ <list size="0" />
192
+ </component>
193
+ <component name="ShelveChangesManager" show_recycled="false" />
194
+ <component name="SvnConfiguration" maxAnnotateRevisions="500">
195
+ <option name="USER" value="" />
196
+ <option name="PASSWORD" value="" />
197
+ <option name="mySSHConnectionTimeout" value="30000" />
198
+ <option name="mySSHReadTimeout" value="30000" />
199
+ <option name="LAST_MERGED_REVISION" />
200
+ <option name="MERGE_DRY_RUN" value="false" />
201
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
202
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
203
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
204
+ <option name="DETECT_NESTED_COPIES" value="true" />
205
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
206
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
207
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
208
+ <option name="FORCE_UPDATE" value="false" />
209
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
210
+ </component>
211
+ <component name="TaskManager">
212
+ <task active="true" id="Default" summary="Default task">
213
+ <changelist id="0d2b47ff-9f1d-4257-817d-19d331ad1154" name="Default" comment="" />
214
+ <created>1322217927379</created>
215
+ <updated>1322217927379</updated>
216
+ </task>
217
+ <servers />
218
+ </component>
219
+ <component name="TodoView" selected-index="0">
220
+ <todo-panel id="selected-file">
221
+ <are-packages-shown value="false" />
222
+ <are-modules-shown value="false" />
223
+ <flatten-packages value="false" />
224
+ <is-autoscroll-to-source value="false" />
225
+ </todo-panel>
226
+ <todo-panel id="all">
227
+ <are-packages-shown value="false" />
228
+ <are-modules-shown value="false" />
229
+ <flatten-packages value="false" />
230
+ <is-autoscroll-to-source value="false" />
231
+ </todo-panel>
232
+ <todo-panel id="default-changelist">
233
+ <are-packages-shown value="false" />
234
+ <are-modules-shown value="false" />
235
+ <flatten-packages value="false" />
236
+ <is-autoscroll-to-source value="false" />
237
+ </todo-panel>
238
+ </component>
239
+ <component name="ToolWindowManager">
240
+ <frame x="0" y="22" width="1874" height="1178" extended-state="0" />
241
+ <editor active="false" />
242
+ <layout>
243
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25598526" sideWeight="0.94468784" order="7" side_tool="false" content_ui="tabs" />
244
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32872927" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
245
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32872927" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
246
+ <window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16812706" sideWeight="0.6712707" order="4" side_tool="true" content_ui="tabs" x="1493" y="234" width="371" height="307" />
247
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
248
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2705367" sideWeight="0.6712707" order="0" side_tool="false" content_ui="tabs" x="1487" y="67" width="367" height="1086" />
249
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3985043" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
250
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32905984" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
251
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3296501" sideWeight="0.99749684" order="8" side_tool="false" content_ui="tabs" />
252
+ <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" />
253
+ <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.19626169" sideWeight="0.6703499" order="3" side_tool="false" content_ui="tabs" />
254
+ <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" />
255
+ <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" />
256
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32905984" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
257
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
258
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
259
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
260
+ </layout>
261
+ </component>
262
+ <component name="VcsManagerConfiguration">
263
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
264
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
265
+ <option name="CHECK_NEW_TODO" value="true" />
266
+ <option name="myTodoPanelSettings">
267
+ <value>
268
+ <are-packages-shown value="false" />
269
+ <are-modules-shown value="false" />
270
+ <flatten-packages value="false" />
271
+ <is-autoscroll-to-source value="false" />
272
+ </value>
273
+ </option>
274
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
275
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
276
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
277
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
278
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
279
+ <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
280
+ <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
281
+ <option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
282
+ <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
283
+ <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
284
+ <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
285
+ <option name="DEFAULT_PATCH_EXTENSION" value="patch" />
286
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
287
+ <option name="LAST_COMMIT_MESSAGE" />
288
+ <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
289
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
290
+ <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
291
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
292
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
293
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
294
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
295
+ <option name="ACTIVE_VCS_NAME" />
296
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
297
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
298
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
299
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
300
+ </component>
301
+ <component name="XDebuggerManager">
302
+ <breakpoint-manager />
303
+ </component>
304
+ <component name="editorHistoryManager">
305
+ <entry file="file://$PROJECT_DIR$/bin/tbrelease">
306
+ <provider selected="true" editor-type-id="text-editor">
307
+ <state line="5" column="31" selection-start="58" selection-end="89" vertical-scroll-proportion="0.07095554">
308
+ <folding />
309
+ </state>
310
+ </provider>
311
+ </entry>
312
+ <entry file="file://$PROJECT_DIR$/Gemfile">
313
+ <provider selected="true" editor-type-id="text-editor">
314
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
315
+ <folding />
316
+ </state>
317
+ </provider>
318
+ </entry>
319
+ <entry file="file://$PROJECT_DIR$/tb_release.gemspec">
320
+ <provider selected="true" editor-type-id="text-editor">
321
+ <state line="25" column="39" selection-start="869" selection-end="869" vertical-scroll-proportion="0.53571427">
322
+ <folding />
323
+ </state>
324
+ </provider>
325
+ </entry>
326
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/version.rb">
327
+ <provider selected="true" editor-type-id="text-editor">
328
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
329
+ <folding />
330
+ </state>
331
+ </provider>
332
+ </entry>
333
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/release_version.rb">
334
+ <provider selected="true" editor-type-id="text-editor">
335
+ <state line="5" column="23" selection-start="85" selection-end="85" vertical-scroll-proportion="0.0">
336
+ <folding />
337
+ </state>
338
+ </provider>
339
+ </entry>
340
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/capistrano.rb">
341
+ <provider selected="true" editor-type-id="text-editor">
342
+ <state line="0" column="20" selection-start="20" selection-end="20" vertical-scroll-proportion="0.0">
343
+ <folding />
344
+ </state>
345
+ </provider>
346
+ </entry>
347
+ <entry file="file://$PROJECT_DIR$/lib/tb_release/command.rb">
348
+ <provider selected="true" editor-type-id="text-editor">
349
+ <state line="1" column="9" selection-start="26" selection-end="33" vertical-scroll-proportion="0.0">
350
+ <folding />
351
+ </state>
352
+ </provider>
353
+ </entry>
354
+ <entry file="file://$PROJECT_DIR$/lib/tb_release.rb">
355
+ <provider selected="true" editor-type-id="text-editor">
356
+ <state line="215" column="26" selection-start="6135" selection-end="6135" vertical-scroll-proportion="0.97161776">
357
+ <folding />
358
+ </state>
359
+ </provider>
360
+ </entry>
361
+ </component>
362
+ </project>
363
+
@@ -0,0 +1,32 @@
1
+ CHANGELOG
2
+
3
+ == 0.0.9
4
+
5
+ * revert "dont ask for release version if branch is set explicitly"
6
+
7
+ == 0.0.8
8
+
9
+ * dont ask for release version if branch is set explicitly
10
+
11
+ == 0.0.7
12
+
13
+ * fix version mismatch
14
+
15
+ == 0.0.6
16
+
17
+ * run build and install before upload to gem server (install.sh)
18
+ * logging contains prefix [tb_release]
19
+
20
+ == 0.0.5
21
+
22
+ * fix typo in method version
23
+
24
+ == 0.0.4
25
+
26
+ * add option to print program version
27
+
28
+ == 0.0.3
29
+
30
+ * run cap command via "bundle exec"
31
+
32
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in tb_release.gemspec
4
+ gemspec
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'thor'
4
+ require 'tb_release'
5
+
6
+ TbRelease::TbRelease.start ARGV
7
+
8
+
@@ -0,0 +1,20 @@
1
+ #!/bin/sh
2
+
3
+ GEM_SERVER="thomas@gems.thomasbaustert.de"
4
+ GEM_PATH="/var/www/gem-server/gems/"
5
+ VERSION=$1
6
+
7
+ if [[ "$1" == "" ]]; then
8
+ echo "install <version>"
9
+ exit 1
10
+ fi
11
+
12
+ echo "install ${VERSION} locally"
13
+ rake build
14
+ rake install
15
+
16
+ echo "install ${VERSION} to ${GEM_SERVER}:${GEM_PATH}"
17
+ scp pkg/tb_release-${VERSION}.gem ${GEM_SERVER}:${GEM_PATH}
18
+ ssh ${GEM_SERVER} "cd ${GEM_PATH} && gem generate_index -d ."
19
+
20
+
@@ -0,0 +1,260 @@
1
+ require "tb_release/version"
2
+ require "tb_release/command"
3
+ require "tb_release/release_version"
4
+ require "tb_release/capistrano"
5
+ require "thor"
6
+ require "bundler"
7
+
8
+ module TbRelease
9
+
10
+ class TbRelease < Thor
11
+ include Command
12
+ include ReleaseVersion
13
+
14
+ APP_NAME = "tbrelease"
15
+
16
+ CHANGES_FILENAME = "CHANGES.rdoc"
17
+
18
+ attr_reader :release_version
19
+
20
+ desc "verify", "Verify the current sources for a new release"
21
+ def verify
22
+ print_env
23
+
24
+ info "verify no uncommitted changes exists ..."
25
+ verify_no_uncommitted_changes
26
+
27
+ info "verify branch is uptodate ..."
28
+ verify_branch_uptodate
29
+
30
+ prepare_release_version
31
+
32
+ info "verify new release version ..."
33
+ verify_new_release_version(release_version)
34
+
35
+ info "verify new release version #{release_version} (tag) not already exists..."
36
+ verify_release_version_not_exists_already
37
+
38
+ info "verify changes for release version exists ..."
39
+ verify_changes_for_version(release_version)
40
+
41
+ info "finished verification."
42
+ end
43
+
44
+ desc "prepare", "Prepare the release (tag commit with release version, push tag)."
45
+ def prepare
46
+ verify
47
+
48
+ tag_with_version(release_version)
49
+ push_tag
50
+ end
51
+
52
+ desc "release", "Release a new version to given deploy env [--deploy_env=env]"
53
+ method_options :deploy_env => :string
54
+ def release
55
+ prepare
56
+
57
+ if yn_ask("Release version #{release_version} to env #{deploy_env}?")
58
+ deploy_release
59
+ end
60
+ end
61
+
62
+ desc "version", "Print version"
63
+ def version
64
+ log "#{APP_NAME} version #{VERSION}"
65
+ end
66
+
67
+ private
68
+
69
+ def deploy_release
70
+ info "setup bundler"
71
+ Bundler.setup
72
+ cmd = [ "bundle", "exec", "cap", "--set-before", "release_version=v#{release_version}",
73
+ "#{deploy_env}", "deploy:migrations" ]
74
+ info "#{cmd.join(' ')}"
75
+ Kernel.exec(*cmd)
76
+ end
77
+
78
+ def print_env
79
+ log "---------------------------------------------------------------"
80
+ log "New release to: #{deploy_env}"
81
+ log "---------------------------------------------------------------"
82
+ log "You are on branch '#{current_branch}'"
83
+ log "Commit on branch '#{current_branch}' to be tagged with new version: "
84
+ log " " + current_commit.split("\n").join("\n ")
85
+ log "---------------------------------------------------------------"
86
+ end
87
+
88
+ def verify_release_needed
89
+ #yn_ask "No changes were made since last release. Continue?"
90
+ # TODO 07.11.11/17:20/tbaustert
91
+ # check REVISION on server?
92
+ end
93
+
94
+ def verify_no_uncommitted_changes
95
+ command "git status --short", true
96
+ unless @output.empty?
97
+ warn "There are uncommitted changes:"
98
+ log @output
99
+ continue?
100
+ end
101
+ end
102
+
103
+ def verify_branch_uptodate
104
+ command "git fetch -q origin #{current_branch}"
105
+
106
+ local = current_commit
107
+ local_sha = (local.grep /^commit/).first.strip
108
+ remote = current_commit("origin/#{current_branch}")
109
+ remote_sha = (remote.grep /^commit/).first.strip
110
+
111
+ if local_sha == remote_sha
112
+ log "Branch 'origin/#{current_branch}' is up to date and is used for the release."
113
+ else
114
+ warn "Branch '#{current_branch}' and 'origin/#{current_branch}' are not identical."
115
+ warn "Do you forget to push commits first?"
116
+ log "--- Local ---\n#{local}"
117
+ log ""
118
+ log "--- Remote ---\n#{remote}"
119
+ log ""
120
+ continue?
121
+ end
122
+ end
123
+
124
+ def verify_release_version_not_exists_already
125
+ command "git tag -l v#{release_version}", true
126
+ unless blank?(@output)
127
+ warn "Release version #{release_version} already exists."
128
+ warn "Release aborted."
129
+ exit(1)
130
+ end
131
+ end
132
+
133
+ def prepare_release_version
134
+ if blank?(release_version)
135
+ log "prepare release version ..."
136
+
137
+ last_version = last_release_version
138
+ next_version = next_release_version(last_version)
139
+
140
+ log "Last release version: #{last_version}"
141
+ new_version = ask "New release version? (#{next_version}):"
142
+ new_version = next_version if blank?(new_version)
143
+
144
+ @release_version = new_version
145
+ end
146
+ @release_version
147
+ end
148
+
149
+ def last_release_version
150
+ command 'git tag', true
151
+ version = available_release_versions.last
152
+ version = "0.0.0" if blank?(version)
153
+ version.sub /^[a-zA-Z]*/, '' # v1.2.3 => 1.2.3
154
+ end
155
+
156
+ # 2.0.9 => 2.0.10 OR v1.2.3-rc1 => v1.2.3-rc2
157
+ def next_release_version(last_version)
158
+ minor_number = last_version.scan(/(\d+)/).last # e.g. ["9"]
159
+ minor_number = minor_number.first.to_s.to_i # "9"
160
+ minor_number += 1 # "10"
161
+ prefix = last_version.reverse.sub(/^\d+/, '').reverse
162
+ "#{prefix}#{minor_number}"
163
+ end
164
+
165
+ def verify_new_release_version(version)
166
+ if (/^[0-9]+\.[0-9]+\.[0-9]+(-rc\d+)?$/ =~ version).nil?
167
+ warn "New version #{version} is not of format 'x.y.z'"
168
+ exit(1)
169
+ end
170
+ end
171
+
172
+ def verify_changes_for_version(version)
173
+ if changes_file_exists?
174
+ unless changes_for_version_exists?(version)
175
+ warn "No changes for version #{version} found in #{CHANGES_FILENAME}."
176
+ continue?
177
+ end
178
+ else
179
+ warn "File #{CHANGES_FILENAME} does not exists. Please create it."
180
+ continue?
181
+ end
182
+ end
183
+
184
+ def changes_file_exists?
185
+ File.exists? "#{project_root}/#{CHANGES_FILENAME}"
186
+ end
187
+
188
+ def changes_for_version_exists?(version)
189
+ lines = File.readlines "#{project_root}/#{CHANGES_FILENAME}"
190
+ lines.any? { |line| /^== *#{version} *$/ =~ line }
191
+ end
192
+
193
+ def project_root
194
+ #RAILS_ROOT
195
+ Dir.pwd
196
+ end
197
+
198
+ def deploy_env
199
+ options[:deploy_env] || "staging"
200
+ end
201
+
202
+ def current_branch
203
+ command 'git branch 2>/dev/null | cut -f2 -d* -s | sed "s/^\ //"', true
204
+ @output
205
+ end
206
+
207
+ def current_commit(branch = current_branch)
208
+ command "git log -n1 #{branch}", true
209
+ @output
210
+ end
211
+
212
+ def tag_with_version(version)
213
+ tag = "v#{version}"
214
+ command "git tag -a -m '#{tag}' #{tag}"
215
+ log "Tag current commit with #{tag}"
216
+ end
217
+
218
+ def push_tag
219
+ command "git push --tags origin #{current_branch}"
220
+ end
221
+
222
+ def yn_ask(msg, options = {})
223
+ default = (options[:default] || 'n').to_s.upcase
224
+ if default == 'Y'
225
+ yes = 'Y'
226
+ no = 'n'
227
+ else
228
+ yes = 'y'
229
+ no = 'N'
230
+ end
231
+ yn = ask "#{msg} (#{yes}/#{no}):"
232
+ yn = default if blank?(yn)
233
+ yn.upcase == 'Y'
234
+ end
235
+
236
+ def continue?
237
+ unless yn_ask "Continue?"
238
+ warn "Release aborted."
239
+ exit(1)
240
+ end
241
+ end
242
+
243
+ def blank?(o)
244
+ o.to_s.strip.empty?
245
+ end
246
+
247
+ def warn(msg)
248
+ super "[WARNING!] #{msg}"
249
+ end
250
+
251
+ def info(msg)
252
+ puts "[#{APP_NAME}] #{msg}"
253
+ end
254
+
255
+ def log(msg)
256
+ puts msg
257
+ end
258
+
259
+ end
260
+ end
@@ -0,0 +1,44 @@
1
+ require "tb_release/release_version"
2
+ require "capistrano"
3
+
4
+ module TbRelease
5
+
6
+ ##
7
+ # Capistrano support. Allows setting Capistrano 'branch' variable to be set:
8
+ #
9
+ # == Example:
10
+ #
11
+ # # deploy/staging.rb
12
+ # set :branch do
13
+ # get_release_version
14
+ # end
15
+ #
16
+ # If the variable 'release_version' exists (e.g. via cap --set-before release_version=v1.2.3' ...)
17
+ # the value is used as branch otherwise the user is ask for the branch (release_version).
18
+ #
19
+ module Capistrano
20
+ include TbRelease::ReleaseVersion
21
+
22
+ def get_release_version
23
+ unless exists?(:release_version)
24
+ tags = available_release_versions
25
+ puts "tags:\n#{tags.join("\n")}"
26
+
27
+ default_tag = tags.last
28
+
29
+ puts "consider to set tag via 'cap --set-before release_version=v1.2.3 ...'"
30
+ tag = ::Capistrano::CLI.ui.ask "Tag to deploy (make sure to push the tag first): [#{default_tag}] "
31
+ tag = default_tag if tag.empty?
32
+ tag
33
+ else
34
+ release_version
35
+ end
36
+ end
37
+
38
+
39
+ end
40
+ end
41
+
42
+ Capistrano::Configuration.class_eval do
43
+ include TbRelease::Capistrano
44
+ end
@@ -0,0 +1,20 @@
1
+ module TbRelease
2
+ module Command
3
+
4
+ private
5
+
6
+ def command(com, capture = false)
7
+ #puts ">>> #{com}"
8
+ unless capture
9
+ system(com)
10
+ else
11
+ @output = %x(#{com}).chomp
12
+ end
13
+ end
14
+
15
+ def last_command_was_success?
16
+ $?.success?
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,40 @@
1
+ module TbRelease
2
+
3
+ module ReleaseVersion
4
+ include TbRelease::Command
5
+
6
+ private
7
+
8
+ def available_release_versions
9
+ command 'git tag', true
10
+ @output.split("\n").sort(&tag_sorting_proc)
11
+ end
12
+
13
+ def tag_sorting_proc
14
+ Proc.new { |t1, t2|
15
+ major1, minor1, rev1, rc1 = t1.split(/\.|-/)
16
+ major2, minor2, rev2, rc2 = t2.split(/\.|-/)
17
+ major1 = major1.sub(/^v{1}/, '')
18
+ major2 = major2.sub(/^v{1}/, '')
19
+
20
+ cmp = major1.to_i <=> major2.to_i
21
+ if cmp == 0
22
+ cmp = minor1.to_i <=> minor2.to_i
23
+ if cmp == 0
24
+ cmp = rev1.to_i <=> rev2.to_i
25
+ if cmp == 0
26
+ rc1 = rc1.to_s.sub('rc', '').to_i
27
+ rc1 = 9999 if rc1 == 0
28
+ rc2 = rc2.to_s.sub('rc', '').to_i
29
+ rc2 = 9999 if rc2 == 0
30
+ cmp = rc1 <=> rc2
31
+ end
32
+ end
33
+ end
34
+
35
+ cmp
36
+ }
37
+ end
38
+
39
+ end
40
+ end
@@ -0,0 +1,3 @@
1
+ module TbRelease
2
+ VERSION = "0.0.9"
3
+ end
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "tb_release/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "tb_release"
7
+ s.version = TbRelease::VERSION
8
+ s.authors = ["Thomas Baustert"]
9
+ s.email = ["business@thomasbaustert.de"]
10
+ s.homepage = ""
11
+ s.summary = %q{Release an Rails app}
12
+ s.description = %q{Release an Rails app}
13
+
14
+ s.rubyforge_project = "tb_release"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ s.add_development_dependency "thor"
23
+ s.add_development_dependency "capistrano"
24
+
25
+ s.add_runtime_dependency "thor"
26
+ s.add_runtime_dependency "capistrano"
27
+ end
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tb_release
3
+ version: !ruby/object:Gem::Version
4
+ hash: 13
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 9
10
+ version: 0.0.9
11
+ platform: ruby
12
+ authors:
13
+ - Thomas Baustert
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-04-25 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: thor
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :development
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: capistrano
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :development
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: thor
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ type: :runtime
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
63
+ name: capistrano
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ type: :runtime
75
+ version_requirements: *id004
76
+ description: Release an Rails app
77
+ email:
78
+ - business@thomasbaustert.de
79
+ executables:
80
+ - tbrelease
81
+ extensions: []
82
+
83
+ extra_rdoc_files: []
84
+
85
+ files:
86
+ - .gitignore
87
+ - .idea/.name
88
+ - .idea/.rakeTasks
89
+ - .idea/encodings.xml
90
+ - .idea/misc.xml
91
+ - .idea/modules.xml
92
+ - .idea/tb_release.iml
93
+ - .idea/vcs.xml
94
+ - .idea/workspace.xml
95
+ - CHANGELOG
96
+ - Gemfile
97
+ - Rakefile
98
+ - bin/tbrelease
99
+ - install.sh
100
+ - lib/tb_release.rb
101
+ - lib/tb_release/capistrano.rb
102
+ - lib/tb_release/command.rb
103
+ - lib/tb_release/release_version.rb
104
+ - lib/tb_release/version.rb
105
+ - tb_release.gemspec
106
+ homepage: ""
107
+ licenses: []
108
+
109
+ post_install_message:
110
+ rdoc_options: []
111
+
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ hash: 3
120
+ segments:
121
+ - 0
122
+ version: "0"
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ requirements: []
133
+
134
+ rubyforge_project: tb_release
135
+ rubygems_version: 1.8.23
136
+ signing_key:
137
+ specification_version: 3
138
+ summary: Release an Rails app
139
+ test_files: []
140
+