crafter 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5482c0f761aea438da40470bb0186738a4d960e
4
- data.tar.gz: fed41bded11f5703a2d94e34f255ac13934017f7
3
+ metadata.gz: bbdb5f063d5cc6d04ebeffe0f6c32eb57e2160cc
4
+ data.tar.gz: abb7df528cb65029514055dc36b09be28eb0d186
5
5
  SHA512:
6
- metadata.gz: 4d955fa53d66848b257b9b7faab90057017f1341cb493f759630f21a30d76208a224200df08105eb6c40f6e8621edefb12c772f84c6082ea8c14d8b3ecbb60d5
7
- data.tar.gz: d7e1db40c9bd6fa0e1464eefe809e459eb616e197a1873cd0546616acf1d5ef70d591c6b9074f99c8d67c5cb92fb41cb1261131b83dada878e841819f51f6f96
6
+ metadata.gz: 673e2a03b87918de15a1e14a2fd7bd9a10192041ac95fb7576bbab29d85af5dfe2ec26c799c430a61adea569f6c09a299c2a2a83796999fc6fe33431ef5ef253
7
+ data.tar.gz: e604ef305fb4c6029057a094cf7215f50bd618c01ce1371739ad1f2f6a840c548ef0842db6e066d6e0d7472ca983d79de3481c37cc538469c97a57bf9d4dd7ed
data/.idea/workspace.xml CHANGED
@@ -1,19 +1,29 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="1c2ddb89-233e-4d24-a76e-018875b6dd93" name="Default" comment="++" />
4
+ <list default="true" id="1c2ddb89-233e-4d24-a76e-018875b6dd93" name="Default" comment="++">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/crafter.rb" afterPath="$PROJECT_DIR$/lib/crafter.rb" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/bin/crafter" afterPath="$PROJECT_DIR$/bin/crafter" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/config/default.rb" afterPath="$PROJECT_DIR$/lib/config/default.rb" />
8
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/target_configuration.rb" afterPath="$PROJECT_DIR$/lib/target_configuration.rb" />
9
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
10
+ </list>
5
11
  <ignored path="takeoff.iws" />
6
12
  <ignored path=".idea/workspace.xml" />
7
13
  <file path="/takeoff.thor" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1363189032100" ignored="false" />
8
- <file path="/project_helper.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367405985347" ignored="false" />
9
- <file path="/temp.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367407980066" ignored="false" />
14
+ <file path="/project_helper.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367481410582" ignored="false" />
15
+ <file path="/temp.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367418656531" ignored="false" />
10
16
  <file path="/takeoff.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367405682357" ignored="false" />
11
17
  <file path="/configuration.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1363265151762" ignored="false" />
12
- <file path="/default.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367405791799" ignored="false" />
13
- <file path="/Dummy.txt" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367408029549" ignored="false" />
18
+ <file path="/default.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367484095890" ignored="false" />
19
+ <file path="/Dummy.txt" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367487163146" ignored="false" />
14
20
  <file path="$APPLICATION_HOME_DIR$/lib/rubymine.jar!/resources/relaxng.rng" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1366270630920" ignored="false" />
15
- <file path="/target_configuration.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367405943254" ignored="false" />
21
+ <file path="/target_configuration.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367484633690" ignored="false" />
16
22
  <file path="/craft" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367407972026" ignored="false" />
23
+ <file path="/crafter" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367484519852" ignored="false" />
24
+ <file path="/crafter.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367480880558" ignored="false" />
25
+ <file path="/default_scripts.rb" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367418618387" ignored="false" />
26
+ <file path="/a.dummy" changelist="1c2ddb89-233e-4d24-a76e-018875b6dd93" time="1367487248372" ignored="false" />
17
27
  <option name="TRACKING_ENABLED" value="true" />
18
28
  <option name="SHOW_DIALOG" value="false" />
19
29
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -35,19 +45,10 @@
35
45
  <splitter split-orientation="horizontal" split-proportion="0.5">
36
46
  <split-first>
37
47
  <leaf>
38
- <file leaf-file-name="craft.rb" pinned="false" current="true" current-in-tab="true">
39
- <entry file="file://$PROJECT_DIR$/lib/craft.rb">
40
- <provider selected="true" editor-type-id="text-editor">
41
- <state line="21" column="33" selection-start="454" selection-end="454" vertical-scroll-proportion="0.24324325">
42
- <folding />
43
- </state>
44
- </provider>
45
- </entry>
46
- </file>
47
48
  <file leaf-file-name="project_helper.rb" pinned="false" current="false" current-in-tab="false">
48
49
  <entry file="file://$PROJECT_DIR$/lib/project_helper.rb">
49
50
  <provider selected="true" editor-type-id="text-editor">
50
- <state line="34" column="12" selection-start="967" selection-end="967" vertical-scroll-proportion="0.0">
51
+ <state line="58" column="23" selection-start="1752" selection-end="1752" vertical-scroll-proportion="0.0">
51
52
  <folding />
52
53
  </state>
53
54
  </provider>
@@ -56,7 +57,7 @@
56
57
  <file leaf-file-name="git_helper.rb" pinned="false" current="false" current-in-tab="false">
57
58
  <entry file="file://$PROJECT_DIR$/lib/git_helper.rb">
58
59
  <provider selected="true" editor-type-id="text-editor">
59
- <state line="48" column="5" selection-start="684" selection-end="684" vertical-scroll-proportion="0.0">
60
+ <state line="48" column="0" selection-start="1405" selection-end="1405" vertical-scroll-proportion="0.0">
60
61
  <folding />
61
62
  </state>
62
63
  </provider>
@@ -65,38 +66,56 @@
65
66
  <file leaf-file-name="target_configuration.rb" pinned="false" current="false" current-in-tab="false">
66
67
  <entry file="file://$PROJECT_DIR$/lib/target_configuration.rb">
67
68
  <provider selected="true" editor-type-id="text-editor">
68
- <state line="34" column="21" selection-start="687" selection-end="687" vertical-scroll-proportion="0.0">
69
+ <state line="36" column="26" selection-start="757" selection-end="757" vertical-scroll-proportion="0.0">
69
70
  <folding />
70
71
  </state>
71
72
  </provider>
72
73
  </entry>
73
74
  </file>
74
- </leaf>
75
- </split-first>
76
- <split-second>
77
- <leaf>
78
- <file leaf-file-name="default.rb" pinned="false" current="false" current-in-tab="true">
75
+ <file leaf-file-name="default_scripts.rb" pinned="false" current="false" current-in-tab="false">
76
+ <entry file="file://$PROJECT_DIR$/lib/config/default_scripts.rb">
77
+ <provider selected="true" editor-type-id="text-editor">
78
+ <state line="17" column="36" selection-start="575" selection-end="575" vertical-scroll-proportion="0.0">
79
+ <folding />
80
+ </state>
81
+ </provider>
82
+ </entry>
83
+ </file>
84
+ <file leaf-file-name="crafter.rb" pinned="false" current="false" current-in-tab="false">
85
+ <entry file="file://$PROJECT_DIR$/lib/crafter.rb">
86
+ <provider selected="true" editor-type-id="text-editor">
87
+ <state line="6" column="3" selection-start="171" selection-end="171" vertical-scroll-proportion="0.0">
88
+ <folding />
89
+ </state>
90
+ </provider>
91
+ </entry>
92
+ </file>
93
+ <file leaf-file-name="default.rb" pinned="false" current="false" current-in-tab="false">
79
94
  <entry file="file://$PROJECT_DIR$/lib/config/default.rb">
80
95
  <provider selected="true" editor-type-id="text-editor">
