grape-activerecord 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +9 -1
- data/lib/grape/activerecord/tasks.rake +6 -0
- 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: 56948972b2bfa7264cb25a540d1c44fdc5a17183
|
4
|
+
data.tar.gz: 67be27e47534ebdbd94c0f876078bcbe1ac01841
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a846ef98dae40897eff9ad4432a198af13eb91c55e5a1299b9aab57eb06570538043f5bd5efa7db38da2fc7856639df361ec95c1da7211bea5be92a28e284b0f
|
7
|
+
data.tar.gz: c93a8bcfab5fe249c34b7649d4c0ed5816f220c41728a876ecb590313b4353fa2a8cc16a48270cc425f9be20bef36a7ddd414d3f569d8d0cf325f53f4747a802
|
data/README.rdoc
CHANGED
@@ -27,9 +27,17 @@ If you don't specify any configuration, grape-activerecord will first look in DA
|
|
27
27
|
...
|
28
28
|
end
|
29
29
|
|
30
|
-
This will establish the database connections and correctly return used connections to the pool after each request.
|
30
|
+
This will establish the database connections and (usually) correctly return used connections to the pool after each request.
|
31
31
|
NOTE If you're mounting sub Grape apps, you need only include grape-activerecord in the root app.
|
32
32
|
|
33
|
+
==== Important
|
34
|
+
|
35
|
+
It's recommended that you manually include ActiveRecord::ConnectionAdapters::ConnectionManagement yourself BEFORE mounting your Grape app (https://github.com/intridea/grape/issues/517#issuecomment-60969722). The top of your config.ru file is a good place:
|
36
|
+
|
37
|
+
# config.ru
|
38
|
+
use ActiveRecord::ConnectionAdapters::ConnectionManagement
|
39
|
+
run MyGrapeApi
|
40
|
+
|
33
41
|
=== Example Rakefile with ActiveRecord tasks
|
34
42
|
|
35
43
|
require 'bundler/setup'
|
@@ -4,6 +4,12 @@ require 'active_support/core_ext/string/strip'
|
|
4
4
|
require 'active_support/core_ext/string/inflections'
|
5
5
|
|
6
6
|
namespace :db do
|
7
|
+
namespace :test do
|
8
|
+
task :environment do
|
9
|
+
ENV['RACK_ENV'] = 'test'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
7
13
|
desc "Create a migration (parameters: NAME, VERSION)"
|
8
14
|
task :create_migration do
|
9
15
|
unless ENV["NAME"]
|
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: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hollinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|