black_operation 0.0.1 → 0.1.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
  SHA1:
3
- metadata.gz: 02bfc2b6e93c393533dfaa9c5f01075595b78cc7
4
- data.tar.gz: 2e060b9522513c5ff521d533c169cfcbd28f9bc8
3
+ metadata.gz: 10d0e2a42970382b2030a1fa68b802e53479a73f
4
+ data.tar.gz: b33b3be31ca231cd922fa33728e6c7bb5208c1ff
5
5
  SHA512:
6
- metadata.gz: 74830efe33df360e03f916bf29690d58bc0993fdda6e526f6a3fc1e8103e2e47d2f8e0124baa4f86ca5403875abef9b682071c0c8d87c1a54d73881312e3ec43
7
- data.tar.gz: 57e3ca42bbd29444e33b50995dc4d0a0d04f2a63fd7aeffa72bf14d75b96165ce048037cbef161d148611b03e949263fe9b25b8eab1dda2b95102322fe911ebb
6
+ metadata.gz: 39b9944a98d3ae7821b40532b73040e27824b78a077da4196c0504a95160da228cf75f19e31b50c62a1af2d239b707fdc664c08717699f49de86cdccd24763cf
7
+ data.tar.gz: f4222edb583cf0940e7f24b67278428b984576322186f3b138d1d08d5e43847078d3b127ca42c27c1ed659521164773b3a46a79dde32841a01fbf1166e170696
@@ -1,3 +1,3 @@
1
1
  module BlackOperation
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,5 +1,7 @@
1
1
  class BlackOperationRailtie < Rails::Railtie
2
2
  rake_tasks do
3
- Dir[File.join(File.dirname(__FILE__),'../tasks/*.rb')].each{|file| load file}
3
+ Dir[File.join(File.dirname(__FILE__),'../tasks/')+"*.rb"].each do |file|
4
+ load file
5
+ end
4
6
  end
5
7
  end
@@ -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.0.1
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-05 00:00:00.000000000 Z
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: