Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation error fix #147

Merged
merged 12 commits into from
Feb 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/daru/view/adapters/datatables.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'daru'
require 'securerandom'
require 'erb'
require 'daru/data_tables'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check how tesstcases has written related to datatables (or may be not written). When I was running IRuby notebook and tried the adapter datatables it was not working.

After requiring the daru/data_tables it worked fine. Need to write testcase for it in separate PR.


module Daru
module View
Expand Down
16,015 changes: 87 additions & 15,928 deletions spec/dummy_iruby/.ipynb_checkpoints/Daru DataFrame and DataTables-checkpoint.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"Install the spreadsheet gem version ~>1.1.1 for using spreadsheet functions.\n",
"\n",
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
{
"data": {
"text/plain": [
Expand All @@ -35,6 +25,14 @@
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/shekharrajak/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/daru-data_tables-af3460a049da/lib/daru/data_tables/version.rb:3: warning: already initialized constant Daru::View::VERSION\n",
"/home/shekharrajak/Documents/githubRepos/sciruby/windows-daru-view/daru-view/lib/daru/view/version.rb:3: warning: previous definition of VERSION was here\n"
]
},
{
"data": {
"text/plain": [
Expand Down Expand Up @@ -166,13 +164,13 @@
{
"data": {
"text/plain": [
"#<Daru::View::Table:0x00000002ccf3b0 @data=#<Daru::DataFrame(5x3)>\n",
"#<Daru::View::Table:0x0000564b9eb7b9a8 @data=#<Daru::DataFrame(5x3)>\n",
" a b c\n",
" one 1 11 11\n",
" two 2 12 22\n",
" three 3 13 33\n",
" four 4 14 44\n",
" five 5 15 55, @options={:pageLength=>3, :data=>[[0, 1, 11, 11], [1, 2, 12, 22], [2, 3, 13, 33], [3, 4, 14, 44], [4, 5, 15, 55]]}, @user_options={}, @adapter=Daru::View::Adapter::DatatablesAdapter, @table=#<Daru::DataTables::DataTable:0x00000002ccf338 @html_options={:table_options=>{:class=>\"display\", :cellspacing=>\"0\", :width=>\"100%\"}}, @data=#<Daru::DataFrame(5x3)>\n",
" five 5 15 55, @options={:pageLength=>3, :data=>[[0, 1, 11, 11], [1, 2, 12, 22], [2, 3, 13, 33], [3, 4, 14, 44], [4, 5, 15, 55]]}, @user_options={}, @adapter=Daru::View::Adapter::DatatablesAdapter, @table=#<Daru::View::DataTable:0x0000564b9eb7b908 @html_options={:table_options=>{:class=>\"display\", :cellspacing=>\"0\", :width=>\"100%\"}}, @data=#<Daru::DataFrame(5x3)>\n",
" a b c\n",
" one 1 11 11\n",
" two 2 12 22\n",
Expand Down Expand Up @@ -203,13 +201,13 @@
" \n",
"$(document).ready(function() {\n",
"\n",
"\t$('#137e472e-8850-419e-8d2c-ac0176df7d97').DataTable(\n",
"\t$('#fa5469a2-55e8-4b16-a31e-64056089289a').DataTable(\n",
"\t\t{pageLength: 3, data: [[0,1,11,11],[1,2,12,22],[2,3,13,33],[3,4,14,44],[4,5,15,55]]}\n",
"\t);\n",
"\n",
"});\n",
"</script>\n",
"<table class=\"display\" cellspacing=\"0\" width=\"100%\" id=\"137e472e-8850-419e-8d2c-ac0176df7d97\"><thead>\n",
"<table class=\"display\" cellspacing=\"0\" width=\"100%\" id=\"fa5469a2-55e8-4b16-a31e-64056089289a\"><thead>\n",
" \n",
" <tr>\n",
" <th></th>\n",
Expand All @@ -225,7 +223,7 @@
"</thead></table>"
],
"text/plain": [
"\"\\n<script type='text/javascript'>\\n \\n$(document).ready(function() {\\n\\n\\t$('#137e472e-8850-419e-8d2c-ac0176df7d97').DataTable(\\n\\t\\t{pageLength: 3, data: [[0,1,11,11],[1,2,12,22],[2,3,13,33],[3,4,14,44],[4,5,15,55]]}\\n\\t);\\n\\n});\\n</script>\\n<table class=\\\"display\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\" id=\\\"137e472e-8850-419e-8d2c-ac0176df7d97\\\"><thead>\\n \\n <tr>\\n <th></th>\\n \\n <th>a</th>\\n \\n <th>b</th>\\n \\n <th>c</th>\\n \\n </tr>\\n \\n</thead></table>\""
"\"\\n<script type='text/javascript'>\\n \\n$(document).ready(function() {\\n\\n\\t$('#fa5469a2-55e8-4b16-a31e-64056089289a').DataTable(\\n\\t\\t{pageLength: 3, data: [[0,1,11,11],[1,2,12,22],[2,3,13,33],[3,4,14,44],[4,5,15,55]]}\\n\\t);\\n\\n});\\n</script>\\n<table class=\\\"display\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\" id=\\\"fa5469a2-55e8-4b16-a31e-64056089289a\\\"><thead>\\n \\n <tr>\\n <th></th>\\n \\n <th>a</th>\\n \\n <th>b</th>\\n \\n <th>c</th>\\n \\n </tr>\\n \\n</thead></table>\""
]
},
"execution_count": 5,
Expand Down Expand Up @@ -330,15 +328,15 @@
],
"metadata": {
"kernelspec": {
"display_name": "Ruby 2.4.1",
"display_name": "Ruby 2.5.3",
"language": "ruby",
"name": "ruby"
},
"language_info": {
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
"version": "2.4.1"
"version": "2.5.3"
}
},
"nbformat": 4,
Expand Down
Loading