eac_rails_base0 0.39.0 → 0.42.0

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: d40e6c771be2a3a4717fe568fd34aea08c56bfbb10d4aa876eddf30f13e3bef5
4
- data.tar.gz: b9f149565fea2e3d880b76a4aee6317a59870ed21d4e4e5148b01c60288b97ba
3
+ metadata.gz: 2dfe41c74d2c63abd7671d2908df5d8e867da042bdd08aa16e875b93e1cebecc
4
+ data.tar.gz: 9f1ae98abd00036b2ea2ff0d9cc5aa927531d6d41d1742ba914c67bc4c5c16b2
5
5
  SHA512:
6
- metadata.gz: 609b35c3187d0cb4e490860209775683d80be4d5674c6d45320f74bd851450237622c06714994da6f466b8f6465d2fca27faee294affb38f11939a8a984773f1
7
- data.tar.gz: 9823469ddefde147b6759ddd12ef06cb130401ac8273a17fb7dc21b1a5fc7d692257345f3b5c0ebf137ab8cf01b815fc70c24d985a71dc5f5a6e6bc023baae47
6
+ metadata.gz: 60a69ef0a2af3f37434c064db0b692246b19cd12aa1a1f8fb85d6133996a3995a55b8ecdfbef4c13a59b046edfb03db59cf4fa34ecbe103a0f9c2049f859bdc4
7
+ data.tar.gz: c75232790707c6343cd1f258e44d5122dc69ab4375a8f6ff144fa232761772d4a052d85ff7a2a238544a17c3b12b00745f1e125c3d8e02c4a80dcf683512e98a
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacRailsBase0
4
+ class ApplicationRecord < ActiveRecord::Base
5
+ self.abstract_class = true
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ <% if current_user&.administrator %>
2
+ <div class="text-center"><b>Versão:</b> <%= base0_app_version %></div>
3
+ <% end %>
@@ -33,5 +33,6 @@
33
33
  <%= render partial: '/layouts/eac_rails_base0/flash' %>
34
34
  <%= yield %>
35
35
  </div>
36
+ <%= render partial: '/layouts/eac_rails_base0/version' %>
36
37
  </body>
37
38
  </html>
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'carrierwave'
4
+ require 'carrierwave/orm/activerecord'
4
5
  require 'fog/aws'
5
6
 
6
7
  if ENV['carrierwave_provider'] == 'AWS'
@@ -2,4 +2,4 @@
2
2
 
3
3
  # Be sure to restart your server when you modify this file.
4
4
 
5
- Rails.application.config.action_dispatch.cookies_serializer = :json
5
+ Rails.application.config.action_dispatch.cookies_serializer = :marshal
@@ -32,7 +32,7 @@ module EacRailsBase0App
32
32
  config.i18n.default_locale = :'pt-BR'
33
33
 
34
34
  # Do not swallow errors in after_commit/after_rollback callbacks.
35
- config.active_record.raise_in_transactional_callbacks = true
35
+ config.active_record.raise_in_transactional_callbacks = true if ::Rails.version < '5'
36
36
 
37
37
  # Autoload do código em /lib.
38
38
  config.autoload_paths << Rails.root.join('lib')
@@ -53,5 +53,11 @@ module EacRailsBase0App
53
53
 
54
54
  migrate_deprecated_dir = ::Rails.root.join('db', 'migrate_deprecated')
55
55
  config.paths['db/migrate'] << migrate_deprecated_dir if migrate_deprecated_dir.directory?
56
+
57
+ if ::Rails.env.development?
58
+ require 'letter_opener'
59
+ config.action_mailer.delivery_method = :letter_opener
60
+ config.action_mailer.perform_deliveries = true
61
+ end
56
62
  end
57
63
  end
@@ -5,23 +5,21 @@ module EacRailsBase0
5
5
  module EacRailsUtilsLinksHelper
6
6
  class << self
7
7
  def included(base)
