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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 869397c568af760a51a25b0439df5a4cde6fb106
4
- data.tar.gz: 705ff2b6e4f1b0964c667e88578fd92c8bbe5d2f
3
+ metadata.gz: 56948972b2bfa7264cb25a540d1c44fdc5a17183
4
+ data.tar.gz: 67be27e47534ebdbd94c0f876078bcbe1ac01841
5
5
  SHA512:
6
- metadata.gz: d2dfac25f45f7b587def45c64dcc8fa031543e9e9c2000053268b231f45953466249930264b647e69ccc51c509ad03751d00c5cc9cb3dc4b0b466208c9d0f85c
7
- data.tar.gz: a36dcea3222d6efde9110863ff5dd764bf063936050279496ed99f8d9f852971ac3abf1ced85f50b619899a666dc2bfa23992f5093b3db431c3f4e10ca177aff
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"]
@@ -1,6 +1,6 @@
1
1
  module Grape
2
2
  module ActiveRecord
3
3
  # Gem version
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
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: 0.0.4
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-09-25 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape