nucleon 0.2.0 → 0.2.1

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