81
- <state line="95" column="24" selection-start="3122" selection-end="3122" vertical-scroll-proportion="0.7839314">
96
+ <state line="51" column="64" selection-start="2045" selection-end="2045" vertical-scroll-proportion="0.0">
82
97
  <folding />
83
98
  </state>
84
99
  </provider>
85
100
  </entry>
86
101
  </file>
87
- <file leaf-file-name="craft" pinned="false" current="false" current-in-tab="false">
88
- <entry file="file://$PROJECT_DIR$/bin/craft">
102
+ <file leaf-file-name="crafter" pinned="false" current="true" current-in-tab="true">
103
+ <entry file="file://$PROJECT_DIR$/bin/crafter">
89
104
  <provider selected="true" editor-type-id="text-editor">
90
- <state line="3" column="14" selection-start="83" selection-end="83" vertical-scroll-proportion="0.0">
105
+ <state line="13" column="24" selection-start="363" selection-end="363" vertical-scroll-proportion="0.22700815">
91
106
  <folding />
92
107
  </state>
93
108
  </provider>
94
109
  </entry>
95
110
  </file>
96
- <file leaf-file-name="craft.gemspec" pinned="false" current="false" current-in-tab="false">
111
+ </leaf>
112
+ </split-first>
113
+ <split-second>
114
+ <leaf>
115
+ <file leaf-file-name="craft.gemspec" pinned="false" current="false" current-in-tab="true">
97
116
  <entry file="file://$PROJECT_DIR$/craft.gemspec">
98
117
  <provider selected="true" editor-type-id="text-editor">
99
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
118
+ <state line="10" column="43" selection-start="523" selection-end="523" vertical-scroll-proportion="0.17462166">
100
119
  <folding />
101
120
  </state>
102
121
  </provider>
@@ -126,11 +145,16 @@
126
145
  <option value="$PROJECT_DIR$/lib/takeoff.thor" />
127
146
  <option value="$PROJECT_DIR$/lib/configuration.rb" />
128
147
  <option value="$PROJECT_DIR$/lib/config/configuration.rb" />
129
- <option value="$PROJECT_DIR$/lib/config/default.rb" />
130
148
  <option value="$PROJECT_DIR$/lib/takeoff.rb" />
131
- <option value="$PROJECT_DIR$/lib/target_configuration.rb" />
132
- <option value="$PROJECT_DIR$/lib/project_helper.rb" />
133
149
  <option value="$PROJECT_DIR$/bin/craft" />
150
+ <option value="$PROJECT_DIR$/lib/config/scripts.rb" />
151
+ <option value="$PROJECT_DIR$/lib/config/default_scripts.rb" />
152
+ <option value="$PROJECT_DIR$/craft.gemspec" />
153
+ <option value="$PROJECT_DIR$/lib/project_helper.rb" />
154
+ <option value="$PROJECT_DIR$/bin/crafter" />
155
+ <option value="$PROJECT_DIR$/lib/config/default.rb" />
156
+ <option value="$PROJECT_DIR$/lib/target_configuration.rb" />
157
+ <option value="$PROJECT_DIR$/lib/crafter.rb" />
134
158
  </list>
135
159
  </option>
136
160
  </component>
@@ -215,7 +239,6 @@
215
239
  <sortByType />
216
240
  </navigator>
217
241
  <panes>
218
- <pane id="Scope" />
219
242
  <pane id="ProjectPane">
220
243
  <subPane>
221
244
  <PATH>
@@ -230,7 +253,7 @@
230
253
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
231
254
  </PATH_ELEMENT>
232
255
  <PATH_ELEMENT>
233
- <option name="myItemId" value="craft" />
256
+ <option name="myItemId" value="crafter" />
234
257
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
235
258
  </PATH_ELEMENT>
236
259
  </PATH>
@@ -240,7 +263,7 @@
240
263
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
241
264
  </PATH_ELEMENT>
242
265
  <PATH_ELEMENT>
