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: 7be061178763fb2bb412e36877d25e44ff109c82c90955279bcf7ff038f1216b
4
- data.tar.gz: 7f478d3e668b336f2b2226b0bd2ea099aae08a22514ede701142cfea3f40457a
3
+ metadata.gz: 6c0c12a78eabc5ec2b734b49fe2631728bebfaaf0dccab0af628c195dc333880
4
+ data.tar.gz: 5bd53485346b0d43bef3791d74c69603a5b6ae8f005fed3eebacabeb4479affa
5
5
  SHA512:
6
- metadata.gz: 06bf7e5f65f10d91c1443235e11d180db58a3f34941367a5073f825b33ea26307bbaa522f4a283fd34ce9e11041626146c0636184d19c481ac761e231545d130
7
- data.tar.gz: ca148d5c2f91c5fb53fdca5bb64dad14f12756a01b8408bdcb22bb5f92ce66eae70c20fa804a7819c0e6817137d1ad49895d36adddbcbfb6e64e22785a531022
6
+ metadata.gz: 554f357c1b5c47e163d4cbbb9fc441a921a116a05d360e3a01351f8cd120df1135603d512b31c92dd745ecb704347f478b4093b1d657568559407c50d8e66d5e
7
+ data.tar.gz: f1276d2569f91a2365dcdbf07d0c66d1eee8d24cdf39e9d34212b685f788baba7c70686aec9eca61ce0f508edc1ff870819ab5ff63ae2b6483dd729a421071d0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.3.0-beta.10
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
@@ -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 needs arguments (e.g. eluvia-auth's `authenticate(['public'])`), define a
57
- # one-line wrapper method instead and point this at that.
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, base for the selection ale endpoint parameters collected from the
93
- # actions and views without action name and without reference. Additionally, always include GET.
94
- methods = endpoint_parameters.select { |e| e.action_name.blank? && e.reference.blank? }.map { |e| e.method.to_sym }
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
  # *****************************************************************************
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: habarico
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.0.pre.beta.10
4
+ version: 7.3.0.pre.beta.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matěj Outlý