easy_ml 0.1.2 → 0.1.3

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: b8bf32b84b8e3991a5c9f2f25355dda8e8b685a6016c659f0ec169e509054e80
4
- data.tar.gz: 27141e14e2b7aab481decb0e2a0189973ae18d86635bd9a586a9083fdb22312d
3
+ metadata.gz: c68319b0bcca7b83e1fb4a539a15b42ced62475f8c8ab7f6b9a7a164c3b02cea
4
+ data.tar.gz: 1a6a83e77ff7723c590ab1238ce12d80aa6aa15bb5897b95a738c0a00760fb48
5
5
  SHA512:
6
- metadata.gz: eb876892ad129afe383aa74acfbae05d75ecd98e6564369ac55b3ab82d6b9703cb3c5f6d7764315092dd13cc644df95fbba6ab21390f667273fec2aa2eb56cad
7
- data.tar.gz: 866195fa9983ffce3ff08eaf7832df758aeccc0d8f6faef1fc93faa2c06fe6d78a9d4a4742370b50e7710e48b86d08d0b7af98fd16d14812d39b92cc95e8e355
6
+ metadata.gz: 8e1e3fdcbae41205892d47be90407b982efdce329b54b635ea2870d141297780ce6f166ab1769f3d531bf51906ff25c17a2d1b8d6a8aed0ea4e1e12052ff8eec
7
+ data.tar.gz: 31b5b12f27734f44fa92015feb8e4ac5c868f38090c3244a90f15b83327427fc05f3d2a34446d1b64f11ba10903bb1b989e890b8a63381c3da2e5a1330b5f778
@@ -1,9 +1,18 @@
1
1
  require_relative "../../../lib/easy_ml/core/model"
2
2
  module EasyML
3
3
  class Model < ActiveRecord::Base
4
- include EasyML::Core::ModelCore
4
+ if ActiveRecord::Base.connection.data_source_exists?("easy_ml_models")
5
+ include EasyML::Core::ModelCore
5
6
 
6
- self.table_name = "easy_ml_models"
7
+ self.table_name = "easy_ml_models"
8
+ else
9
+ # Placeholder if the table doesn't exist (keeps the file quiet)
10
+ def self.table_ready?
11
+ false
12
+ end
13
+
14
+ Rails.logger.info("Skipping EasyML::Model definition as the 'easy_ml_models' table doesn't exist.")
15
+ end
7
16
 
8
17
  scope :live, -> { where(is_live: true) }
9
18
  attribute :root_dir, :string
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyML
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_ml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Shollenberger