Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from VaibhavA19/dev
moved ruby client to opensource
- Loading branch information
Showing
119 changed files
with
36,735 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# juno-ruby-client | ||
Ruby client for JunoDB <br> | ||
|
||
[Documentation](https://github.com/VaibhavA19/junodb/tree/dev/client/Ruby/docs) <br> | ||
[SampleScript](https://github.com/VaibhavA19/junodb/blob/dev/client/Ruby/sample.rb) <br> | ||
[ConfigFile](https://github.com/VaibhavA19/junodb/blob/dev/client/Ruby/juno.yml) | ||
|
||
### Work Directory: [juno] | ||
# Gem Tasks | ||
### Build gem | ||
``` | ||
cd juno | ||
rake build | ||
``` | ||
|
||
### Install gem | ||
``` | ||
cd juno | ||
rake install | ||
``` | ||
|
||
### Execute tests | ||
``` | ||
cd juno | ||
rake spec | ||
``` | ||
|
||
### Execute rubocop linitng | ||
``` | ||
cd juno | ||
rake lint | ||
``` | ||
|
||
### Update documentation | ||
``` | ||
cd juno | ||
rake yard:document | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,301 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title> | ||
Module: Juno | ||
|
||
— Documentation by YARD 0.9.34 | ||
|
||
</title> | ||
|
||
<link rel="stylesheet" href="css/style.css" type="text/css" /> | ||
|
||
<link rel="stylesheet" href="css/common.css" type="text/css" /> | ||
|
||
<script type="text/javascript"> | ||
pathId = "Juno"; | ||
relpath = ''; | ||
</script> | ||
|
||
|
||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script> | ||
|
||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script> | ||
|
||
|
||
</head> | ||
<body> | ||
<div class="nav_wrap"> | ||
<iframe id="nav" src="class_list.html?1"></iframe> | ||
<div id="resizer"></div> | ||
</div> | ||
|
||
<div id="main" tabindex="-1"> | ||
<div id="header"> | ||
<div id="menu"> | ||
|
||
<a href="_index.html">Index (J)</a> » | ||
|
||
|
||
<span class="title">Juno</span> | ||
|
||
</div> | ||
|
||
<div id="search"> | ||
|
||
<a class="full_list_link" id="class_list_link" | ||
href="class_list.html"> | ||
|
||
<svg width="24" height="24"> | ||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> | ||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> | ||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> | ||
</svg> | ||
</a> | ||
|
||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
|
||
<div id="content"><h1>Module: Juno | ||
|
||
|
||
|
||
</h1> | ||
<div class="box_info"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dl> | ||
<dt>Defined in:</dt> | ||
<dd>lib/juno/IO/constants.rb<span class="defines">,<br /> | ||
lib/juno/logger.rb,<br /> lib/juno/version.rb,<br /> lib/juno/Utils/utils.rb,<br /> lib/juno/Config/config.rb,<br /> lib/juno/server_status.rb,<br /> lib/juno/IO/JunoMessage.rb,<br /> lib/juno/Net/worker_pool.rb,<br /> lib/juno/Net/io_processor.rb,<br /> lib/juno/Net/ping_message.rb,<br /> lib/juno/Config/properties.rb,<br /> lib/juno/IO/ProtocolHeader.rb,<br /> lib/juno/Net/request_queue.rb,<br /> lib/juno/Client/cache_store.rb,<br /> lib/juno/Client/sync_client.rb,<br /> lib/juno/Net/base_processor.rb,<br /> lib/juno/Net/client_handler.rb,<br /> lib/juno/Utils/client_utils.rb,<br /> lib/juno/Client/juno_request.rb,<br /> lib/juno/Client/react_client.rb,<br /> lib/juno/IO/OperationMessage.rb,<br /> lib/juno/IO/PayloadComponent.rb,<br /> lib/juno/Client/juno_response.rb,<br /> lib/juno/Config/config_reader.rb,<br /> lib/juno/IO/MetadataComponent.rb,<br /> lib/juno/Client/operation_type.rb,<br /> lib/juno/Client/record_context.rb,<br /> lib/juno/Config/config_provider.rb,<br /> lib/juno/Client/operation_status.rb,<br /> lib/juno/Config/default_properties.rb,<br /> lib/juno/IO/MetadataComponentTemplate.rb</span> | ||
</dd> | ||
</dl> | ||
|
||
</div> | ||
|
||
<h2>Overview</h2><div class="docstring"> | ||
<div class="discussion"> | ||
|
||
<p>Top module for juno client</p> | ||
|
||
|
||
</div> | ||
</div> | ||
<div class="tags"> | ||
|
||
|
||
</div><h2>Defined Under Namespace</h2> | ||
<p class="children"> | ||
|
||
|
||
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Juno/Client.html" title="Juno::Client (module)">Client</a></span>, <span class='object_link'><a href="Juno/ClientUtils.html" title="Juno::ClientUtils (module)">ClientUtils</a></span>, <span class='object_link'><a href="Juno/IO.html" title="Juno::IO (module)">IO</a></span>, <span class='object_link'><a href="Juno/Net.html" title="Juno::Net (module)">Net</a></span> | ||
|
||
|
||
|
||
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Juno/Config.html" title="Juno::Config (class)">Config</a></span>, <span class='object_link'><a href="Juno/ConfigProvider.html" title="Juno::ConfigProvider (class)">ConfigProvider</a></span>, <span class='object_link'><a href="Juno/ConfigReader.html" title="Juno::ConfigReader (class)">ConfigReader</a></span>, <span class='object_link'><a href="Juno/DefaultProperties.html" title="Juno::DefaultProperties (class)">DefaultProperties</a></span>, <span class='object_link'><a href="Juno/Logger.html" title="Juno::Logger (class)">Logger</a></span>, <span class='object_link'><a href="Juno/Properties.html" title="Juno::Properties (class)">Properties</a></span>, <span class='object_link'><a href="Juno/ServerStatus.html" title="Juno::ServerStatus (class)">ServerStatus</a></span>, <span class='object_link'><a href="Juno/Utils.html" title="Juno::Utils (class)">Utils</a></span> | ||
|
||
|
||
</p> | ||
|
||
|
||
<h2> | ||
Constant Summary | ||
<small><a href="#" class="constants_summary_toggle">collapse</a></small> | ||
</h2> | ||
|
||
<dl class="constants"> | ||
|
||
<dt id="VERSION-constant" class="">VERSION = | ||
|
||
</dt> | ||
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>'</span></span></pre></dd> | ||
|
||
</dl> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h2> | ||
Class Method Summary | ||
<small><a href="#" class="summary_toggle">collapse</a></small> | ||
</h2> | ||
|
||
<ul class="summary"> | ||
|
||
<li class="public "> | ||
<span class="summary_signature"> | ||
|
||
<a href="#configure-class_method" title="configure (class method)">.<strong>configure</strong> ⇒ Object </a> | ||
|
||
|
||
|
||
</span> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span> | ||
|
||
</li> | ||
|
||
|
||
<li class="public "> | ||
<span class="summary_signature"> | ||
|
||
<a href="#juno_config-class_method" title="juno_config (class method)">.<strong>juno_config</strong> ⇒ Object </a> | ||
|
||
|
||
|
||
</span> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span> | ||
|
||
</li> | ||
|
||
|
||
</ul> | ||
|
||
|
||
|
||
|
||
<div id="class_method_details" class="method_details_list"> | ||
<h2>Class Method Details</h2> | ||
|
||
|
||
<div class="method_details first"> | ||
<h3 class="signature first" id="configure-class_method"> | ||
|
||
.<strong>configure</strong> ⇒ <tt>Object</tt> | ||
|
||
|
||
|
||
|
||
|
||
</h3><table class="source_code"> | ||
<tr> | ||
<td> | ||
<pre class="lines"> | ||
|
||
|
||
105 | ||
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122</pre> | ||
</td> | ||
<td> | ||
<pre class="code"><span class="info file"># File 'lib/juno/Config/config.rb', line 105</span> | ||
|
||
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span> | ||
<span class='kw'>if</span> <span class='ivar'>@juno_config</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> | ||
<span class='id identifier rubyid_config_reader'>config_reader</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Juno (module)">Juno</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Juno/ConfigReader.html" title="Juno::ConfigReader (class)">ConfigReader</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Juno/ConfigReader.html#initialize-instance_method" title="Juno::ConfigReader#initialize (method)">new</a></span></span> | ||
<span class='kw'>yield</span> <span class='id identifier rubyid_config_reader'>config_reader</span> | ||
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_file_path'>file_path</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> | ||
<span class='ivar'>@juno_config</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Juno/Config.html" title="Juno::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Juno/Config.html#initialize-instance_method" title="Juno::Config#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Juno/ConfigProvider.html" title="Juno::ConfigProvider (class)">ConfigProvider</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Juno/ConfigProvider.html#initialize-instance_method" title="Juno::ConfigProvider#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span> <span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_source_format'>source_format</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span><span class='comma'>,</span> | ||
<span class='label'>log_file:</span> <span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span><span class='comma'>,</span> <span class='label'>ssl_cert_file:</span> <span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_ssl_cert_file'>ssl_cert_file</span><span class='comma'>,</span> | ||
<span class='label'>ssl_key_file:</span> <span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_ssl_key_file'>ssl_key_file</span><span class='rparen'>)</span> | ||
<span class='ivar'>@LOGGER</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Juno (module)">Juno</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Juno/Logger.html" title="Juno::Logger (class)">Logger</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Juno/Logger.html#instance-class_method" title="Juno::Logger.instance (method)">instance</a></span></span> | ||
<span class='kw'>elsif</span> <span class='op'>!</span><span class='id identifier rubyid_config_reader'>config_reader</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='comment'># URL should URI Object | ||
</span> <span class='comment'># @juno_config = Config.new(ConfigProvider.new(@juno_config.file_path, @juno_config.source_format, nil)) | ||
</span> <span class='kw'>else</span> | ||
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>No file or url provided</span><span class='tstring_end'>'</span></span> | ||
<span class='kw'>end</span> | ||
<span class='kw'>else</span> | ||
<span class='const'><span class='object_link'><a href="" title="Juno (module)">Juno</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Juno/Logger.html" title="Juno::Logger (class)">Logger</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Juno/Logger.html#instance-class_method" title="Juno::Logger.instance (method)">instance</a></span></span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Juno client cannot be reconfigured</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> | ||
<span class='kw'>end</span> | ||
<span class='kw'>end</span></pre> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<div class="method_details "> | ||
<h3 class="signature " id="juno_config-class_method"> | ||
|
||
.<strong>juno_config</strong> ⇒ <tt>Object</tt> | ||
|
||
|
||
|
||
|
||
|
||
</h3><table class="source_code"> | ||
<tr> | ||
<td> | ||
<pre class="lines"> | ||
|
||
|
||
124 | ||
125 | ||
126 | ||
127 | ||
128</pre> | ||
</td> | ||
<td> | ||
<pre class="code"><span class="info file"># File 'lib/juno/Config/config.rb', line 124</span> | ||
|
||
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_juno_config'>juno_config</span> | ||
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Please configure the properties using Juno.configure</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='ivar'>@juno_config</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> | ||
|
||
<span class='ivar'>@juno_config</span> | ||
<span class='kw'>end</span></pre> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
<div id="footer"> | ||
Generated on Fri Aug 11 11:39:54 2023 by | ||
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> | ||
0.9.34 (ruby-3.0.0). | ||
</div> | ||
|
||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.