jupyter_on_rails 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23abc55bf5cdbb25fcedc441594b67deba55617f1064376785719b254e1dd1fe
4
- data.tar.gz: b1f90644a6c73ebb3bb798064012f4db785683542df034c15ea37aabd4d8fdeb
3
+ metadata.gz: acb987152e18462c17c8b46cec074aecda7450e9461a5cac2d0cea966de49b04
4
+ data.tar.gz: 992b7ad60f5db9a75485f72181a828bfaa058e110762521dccf2cbaee240ae2a
5
5
  SHA512:
6
- metadata.gz: 82d708ee1ed8ec629a3eb2fa4cec1b7b356ef6849bf4d3c5574e8b5a7e6ef1fca5a7071f0d51e8d3576535c1bfdc5fa7cd310aede308f0e9e88cce4cd46e5d66
7
- data.tar.gz: 618abf46f0a4977e5ff9129b22bbfef5924254fd3240030802e323cb51f265e85c4593f9037d61a6eac28a63a5767ef7d6f31a5645de5659aa236108c5bf53d2
6
+ metadata.gz: 065f41a91dc2c1c7cb2f56b301ac91375cea2f2593da0bd0905da08292dee90a29a66c02a7b8afb8fca917de38f5bbff12da60a22d0acebc2048d91389baa002
7
+ data.tar.gz: c59c90281a8339a33ef2f594e8e2fe5784fa8f22060879b72b708ca37e14359e5792abae224149ab985eb7504b88bcc60adb8ecc83af8619b3cfc91116b3c241
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  /Gemfile.lock
10
+ /vendor
@@ -0,0 +1,13 @@
1
+ require 'active_support/concern'
2
+
3
+ module JupyterOnRails
4
+ module Daru
5
+ module ActiveRecordExt
6
+ extend ::ActiveSupport::Concern
7
+
8
+ included do
9
+ scope :to_df, -> { ::Daru::DataFrame.from_activerecord(self) }
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,7 +1,17 @@
1
+ require_relative 'daru/active_record_ext'
2
+
1
3
  module JupyterOnRails
2
4
  class Railtie < ::Rails::Railtie
3
5
  rake_tasks do
4
6
  load 'jupyter_on_rails/railtie/jupyter.rake'
5
7
  end
8
+
9
+ config.before_configuration do
10
+ if defined?(::Daru) && defined?(::ActiveRecord)
11
+ class ::ActiveRecord::Base
12
+ include ::JupyterOnRails::Daru::ActiveRecordExt
13
+ end
14
+ end
15
+ end
6
16
  end
7
17
  end
@@ -1,3 +1,3 @@
1
1
  module JupyterOnRails
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jupyter_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki INOUE
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-23 00:00:00.000000000 Z
11
+ date: 2019-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,6 +83,7 @@ files:
83
83
  - jupyter_on_rails.gemspec
84
84
  - lib/jupyter_on_rails.rb
85
85
  - lib/jupyter_on_rails/boot.rb
86
+ - lib/jupyter_on_rails/daru/active_record_ext.rb
86
87
  - lib/jupyter_on_rails/iruby_kernel_extention.rb
87
88
  - lib/jupyter_on_rails/railtie.rb
88
89
  - lib/jupyter_on_rails/railtie/jupyter.rake