habarico 7.3.0.pre.beta.10 → 7.3.0.pre.beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c0c12a78eabc5ec2b734b49fe2631728bebfaaf0dccab0af628c195dc333880
|
|
4
|
+
data.tar.gz: 5bd53485346b0d43bef3791d74c69603a5b6ae8f005fed3eebacabeb4479affa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 554f357c1b5c47e163d4cbbb9fc441a921a116a05d360e3a01351f8cd120df1135603d512b31c92dd745ecb704347f478b4093b1d657568559407c50d8e66d5e
|
|
7
|
+
data.tar.gz: f1276d2569f91a2365dcdbf07d0c66d1eee8d24cdf39e9d34212b685f788baba7c70686aec9eca61ce0f508edc1ff870819ab5ff63ae2b6483dd729a421071d0
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.3.0-beta.
|
|
1
|
+
7.3.0-beta.11
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
require "rails/generators"
|
|
2
2
|
require "rails/generators/migration"
|
|
3
|
+
# Defines ActiveRecord::Generators::Base, whose next_migration_number is reused below. Railties
|
|
4
|
+
# does not autoload it, so without this require the generator fails with a NameError.
|
|
5
|
+
require "rails/generators/active_record"
|
|
3
6
|
|
|
4
7
|
module Habarico
|
|
5
8
|
module Preferences
|
data/lib/habarico/config.rb
CHANGED
|
@@ -53,8 +53,8 @@ module Habarico
|
|
|
53
53
|
# Name of the method Habarico calls (via `send`) as its authentication before_action, on both
|
|
54
54
|
# Habarico::Controller and Habarico::ApplicationController. Point this at an existing no-argument
|
|
55
55
|
# auth method on your ApplicationController (e.g. `:authenticate_user!`) to reuse it directly. If
|
|
56
|
-
# your auth method
|
|
57
|
-
#
|
|
56
|
+
# your auth method takes arguments, define a one-line wrapper method instead and point this at
|
|
57
|
+
# that.
|
|
58
58
|
mattr_accessor :authenticate_method
|
|
59
59
|
@@authenticate_method = :authenticate_request
|
|
60
60
|
|
|
@@ -89,9 +89,9 @@ module Habarico
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def generate_endpoints(_context, endpoint_parameters)
|
|
92
|
-
# Determine endpoint methods to be included
|
|
93
|
-
#
|
|
94
|
-
methods = endpoint_parameters.select { |e| e.
|
|
92
|
+
# Determine endpoint methods to be included from the endpoint parameters of the actions and views that address
|
|
93
|
+
# the resource itself (no reference; an action name always comes with one). Additionally, always include GET.
|
|
94
|
+
methods = endpoint_parameters.select { |e| e.reference.blank? }.map { |e| e.method.to_sym }
|
|
95
95
|
methods << :get # Ensure GET is always present
|
|
96
96
|
methods = methods.uniq
|
|
97
97
|
|
data/lib/habarico.rb
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
require "eluvia-base"
|
|
2
2
|
|
|
3
|
+
# Runtime dependencies of the gemspec. Bundler.require in a host app only requires what that app
|
|
4
|
+
# lists itself, so without these a host gets `undefined method 'page'` on its first list request
|
|
5
|
+
# (kaminari) or an uninitialised constant from a permission callable (pundit).
|
|
6
|
+
require "kaminari"
|
|
7
|
+
require "pundit"
|
|
8
|
+
|
|
3
9
|
# *****************************************************************************
|
|
4
10
|
# Basic library
|
|
5
11
|
# *****************************************************************************
|