brick 1.0.12 → 1.0.13

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
  SHA256:
3
- metadata.gz: f7c3e4032e5e9f111839b7ff6e6378e4937edeabeb0edcf480cf6c50e79e599a
4
- data.tar.gz: 1a1e5b096a3f6fff0f2c49c6be6abcfbe012f3e24fccf0ea6b307b58d9cbc076
3
+ metadata.gz: 2c22e9b6dcc1ca819d7cdc6852def21d10e5c5c23f6fc7489b1fe5ae52b6c68e
4
+ data.tar.gz: 2242f7c0045e294fc505a479054a43d7d4355a0f7b6bf8407122f6f426eea541
5
5
  SHA512:
6
- metadata.gz: 4dbd885a2c4dc9666378a69423179ca2085c89b6b6120d21ef8d3274f229a88306f54868b8a18aad8e55a37a71bc9b78dff073263bb86fd89d5b982acf8d5210
7
- data.tar.gz: 952f94f89445170f26fad10357ede0df7c9053d034ddb552b1e9cba884cbdf0325325cb29a2248fac4e9de3bd8c41619fc9612d44435e6ccb808a16fd018d8dc
6
+ metadata.gz: 6b42dcae433ac8c0fbc91dbf9952451548af6e72eadb466f98c8c6d084be7217df192aa6fc141a18d1e76bd25a551746cf155799045d66f88f41ede99b36b39e
7
+ data.tar.gz: 7ab155441e2868af3fe0b2a5339ec6614c18ff9d641a076f678ef6baa7b943cad88c97443db3c70506206c54f2b754a1892490d977f3e714fb66c889fe107fa5
@@ -180,7 +180,7 @@ class Object
180
180
  return Object._brick_const_missing(*args) if ActiveSupport::Dependencies.search_for_file(class_name.underscore)
181
181
 
182
182
  relations = ::Brick.instance_variable_get(:@relations)[ActiveRecord::Base.connection_pool.object_id] || {}
183
- is_controllers_enabled = Rails.development? || ::Brick.enable_controllers?
183
+ is_controllers_enabled = ::Brick.enable_controllers? || (ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'development'
184
184
  result = if is_controllers_enabled && class_name.end_with?('Controller') && (plural_class_name = class_name[0..-11]).length.positive?
185
185
  # Otherwise now it's up to us to fill in the gaps
186
186
  if (model = ActiveSupport::Inflector.singularize(plural_class_name).constantize)
@@ -37,7 +37,7 @@ module Brick
37
37
  # ====================================
38
38
  # Dynamically create generic templates
39
39
  # ====================================
40
- if Rails.development? || ::Brick.enable_views?
40
+ if ::Brick.enable_views? || (ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'development'
41
41
  ActionView::LookupContext.class_exec do
42
42
  alias :_brick_template_exists? :template_exists?
43
43
  def template_exists?(*args, **options)
@@ -283,7 +283,7 @@ function changeout(href, param, value) {
283
283
  end
284
284
  end
285
285
 
286
- if Rails.development? || ::Brick.enable_routes?
286
+ if ::Brick.enable_routes? || (ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'development'
287
287
  ActionDispatch::Routing::RouteSet.class_exec do
288
288
  alias _brick_finalize_routeset! finalize!
289
289
  def finalize!(*args, **options)
@@ -5,7 +5,7 @@ module Brick
5
5
  module VERSION
6
6
  MAJOR = 1
7
7
  MINOR = 0
8
- TINY = 12
8
+ TINY = 13
9
9
 
10
10
  # PRE is nil unless it's a pre-release (beta, RC, etc.)
11
11
  PRE = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorin Thwaits