243
- <option name="myItemId" value="craft" />
266
+ <option name="myItemId" value="crafter" />
244
267
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
245
268
  </PATH_ELEMENT>
246
269
  <PATH_ELEMENT>
@@ -254,7 +277,7 @@
254
277
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
255
278
  </PATH_ELEMENT>
256
279
  <PATH_ELEMENT>
257
- <option name="myItemId" value="craft" />
280
+ <option name="myItemId" value="crafter" />
258
281
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
259
282
  </PATH_ELEMENT>
260
283
  <PATH_ELEMENT>
@@ -272,7 +295,7 @@
272
295
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
273
296
  </PATH_ELEMENT>
274
297
  <PATH_ELEMENT>
275
- <option name="myItemId" value="craft" />
298
+ <option name="myItemId" value="crafter" />
276
299
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
277
300
  </PATH_ELEMENT>
278
301
  <PATH_ELEMENT>
@@ -282,16 +305,17 @@
282
305
  </PATH>
283
306
  </subPane>
284
307
  </pane>
308
+ <pane id="Scope" />
285
309
  </panes>
286
310
  </component>
287
311
  <component name="PropertiesComponent">
288
312
  <property name="options.splitter.main.proportions" value="0.3" />
289
313
  <property name="WebServerToolWindowFactoryState" value="false" />
290
- <property name="recentsLimit" value="5" />
291
314
  <property name="options.lastSelected" value="editor.preferences.appearance" />
315
+ <property name="recentsLimit" value="5" />
292
316
  <property name="FullScreen" value="false" />
293
- <property name="options.splitter.details.proportions" value="0.2" />
294
317
  <property name="options.searchVisible" value="true" />
318
+ <property name="options.splitter.details.proportions" value="0.2" />
295
319
  </component>
296
320
  <component name="RecentsManager">
297
321
  <key name="MoveFile.RECENT_KEYS">
@@ -509,10 +533,10 @@
509
533
  <layout>
510
534
  <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32955405" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
511
535
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32955405" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
512
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32955405" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
536
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32955405" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
513
537
  <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" />
514
538
  <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="false" content_ui="tabs" />
515
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.14223108" sideWeight="0.670446" order="0" side_tool="false" content_ui="combo" />
539
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.14661355" sideWeight="0.670446" order="0" side_tool="false" content_ui="combo" />
516
540
  <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39984593" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
517
541
  <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="false" content_ui="tabs" />
518
542
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32955405" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
@@ -593,11 +617,6 @@
593
617
  </breakpoint-manager>
594
618
  </component>
595
619
  <component name="editorHistoryManager">
596
- <entry file="file://$USER_HOME$/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/ostruct.rb">
597
- <provider selected="true" editor-type-id="text-editor">
598
- <state line="164" column="6" selection-start="4915" selection-end="4915" vertical-scroll-proportion="2.366548" />
599
- </provider>
600
- </entry>
601
620
  <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.12/lib/active_support/core_ext/string/starts_ends_with.rb">
602
621
  <provider selected="true" editor-type-id="text-editor">
603
622
  <state line="1" column="2" selection-start="15" selection-end="15" vertical-scroll-proportion="0.018979834" />
@@ -635,56 +654,61 @@
635
654
  </entry>
636
655
  <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p194/gems/highline-1.6.15/lib/highline.rb">
637
656
  <provider selected="true" editor-type-id="text-editor">
638
- <state line="315" column="6" selection-start="12130" selection-end="12130" vertical-scroll-proportion="0.1757858">
657
+ <state line="315" column="6" selection-start="12130" selection-end="12130" vertical-scroll-proportion="0.1757858" />
658
+ </provider>
659
+ </entry>
660
+ <entry file="file://$PROJECT_DIR$/craft.gemspec">
661
+ <provider selected="true" editor-type-id="text-editor">
662
+ <state line="10" column="43" selection-start="523" selection-end="523" vertical-scroll-proportion="0.17462166">
639
663
  <folding />
640
664
  </state>