8
- base.include(InstanceMethods)
9
- base.include(::CanCanDryHelper)
10
- base.alias_method_chain :short_object_link, :base0
11
- base.alias_method_chain :object_path_by_class, :base0
8
+ base.prepend(InstanceMethods)
9
+ base.prepend(::CanCanDryHelper)
12
10
  end
13
11
  end
14
12
 
15
13
  module InstanceMethods
16
- def short_object_link_with_base0(object, action = nil, options = {})
14
+ def short_object_link(object, action = nil, options = {})
17
15
  value_or_sign(object, '') do |value|
18
16
  path = object_path(value, action)
19
17
  link_to '', url_for(path), options if can_by_path?(path, options[:method])
20
18
  end
21
19
  end
22
20
 
23
- def object_path_by_class_with_base0(*args)
24
- object_path_by_class_without_base0(*args).gsub(/_url\z/, '_path')
21
+ def object_path_by_class(*args)
22
+ super(*args).gsub(/_url\z/, '_path')
25
23
  end
26
24
  end
27
25
  end
@@ -31,4 +29,4 @@ end
31
29
  require 'eac_rails_utils/links_helper'
32
30
  patch = ::EacRailsBase0::Patches::EacRailsUtilsLinksHelper
33
31
  target = ::EacRailsUtils::LinksHelper
34
- target.send(:include, patch) unless target.included_modules.include?(patch)
32
+ target.prepend(patch) unless target.included_modules.include?(patch)
@@ -5,14 +5,13 @@ module EacRailsBase0
5
5
  module UrlForPatch
6
6
  class << self
7
7
  def included(base)
8
- base.include(InstanceMethods)
9
- base.alias_method_chain :url_for, :engines
8
+ base.prepend(InstanceMethods)
10
9
  end
11
10
  end
12
11
 
13
12
  module InstanceMethods
14
- def url_for_with_engines(options = nil)
15
- url_for_without_engines(options)
13
+ def url_for(options = nil)
14
+ super(options)
16
15
  rescue ActionController::UrlGenerationError
17
16
  engines_url_for(options)
18
17
  end
@@ -39,4 +38,4 @@ end
39
38
 
40
39
  patch = ::EacRailsBase0::Patches::UrlForPatch
41
40
  target = ::ActionDispatch::Routing::UrlFor
42
- target.send(:include, patch) unless target.included_modules.include?(patch)
41
+ target.prepend(patch) unless target.included_modules.include?(patch)
@@ -1,20 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # This file was generated by the `rails generate rspec:install` command. Conventionally, all
4
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
- # The generated `.rspec` file contains `--require spec_helper` which will cause
6
- # this file to always be loaded, without a need to explicitly require it in any
7
- # files.
8
- #
9
- # Given that it is always loaded, you are encouraged to keep this file as
10
- # light-weight as possible. Requiring heavyweight dependencies from this file
11
- # will add to the boot time of your test suite on EVERY test run, even for an
12
- # individual file that may not need all of that loaded. Instead, consider making
13
- # a separate helper file that requires the additional dependencies and performs
14
- # the additional setup, and require it from the spec files that actually need
15
- # it.
16
- #
17
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
3
  begin
19
4
  ActiveRecord::Migration.maintain_test_schema!
20
5
  rescue ActiveRecord::PendingMigrationError => e
@@ -23,114 +8,22 @@ rescue ActiveRecord::PendingMigrationError => e
23
8
  end
24
9
 
25
10
  RSpec.configure do |config|
26
- # rspec-expectations config goes here. You can use an alternate
27
- # assertion/expectation library such as wrong or the stdlib/minitest
28
- # assertions if you prefer.
29
11
  config.expect_with :rspec do |expectations|
30
- # This option will default to `true` in RSpec 4. It makes the `description`
31
- # and `failure_message` of custom matchers include text for helper methods
32
- # defined using `chain`, e.g.:
33
- # be_bigger_than(2).and_smaller_than(4).description
34
- # # => "be bigger than 2 and smaller than 4"
35
- # ...rather than:
36
- # # => "be bigger than 2"
37
12
  expectations.include_chain_clauses_in_custom_matcher_descriptions = true
