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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db11e3967b8ac70e5ee7004d84b1042f2f410ad8
4
- data.tar.gz: 95572451c379d669fa4300abbbb9ebbebf172034
3
+ metadata.gz: d7798a801d0b06bc3c6d9d5ce4963607d194055e
4
+ data.tar.gz: 80ee2a0e1a22efbbbbcde3f82db262dfad101f4d
5
5
  SHA512:
6
- metadata.gz: 7773eafa3fcec4a436a98cd6cc6afaa0b823b9683255f141548972b41efa755f8bff244847aa7ac0da797d22d1ba80f014d3167a49df8dde33506a73d910abc3
7
- data.tar.gz: 298980ee980a37fa068d63434abfcb64c8c583dbcf8401d9d1629930624abf94e86fb942b0c9d0809383328b1112e9fc175b00d0b2a48d8ba06334397ece3202
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['db:load_config'].clear
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
- Rake::Task['db:load_config'].invoke
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')
@@ -1,4 +1,3 @@
1
1
  load "active_record/railties/databases.rake"
2
- require "grape/activerecord"
3
2
  require "grape/activerecord/rake/activerecord_#{ActiveRecord::VERSION::MAJOR}"
4
3
  load "grape/activerecord/tasks.rake"
@@ -1,6 +1,6 @@
1
1
  module Grape
2
2
  module ActiveRecord
3
3
  # Gem version
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
6
6
  end
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.1
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-10 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape