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,549 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Nucleon::Project::Github - 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 id="top" class="class">
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="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/nucleon/project/github.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link"><a href="Git.html">Nucleon::Project::Git</a>
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-c-expand_url">::expand_url</a>
74
+
75
+ <li><a href="#method-i-client">#client</a>
76
+
77
+ <li><a href="#method-i-init_auth">#init_auth</a>
78
+
79
+ <li><a href="#method-i-normalize">#normalize</a>
80
+
81
+ <li><a href="#method-i-set_connection">#set_connection</a>
82
+
83
+ <li><a href="#method-i-verify_key">#verify_key</a>
84
+
85
+ </ul>
86
+ </nav>
87
+
88
+ </div>
89
+
90
+ <div id="project-metadata">
91
+ <nav id="fileindex-section" class="section project-section">
92
+ <h3 class="section-header">Pages</h3>
93
+
94
+ <ul>
95
+
96
+ <li class="file"><a href="../../ARCHITECTURE_rdoc.html">ARCHITECTURE</a>
97
+
98
+ <li class="file"><a href="../../README_rdoc.html">README</a>
99
+
100
+ <li class="file"><a href="../../TODO_rdoc.html">TODO</a>
101
+
102
+ </ul>
103
+ </nav>
104
+
105
+ <nav id="classindex-section" class="section project-section">
106
+ <h3 class="section-header">Class and Module Index</h3>
107
+
108
+ <ul class="link-list">
109
+
110
+ <li><a href="../../Nucleon.html">Nucleon</a>
111
+
112
+ <li><a href="../../Nucleon/Action.html">Nucleon::Action</a>
113
+
114
+ <li><a href="../../Nucleon/Action/Add.html">Nucleon::Action::Add</a>
115
+
116
+ <li><a href="../../Nucleon/Action/Create.html">Nucleon::Action::Create</a>
117
+
118
+ <li><a href="../../Nucleon/Action/Extract.html">Nucleon::Action::Extract</a>
119
+
120
+ <li><a href="../../Nucleon/Action/Remove.html">Nucleon::Action::Remove</a>
121
+
122
+ <li><a href="../../Nucleon/Action/Save.html">Nucleon::Action::Save</a>
123
+
124
+ <li><a href="../../Nucleon/Action/Update.html">Nucleon::Action::Update</a>
125
+
126
+ <li><a href="../../Nucleon/Codes.html">Nucleon::Codes</a>
127
+
128
+ <li><a href="../../Nucleon/Command.html">Nucleon::Command</a>
129
+
130
+ <li><a href="../../Nucleon/Command/Bash.html">Nucleon::Command::Bash</a>
131
+
132
+ <li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
133
+
134
+ <li><a href="../../Nucleon/Config/Collection.html">Nucleon::Config::Collection</a>
135
+
136
+ <li><a href="../../Nucleon/Config/Options.html">Nucleon::Config::Options</a>
137
+
138
+ <li><a href="../../Nucleon/Core.html">Nucleon::Core</a>
139
+
140
+ <li><a href="../../Nucleon/Errors.html">Nucleon::Errors</a>
141
+
142
+ <li><a href="../../Nucleon/Errors/BatchError.html">Nucleon::Errors::BatchError</a>
143
+
144
+ <li><a href="../../Nucleon/Errors/NucleonError.html">Nucleon::Errors::NucleonError</a>
145
+
146
+ <li><a href="../../Nucleon/Errors/SSHUnavailable.html">Nucleon::Errors::SSHUnavailable</a>
147
+
148
+ <li><a href="../../Nucleon/Event.html">Nucleon::Event</a>
149
+
150
+ <li><a href="../../Nucleon/Event/Regex.html">Nucleon::Event::Regex</a>
151
+
152
+ <li><a href="../../Nucleon/Facade.html">Nucleon::Facade</a>
153
+
154
+ <li><a href="../../Nucleon/Gems.html">Nucleon::Gems</a>
155
+
156
+ <li><a href="../../Nucleon/Manager.html">Nucleon::Manager</a>
157
+
158
+ <li><a href="../../Nucleon/Mixin.html">Nucleon::Mixin</a>
159
+
160
+ <li><a href="../../Nucleon/Mixin/Action.html">Nucleon::Mixin::Action</a>
161
+
162
+ <li><a href="../../Nucleon/Mixin/Action/Commit.html">Nucleon::Mixin::Action::Commit</a>
163
+
164
+ <li><a href="../../Nucleon/Mixin/Action/Project.html">Nucleon::Mixin::Action::Project</a>
165
+
166
+ <li><a href="../../Nucleon/Mixin/Action/Push.html">Nucleon::Mixin::Action::Push</a>
167
+
168
+ <li><a href="../../Nucleon/Mixin/Colors.html">Nucleon::Mixin::Colors</a>
169
+
170
+ <li><a href="../../Nucleon/Mixin/ConfigCollection.html">Nucleon::Mixin::ConfigCollection</a>
171
+
172
+ <li><a href="../../Nucleon/Mixin/ConfigOptions.html">Nucleon::Mixin::ConfigOptions</a>
173
+
174
+ <li><a href="../../Nucleon/Mixin/Macro.html">Nucleon::Mixin::Macro</a>
175
+
176
+ <li><a href="../../Nucleon/Mixin/Macro/ObjectInterface.html">Nucleon::Mixin::Macro::ObjectInterface</a>
177
+
178
+ <li><a href="../../Nucleon/Mixin/Macro/PluginInterface.html">Nucleon::Mixin::Macro::PluginInterface</a>
179
+
180
+ <li><a href="../../Nucleon/Mixin/Settings.html">Nucleon::Mixin::Settings</a>
181
+
182
+ <li><a href="../../Nucleon/Mixin/SubConfig.html">Nucleon::Mixin::SubConfig</a>
183
+
184
+ <li><a href="../../Nucleon/Parallel.html">Nucleon::Parallel</a>
185
+
186
+ <li><a href="../../Nucleon/Parallel/ClassMethods.html">Nucleon::Parallel::ClassMethods</a>
187
+
188
+ <li><a href="../../Nucleon/Parallel/InstanceMethods.html">Nucleon::Parallel::InstanceMethods</a>
189
+
190
+ <li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
191
+
192
+ <li><a href="../../Nucleon/Plugin/Action.html">Nucleon::Plugin::Action</a>
193
+
194
+ <li><a href="../../Nucleon/Plugin/Action/Option.html">Nucleon::Plugin::Action::Option</a>
195
+
196
+ <li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
197
+
198
+ <li><a href="../../Nucleon/Plugin/Command.html">Nucleon::Plugin::Command</a>
199
+
200
+ <li><a href="../../Nucleon/Plugin/Event.html">Nucleon::Plugin::Event</a>
201
+
202
+ <li><a href="../../Nucleon/Plugin/Extension.html">Nucleon::Plugin::Extension</a>
203
+
204
+ <li><a href="../../Nucleon/Plugin/Project.html">Nucleon::Plugin::Project</a>
205
+
206
+ <li><a href="../../Nucleon/Plugin/Template.html">Nucleon::Plugin::Template</a>
207
+
208
+ <li><a href="../../Nucleon/Plugin/Translator.html">Nucleon::Plugin::Translator</a>
209
+
210
+ <li><a href="../../Nucleon/Project.html">Nucleon::Project</a>
211
+
212
+ <li><a href="../../Nucleon/Project/Git.html">Nucleon::Project::Git</a>
213
+
214
+ <li><a href="../../Nucleon/Project/Github.html">Nucleon::Project::Github</a>
215
+
216
+ <li><a href="../../Nucleon/Template.html">Nucleon::Template</a>
217
+
218
+ <li><a href="../../Nucleon/Template/Json.html">Nucleon::Template::Json</a>
219
+
220
+ <li><a href="../../Nucleon/Template/Wrapper.html">Nucleon::Template::Wrapper</a>
221
+
222
+ <li><a href="../../Nucleon/Template/Yaml.html">Nucleon::Template::Yaml</a>
223
+
224
+ <li><a href="../../Nucleon/Translator.html">Nucleon::Translator</a>
225
+
226
+ <li><a href="../../Nucleon/Translator/Json.html">Nucleon::Translator::Json</a>
227
+
228
+ <li><a href="../../Nucleon/Translator/Yaml.html">Nucleon::Translator::Yaml</a>
229
+
230
+ <li><a href="../../Nucleon/Util.html">Nucleon::Util</a>
231
+
232
+ <li><a href="../../Nucleon/Util/CLI.html">Nucleon::Util::CLI</a>
233
+
234
+ <li><a href="../../Nucleon/Util/CLI/Parser.html">Nucleon::Util::CLI::Parser</a>
235
+
236
+ <li><a href="../../Nucleon/Util/Cache.html">Nucleon::Util::Cache</a>
237
+
238
+ <li><a href="../../Nucleon/Util/Console.html">Nucleon::Util::Console</a>
239
+
240
+ <li><a href="../../Nucleon/Util/Data.html">Nucleon::Util::Data</a>
241
+
242
+ <li><a href="../../Nucleon/Util/Disk.html">Nucleon::Util::Disk</a>
243
+
244
+ <li><a href="../../Nucleon/Util/Git.html">Nucleon::Util::Git</a>
245
+
246
+ <li><a href="../../Nucleon/Util/Liquid.html">Nucleon::Util::Liquid</a>
247
+
248
+ <li><a href="../../Nucleon/Util/Logger.html">Nucleon::Util::Logger</a>
249
+
250
+ <li><a href="../../Nucleon/Util/Package.html">Nucleon::Util::Package</a>
251
+
252
+ <li><a href="../../Nucleon/Util/SSH.html">Nucleon::Util::SSH</a>
253
+
254
+ <li><a href="../../Nucleon/Util/SSH/Keypair.html">Nucleon::Util::SSH::Keypair</a>
255
+
256
+ <li><a href="../../Nucleon/Util/Shell.html">Nucleon::Util::Shell</a>
257
+
258
+ <li><a href="../../Nucleon/Util/Shell/Result.html">Nucleon::Util::Shell::Result</a>
259
+
260
+ <li><a href="../../Hash.html">Hash</a>
261
+
262
+ <li><a href="../../Kernel.html">Kernel</a>
263
+
264
+ </ul>
265
+ </nav>
266
+
267
+ </div>
268
+ </nav>
269
+
270
+ <div id="documentation">
271
+ <h1 class="class">class Nucleon::Project::Github</h1>
272
+
273
+ <div id="description" class="description">
274
+
275
+ </div><!-- description -->
276
+
277
+
278
+
279
+
280
+ <section id="5Buntitled-5D" class="documentation-section">
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+ <!-- Methods -->
290
+
291
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
292
+ <h3 class="section-header">Public Class Methods</h3>
293
+
294
+
295
+ <div id="method-c-expand_url" class="method-detail ">
296
+
297
+ <div class="method-heading">
298
+ <span class="method-name">expand_url</span><span
299
+ class="method-args">(path, editable = false)</span>
300
+ <span class="method-click-advice">click to toggle source</span>
301
+ </div>
302
+
303
+
304
+ <div class="method-description">
305
+
306
+
307
+
308
+
309
+
310
+ <div class="method-source-code" id="expand_url-source">
311
+ <pre><span class="ruby-comment"># File lib/nucleon/project/github.rb, line 82</span>
312
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">expand_url</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">editable</span> = <span class="ruby-keyword">false</span>)
313
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">editable</span>
314
+ <span class="ruby-identifier">protocol</span> = <span class="ruby-string">&#39;git@&#39;</span>
315
+ <span class="ruby-identifier">separator</span> = <span class="ruby-string">&#39;:&#39;</span>
316
+ <span class="ruby-keyword">else</span>
317
+ <span class="ruby-identifier">protocol</span> = <span class="ruby-string">&#39;https://&#39;</span>
318
+ <span class="ruby-identifier">separator</span> = <span class="ruby-string">&#39;/&#39;</span>
319
+ <span class="ruby-keyword">end</span>
320
+ <span class="ruby-keyword">return</span> <span class="ruby-node">&quot;#{protocol}github.com#{separator}&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;.git&#39;</span>
321
+ <span class="ruby-keyword">end</span></pre>
322
+ </div><!-- expand_url-source -->
323
+
324
+ </div>
325
+
326
+
327
+
328
+
329
+ </div><!-- expand_url-method -->
330
+
331
+
332
+ </section><!-- public-class-method-details -->
333
+
334
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
335
+ <h3 class="section-header">Public Instance Methods</h3>
336
+
337
+
338
+ <div id="method-i-client" class="method-detail ">
339
+
340
+ <div class="method-heading">
341
+ <span class="method-name">client</span><span
342
+ class="method-args">()</span>
343
+ <span class="method-click-advice">click to toggle source</span>
344
+ </div>
345
+
346
+
347
+ <div class="method-description">
348
+
349
+
350
+
351
+
352
+
353
+ <div class="method-source-code" id="client-source">
354
+ <pre><span class="ruby-comment"># File lib/nucleon/project/github.rb, line 37</span>
355
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">client</span>
356
+ <span class="ruby-identifier">set_connection</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@client</span>
357
+ <span class="ruby-ivar">@client</span>
358
+ <span class="ruby-keyword">end</span></pre>
359
+ </div><!-- client-source -->
360
+
361
+ </div>
362
+
363
+
364
+
365
+
366
+ </div><!-- client-method -->
367
+
368
+
369
+ <div id="method-i-init_auth" class="method-detail ">
370
+
371
+ <div class="method-heading">
372
+ <span class="method-name">init_auth</span><span
373
+ class="method-args">()</span>
374
+ <span class="method-click-advice">click to toggle source</span>
375
+ </div>
376
+
377
+
378
+ <div class="method-description">
379
+
380
+
381
+
382
+
383
+
384
+ <div class="method-source-code" id="init_auth-source">
385
+ <pre><span class="ruby-comment"># File lib/nucleon/project/github.rb, line 45</span>
386
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">init_auth</span>
387
+ <span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span>
388
+ <span class="ruby-identifier">external_ip</span> = <span class="ruby-constant">Nucleon</span>.<span class="ruby-identifier">ip_address</span>
389
+ <span class="ruby-identifier">internal_ip</span> = <span class="ruby-identifier">get</span>(<span class="ruby-value">:internal_ip</span>, <span class="ruby-keyword">nil</span>)
390
+
391
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">internal_ip</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">internal_ip</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">external_ip</span>
392
+ <span class="ruby-identifier">location</span> = <span class="ruby-node">&quot;#{external_ip}[#{internal_ip}]&quot;</span>
393
+ <span class="ruby-keyword">else</span>
394
+ <span class="ruby-identifier">location</span> = <span class="ruby-identifier">external_ip</span>
395
+ <span class="ruby-keyword">end</span>
396
+
397
+ <span class="ruby-identifier">key_id</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;USER&#39;</span>] <span class="ruby-operator">+</span> <span class="ruby-string">&#39;@&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">location</span>
398
+ <span class="ruby-identifier">ssh_key</span> = <span class="ruby-identifier">public_key_str</span>
399
+
400
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">private_key</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ssh_key</span>
401
+ <span class="ruby-identifier">deploy_keys</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">deploy_keys</span>(<span class="ruby-identifier">plugin_name</span>)
402
+ <span class="ruby-identifier">github_id</span> = <span class="ruby-keyword">nil</span>
403
+ <span class="ruby-identifier">keys_match</span> = <span class="ruby-keyword">true</span>
404
+
405
+ <span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key_resource</span><span class="ruby-operator">|</span>
406
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">key_resource</span>.<span class="ruby-identifier">title</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">key_id</span>
407
+ <span class="ruby-identifier">github_id</span> = <span class="ruby-identifier">key_resource</span>.<span class="ruby-identifier">id</span>
408
+ <span class="ruby-identifier">keys_match</span> = <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">key_resource</span>.<span class="ruby-identifier">key</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">ssh_key</span>
409
+ <span class="ruby-keyword">break</span>
410
+ <span class="ruby-keyword">end</span>
411
+ <span class="ruby-keyword">end</span>
412
+
413
+ <span class="ruby-identifier">client</span>.<span class="ruby-identifier">remove_deploy_key</span>(<span class="ruby-identifier">myself</span>.<span class="ruby-identifier">plugin_name</span>, <span class="ruby-identifier">github_id</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">github_id</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">keys_match</span>
414
+ <span class="ruby-identifier">client</span>.<span class="ruby-identifier">add_deploy_key</span>(<span class="ruby-identifier">myself</span>.<span class="ruby-identifier">plugin_name</span>, <span class="ruby-identifier">key_id</span>, <span class="ruby-identifier">ssh_key</span>)
415
+ <span class="ruby-identifier">verify_key</span>
416
+ <span class="ruby-keyword">end</span>
417
+ <span class="ruby-keyword">end</span>
418
+ <span class="ruby-keyword">end</span></pre>
419
+ </div><!-- init_auth-source -->
420
+
421
+ </div>
422
+
423
+
424
+
425
+
426
+ </div><!-- init_auth-method -->
427
+
428
+
429
+ <div id="method-i-normalize" class="method-detail ">
430
+
431
+ <div class="method-heading">
432
+ <span class="method-name">normalize</span><span
433
+ class="method-args">(reload)</span>
434
+ <span class="method-click-advice">click to toggle source</span>
435
+ </div>
436
+
437
+
438
+ <div class="method-description">
439
+
440
+
441
+
442
+
443
+
444
+ <div class="method-source-code" id="normalize-source">
445
+ <pre><span class="ruby-comment"># File lib/nucleon/project/github.rb, line 13</span>
446
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">normalize</span>(<span class="ruby-identifier">reload</span>)
447
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">reference</span> = <span class="ruby-identifier">delete</span>(<span class="ruby-value">:reference</span>, <span class="ruby-keyword">nil</span>)
448
+ <span class="ruby-identifier">myself</span>.<span class="ruby-identifier">plugin_name</span> = <span class="ruby-identifier">reference</span>
449
+ <span class="ruby-keyword">else</span>
450
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">url</span> = <span class="ruby-identifier">get</span>(<span class="ruby-value">:url</span>, <span class="ruby-keyword">nil</span>)
451
+ <span class="ruby-identifier">myself</span>.<span class="ruby-identifier">plugin_name</span> = <span class="ruby-identifier">url</span>
452
+ <span class="ruby-identifier">set</span>(<span class="ruby-value">:url</span>, <span class="ruby-identifier">myself</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">expand_url</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">get</span>(<span class="ruby-value">:ssh</span>, <span class="ruby-keyword">false</span>)))
453
+ <span class="ruby-keyword">end</span>
454
+ <span class="ruby-keyword">end</span>
455
+ <span class="ruby-keyword">super</span>
456
+ <span class="ruby-keyword">end</span></pre>
457
+ </div><!-- normalize-source -->
458
+
459
+ </div>
460
+
461
+
462
+
463
+
464
+ </div><!-- normalize-method -->
465
+
466
+
467
+ <div id="method-i-set_connection" class="method-detail ">
468
+
469
+ <div class="method-heading">
470
+ <span class="method-name">set_connection</span><span
471
+ class="method-args">()</span>
472
+ <span class="method-click-advice">click to toggle source</span>
473
+ </div>
474
+
475
+
476
+ <div class="method-description">
477
+
478
+
479
+
480
+
481
+
482
+ <div class="method-source-code" id="set_connection-source">
483
+ <pre><span class="ruby-comment"># File lib/nucleon/project/github.rb, line 27</span>
484
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">set_connection</span>
485
+ <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;octokit&#39;</span>
486
+
487
+ <span class="ruby-ivar">@client</span> = <span class="ruby-constant">Octokit</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span> <span class="ruby-value">:netrc</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>
488
+ <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">login</span>
489
+ <span class="ruby-keyword">end</span></pre>
490
+ </div><!-- set_connection-source -->
491
+
492
+ </div>
493
+
494
+
495
+
496
+
497
+ </div><!-- set_connection-method -->
498
+
499
+
500
+ </section><!-- public-instance-method-details -->
501
+
502
+ <section id="protected-instance-5Buntitled-5D-method-details" class="method-section section">
503
+ <h3 class="section-header">Protected Instance Methods</h3>
504
+
505
+
506
+ <div id="method-i-verify_key" class="method-detail ">
507
+
508
+ <div class="method-heading">
509
+ <span class="method-name">verify_key</span><span
510
+ class="method-args">()</span>
511
+ <span class="method-click-advice">click to toggle source</span>
512
+ </div>
513
+
514
+
515
+ <div class="method-description">
516
+
517
+
518
+
519
+
520
+
521
+ <div class="method-source-code" id="verify_key-source">
522
+ <pre><span class="ruby-comment"># File lib/nucleon/project/github.rb, line 95</span>
523
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">verify_key</span>
524
+ <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span>.<span class="ruby-identifier">init_session</span>(<span class="ruby-string">&#39;github.com&#39;</span>, <span class="ruby-string">&#39;git&#39;</span>, <span class="ruby-value">22</span>, <span class="ruby-identifier">private_key</span>)
525
+ <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span>.<span class="ruby-identifier">close</span>(<span class="ruby-string">&#39;github.com&#39;</span>, <span class="ruby-string">&#39;git&#39;</span>)
526
+ <span class="ruby-keyword">end</span></pre>
527
+ </div><!-- verify_key-source -->
528
+
529
+ </div>
530
+
531
+
532
+
533
+
534
+ </div><!-- verify_key-method -->
535
+
536
+
537
+ </section><!-- protected-instance-method-details -->
538
+
539
+ </section><!-- 5Buntitled-5D -->
540
+
541
+ </div><!-- documentation -->
542
+
543
+
544
+ <footer id="validator-badges">
545
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
546
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
547
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
548
+ </footer>
549
+