eac_active_scaffold 0.2.3 → 0.3.0

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: ede215cb2cf301d5dbe839a93be45a13eba4988d5746aed8da6efe9f57d98910
4
- data.tar.gz: 6c87c45db09b325108a4c4120f18cf96fa1d5756dcee972c719d556999fb798a
3
+ metadata.gz: e5cc04435477ea32bbf31c2189530aba0922da6cbf39cddeb288b34202a0a059
4
+ data.tar.gz: ddc743b6a429d04f1971a20b4d0ee93b335ed33c8b82c6236a8da5d7f4a4c7b8
5
5
  SHA512:
6
- metadata.gz: 97faab77dd80415461f9e0a69410f3138c9afc629e28be846f1f48620c6cc80056555eb7da9830b697c24f94294feb287aead631906b3295c0e9ef5ca8b8c810
7
- data.tar.gz: 4224bc31ffe0789297a8199338d48828c33559cf68a459c2c9cb0b7c24331ad43df7acb79b4bd359eb5d3214f10878707443b192342063470ab9d15de595fb2c
6
+ metadata.gz: fa40fddc77968d294eca75f46a75b573a34ffa65ce2a48c23f8de8c29cec60b85c2e1cd75610e41fa0696d62c229e9ac40317dcb915a09b94d0143f781979832
7
+ data.tar.gz: b9e62f051d4103e5f65981997883a6a925356389b0e07487936bd10301d8a2fabe6233277941bd45a956cbc502013ff2fe846397b1a2f51c7a627308ca931f57
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacActiveScaffold
6
+ module Rspec
7
+ module Setup
8
+ def self.extended(obj)
9
+ %w[controller_example].each do |m|
10
+ obj.send("setup_#{m}")
11
+ end
12
+ end
13
+
14
+ private
15
+
16
+ def setup_controller_example
17
+ require 'eac_active_scaffold/rspec/shared_contexts/active_scaffold_controller'
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::RSpec.shared_context 'active_scaffold_controller' do |options|
4
+ let(:index_path) { options.fetch(:index_path) }
5
+ let(:model) { options.fetch(:model) }
6
+
7
+ before do
8
+ visit index_path
9
+ end
10
+
11
+ it 'show index page' do
12
+ expect(page).to have_content model.model_name.human(count: 2)
13
+ end
14
+
15
+ it 'create new record' do
16
+ expect do
17
+ click_on ::I18n.t('active_scaffold.create_new')
18
+ options.fetch(:valid).each do |key, value|
19
+ fill_in model.human_attribute_name(key), with: value
20
+ end
21
+ click_on ::I18n.t('active_scaffold.create')
22
+ end.to change { model.count }.by(1)
23
+ end
24
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacActiveScaffold
6
+ module Rspec
7
+ require_sub __FILE__
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacActiveScaffold
4
- VERSION = '0.2.3'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_active_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-05 00:00:00.000000000 Z
11
+ date: 2023-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_scaffold
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.6.11
19
+ version: '3.6'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.6.11.1
22
+ version: 3.6.17
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 3.6.11
29
+ version: '3.6'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.6.11.1
32
+ version: 3.6.17
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: eac_ruby_utils
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.95'
39
+ version: '0.117'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 0.95.1
42
+ version: 0.117.1
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '0.95'
49
+ version: '0.117'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 0.95.1
52
+ version: 0.117.1
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: eac_rails_gem_support
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -82,6 +82,9 @@ files:
82
82
  - lib/eac_active_scaffold/engine.rb
83
83
  - lib/eac_active_scaffold/patches.rb
84
84
  - lib/eac_active_scaffold/patches/action_dispatch.rb
85
+ - lib/eac_active_scaffold/rspec.rb
86
+ - lib/eac_active_scaffold/rspec/setup.rb
87
+ - lib/eac_active_scaffold/rspec/shared_contexts/active_scaffold_controller.rb
85
88
  - lib/eac_active_scaffold/version.rb
86
89
  homepage:
87
90
  licenses: []