black_operation 0.0.1 → 0.1.1
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 +4 -4
- data/lib/black_operation/version.rb +1 -1
- data/lib/railties/black_operation_railtie.rb +3 -1
- data/lib/tasks/install.rb +28 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10d0e2a42970382b2030a1fa68b802e53479a73f
|
4
|
+
data.tar.gz: b33b3be31ca231cd922fa33728e6c7bb5208c1ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39b9944a98d3ae7821b40532b73040e27824b78a077da4196c0504a95160da228cf75f19e31b50c62a1af2d239b707fdc664c08717699f49de86cdccd24763cf
|
7
|
+
data.tar.gz: f4222edb583cf0940e7f24b67278428b984576322186f3b138d1d08d5e43847078d3b127ca42c27c1ed659521164773b3a46a79dde32841a01fbf1166e170696
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
namespace :black_operation do
|
3
|
+
desc "Runs \"rails runner\" on all scripts in the install directory after migrations and schema load"
|
4
|
+
task :new_install do
|
5
|
+
if File.exists?("db/schema.rb")
|
6
|
+
`bundle exec rake db:schema:load`
|
7
|
+
end
|
8
|
+
`bundle exec rake db:migrate`
|
9
|
+
run_scripts
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Runs \"rails runner\" on all scripts in the install directory after migrations skips schema load"
|
13
|
+
task :update_install do
|
14
|
+
#`bundle exec rake db:migrate`
|
15
|
+
run_scripts
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
def run_scripts
|
20
|
+
if File.exists?("install")
|
21
|
+
Dir.glob("install/**/*") do |file|
|
22
|
+
puts "Running #{file}"
|
23
|
+
cmd = "rails runner #{file}"
|
24
|
+
`#{cmd}`
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: black_operation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Pessetto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/black_operation.rb
|
55
55
|
- lib/black_operation/version.rb
|
56
56
|
- lib/railties/black_operation_railtie.rb
|
57
|
+
- lib/tasks/install.rb
|
57
58
|
- lib/tasks/precompile.rb
|
58
59
|
homepage: ''
|
59
60
|
licenses:
|