641
665
  </provider>
642
666
  </entry>
643
- <entry file="file://$PROJECT_DIR$/bin/craft">
667
+ <entry file="file://$PROJECT_DIR$/lib/config/default_scripts.rb">
644
668
  <provider selected="true" editor-type-id="text-editor">
645
- <state line="3" column="14" selection-start="83" selection-end="83" vertical-scroll-proportion="0.0">
669
+ <state line="17" column="36" selection-start="575" selection-end="575" vertical-scroll-proportion="0.0">
646
670
  <folding />
647
671
  </state>
648
672
  </provider>
649
673
  </entry>
650
- <entry file="file://$PROJECT_DIR$/lib/target_configuration.rb">
674
+ <entry file="file://$PROJECT_DIR$/lib/project_helper.rb">
651
675
  <provider selected="true" editor-type-id="text-editor">
652
- <state line="34" column="21" selection-start="687" selection-end="687" vertical-scroll-proportion="0.0">
676
+ <state line="58" column="23" selection-start="1752" selection-end="1752" vertical-scroll-proportion="0.0">
653
677
  <folding />
654
678
  </state>
655
679
  </provider>
656
680
  </entry>
657
- <entry file="file://$PROJECT_DIR$/lib/project_helper.rb">
681
+ <entry file="file://$PROJECT_DIR$/lib/target_configuration.rb">
658
682
  <provider selected="true" editor-type-id="text-editor">
659
- <state line="34" column="12" selection-start="967" selection-end="967" vertical-scroll-proportion="0.0">
683
+ <state line="36" column="26" selection-start="757" selection-end="757" vertical-scroll-proportion="0.0">
660
684
  <folding />
661
685
  </state>
662
686
  </provider>
663
687
  </entry>
664
- <entry file="file://$PROJECT_DIR$/lib/git_helper.rb">
688
+ <entry file="file://$PROJECT_DIR$/lib/config/default.rb">
665
689
  <provider selected="true" editor-type-id="text-editor">
666
- <state line="48" column="5" selection-start="684" selection-end="684" vertical-scroll-proportion="0.0">
690
+ <state line="51" column="64" selection-start="2045" selection-end="2045" vertical-scroll-proportion="0.0">
667
691
  <folding />
668
692
  </state>
669
693
  </provider>
670
694
  </entry>
671
- <entry file="file://$PROJECT_DIR$/craft.gemspec">
695
+ <entry file="file://$PROJECT_DIR$/lib/git_helper.rb">
672
696
  <provider selected="true" editor-type-id="text-editor">
673
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
697
+ <state line="48" column="0" selection-start="1405" selection-end="1405" vertical-scroll-proportion="0.0">
674
698
  <folding />
675
699
  </state>
676
700
  </provider>
677
701
  </entry>
678
- <entry file="file://$PROJECT_DIR$/lib/config/default.rb">
702
+ <entry file="file://$PROJECT_DIR$/lib/crafter.rb">
679
703
  <provider selected="true" editor-type-id="text-editor">
680
- <state line="95" column="24" selection-start="3122" selection-end="3122" vertical-scroll-proportion="0.7839314">
704
+ <state line="6" column="3" selection-start="171" selection-end="171" vertical-scroll-proportion="0.0">
681
705
  <folding />
682
706
  </state>
683
707
  </provider>
684
708
  </entry>
685
- <entry file="file://$PROJECT_DIR$/lib/craft.rb">
709
+ <entry file="file://$PROJECT_DIR$/bin/crafter">
686
710
  <provider selected="true" editor-type-id="text-editor">
687
- <state line="21" column="33" selection-start="454" selection-end="454" vertical-scroll-proportion="0.24324325">
711
+ <state line="13" column="24" selection-start="363" selection-end="363" vertical-scroll-proportion="0.22700815">
688
712
  <folding />
689
713
  </state>
690
714
  </provider>