38
13
  end
39
14
 
40
- # rspec-mocks config goes here. You can use an alternate test double
41
- # library (such as bogus or mocha) by changing the `mock_with` option here.
42
15
  config.mock_with :rspec do |mocks|
43
- # Prevents you from mocking or stubbing a method that does not exist on
44
- # a real object. This is generally recommended, and will default to
45
- # `true` in RSpec 4.
46
16
  mocks.verify_partial_doubles = true
47
17
  end
48
18
 
49
- # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
50
- # have no way to turn it off -- the option exists only for backwards
51
- # compatibility in RSpec 3). It causes shared context metadata to be
52
- # inherited by the metadata hash of host groups and examples, rather than
53
- # triggering implicit auto-inclusion in groups with matching metadata.
54
19
  config.shared_context_metadata_behavior = :apply_to_host_groups
55
-
56
- # The settings below are suggested to provide a good initial experience
57
- # with RSpec, but feel free to customize to your heart's content.
58
- # # This allows you to limit a spec run to individual examples or groups
59
- # # you care about by tagging them with `:focus` metadata. When nothing
60
- # # is tagged with `:focus`, all examples get run. RSpec also provides
61
- # # aliases for `it`, `describe`, and `context` that include `:focus`
62
- # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
63
- # config.filter_run_when_matching :focus
64
- #
65
- # # Allows RSpec to persist some state between runs in order to support
66
- # # the `--only-failures` and `--next-failure` CLI options. We recommend
67
- # # you configure your source control system to ignore this file.
68
20
  config.example_status_persistence_file_path = ::Rails.root.join('tmp', 'cache', 'rspec.txt')
69
- #
70
- # # Limits the available syntax to the non-monkey patched syntax that is
71
- # # recommended. For more details, see:
72
- # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
73
- # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
74
- # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
75
- # config.disable_monkey_patching!
76
- #
77
- # # Many RSpec users commonly either run the entire suite or an individual
78
- # # file, and it's useful to allow more verbose output when running an
79
- # # individual spec file.
80
- # if config.files_to_run.one?
81
- # # Use the documentation formatter for detailed output,
82
- # # unless a formatter has already been configured
83
- # # (e.g. via a command-line flag).
84
- # config.default_formatter = "doc"
85
- # end
86
- #
87
- # # Print the 10 slowest examples and example groups at the
88
- # # end of the spec run, to help surface which specs are running
89
- # # particularly slow.
90
- # config.profile_examples = 10
91
- #
92
- # # Run specs in random order to surface order dependencies. If you find an
93
- # # order dependency and want to debug it, you can fix the order by providing
94
- # # the seed, which is printed after each run.
95
- # # --seed 1234
96
- # config.order = :random
97
- #
98
- # # Seed global randomization in this process using the `--seed` CLI option.
99
- # # Setting this allows you to use `--seed` to deterministically reproduce
100
- # # test failures related to randomization by passing the same `--seed` value
101
- # # as the one that triggered the failure.
102
- # Kernel.srand config.seed
103
-
104
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
105
21
  config.fixture_path = "#{::Rails.root}/spec/fixtures"
106
-
107
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
108
- # examples within a transaction, remove the following line or assign false
109
- # instead of true.
110
22
  config.use_transactional_fixtures = true
111
-
112
- # RSpec Rails can automatically mix in different behaviours to your tests
113
- # based on their file location, for example enabling you to call `get` and
114
- # `post` in specs under `spec/controllers`.
115
- #
116
- # You can disable this behaviour by removing the line below, and instead
117
- # explicitly tag your specs with their type, e.g.:
118
- #
119
- # RSpec.describe UsersController, :type => :controller do
120
- # # ...
121
- # end
122
- #
123
- # The different available types are documented in the features, such as in
124
- # https://relishapp.com/rspec/rspec-rails/docs
125
23
  config.infer_spec_type_from_file_location!
126
-
127
- # Filter lines from Rails gems in backtraces.
128
24
  config.filter_rails_from_backtrace!
129
- # arbitrary gems may also be filtered via:
130
- # config.filter_gems_from_backtrace("gem name")
131
25
  end
132
26
 
133
- require 'eac_rails_base0/spec_helper/capybara'
134
- require 'eac_rails_base0/spec_helper/factory_bot'
135
- require 'eac_rails_base0/spec_helper/eac_users_support'
27
+ require 'eac_ruby_utils/require_sub'
28
+ ::EacRubyUtils.require_sub __FILE__
136
29
  require 'aranha/parsers/spec/source_target_fixtures_example'
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'devise'
4
+ require_relative 'factory_bot'
4
5
 
5
6
  RSpec.configure do |config|
6
7
  config.include Warden::Test::Helpers
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsBase0
4
- VERSION = '0.39.0'
4
+ VERSION = '0.42.0'
5
5
  end
@@ -1 +1 @@
1
- --require lib/spec_rails_helper --color --format doc --default-path . --pattern '**/spec/**/*_spec.rb'
1
+ --require lib/spec_rails_helper --color --format doc --default-path . --pattern 'spec/**/*_spec.rb'
metadata CHANGED
@@ -1,15 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_rails_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.0
4
+ version: 0.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-11 00:00:00.000000000 Z
11
+ date: 2020-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: active_scaffold
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.5.5
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.5'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.5.5
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: aranha
15
35
  requirement: !ruby/object:Gem::Requirement
@@ -130,16 +150,16 @@ dependencies:
130
150
  name: coffee-rails
131
151
  requirement: !ruby/object:Gem::Requirement
132
152
  requirements:
133
- - - "~>"
153
+ - - ">="
134
154
  - !ruby/object:Gem::Version
135
- version: 4.1.0
155
+ version: 4.2.2
136
156
  type: :runtime
137
157
  prerelease: false
138
158
  version_requirements: !ruby/object:Gem::Requirement
139
159
  requirements:
140
- - - "~>"
160
+ - - ">="
141
161
  - !ruby/object:Gem::Version
142
- version: 4.1.0
162
+ version: 4.2.2
143
163
  - !ruby/object:Gem::Dependency
144
164
  name: eac_rails_utils
145
165
  requirement: !ruby/object:Gem::Requirement
@@ -180,14 +200,20 @@ dependencies:
180
200
  requirements:
181
201
  - - "~>"
182
202
  - !ruby/object:Gem::Version
183
- version: '0.4'
203
+ version: '0.6'
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: 0.6.3
184
207
  type: :runtime
185
208
  prerelease: false
186
209
  version_requirements: !ruby/object:Gem::Requirement
187
210
  requirements:
188
211
  - - "~>"
189
212
  - !ruby/object:Gem::Version
190
- version: '0.4'
213
+ version: '0.6'
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: 0.6.3
191
217
  - !ruby/object:Gem::Dependency
192
218
  name: eac_ruby_utils
193
219
  requirement: !ruby/object:Gem::Requirement
@@ -208,20 +234,20 @@ dependencies:
208
234
  requirements:
209
235
  - - "~>"
210
236
  - !ruby/object:Gem::Version
211
- version: '0.6'
237
+ version: '0.8'
212
238
  - - ">="
213
239
  - !ruby/object:Gem::Version
214
- version: 0.6.1
240
+ version: 0.8.2
215
241
  type: :runtime
216
242
  prerelease: false
217
243
  version_requirements: !ruby/object:Gem::Requirement
218
244
  requirements:
219
245
  - - "~>"
220
246
  - !ruby/object:Gem::Version
221
- version: '0.6'
247
+ version: '0.8'
222
248
  - - ">="
223
249
  - !ruby/object:Gem::Version
