nucleon 0.1.19 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +1 -0
  4. data/TODO.rdoc +0 -3
  5. data/VERSION +1 -1
  6. data/bin/nucleon +19 -0
  7. data/lib/core/config.rb +11 -7
  8. data/lib/core/environment.rb +338 -0
  9. data/lib/core/facade.rb +150 -98
  10. data/lib/core/manager.rb +160 -249
  11. data/lib/core/mixin/action/project.rb +2 -2
  12. data/lib/core/mixin/macro/plugin_interface.rb +11 -11
  13. data/lib/core/plugin/action.rb +277 -24
  14. data/lib/core/plugin/base.rb +22 -14
  15. data/lib/core/plugin/command.rb +1 -1
  16. data/lib/core/plugin/event.rb +3 -3
  17. data/lib/core/plugin/extension.rb +1 -1
  18. data/lib/core/plugin/project.rb +15 -15
  19. data/lib/core/plugin/template.rb +1 -1
  20. data/lib/core/plugin/translator.rb +1 -1
  21. data/lib/core/util/cache.rb +1 -1
  22. data/lib/core/util/cli.rb +32 -3
  23. data/lib/core/util/console.rb +30 -10
  24. data/lib/core/util/data.rb +11 -3
  25. data/lib/core/util/logger.rb +1 -1
  26. data/lib/core/util/shell.rb +6 -3
  27. data/lib/core/util/ssh.rb +148 -24
  28. data/lib/nucleon/action/extract.rb +11 -4
  29. data/lib/nucleon/action/{add.rb → project/add.rb} +13 -4
  30. data/lib/nucleon/action/{create.rb → project/create.rb} +12 -3
  31. data/lib/nucleon/action/{remove.rb → project/remove.rb} +11 -2
  32. data/lib/nucleon/action/{save.rb → project/save.rb} +11 -2
  33. data/lib/nucleon/action/{update.rb → project/update.rb} +11 -2
  34. data/lib/nucleon/command/bash.rb +1 -1
  35. data/lib/nucleon/event/regex.rb +1 -1
  36. data/lib/nucleon/project/git.rb +3 -3
  37. data/lib/nucleon/template/{json.rb → JSON.rb} +1 -1
  38. data/lib/nucleon/template/{yaml.rb → YAML.rb} +1 -1
  39. data/lib/nucleon/template/wrapper.rb +1 -1
  40. data/lib/nucleon/translator/{json.rb → JSON.rb} +1 -1
  41. data/lib/nucleon/translator/{yaml.rb → YAML.rb} +1 -1
  42. data/lib/nucleon_base.rb +26 -15
  43. data/locales/en.yml +69 -44
  44. data/nucleon.gemspec +129 -11
  45. data/rdoc/site/0.1.19/ARCHITECTURE_rdoc.html +634 -0
  46. data/rdoc/site/0.1.19/Hash.html +347 -0
  47. data/rdoc/site/0.1.19/Kernel.html +413 -0
  48. data/rdoc/site/0.1.19/Nucleon.html +570 -0
  49. data/rdoc/site/0.1.19/Nucleon/Action.html +280 -0
  50. data/rdoc/site/0.1.19/Nucleon/Action/Add.html +458 -0
  51. data/rdoc/site/0.1.19/Nucleon/Action/Create.html +415 -0
  52. data/rdoc/site/0.1.19/Nucleon/Action/Extract.html +413 -0
  53. data/rdoc/site/0.1.19/Nucleon/Action/Remove.html +461 -0
  54. data/rdoc/site/0.1.19/Nucleon/Action/Save.html +434 -0
  55. data/rdoc/site/0.1.19/Nucleon/Action/Update.html +381 -0
  56. data/rdoc/site/0.1.19/Nucleon/Codes.html +563 -0
  57. data/rdoc/site/0.1.19/Nucleon/Command.html +275 -0
  58. data/rdoc/site/0.1.19/Nucleon/Command/Bash.html +544 -0
  59. data/rdoc/site/0.1.19/Nucleon/Config.html +1623 -0
  60. data/rdoc/site/0.1.19/Nucleon/Config/Collection.html +509 -0
  61. data/rdoc/site/0.1.19/Nucleon/Config/Options.html +489 -0
  62. data/rdoc/site/0.1.19/Nucleon/Core.html +635 -0
  63. data/rdoc/site/0.1.19/Nucleon/Errors.html +275 -0
  64. data/rdoc/site/0.1.19/Nucleon/Errors/BatchError.html +281 -0
  65. data/rdoc/site/0.1.19/Nucleon/Errors/NucleonError.html +657 -0
  66. data/rdoc/site/0.1.19/Nucleon/Errors/SSHUnavailable.html +281 -0
  67. data/rdoc/site/0.1.19/Nucleon/Event.html +275 -0
  68. data/rdoc/site/0.1.19/Nucleon/Event/Regex.html +467 -0
  69. data/rdoc/site/0.1.19/Nucleon/Facade.html +2336 -0
  70. data/rdoc/site/0.1.19/Nucleon/Gems.html +635 -0
  71. data/rdoc/site/0.1.19/Nucleon/Manager.html +1828 -0
  72. data/rdoc/site/0.1.19/Nucleon/Mixin.html +284 -0
  73. data/rdoc/site/0.1.19/Nucleon/Mixin/Action.html +277 -0
  74. data/rdoc/site/0.1.19/Nucleon/Mixin/Action/Commit.html +381 -0
  75. data/rdoc/site/0.1.19/Nucleon/Mixin/Action/Project.html +395 -0
  76. data/rdoc/site/0.1.19/Nucleon/Mixin/Action/Push.html +371 -0
  77. data/rdoc/site/0.1.19/Nucleon/Mixin/Colors.html +545 -0
  78. data/rdoc/site/0.1.19/Nucleon/Mixin/ConfigCollection.html +481 -0
  79. data/rdoc/site/0.1.19/Nucleon/Mixin/ConfigOptions.html +449 -0
  80. data/rdoc/site/0.1.19/Nucleon/Mixin/Macro.html +276 -0
  81. data/rdoc/site/0.1.19/Nucleon/Mixin/Macro/ObjectInterface.html +695 -0
  82. data/rdoc/site/0.1.19/Nucleon/Mixin/Macro/PluginInterface.html +682 -0
  83. data/rdoc/site/0.1.19/Nucleon/Mixin/Settings.html +481 -0
  84. data/rdoc/site/0.1.19/Nucleon/Mixin/SubConfig.html +887 -0
  85. data/rdoc/site/0.1.19/Nucleon/Parallel.html +325 -0
  86. data/rdoc/site/0.1.19/Nucleon/Parallel/ClassMethods.html +325 -0
  87. data/rdoc/site/0.1.19/Nucleon/Parallel/InstanceMethods.html +334 -0
  88. data/rdoc/site/0.1.19/Nucleon/Plugin.html +282 -0
  89. data/rdoc/site/0.1.19/Nucleon/Plugin/Action.html +1368 -0
  90. data/rdoc/site/0.1.19/Nucleon/Plugin/Action/Option.html +459 -0
  91. data/rdoc/site/0.1.19/Nucleon/Plugin/Base.html +1737 -0
  92. data/rdoc/site/0.1.19/Nucleon/Plugin/Command.html +721 -0
  93. data/rdoc/site/0.1.19/Nucleon/Plugin/Event.html +442 -0
  94. data/rdoc/site/0.1.19/Nucleon/Plugin/Extension.html +281 -0
  95. data/rdoc/site/0.1.19/Nucleon/Plugin/Project.html +2864 -0
  96. data/rdoc/site/0.1.19/Nucleon/Plugin/Template.html +476 -0
  97. data/rdoc/site/0.1.19/Nucleon/Plugin/Translator.html +371 -0
  98. data/rdoc/site/0.1.19/Nucleon/Project.html +276 -0
  99. data/rdoc/site/0.1.19/Nucleon/Project/Git.html +1801 -0
  100. data/rdoc/site/0.1.19/Nucleon/Project/Github.html +549 -0
  101. data/rdoc/site/0.1.19/Nucleon/Template.html +277 -0
  102. data/rdoc/site/0.1.19/Nucleon/Template/Json.html +329 -0
  103. data/rdoc/site/0.1.19/Nucleon/Template/Wrapper.html +329 -0
  104. data/rdoc/site/0.1.19/Nucleon/Template/Yaml.html +329 -0
  105. data/rdoc/site/0.1.19/Nucleon/Translator.html +276 -0
  106. data/rdoc/site/0.1.19/Nucleon/Translator/Json.html +366 -0
  107. data/rdoc/site/0.1.19/Nucleon/Translator/Yaml.html +366 -0
  108. data/rdoc/site/0.1.19/Nucleon/Util.html +285 -0
  109. data/rdoc/site/0.1.19/Nucleon/Util/CLI.html +388 -0
  110. data/rdoc/site/0.1.19/Nucleon/Util/CLI/Parser.html +1183 -0
  111. data/rdoc/site/0.1.19/Nucleon/Util/Cache.html +780 -0
  112. data/rdoc/site/0.1.19/Nucleon/Util/Console.html +1294 -0
  113. data/rdoc/site/0.1.19/Nucleon/Util/Data.html +1399 -0
  114. data/rdoc/site/0.1.19/Nucleon/Util/Disk.html +522 -0
  115. data/rdoc/site/0.1.19/Nucleon/Util/Git.html +361 -0
  116. data/rdoc/site/0.1.19/Nucleon/Util/Liquid.html +365 -0
  117. data/rdoc/site/0.1.19/Nucleon/Util/Logger.html +806 -0
  118. data/rdoc/site/0.1.19/Nucleon/Util/Package.html +558 -0
  119. data/rdoc/site/0.1.19/Nucleon/Util/SSH.html +910 -0
  120. data/rdoc/site/0.1.19/Nucleon/Util/SSH/Keypair.html +453 -0
  121. data/rdoc/site/0.1.19/Nucleon/Util/Shell.html +686 -0
  122. data/rdoc/site/0.1.19/Nucleon/Util/Shell/Result.html +497 -0
  123. data/rdoc/site/0.1.19/README_rdoc.html +312 -0
  124. data/rdoc/site/0.1.19/TODO_rdoc.html +267 -0
  125. data/rdoc/site/0.1.19/created.rid +60 -0
  126. data/rdoc/site/0.1.19/images/add.png +0 -0
  127. data/rdoc/site/0.1.19/images/brick.png +0 -0
  128. data/rdoc/site/0.1.19/images/brick_link.png +0 -0
  129. data/rdoc/site/0.1.19/images/bug.png +0 -0
  130. data/rdoc/site/0.1.19/images/bullet_black.png +0 -0
  131. data/rdoc/site/0.1.19/images/bullet_toggle_minus.png +0 -0
  132. data/rdoc/site/0.1.19/images/bullet_toggle_plus.png +0 -0
  133. data/rdoc/site/0.1.19/images/date.png +0 -0
  134. data/rdoc/site/0.1.19/images/delete.png +0 -0
  135. data/rdoc/site/0.1.19/images/find.png +0 -0
  136. data/rdoc/site/0.1.19/images/loadingAnimation.gif +0 -0
  137. data/rdoc/site/0.1.19/images/macFFBgHack.png +0 -0
  138. data/rdoc/site/0.1.19/images/package.png +0 -0
  139. data/rdoc/site/0.1.19/images/page_green.png +0 -0
  140. data/rdoc/site/0.1.19/images/page_white_text.png +0 -0
  141. data/rdoc/site/0.1.19/images/page_white_width.png +0 -0
  142. data/rdoc/site/0.1.19/images/plugin.png +0 -0
  143. data/rdoc/site/0.1.19/images/ruby.png +0 -0
  144. data/rdoc/site/0.1.19/images/tag_blue.png +0 -0
  145. data/rdoc/site/0.1.19/images/tag_green.png +0 -0
  146. data/rdoc/site/0.1.19/images/transparent.png +0 -0
  147. data/rdoc/site/0.1.19/images/wrench.png +0 -0
  148. data/rdoc/site/0.1.19/images/wrench_orange.png +0 -0
  149. data/rdoc/site/0.1.19/images/zoom.png +0 -0
  150. data/rdoc/site/0.1.19/index.html +311 -0
  151. data/rdoc/site/0.1.19/js/darkfish.js +155 -0
  152. data/rdoc/site/0.1.19/js/jquery.js +18 -0
  153. data/rdoc/site/0.1.19/js/navigation.js +142 -0
  154. data/rdoc/site/0.1.19/js/search.js +94 -0
  155. data/rdoc/site/0.1.19/js/search_index.js +1 -0
  156. data/rdoc/site/0.1.19/js/searcher.js +228 -0
  157. data/rdoc/site/0.1.19/rdoc.css +543 -0
  158. data/rdoc/site/0.1.19/table_of_contents.html +1541 -0
  159. metadata +140 -11
@@ -0,0 +1,634 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>ARCHITECTURE - nucleon 0.1.19</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body class="file">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="project-metadata">
47
+ <nav id="fileindex-section" class="section project-section">
48
+ <h3 class="section-header">Pages</h3>
49
+
50
+ <ul>
51
+
52
+ <li class="file"><a href="./ARCHITECTURE_rdoc.html">ARCHITECTURE</a>
53
+
54
+ <li class="file"><a href="./README_rdoc.html">README</a>
55
+
56
+ <li class="file"><a href="./TODO_rdoc.html">TODO</a>
57
+
58
+ </ul>
59
+ </nav>
60
+
61
+ <nav id="classindex-section" class="section project-section">
62
+ <h3 class="section-header">Class and Module Index</h3>
63
+
64
+ <ul class="link-list">
65
+
66
+ <li><a href="./Nucleon.html">Nucleon</a>
67
+
68
+ <li><a href="./Nucleon/Action.html">Nucleon::Action</a>
69
+
70
+ <li><a href="./Nucleon/Action/Add.html">Nucleon::Action::Add</a>
71
+
72
+ <li><a href="./Nucleon/Action/Create.html">Nucleon::Action::Create</a>
73
+
74
+ <li><a href="./Nucleon/Action/Extract.html">Nucleon::Action::Extract</a>
75
+
76
+ <li><a href="./Nucleon/Action/Remove.html">Nucleon::Action::Remove</a>
77
+
78
+ <li><a href="./Nucleon/Action/Save.html">Nucleon::Action::Save</a>
79
+
80
+ <li><a href="./Nucleon/Action/Update.html">Nucleon::Action::Update</a>
81
+
82
+ <li><a href="./Nucleon/Codes.html">Nucleon::Codes</a>
83
+
84
+ <li><a href="./Nucleon/Command.html">Nucleon::Command</a>
85
+
86
+ <li><a href="./Nucleon/Command/Bash.html">Nucleon::Command::Bash</a>
87
+
88
+ <li><a href="./Nucleon/Config.html">Nucleon::Config</a>
89
+
90
+ <li><a href="./Nucleon/Config/Collection.html">Nucleon::Config::Collection</a>
91
+
92
+ <li><a href="./Nucleon/Config/Options.html">Nucleon::Config::Options</a>
93
+
94
+ <li><a href="./Nucleon/Core.html">Nucleon::Core</a>
95
+
96
+ <li><a href="./Nucleon/Errors.html">Nucleon::Errors</a>
97
+
98
+ <li><a href="./Nucleon/Errors/BatchError.html">Nucleon::Errors::BatchError</a>
99
+
100
+ <li><a href="./Nucleon/Errors/NucleonError.html">Nucleon::Errors::NucleonError</a>
101
+
102
+ <li><a href="./Nucleon/Errors/SSHUnavailable.html">Nucleon::Errors::SSHUnavailable</a>
103
+
104
+ <li><a href="./Nucleon/Event.html">Nucleon::Event</a>
105
+
106
+ <li><a href="./Nucleon/Event/Regex.html">Nucleon::Event::Regex</a>
107
+
108
+ <li><a href="./Nucleon/Facade.html">Nucleon::Facade</a>
109
+
110
+ <li><a href="./Nucleon/Gems.html">Nucleon::Gems</a>
111
+
112
+ <li><a href="./Nucleon/Manager.html">Nucleon::Manager</a>
113
+
114
+ <li><a href="./Nucleon/Mixin.html">Nucleon::Mixin</a>
115
+
116
+ <li><a href="./Nucleon/Mixin/Action.html">Nucleon::Mixin::Action</a>
117
+
118
+ <li><a href="./Nucleon/Mixin/Action/Commit.html">Nucleon::Mixin::Action::Commit</a>
119
+
120
+ <li><a href="./Nucleon/Mixin/Action/Project.html">Nucleon::Mixin::Action::Project</a>
121
+
122
+ <li><a href="./Nucleon/Mixin/Action/Push.html">Nucleon::Mixin::Action::Push</a>
123
+
124
+ <li><a href="./Nucleon/Mixin/Colors.html">Nucleon::Mixin::Colors</a>
125
+
126
+ <li><a href="./Nucleon/Mixin/ConfigCollection.html">Nucleon::Mixin::ConfigCollection</a>
127
+
128
+ <li><a href="./Nucleon/Mixin/ConfigOptions.html">Nucleon::Mixin::ConfigOptions</a>
129
+
130
+ <li><a href="./Nucleon/Mixin/Macro.html">Nucleon::Mixin::Macro</a>
131
+
132
+ <li><a href="./Nucleon/Mixin/Macro/ObjectInterface.html">Nucleon::Mixin::Macro::ObjectInterface</a>
133
+
134
+ <li><a href="./Nucleon/Mixin/Macro/PluginInterface.html">Nucleon::Mixin::Macro::PluginInterface</a>
135
+
136
+ <li><a href="./Nucleon/Mixin/Settings.html">Nucleon::Mixin::Settings</a>
137
+
138
+ <li><a href="./Nucleon/Mixin/SubConfig.html">Nucleon::Mixin::SubConfig</a>
139
+
140
+ <li><a href="./Nucleon/Parallel.html">Nucleon::Parallel</a>
141
+
142
+ <li><a href="./Nucleon/Parallel/ClassMethods.html">Nucleon::Parallel::ClassMethods</a>
143
+
144
+ <li><a href="./Nucleon/Parallel/InstanceMethods.html">Nucleon::Parallel::InstanceMethods</a>
145
+
146
+ <li><a href="./Nucleon/Plugin.html">Nucleon::Plugin</a>
147
+
148
+ <li><a href="./Nucleon/Plugin/Action.html">Nucleon::Plugin::Action</a>
149
+
150
+ <li><a href="./Nucleon/Plugin/Action/Option.html">Nucleon::Plugin::Action::Option</a>
151
+
152
+ <li><a href="./Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
153
+
154
+ <li><a href="./Nucleon/Plugin/Command.html">Nucleon::Plugin::Command</a>
155
+
156
+ <li><a href="./Nucleon/Plugin/Event.html">Nucleon::Plugin::Event</a>
157
+
158
+ <li><a href="./Nucleon/Plugin/Extension.html">Nucleon::Plugin::Extension</a>
159
+
160
+ <li><a href="./Nucleon/Plugin/Project.html">Nucleon::Plugin::Project</a>
161
+
162
+ <li><a href="./Nucleon/Plugin/Template.html">Nucleon::Plugin::Template</a>
163
+
164
+ <li><a href="./Nucleon/Plugin/Translator.html">Nucleon::Plugin::Translator</a>
165
+
166
+ <li><a href="./Nucleon/Project.html">Nucleon::Project</a>
167
+
168
+ <li><a href="./Nucleon/Project/Git.html">Nucleon::Project::Git</a>
169
+
170
+ <li><a href="./Nucleon/Project/Github.html">Nucleon::Project::Github</a>
171
+
172
+ <li><a href="./Nucleon/Template.html">Nucleon::Template</a>
173
+
174
+ <li><a href="./Nucleon/Template/Json.html">Nucleon::Template::Json</a>
175
+
176
+ <li><a href="./Nucleon/Template/Wrapper.html">Nucleon::Template::Wrapper</a>
177
+
178
+ <li><a href="./Nucleon/Template/Yaml.html">Nucleon::Template::Yaml</a>
179
+
180
+ <li><a href="./Nucleon/Translator.html">Nucleon::Translator</a>
181
+
182
+ <li><a href="./Nucleon/Translator/Json.html">Nucleon::Translator::Json</a>
183
+
184
+ <li><a href="./Nucleon/Translator/Yaml.html">Nucleon::Translator::Yaml</a>
185
+
186
+ <li><a href="./Nucleon/Util.html">Nucleon::Util</a>
187
+
188
+ <li><a href="./Nucleon/Util/CLI.html">Nucleon::Util::CLI</a>
189
+
190
+ <li><a href="./Nucleon/Util/CLI/Parser.html">Nucleon::Util::CLI::Parser</a>
191
+
192
+ <li><a href="./Nucleon/Util/Cache.html">Nucleon::Util::Cache</a>
193
+
194
+ <li><a href="./Nucleon/Util/Console.html">Nucleon::Util::Console</a>
195
+
196
+ <li><a href="./Nucleon/Util/Data.html">Nucleon::Util::Data</a>
197
+
198
+ <li><a href="./Nucleon/Util/Disk.html">Nucleon::Util::Disk</a>
199
+
200
+ <li><a href="./Nucleon/Util/Git.html">Nucleon::Util::Git</a>
201
+
202
+ <li><a href="./Nucleon/Util/Liquid.html">Nucleon::Util::Liquid</a>
203
+
204
+ <li><a href="./Nucleon/Util/Logger.html">Nucleon::Util::Logger</a>
205
+
206
+ <li><a href="./Nucleon/Util/Package.html">Nucleon::Util::Package</a>
207
+
208
+ <li><a href="./Nucleon/Util/SSH.html">Nucleon::Util::SSH</a>
209
+
210
+ <li><a href="./Nucleon/Util/SSH/Keypair.html">Nucleon::Util::SSH::Keypair</a>
211
+
212
+ <li><a href="./Nucleon/Util/Shell.html">Nucleon::Util::Shell</a>
213
+
214
+ <li><a href="./Nucleon/Util/Shell/Result.html">Nucleon::Util::Shell::Result</a>
215
+
216
+ <li><a href="./Hash.html">Hash</a>
217
+
218
+ <li><a href="./Kernel.html">Kernel</a>
219
+
220
+ </ul>
221
+ </nav>
222
+
223
+ </div>
224
+ </nav>
225
+
226
+ <div id="documentation" class="description">
227
+
228
+ <h2 id="label-Nucleon+architecture+guide"><a href="Nucleon.html">Nucleon</a> architecture guide</h2>
229
+
230
+ <p><a href="Nucleon.html">Nucleon</a> is built to provide an easy and minimal,
231
+ yet extremely powerful, framework for building applications that are
232
+ highly distributable in nature.</p>
233
+
234
+ <p>This project should be applicable to any Ruby application that needs to be
235
+ built in a pluggable, concurrent, and configurable fashion. It is capable
236
+ of being used as pieces in existing programming models and it provides an
237
+ extremely simple core programming model that you can build on.</p>
238
+
239
+ <p>There are five major architectural goals of the project:</p>
240
+
241
+ <h3 id="label-Persistent+and+mergeable+objects">Persistent and mergeable objects</h3>
242
+
243
+ <h4 id="label-Important+concept%3A++Objects+%3D%3D+Property+trees">Important concept: Objects == Property trees</h4>
244
+
245
+ <p>At the core of the <a href="Nucleon.html">Nucleon</a> framework is the
246
+ configuration. The configuration is used for allowing us to store,
247
+ lookup, and perform other operations (such as merge) on our class data by
248
+ treating a subset of class properties as a tree based data structure.</p>
249
+
250
+ <p>Examples of <a href="Nucleon.html">Nucleon</a> configurations:</p>
251
+
252
+ <pre class="ruby"><span class="ruby-identifier">first_config</span> = <span class="ruby-constant">Nucleon</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
253
+ <span class="ruby-identifier">first_config</span>.<span class="ruby-identifier">set</span>([ :<span class="ruby-identifier">my</span> <span class="ruby-operator">:</span><span class="ruby-identifier">nested</span>, :<span class="ruby-identifier">property</span> ], <span class="ruby-string">&#39;hello&#39;</span>)
254
+ <span class="ruby-identifier">first_config</span>.<span class="ruby-identifier">set</span>([ :<span class="ruby-identifier">my</span>, :<span class="ruby-identifier">other</span> ], { :<span class="ruby-identifier">ok</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> })
255
+
256
+ <span class="ruby-identifier">tree_data</span> = <span class="ruby-identifier">first_config</span>.<span class="ruby-identifier">export</span>
257
+ <span class="ruby-comment"># tree_data = { </span>
258
+ <span class="ruby-comment"># :my =&gt; {</span>
259
+ <span class="ruby-comment"># :nested =&gt; { :property =&gt; &#39;hello&#39; },</span>
260
+ <span class="ruby-comment"># :other =&gt; { :ok =&gt; true }</span>
261
+ <span class="ruby-comment"># }</span>
262
+ <span class="ruby-comment"># }</span>
263
+
264
+ <span class="ruby-identifier">second_config</span> = <span class="ruby-constant">Nucleon</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
265
+ <span class="ruby-identifier">second_config</span>.<span class="ruby-identifier">set</span>([ :<span class="ruby-identifier">my</span>, :<span class="ruby-identifier">other</span>, :<span class="ruby-identifier">ok</span> ], <span class="ruby-keyword">false</span>)
266
+ <span class="ruby-identifier">second_config</span>.<span class="ruby-identifier">set</span>(:<span class="ruby-identifier">property</span>, <span class="ruby-keyword">true</span>)
267
+ <span class="ruby-identifier">second_config</span>.<span class="ruby-identifier">set</span>([ :<span class="ruby-identifier">something</span>, :<span class="ruby-keyword">else</span> ], <span class="ruby-keyword">true</span>)
268
+
269
+ <span class="ruby-identifier">third_config</span> = <span class="ruby-constant">Nucleon</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>({ :<span class="ruby-identifier">property</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">false</span> })
270
+ <span class="ruby-identifier">third_config</span>.<span class="ruby-identifier">import</span>(<span class="ruby-identifier">first_config</span>)
271
+ <span class="ruby-identifier">third_config</span>.<span class="ruby-identifier">defaults</span>(<span class="ruby-identifier">second_config</span>)
272
+
273
+ <span class="ruby-identifier">tree_data</span> = <span class="ruby-identifier">third_config</span>.<span class="ruby-identifier">export</span>
274
+ <span class="ruby-comment"># tree_data = { </span>
275
+ <span class="ruby-comment"># :my =&gt; {</span>
276
+ <span class="ruby-comment"># :nested =&gt; { :property =&gt; &#39;hello&#39; },</span>
277
+ <span class="ruby-comment"># :other =&gt; { :ok =&gt; true }</span>
278
+ <span class="ruby-comment"># },</span>
279
+ <span class="ruby-comment"># :property =&gt; false,</span>
280
+ <span class="ruby-comment"># :something =&gt; { :else =&gt; true }</span>
281
+ <span class="ruby-comment"># }</span>
282
+ </pre>
283
+
284
+ <p>As you can see the concept is pretty simple. In <a
285
+ href="Nucleon.html">Nucleon</a> most classes extend the configuration so
286
+ they have the above elastic and persistable qualities. Upon the
287
+ configuration primitives are built specialized accessors / modifiers in sub
288
+ classes. This creates a very dynamic and flexible object model upon which
289
+ we can build effective distributed systems.</p>
290
+
291
+ <h3 id="label-Extremely+pluggable+and+extensible">Extremely pluggable and extensible</h3>
292
+
293
+ <p>In the future application programming will focus much more on plugins and
294
+ extensions to existing systems than crafting a bunch of standalone systems.
295
+ This trend has already begun. But it can be harder to start an application
296
+ with a capable plugin and extensibility model unless already building on an
297
+ extensible framework (at which point you are most likely creating plugins).</p>
298
+
299
+ <p>One of the driving goals behind the <a href="Nucleon.html">Nucleon</a>
300
+ project is to deliver a cutting edge plugin and extensibility model that
301
+ other applications or frameworks can build on to provide their parallel
302
+ capable pluggable architecture. In order to do this effectively we need
303
+ to bridge different extensible systems to create an integrated hybrid.</p>
304
+
305
+ <p><a href="Nucleon.html">Nucleon</a> provides (and will provide) quite a few
306
+ means of extension:</p>
307
+
308
+ <h4 id="label-Plugin+%2F+providers+architecture">Plugin / providers architecture</h4>
309
+
310
+ <p><a href="Nucleon.html">Nucleon</a> implements a model where we define a
311
+ base API interface/implementation as a base plugin, which can be extended
312
+ by specialized providers loaded from a myriad of locations (that you can
313
+ define). This allows us to utilize base capabilities that can be easily
314
+ extended by developers with a single Ruby file provider implementation.
315
+ These plugin instances are usually created via a facade that makes
316
+ referencing them very easy. The facade is layered like an onion so it is
317
+ very easy to extend as needed.</p>
318
+
319
+ <p>For example:</p>
320
+
321
+ <pre class="ruby"><span class="ruby-identifier">translator</span> = <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">translator</span>({ :<span class="ruby-identifier">provider</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">json</span> })
322
+ <span class="ruby-identifier">obj_string</span> = <span class="ruby-identifier">translator</span>.<span class="ruby-identifier">generate</span>(<span class="ruby-identifier">properties</span>)
323
+ <span class="ruby-identifier">properties</span> = <span class="ruby-identifier">translator</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">obj_string</span>)
324
+ </pre>
325
+
326
+ <p>It should be noted that ALL <a href="Nucleon.html">Nucleon</a> plugins are
327
+ at their core, configurations.</p>
328
+
329
+ <h4 id="label-Method+block+extension">Method block extension</h4>
330
+
331
+ <p>Sometimes it is nice to have a base implementation handle mundane details
332
+ of a task and leave the juicy bits to the child implementation. Normally,
333
+ in most OOP languages, we do this by simply extending parent methods
334
+ through inheritance. This leaves us with a problem though. How can we
335
+ get the parent to process before, after, or even in between the execution
336
+ of the child implementation?</p>
337
+
338
+ <p>Ruby makes thie very easy! To fulfill this goal we often use code blocks
339
+ passed to the parent that the parent then executes on behalf of the child.</p>
340
+
341
+ <p>For example:</p>
342
+
343
+ <pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">ParentClass</span>
344
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
345
+ <span class="ruby-ivar">@logger</span> = <span class="ruby-constant">Log4r</span><span class="ruby-operator">::</span><span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;over-engineered greeting class&#39;</span>)
346
+ <span class="ruby-keyword">end</span>
347
+
348
+ <span class="ruby-comment">#---</span>
349
+
350
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">say_hello</span>(<span class="ruby-identifier">to</span>, &amp;<span class="ruby-identifier">code</span>)
351
+ <span class="ruby-identifier">result</span> = <span class="ruby-keyword">false</span>
352
+ <span class="ruby-ivar">@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Invoking say_hello with #{to}&quot;</span>)
353
+
354
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>(:<span class="ruby-identifier">validate</span>)
355
+ <span class="ruby-ivar">@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">&quot;We&#39;re all good&quot;</span>)
356
+ <span class="ruby-identifier">result</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>(:<span class="ruby-identifier">run</span>)
357
+ <span class="ruby-keyword">end</span>
358
+
359
+ <span class="ruby-ivar">@logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Finishing say_hello with #{to}&quot;</span>)
360
+ <span class="ruby-identifier">result</span>
361
+ <span class="ruby-keyword">end</span>
362
+ <span class="ruby-keyword">end</span>
363
+
364
+ <span class="ruby-comment">#---</span>
365
+
366
+ <span class="ruby-keyword">class</span> <span class="ruby-constant">ChildClass</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">ParentClass</span>
367
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">say_hello</span>(<span class="ruby-identifier">to</span>)
368
+ <span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span><span class="ruby-operator">|</span>
369
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">op</span> <span class="ruby-operator">==</span> :<span class="ruby-identifier">validate</span>
370
+ <span class="ruby-operator">!</span><span class="ruby-identifier">to</span>.<span class="ruby-identifier">nil?</span>
371
+ <span class="ruby-keyword">else</span>
372
+ <span class="ruby-comment"># This code only gets executed if &lt;to&gt; is not nil</span>
373
+ <span class="ruby-comment"># And we don&#39;t have to worry about logging</span>
374
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;hello #{to}!&quot;</span>
375
+ <span class="ruby-keyword">true</span>
376
+ <span class="ruby-keyword">end</span>
377
+ <span class="ruby-keyword">end</span>
378
+ <span class="ruby-keyword">end</span>
379
+ <span class="ruby-keyword">end</span>
380
+
381
+ <span class="ruby-comment">#---</span>
382
+
383
+ <span class="ruby-identifier">obj</span> = <span class="ruby-constant">ChildClass</span>.<span class="ruby-identifier">new</span>
384
+ <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">say_hello</span>(<span class="ruby-string">&#39;world&#39;</span>)
385
+ <span class="ruby-comment"># hello world!</span>
386
+ </pre>
387
+
388
+ <p>As you can see we executed the child method statements multiple times from
389
+ the parent method so that we could abstract out some of the operations in
390
+ the sub class, thus making the provider easier to develop and the parent
391
+ abstract enough to support various providers.</p>
392
+
393
+ <p>Also notice that we did not expose the external block execution to the
394
+ users of the class or to child classes of ChildClass. In this case we
395
+ chose to stop the block execution propogation because the implementation
396
+ was very simple; say hello. If it had been more complex we could propogate
397
+ the block execution on down the line.</p>
398
+
399
+ <h4 id="label-Event+based+plugin+extensions">Event based plugin extensions</h4>
400
+
401
+ <p>It is extremely useful to be able to tap into the execution flow of
402
+ existing objects and methods. This allows the flow to change based on
403
+ actions that are defined by plugins that hook into other plugins
404
+ operations.</p>
405
+
406
+ <p><a href="Nucleon.html">Nucleon</a> implements a plugin type called the
407
+ Extension. It&#39;s sole purpose is to extend other plugins (including
408
+ Extensions). The base extension plugin has no special methods, leaving
409
+ the method interface pretty clean. These extensions are instantiated (only
410
+ one per defined extension) and they act on events as the application
411
+ execution flows. The are true class instances so they can manage state
412
+ between registered events.</p>
413
+
414
+ <p>Events are triggered by named method calls run by a central plugin manager.
415
+ They look just like regular methods but call out to other extensions to
416
+ help configure, get/set values, or otherwise act on the state of the
417
+ application at the time triggered. Extensions register for events by
418
+ defining an instance method that matches the name of the event. Every
419
+ event method (hook) takes one parameter (you guessed it); a configuration.
420
+ This makes the process quick and painless and code for events remains
421
+ easily localized and separated.</p>
422
+
423
+ <p>For example:</p>
424
+
425
+ <pre class="ruby"><span class="ruby-comment">#</span>
426
+ <span class="ruby-comment"># This would be defined within a namespaced load path.</span>
427
+ <span class="ruby-comment"># More on that in the usage section.</span>
428
+ <span class="ruby-comment"># </span>
429
+ <span class="ruby-keyword">class</span> <span class="ruby-constant">MyExtension</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">plugin_class</span>(:<span class="ruby-identifier">extension</span>)
430
+
431
+ <span class="ruby-ivar">@objs</span> = []
432
+
433
+ <span class="ruby-comment">#---</span>
434
+
435
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">myobj_config</span>(<span class="ruby-identifier">config</span>)
436
+ <span class="ruby-keyword">if</span> <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">check</span>(:<span class="ruby-identifier">is_nucleon_awesome</span>, <span class="ruby-identifier">config</span>)
437
+ <span class="ruby-comment"># I&#39;m going to be nice and let other extensions help me decide.</span>
438
+ <span class="ruby-identifier">config</span>[:<span class="ruby-identifier">awesome</span>] = <span class="ruby-keyword">true</span>
439
+ <span class="ruby-keyword">end</span>
440
+ <span class="ruby-keyword">end</span>
441
+
442
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_nucleon_awesome</span>(<span class="ruby-identifier">config</span>)
443
+ <span class="ruby-keyword">true</span> <span class="ruby-comment"># Of course I&#39;m a little biased</span>
444
+ <span class="ruby-keyword">end</span>
445
+
446
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">record_object</span>(<span class="ruby-identifier">config</span>)
447
+ <span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">config</span>)
448
+ <span class="ruby-keyword">end</span>
449
+ <span class="ruby-keyword">end</span>
450
+
451
+ <span class="ruby-comment">#---</span>
452
+
453
+ <span class="ruby-comment"># Extension would normally be loaded via Nucleon.register(load_path)</span>
454
+ <span class="ruby-comment"># No one overruled me, Whew!</span>
455
+
456
+ <span class="ruby-identifier">myobj</span> = <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">config</span>(:<span class="ruby-identifier">myobj</span>, { :<span class="ruby-identifier">nucleon</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">is</span> })
457
+ <span class="ruby-comment"># myobj = {</span>
458
+ <span class="ruby-comment"># :nucleon =&gt; :is,</span>
459
+ <span class="ruby-comment"># :awesome =&gt; true</span>
460
+ <span class="ruby-comment"># }</span>
461
+
462
+ <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">exec</span>(:<span class="ruby-identifier">record_object</span>, <span class="ruby-identifier">myobj</span>)
463
+ </pre>
464
+
465
+ <h4 id="label-Middleware+sequences+%28NOT+YET+IMPLEMENTED%29">Middleware sequences (NOT YET IMPLEMENTED)</h4>
466
+
467
+ <p>We are evaluating the implementation of stacked actions or some form of
468
+ composite plugin execution model. Mitchell Hashimoto has created an
469
+ extremely useful solution for Vagrant and a separate middleware gem that
470
+ provides standalone middleware sequencing capabilities.</p>
471
+
472
+ <p>In the future we might integrate this system to stack our action plugins so
473
+ we can derive action lists. This would most likely be a framework that was
474
+ primarily used by the action plugin system and derivative projects.</p>
475
+
476
+ <p>Your thoughts are welcome? Contact the maintainers or file an issue.</p>
477
+
478
+ <h4 id="label-Execution+plans+%28NOT+YET+MIGRATED%29">Execution plans (NOT YET MIGRATED)</h4>
479
+
480
+ <p>In the early days of this project (or it&#39;s predecessor), I created and
481
+ utilized a system of executing JSON based CLI execution plans that could
482
+ respond to and trigger events, resulting in a responsive CLI sequence that
483
+ was programmed entirely in JSON as configurations. This fits our “make
484
+ everything a configuration” philosophy.</p>
485
+
486
+ <p>This system will be brought up to the current architecture before version
487
+ 1.0 (first production release). It will be very powerful, allowing for the
488
+ creation of new CLI commands and event driven programmatic actions purely
489
+ by working with JSON, YAML, or any other defined translator in the
490
+ application.</p>
491
+
492
+ <p>The goal is to allow for the ultimate in high level scriptable programming;
493
+ configuring data objects that execute programs.</p>
494
+
495
+ <p>This might eventually be integrated with the middleware sequences discussed
496
+ above.</p>
497
+
498
+ <h3 id="label-Easily+parallel">Easily parallel</h3>
499
+
500
+ <p>Concurrency is the backbone of scalability and fault tolerance. With <a
501
+ href="Nucleon.html">Nucleon</a> we seek to create a system that can utilize
502
+ the whole of the resources available to us in the most flexible way
503
+ possible. We should be able to write parallel capable objects without even
504
+ thinking about it (ok, maybe a litle). It should also be capable of
505
+ completely disabling the parallel execution and library inclusion to make
506
+ it easier to troubleshoot and debug.</p>
507
+
508
+ <p>There are two main popular concurrency methodologies currently being
509
+ promoted today. Erlang has popularized the actor based concurrency model
510
+ which has been widely discussed and adopted across the enterprise.
511
+ Another popular model is channel based communication between workers
512
+ popularized by the Go programming language. We would eventually like to
513
+ support both.</p>
514
+
515
+ <p>Currently we utilize and build on a super awesome Actor based parallel
516
+ framework for Ruby called Celluloid (<a
517
+ href="http://celluloid.io">celluloid.io</a>). This library is designed
518
+ around principles gleaned from Erlang&#39;s concurrency mechanism and is
519
+ built around an object oriented message passing architecture. It is very
520
+ well written.</p>
521
+
522
+ <p><a href="Nucleon.html">Nucleon</a> provides an interface to wrap and load
523
+ Celluloid actor proxies into your object&#39;s but allows for the parallel
524
+ abilities to be completely disabled, reducing the complexity of the code
525
+ (good for stack traces) and allowing for sequentially based debugging
526
+ tools (trapping through the code) to function correctly.</p>
527
+
528
+ <p>How easy is it to create a parallel object?</p>
529
+
530
+ <pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">MyClass</span>
531
+ <span class="ruby-identifier">include</span> <span class="ruby-constant">Nucleon</span><span class="ruby-operator">::</span><span class="ruby-constant">Parallel</span> <span class="ruby-comment"># Uses Celluloid under the hood!</span>
532
+
533
+ <span class="ruby-ivar">@order</span> = []
534
+
535
+ <span class="ruby-identifier">attr_reader</span> :<span class="ruby-identifier">order</span>
536
+
537
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">print_number</span>(<span class="ruby-identifier">num</span>)
538
+ <span class="ruby-identifier">sleep</span>(<span class="ruby-constant">Random</span>.<span class="ruby-identifier">rand</span>(<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>))
539
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Printing: #{num}&quot;</span>
540
+ <span class="ruby-ivar">@order</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">num</span>
541
+ <span class="ruby-keyword">end</span>
542
+ <span class="ruby-keyword">end</span>
543
+
544
+ <span class="ruby-comment">#---</span>
545
+
546
+ <span class="ruby-identifier">printer</span> = <span class="ruby-constant">MyClass</span>.<span class="ruby-identifier">new</span>
547
+ <span class="ruby-identifier">printer</span>.<span class="ruby-identifier">parallel</span>(:<span class="ruby-identifier">print_number</span>, <span class="ruby-constant">Array</span>(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">100</span>))
548
+ <span class="ruby-comment"># prints sequence out of sequence</span>
549
+ <span class="ruby-comment"># unless (ENV[&#39;NUCLEON_DEBUG&#39;] or ENV[&#39;NUCLEON_NO_PARALLEL&#39;] defined)</span>
550
+
551
+ <span class="ruby-identifier">printer</span>.<span class="ruby-identifier">order</span> <span class="ruby-comment"># Whatever order they were executed in</span>
552
+ </pre>
553
+
554
+ <p>In the future we will put research into the channel based communication
555
+ concurrency model used by Go.</p>
556
+
557
+ <h3 id="label-Automatable+project+workflows">Automatable project workflows</h3>
558
+
559
+ <p>Configurations are great, but if they can&#39;t persist and be recalled
560
+ later by the application or framework they have limited effectiveness.
561
+ Since we want projects that are distributed in nature the configurations
562
+ need to be, not just persistent, but remotely available. With this in mind
563
+ the Project plugin was born.</p>
564
+
565
+ <p>The project is a revisionable data store with a local directory. It could
566
+ be a file repository or an active database some where (or even a service
567
+ like Dropbox). The idea is we provide a basic implementation of the
568
+ project in abstract operations and specialized providers fill in the
569
+ details.</p>
570
+
571
+ <p>So far we have implemented Git, and an extension to Git, GitHub. We use a
572
+ lot of text based files in our projects and Git is great for compressing
573
+ and storing versions of them, so Git was the first project integration.
574
+ Git is also a highly popular distributed mission critical capable version
575
+ control system, which is also a contributing factor in its prioritization.</p>
576
+
577
+ <p>In the future we plan on integrating more project providers and reworking
578
+ the Git provider to utilize more of the performance oriented Rugged
579
+ (LibGit2) libraries.</p>
580
+
581
+ <p>What a project looks like as a programming construct:</p>
582
+
583
+ <pre class="ruby"><span class="ruby-identifier">project</span> = <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">project</span>({
584
+ :<span class="ruby-identifier">provider</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">github</span>, <span class="ruby-comment"># Project resides at Github (use special API sauce)</span>
585
+ :<span class="ruby-identifier">reference</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;coralnexus/nucleon&#39;</span>, <span class="ruby-comment"># GitHub identifier</span>
586
+ :<span class="ruby-identifier">revision</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;0.1&#39;</span>, <span class="ruby-comment"># Revision to ensure checked out for project</span>
587
+ :<span class="ruby-identifier">directory</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;/tmp/nucleon&#39;</span>, <span class="ruby-comment"># Directory to setup project</span>
588
+ :<span class="ruby-identifier">create</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>, <span class="ruby-comment"># Create project if does not exist yet</span>
589
+ :<span class="ruby-identifier">pull</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> <span class="ruby-comment"># Go ahead and pull updates</span>
590
+ })
591
+
592
+ <span class="ruby-comment"># If you have a .netrc file with auth credentials in your home directory</span>
593
+ <span class="ruby-comment"># the plugin will manage deploy keys for private projects.</span>
594
+
595
+ <span class="ruby-identifier">origin</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">remote</span>(:<span class="ruby-identifier">origin</span>)
596
+ <span class="ruby-comment"># http://github.com/coralnexus/nucleon.git</span>
597
+
598
+ <span class="ruby-identifier">edit</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">remote</span>(:<span class="ruby-identifier">edit</span>)
599
+ <span class="ruby-comment"># git@github.com:coralnexus/nucleon.git</span>
600
+
601
+ <span class="ruby-identifier">project</span>.<span class="ruby-identifier">checkout</span>(<span class="ruby-string">&#39;0.1&#39;</span>)
602
+ <span class="ruby-identifier">project</span>.<span class="ruby-identifier">pull</span>(:<span class="ruby-identifier">edit</span>)
603
+
604
+ <span class="ruby-identifier">project</span>.<span class="ruby-identifier">ignore</span>(<span class="ruby-string">&#39;my-tmp-file.txt&#39;</span>)
605
+
606
+ <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-string">&#39;some-file.txt, { :message =&gt; &#39;</span><span class="ruby-constant">Changing</span> <span class="ruby-identifier">some</span> <span class="ruby-identifier">file</span> <span class="ruby-identifier">text</span>.<span class="ruby-string">&#39; })
607
+
608
+ project.add_subproject(&#39;</span><span class="ruby-identifier">other</span><span class="ruby-operator">/</span><span class="ruby-identifier">nucleon</span><span class="ruby-string">&#39;, &#39;</span><span class="ruby-identifier">http</span><span class="ruby-operator">:</span><span class="ruby-regexp">//</span><span class="ruby-identifier">github</span>.<span class="ruby-identifier">com</span><span class="ruby-operator">/</span><span class="ruby-identifier">coralnexus</span><span class="ruby-operator">/</span><span class="ruby-identifier">nucleon</span>.<span class="ruby-identifier">git</span>, <span class="ruby-string">&#39;0.1&#39;</span>)
609
+ <span class="ruby-identifier">project</span>.<span class="ruby-identifier">delete_subproject</span>(<span class="ruby-string">&#39;other/nucleon&#39;</span>)
610
+ </pre>
611
+
612
+ <p>There are more methods and options for the above methods, but the above
613
+ should give you an idea of what you can expect. The interface API is
614
+ definitely skewed towards the Git idioms, such as remotes, checkout,
615
+ commit, but the implementation can vary so if the data store can map to
616
+ most of the typical distributed version control ablities then it should be
617
+ fairly easy to integrate.</p>
618
+
619
+ <h3 id="label-Flexible+action+execution+model">Flexible action execution model</h3>
620
+
621
+ <p>One of the goals of the project is to create a very flexible action
622
+ execution system that can be used from the CLI, internally as method calls,
623
+ and eventually as service API endpoints.</p>
624
+
625
+ </div>
626
+
627
+
628
+
629
+ <footer id="validator-badges">
630
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
631
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
632
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
633
+ </footer>
634
+