jigsaw_engine 0.4.2 → 0.4.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
  SHA256:
3
- metadata.gz: e8d01272d6ca20684009e4dbccc9985b8c53fc9f4979bb5e392112846eedc9b7
4
- data.tar.gz: a350e9dee0a165d19b0262bfbbb1f36800d2018b87e6a715a60349c8a6a3cb26
3
+ metadata.gz: 00b71a976d2353a471936ab908ea0ea5cb80ec22917118bbe593f34bd01a030b
4
+ data.tar.gz: 32632b4f9d8595cdf5e1e145000a79441017ba3acecbcec8ea04678c87f90995
5
5
  SHA512:
6
- metadata.gz: f946c33b8944c75db5e4dc88949b20e420b3fb9c696870721990d0f46feb0fb74bba4f88ecf8fb7fd3b09e5a4f38929a83b838c2820c9960058841785889a8f5
7
- data.tar.gz: 03b2820a821262a966b34c599f9fcd598d565cd0f4c82d315157f1e4c2504b61207ec9727b5ea90b307fcdcf4d859b73d2e2a3c2a652400ecacb1f7aca1f2af5
6
+ metadata.gz: 7914ae00f8b934c434134dc3ba4c46d6c8d2de1b1e3e3e04a42669f3d7bd06b57f455aaacabec63de640726e69f6bd016a9299c5cea71b5d06bd5a478e22b718
7
+ data.tar.gz: ff2ae823f02f33e036fe9e43e1b4a415635f3157a563dcc0167fcb7c48387b7a8b373b4a5634c6b48d021dc0cc2b63cfb4f2767b5a65dea9d9079735d83dae65
@@ -1,3 +1,3 @@
1
1
  module Jigsaw
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -0,0 +1,35 @@
1
+ namespace :jigsaw do
2
+ namespace :install do
3
+ desc "Install Jigsaw seed files into app/javascript/seeds/"
4
+ task :seeds do
5
+ source = Jigsaw::Engine.root.join("app/javascript/seeds")
6
+ destination = Rails.root.join("app/javascript/seeds")
7
+
8
+ unless source.exist?
9
+ abort "[jigsaw] Source seeds directory not found: #{source}"
10
+ end
11
+
12
+ installed = 0
13
+ skipped = 0
14
+
15
+ Dir.glob(source.join("**/*")).each do |src_file|
16
+ next if File.directory?(src_file)
17
+
18
+ relative = Pathname.new(src_file).relative_path_from(source)
19
+ dest_file = destination.join(relative)
20
+
21
+ if dest_file.exist?
22
+ skipped += 1
23
+ next
24
+ end
25
+
26
+ FileUtils.mkdir_p(dest_file.dirname)
27
+ FileUtils.cp(src_file, dest_file)
28
+ installed += 1
29
+ end
30
+
31
+ puts "[jigsaw] Installed #{installed} seed files to #{destination}"
32
+ puts "[jigsaw] Skipped #{skipped} existing files" if skipped > 0
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jigsaw_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Kidd
@@ -1007,6 +1007,7 @@ files:
1007
1007
  - lib/jigsaw/version.rb.erb
1008
1008
  - lib/jigsaw_engine.rb
1009
1009
  - lib/tasks/kube_tasks.rake
1010
+ - lib/tasks/seeds.rake
1010
1011
  - lib/tasks/shadcn.rake
1011
1012
  - vendor/javascript/babel.min.js
1012
1013
  homepage: https://github.com/general-intelligence-systems/jigsaw-engine