224
- version: 0.6.1
250
+ version: 0.8.2
225
251
  - !ruby/object:Gem::Dependency
226
252
  name: factory_bot_rails
227
253
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +338,20 @@ dependencies:
312
338
  - - ">="
313
339
  - !ruby/object:Gem::Version
314
340
  version: '0'
341
+ - !ruby/object:Gem::Dependency
342
+ name: letter_opener
343
+ requirement: !ruby/object:Gem::Requirement
344
+ requirements:
345
+ - - ">="
346
+ - !ruby/object:Gem::Version
347
+ version: '0'
348
+ type: :runtime
349
+ prerelease: false
350
+ version_requirements: !ruby/object:Gem::Requirement
351
+ requirements:
352
+ - - ">="
353
+ - !ruby/object:Gem::Version
354
+ version: '0'
315
355
  - !ruby/object:Gem::Dependency
316
356
  name: puma
317
357
  requirement: !ruby/object:Gem::Requirement
@@ -330,22 +370,16 @@ dependencies:
330
370
  name: rails
331
371
  requirement: !ruby/object:Gem::Requirement
332
372
  requirements:
333
- - - "~>"
334
- - !ruby/object:Gem::Version
335
- version: 4.2.11
336
373
  - - ">="
337
374
  - !ruby/object:Gem::Version
338
- version: 4.2.11.1
375
+ version: 4.2.11.3
339
376
  type: :runtime
340
377
  prerelease: false
341
378
  version_requirements: !ruby/object:Gem::Requirement
342
379
  requirements:
343
- - - "~>"
344
- - !ruby/object:Gem::Version
345
- version: 4.2.11
346
380
  - - ">="
347
381
  - !ruby/object:Gem::Version
348
- version: 4.2.11.1
382
+ version: 4.2.11.3
349
383
  - !ruby/object:Gem::Dependency
350
384
  name: rails-i18n
351
385
  requirement: !ruby/object:Gem::Requirement
@@ -360,6 +394,20 @@ dependencies:
360
394
  - - "~>"
361
395
  - !ruby/object:Gem::Version
362
396
  version: '4.0'
397
+ - !ruby/object:Gem::Dependency
398
+ name: recordselect
399
+ requirement: !ruby/object:Gem::Requirement
400
+ requirements:
401
+ - - ">="
402
+ - !ruby/object:Gem::Version
403
+ version: 3.10.1
404
+ type: :runtime
405
+ prerelease: false
406
+ version_requirements: !ruby/object:Gem::Requirement
407
+ requirements:
408
+ - - ">="
409
+ - !ruby/object:Gem::Version
410
+ version: 3.10.1
363
411
  - !ruby/object:Gem::Dependency
364
412
  name: rspec-rails
365
413
  requirement: !ruby/object:Gem::Requirement
@@ -518,6 +566,7 @@ files:
518
566
  - app/helpers/eac_rails_base0/app_version_helper.rb
519
567
  - app/helpers/eac_rails_base0/layout_helper.rb
520
568
  - app/helpers/eac_rails_base0/panel_default_helper.rb
569
+ - app/models/eac_rails_base0/application_record.rb
521
570
  - app/uploaders/eac_rails_base0/default_file_uploader.rb
522
571
  - app/views/devise/confirmations/new.html.erb
523
572
  - app/views/devise/mailer/confirmation_instructions.html.erb
@@ -533,6 +582,7 @@ files:
533
582
  - app/views/layouts/eac_rails_base0/_navbar_user.html.erb
534
583
  - app/views/layouts/eac_rails_base0/_open_graph_protocol.html.erb
535
584
  - app/views/layouts/eac_rails_base0/_tasks_scheduler_alert.html.erb
585
+ - app/views/layouts/eac_rails_base0/_version.erb
536
586
  - app/views/layouts/eac_rails_base0/application.html.erb
537
587
  - config/initializers/action_mailer.rb
538
588
  - config/initializers/active_scaffold.rb