data/bin/crafter CHANGED
@@ -4,10 +4,12 @@ require 'fileutils'
4
4
  $:.push File.expand_path("../../lib", __FILE__)
5
5
 
6
6
  if ARGV[0] == 'reset'
7
- puts 'copying defaults to ~/.crafter.rb'
7
+ puts 'reseting to default setup in ~/.crafter.rb'
8
8
  root = File.expand_path('.', File.dirname(__FILE__))
9
9
  FileUtils.cp("#{root}/../lib/config/default.rb", File.join(Dir.home, '.crafter.rb'))
10
+ exit(0)
10
11
  end
11
12
 
12
13
  require 'crafter'
13
- Crafter::setup_project()
14
+ Crafter::setup_project()
15
+ puts 'Finished.'
data/craft.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'crafter'
6
- gem.version = '0.1.2'
6
+ gem.version = '0.1.3'
7
7
  gem.authors = ['Krzysztof Zabłocki']
8
8
  gem.email = ['merowing2@gmail.com']
9
9
  gem.description = %q{CLI for setting up new Xcode projects. Inspired by thoughtbot liftoff.}
@@ -1,56 +1,13 @@
1
- icon_script = %q[
2
- commit=`git rev-parse --short HEAD`
3
- branch=`git rev-parse --abbrev-ref HEAD`
4
- version=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}"`
5
-
6
- function processIcon() {
7
- export PATH=$PATH:/usr/local/bin
8
- base_file=$1
9
- if [ ! -f $base_file ]; then return; fi
10
-
11
- target_file=`echo $base_file | sed "s/_base//"`
12
- target_path="${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${target_file}"
13
-
14
- if [ $CONFIGURATION = "Release" ]; then
15
- cp ${base_file} $target_path
16
- return
17
- fi
18
-
19
- width=`identify -format %w ${base_file}`
20
-
21
- convert -background '#0008' -fill white -gravity center -size ${width}x40\
22
- caption:"${version} ${branch} ${commit}"\
23
- ${base_file} +swap -gravity south -composite ${target_path}
24
- }
25
-
26
- processIcon "Icon_base.png"
27
- processIcon "Icon_base@2x.png"
28
- processIcon "Icon_base~iPad.png"
29
- processIcon "Icon_base@2x~iPad.png"
30
- ]
31
-
32
-
33
- test_script = %q[
34
- # Launch application using ios-sim and set up environment to inject test bundle into application
35
- # Source: http://stackoverflow.com/a/12682617/504494
36
-
37
- echo "ENTERING TEST SCRIPT"
38
-
39
- if [ "$RUN_UNIT_TEST_WITH_IOS_SIM" = "YES" ]; then
40
- echo "TESTING_"
41
- test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION"
42
- ios-sim launch "$(dirname "$TEST_HOST")" --setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle="$test_bundle_path" --setenv XCInjectBundleInto="$TEST_HOST" --args -SenTest All "$test_bundle_path"
43
- echo "Finished running tests with ios-sim"
44
- else
45
- #"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
46
- fi
47
- ]
1
+ load "#{Crafter::ROOT}/config/default_scripts.rb"
48
2
 
3
+ # All your configuration should happen inside configure block
49
4
  Crafter.configure do
5
+ # This are projects wide instructions
50
6
  add_platform({:platform => :ios, :deployment => 6.0})
51
7
  add_git_ignore
52
8
  duplicate_configurations({:adhoc => :debug, :profiling => :debug})
53
9
 
10
+ # set of options, warnings, static analyser and anything else normal xcode treats as build options
54
11
  set_options %w(
55
12
  GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED
56
13
  GCC_WARN_MISSING_PARENTHESES
@@ -71,24 +28,28 @@ Crafter.configure do
71
28
  GCC_TREAT_WARNINGS_AS_ERRORS
72
29
  )
73
30
 
31
+ # target specific options, :default is just a name for you, feel free to call it whatever you like
74
32
  with :default do
