dropkiq 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e87a6068808562755a7635c9fbc10a9ae729831a
4
- data.tar.gz: e6202b25aa738ac373a0cc42c96b09d05e51af45
3
+ metadata.gz: 5d844cf3f9530b26f65bbb96987a8990a5c2eaa8
4
+ data.tar.gz: e500d13eb8eb341888c00bc251b2e14b99c3c03a
5
5
  SHA512:
6
- metadata.gz: d460fb7e82845b7254004ece0188716ea00e5391b26badf98d8235a3e79ec2ae89f6202dc5df5eae5a68bb8d717402cc764b43c13af20b6120dbd78160d5f182
7
- data.tar.gz: 7ac1df5a615b9f54561d99c1201a992fba31bacf31d9007b22cac65d4f32dd5ae671683b362b427ab1047a5f399c5fba7137984e03fa9316cff4431017bd4b3c
6
+ metadata.gz: 654b6c30b1c01bcbebf477d3270c0c994a1606b3a3cba83826987ea1673c6f1f05fdd202e0603ff0872aab70ad13455af62462e9cf4379d1214c7ee4341c1a08
7
+ data.tar.gz: bf2b8fbd9d3944253751ea41b0bd777a604e4df84bb4d2ab30ca9d5b3022036f02b1b8c8a97146c112d5fc87d57a0befabf162be235d32fea526bd356003642e
data/Gemfile.lock CHANGED
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dropkiq (0.1.2)
4
+ dropkiq (0.1.3)
5
5
  activerecord (>= 4.2)
6
6
  liquid (~> 4.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (5.2.3)
12
- activesupport (= 5.2.3)
13
- activerecord (5.2.3)
14
- activemodel (= 5.2.3)
15
- activesupport (= 5.2.3)
11
+ activemodel (5.2.4.1)
12
+ activesupport (= 5.2.4.1)
13
+ activerecord (5.2.4.1)
14
+ activemodel (= 5.2.4.1)
15
+ activesupport (= 5.2.4.1)
16
16
  arel (>= 9.0)
17
- activesupport (5.2.3)
17
+ activesupport (5.2.4.1)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
@@ -22,7 +22,7 @@ GEM
22
22
  arel (9.0.0)
23
23
  coderay (1.1.2)
24
24
  concurrent-ruby (1.1.5)
25
- i18n (1.7.0)
25
+ i18n (1.8.2)
26
26
  concurrent-ruby (~> 1.0)
27
27
  liquid (4.0.3)
28
28
  method_source (0.9.2)
@@ -36,7 +36,7 @@ GEM
36
36
  rake (10.5.0)
37
37
  sqlite3 (1.3.13)
38
38
  thread_safe (0.3.6)
39
- tzinfo (1.2.5)
39
+ tzinfo (1.2.6)
40
40
  thread_safe (~> 0.1)
41
41
 
42
42
  PLATFORMS
@@ -1,5 +1,7 @@
1
1
  module Dropkiq
2
2
  DEFAULT_DROP_PATH = "/app/drops"
3
+ DEFAULT_MODEL_PATH = "/app/models"
4
+
3
5
  DEFAULT_LIQUID_DROP_CLASSES = [
4
6
  Liquid::ForloopDrop,
5
7
  Liquid::TablerowloopDrop
@@ -12,7 +12,8 @@ module Dropkiq
12
12
  self.active_record_class ||= find_active_record_class_from_shim
13
13
 
14
14
  if active_record_class.blank?
15
- raise "No ActiveRecord Class found for #{liquid_drop_class.name}"
15
+ puts "WARNING: No ActiveRecord Class found for #{liquid_drop_class.name}"
16
+ return
16
17
  end
17
18
 
18
19
  self.table_name = active_record_class.table_name
@@ -20,6 +21,8 @@ module Dropkiq
20
21
  end
21
22
 
22
23
  def to_param
24
+ return {} if active_record_class.blank?
25
+
23
26
  {
24
27
  "#{table_name}" => {
25
28
  "methods" => drop_method_params
@@ -2,7 +2,9 @@ namespace :dropkiq do
2
2
  desc "Generate the fixture schema based on Liquid::Drop classes"
3
3
  task :schema do
4
4
  require "#{Rails.root}/config/environment.rb"
5
+
5
6
  Dir.glob("#{Rails.root}#{Dropkiq::DEFAULT_DROP_PATH}/**/*.rb").each { |f| load f }
7
+ Dir.glob("#{Rails.root}#{Dropkiq::DEFAULT_MODEL_PATH}/**/*.rb").each { |f| load f }
6
8
 
7
9
  existing_schema_yaml = begin
8
10
  File.read("#{Rails.root}/db/dropkiq_schema.yaml")
@@ -1,3 +1,3 @@
1
1
  module Dropkiq
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropkiq
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
  - Adam Darrah