grape-activerecord 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/grape/activerecord/rake/activerecord_4.rb +13 -3
- data/lib/grape/activerecord/rake.rb +0 -1
- data/lib/grape/activerecord/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7798a801d0b06bc3c6d9d5ce4963607d194055e
|
4
|
+
data.tar.gz: 80ee2a0e1a22efbbbbcde3f82db262dfad101f4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2c9dd61350a7fcd8f10670929f93ee53a45a01c8ffa728103a9bf75411f6c100a468ce9170a957805806acfa9340b22d833db0cbd5167f49b7e9923adf8673e
|
7
|
+
data.tar.gz: 8081033ff7aebc1ec079f30841512da5c18c580f0e6252d25affe5b11a896b7d5a00c53a6eb6896021de7291d1593ddb261c25fc01b5ba936d3f49436b4f3fc5
|
data/README.md
CHANGED
@@ -34,12 +34,12 @@ This will give you most of the standard `db:` tasks you get in Rails. Run `bundl
|
|
34
34
|
require "bundler/setup"
|
35
35
|
require "grape/activerecord/rake"
|
36
36
|
|
37
|
-
# NOTE If you set a custom db config in your app, you'll need to set it in your Rakefile too
|
38
|
-
# Grape::ActiveRecord.database_file = "elsewhere/db.yml"
|
39
|
-
|
40
37
|
namespace :db do
|
41
38
|
# Some db tasks require your app code to be loaded
|
42
39
|
task :environment do
|
40
|
+
# If you set a custom db config in your app, you'll need to set it in your Rakefile too
|
41
|
+
# Grape::ActiveRecord.database_file = "elsewhere/db.yml"
|
42
|
+
|
43
43
|
require_relative "app"
|
44
44
|
end
|
45
45
|
end
|
@@ -1,5 +1,4 @@
|
|
1
|
-
Rake::Task
|
2
|
-
Rake::Task.define_task('db:load_config') do
|
1
|
+
Rake::Task.define_task('db:_load_config') do
|
3
2
|
require 'grape/activerecord'
|
4
3
|
ActiveRecord::Base.logger = nil
|
5
4
|
|
@@ -19,8 +18,19 @@ Rake::Task.define_task('db:load_config') do
|
|
19
18
|
end
|
20
19
|
end
|
21
20
|
|
21
|
+
Rake::Task['db:load_config'].clear
|
22
|
+
Rake::Task.define_task('db:load_config') do
|
23
|
+
# Run the user's db:environment task first, so they have an opportunity to set a custom db config location
|
24
|
+
Rake::Task['db:environment'].invoke
|
25
|
+
end
|
26
|
+
|
22
27
|
Rake::Task.define_task('db:environment') do
|
23
|
-
|
28
|
+
# defined by user
|
29
|
+
end
|
30
|
+
|
31
|
+
# Load db config at the end of user-defined db:environment
|
32
|
+
Rake::Task['db:environment'].enhance do
|
33
|
+
Rake::Task['db:_load_config'].invoke
|
24
34
|
end
|
25
35
|
|
26
36
|
Rake::Task['db:test:deprecated'].clear if Rake::Task.task_defined?('db:test:deprecated')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hollinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|