diff --git a/lib/daru/view.rb b/lib/daru/view.rb index d9e81cc..ad6320e 100644 --- a/lib/daru/view.rb +++ b/lib/daru/view.rb @@ -13,6 +13,9 @@ # Rails Helper require 'daru/view/app/rails/railtie.rb' if defined?(Rails) +# monkeys +require 'daru/view/monkeys' + module Daru module View # default Nyaplot library is used. diff --git a/lib/daru/view/monkeys.rb b/lib/daru/view/monkeys.rb new file mode 100644 index 0000000..8f7d02a --- /dev/null +++ b/lib/daru/view/monkeys.rb @@ -0,0 +1,13 @@ +module Daru + class DataFrame + # @example + # + # df = Daru::DataFrame.new([1, 2, 3, 4, 5]) + # df.plot_view(adapter: :googlecharts) + # + # Note: `options` can take options same as Daru::View::Plot(df, options) + def plot_view(options={}) + Daru::View::Plot.new(self, options) + end + end +end diff --git a/spec/dummy_iruby/Gemfile.lock b/spec/dummy_iruby/Gemfile.lock index fd10be3..c5c526a 100644 --- a/spec/dummy_iruby/Gemfile.lock +++ b/spec/dummy_iruby/Gemfile.lock @@ -1,9 +1,10 @@ GIT remote: https://github.com/SciRuby/daru.git - revision: 9f304c1b7fe41f610bc1269a01deb693ba313134 + revision: 0127dd5e2cb62d8a4a6550ef9cfb177ae387cd5e specs: - daru (0.1.5) + daru (0.1.6) backports + packable (~> 1.3.9) GIT remote: https://github.com/SciRuby/nyaplot.git @@ -13,7 +14,7 @@ GIT GIT remote: https://github.com/Shekharrajak/data_tables.git - revision: 5765938137c522a8b4537a1ca1a4010a2dbd21f4 + revision: b2418905faeaec927736354cfb470f7250fd8c8d specs: data_tables (0.1.0) @@ -21,17 +22,23 @@ PATH remote: ../.. specs: daru-view (0.1.0) + actionview + daru + data_tables + google_visualr + lazy_high_charts + nyaplot GEM remote: http://rubygems.org/ specs: - actionview (5.1.2) - activesupport (= 5.1.2) + actionview (5.1.3) + activesupport (= 5.1.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activesupport (5.1.2) + activesupport (5.1.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -40,7 +47,7 @@ GEM backports (3.8.0) bond (0.5.1) builder (3.2.3) - byebug (9.0.6) + byebug (9.1.0) coderay (1.1.1) concurrent-ruby (1.0.5) data_uri (0.1.0) @@ -69,11 +76,13 @@ GEM method_source (0.8.2) mimemagic (0.3.2) mini_portile2 (2.2.0) - minitest (5.10.2) + minitest (5.10.3) multi_json (1.12.1) nokogiri (1.8.0) mini_portile2 (~> 2.2.0) - parallel (1.11.2) + packable (1.3.9) + backports + parallel (1.12.0) parser (2.4.0.0) ast (~> 2.2) powerpack (0.1.1) @@ -81,8 +90,8 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-byebug (3.4.2) - byebug (~> 9.0) + pry-byebug (3.5.0) + byebug (~> 9.1) pry (~> 0.10) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) @@ -91,7 +100,7 @@ GEM loofah (~> 2.0) rainbow (2.2.2) rake - rake (10.5.0) + rake (12.0.0) rbczmq (1.7.9) rspec (3.6.0) rspec-core (~> 3.6.0) @@ -114,11 +123,11 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.8.1) - simplecov (0.14.1) + simplecov (0.15.0) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.1) + simplecov-html (0.10.2) slop (3.6.0) thread_safe (0.3.6) tzinfo (1.2.3) @@ -129,20 +138,17 @@ PLATFORMS ruby DEPENDENCIES - actionview bundler (~> 1.14) daru! daru-view! data_tables! distribution ffi-rzmq - google_visualr iruby - lazy_high_charts nyaplot! pry (~> 0.10) pry-byebug - rake (~> 10.0) + rake rbczmq rspec (~> 3.4) rubocop