33
+ # each target have set of pods
75
34
  pods << %w(NSLogger-CocoaLumberjack-connector TestFlightSDK)
76
35
 
36
+ # each target can have optional blocks, eg. crafter will ask you if you want to include networking with a project
77
37
  add_option :networking do
78
38
  pods << 'AFNetworking'
79
39
  end
80
40
 
81
-
82
41
  add_option :coredata do
83
42
  pods << 'MagicalRecord'
84
43
  end
85
44
 
86
- # icon versioning
87
- scripts << {:name => 'icon versioning', :script => icon_script}
45
+ # each target can have shell scripts added, in this example we are adding my icon versioning script as in http://www.merowing.info/2013/03/overlaying-application-version-on-top-of-your-icon/
46
+ scripts << {:name => 'icon versioning', :script => @icon_versioning_script}
47
+
48
+ # we can also execute arbitrary ruby code when configuring our projects, here we rename all our standard icon* to icon_base for versioning script
88
49
  icon_rename = proc do |file|
89
50
  extension = File.extname(file)
90
51
  file_name = File.basename(file, extension)
91
- File.rename(file, "#{File.dirname(file)}/#{file_name}_base.#{extension}")
52
+ File.rename(file, "#{File.dirname(file)}/#{file_name}_base#{extension}")
92
53
  end
93
54
 
94
55
  Dir['**/Icon.png'].each(&icon_rename)
@@ -97,12 +58,11 @@ Crafter.configure do
97
58
  Dir['**/Icon-72@2x.png'].each(&icon_rename)
98
59
  end
99
60
 
100
-
61
+ # more targets setup
101
62
  with :tests do
102
- add_option :testing do
63
+ add_option :kiwi do
103
64
  pods << 'Kiwi'
104
- scripts << {:name => 'command line unit tests', :script => test_script}
65
+ scripts << {:name => 'command line unit tests', :script => @command_line_test_script}
105
66
  end
106
67
  end
107
-
108
- end
68
+ end
@@ -0,0 +1,52 @@
1
+ module Crafter
2
+ extend self
3
+
4
+ @icon_versioning_script = %q[
5
+ commit=`git rev-parse --short HEAD`
6
+ branch=`git rev-parse --abbrev-ref HEAD`
7
+ version=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}"`
8
+
9
+ function processIcon() {
10
+ export PATH=$PATH:/usr/local/bin
11
+ base_file=$1
12
+ if [ ! -f $base_file ]; then return; fi
13
+
14
+ target_file=`echo $base_file | sed "s/_base//"`
15
+ target_path="${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${target_file}"
16
+
17
+ if [ $CONFIGURATION = "Release" ]; then
18
+ cp ${base_file} $target_path
19
+ return
20
+ fi
21
+
22
+ width=`identify -format %w ${base_file}`
23
+
24
+ convert -background '#0008' -fill white -gravity center -size ${width}x40\
25
+ caption:"${version} ${branch} ${commit}"\
26
+ ${base_file} +swap -gravity south -composite ${target_path}
27
+ }
28
+
29
+ processIcon "Icon_base.png"
30
+ processIcon "Icon_base@2x.png"
31
+ processIcon "Icon_base~iPad.png"
32
+ processIcon "Icon_base@2x~iPad.png"
33
+ ]
34
+
35
+
36
+ @command_line_test_script = %q[
37
+ # Launch application using ios-sim and set up environment to inject test bundle into application
38
+ # Source: http://stackoverflow.com/a/12682617/504494
39
+
40
+ echo "ENTERING TEST SCRIPT"
41
+
42
+ if [ "$RUN_UNIT_TEST_WITH_IOS_SIM" = "YES" ]; then
43
+ echo "TESTING_"
44
+ test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION"
45
+ ios-sim launch "$(dirname "$TEST_HOST")" --setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle="$test_bundle_path" --setenv XCInjectBundleInto="$TEST_HOST" --args -SenTest All "$test_bundle_path"
46
+ echo "Finished running tests with ios-sim"
47
+ else
48
+ #"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
49
+ fi
50
+ ]
51
+
52
+ end
data/lib/crafter.rb CHANGED
@@ -1,3 +1,11 @@
1
+ unless Kernel.respond_to?(:require_relative)
2
+ module Kernel
3
+ def require_relative(path)
4
+ require File.join(File.dirname(caller[0]), path.to_str)
5
+ end
6
+ end
7
+ end
8
+
1
9
  require_relative 'project_helper'
2
10
  require_relative 'git_helper'
3
11
  require_relative 'target_configuration'
@@ -56,6 +64,7 @@ module Crafter
56
64
  end
57
65
 
58
66
  def process_configurations
67
+ puts 'duplicating configurations'
59
68
  self.project.duplicate_configurations(@configuration)
60
69
  end
61
70
 
@@ -64,14 +73,17 @@ module Crafter
64
73
  end
65
74
 
66
75
  def process_options
76
+ puts 'setting up variety of options'
67
77
  self.project.enable_options(@options)
68
78
  end
69
79
 
70
80
  def process_git
81
+ puts 'preparing git ignore'
71
82
  GitHelper.new.generate_files
72
83
  end
73
84
 
74
85
  def process_pods
86
+ puts 'preparing pod file'
75
87
  File.open('Podfile', File::WRONLY|File::CREAT|File::EXCL) do |f|
76
88
 
77
89
  @platforms.each do |hash|
@@ -92,6 +104,7 @@ module Crafter
92
104
  end
93
105
 
94
106
  def process_scripts
107
+ puts 'adding scripts'
95
108
  @targets.each { |_, v| v.process_scripts(self.project) }
96
109
  end
97
110
 
@@ -19,7 +19,7 @@ class ProjectHelper
19
19
 
20
20
  def add_shell_script(target, name, script)
21
21
  if target.shell_script_build_phases.to_a.index { |phase| phase.name == name }
22
- puts "Skipping adding shell script for target #{target} as #{name} already exists"
22
+ puts "Skipping adding \"#{name}\" script for target #{target} as it already exist"
23
23
  else
24
24
  target.new_shell_script_build_phase(name).shell_script = script
25
25
  save_changes
@@ -81,7 +81,7 @@ class ProjectHelper
81
81
 
82
82
  def choose_item(title, objects)
83
83
  if objects.empty?
84
- raise "Could not locate any #{title}s!"
84
+ raise 'Could not locate any Targets!'
85
85
  elsif objects.size == 1
86
86
  objects.first
87
87
  else
@@ -17,7 +17,7 @@ class TargetConfiguration
17
17
  def process_optional
18
18
  @options.each do |key, obj|
19
19
  key_string = key.to_s
20
- if ask_question "do you want to add #{key_string}?"
20
+ if ask_question "do you want to add #{key_string}? [Yn]"
21
21
  raise unless obj.is_a? Proc
22
22
  obj.call()
23
23
  end
@@ -25,9 +25,10 @@ class TargetConfiguration
25
25
  end
26
26
 
27
27
  def write_pods(f)
28
+ return if @pods.empty?
28
29
  f.puts "target :#{@target.name}, :exclusive => true do"
29
30
  pods.flatten.each do |pod|
30
- f.puts "pod '#{pod}'"
31
+ f.puts " pod '#{pod}'"
31
32
  end
32
33
  f.puts 'end'
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crafter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Zabłocki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-01 00:00:00.000000000 Z
11
+ date: 2013-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj
@@ -57,6 +57,7 @@ files:
57
57
  - bin/crafter
58
58
  - craft.gemspec
59
59
  - lib/config/default.rb
60
+ - lib/config/default_scripts.rb
60
61
  - lib/crafter.rb
61
62
  - lib/git_helper.rb
62
63
  - lib/project_helper.rb