rails_ops 1.0.0.beta6 → 1.0.0.beta7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +4 -0
- data/Rakefile +5 -6
- data/VERSION +1 -1
- data/lib/rails_ops/hookup.rb +9 -1
- data/lib/rails_ops/log_subscriber.rb +3 -6
- data/lib/rails_ops/model_mixins/virtual_has_one.rb +1 -5
- data/lib/rails_ops/model_mixins.rb +0 -1
- data/lib/rails_ops/operation/model.rb +1 -1
- data/lib/rails_ops/operation.rb +2 -2
- data/lib/rails_ops.rb +0 -3
- data/rails_ops.gemspec +11 -20
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/cable.js +13 -0
- data/test/dummy/app/assets/javascripts/channels/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/models/group.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +37 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config/application.rb +17 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/database.yml +14 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +54 -0
- data/test/dummy/config/environments/production.rb +91 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/rails_ops.rb +4 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +56 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/secrets.yml +32 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/db/schema.rb +9 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/package.json +5 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/.keep +0 -0
- data/test/test_helper.rb +44 -10
- data/test/unit/rails_ops/operation/model/create_test.rb +52 -0
- data/test/unit/rails_ops/operation/model/load_test.rb +54 -0
- data/test/unit/rails_ops/operation/model/update_test.rb +22 -0
- data/test/unit/rails_ops/operation/model_test.rb +67 -0
- data/test/unit/rails_ops/operation_test.rb +145 -0
- metadata +134 -49
- data/lib/rails_ops/model_mixins/protected_attributes.rb +0 -78
- data/test/rails_ops/operation/example_test.rb +0 -14
data/test/test_helper.rb
CHANGED
@@ -1,19 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require '
|
4
|
-
require 'rails_ops'
|
5
|
-
require 'db/models'
|
1
|
+
require File.expand_path('../../test/dummy/config/environment.rb', __FILE__)
|
2
|
+
# ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
3
|
+
require 'rails/test_help'
|
6
4
|
|
7
|
-
|
5
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
6
|
+
# to be shown.
|
7
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
8
|
+
|
9
|
+
require 'rails/test_unit/reporter'
|
10
|
+
|
11
|
+
Rails::TestUnitReporter.executable = 'bin/test'
|
12
|
+
|
13
|
+
# Load fixtures from the engine
|
14
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
15
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
|
16
|
+
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
17
|
+
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + '/files'
|
18
|
+
ActiveSupport::TestCase.fixtures :all
|
19
|
+
end
|
20
|
+
|
21
|
+
load File.dirname(__FILE__) + '/dummy/db/schema.rb'
|
22
|
+
|
23
|
+
require 'request_store'
|
8
24
|
|
9
25
|
module TestHelper
|
10
26
|
extend ActiveSupport::Concern
|
11
27
|
|
12
|
-
|
13
|
-
|
14
|
-
|
28
|
+
# Help test raise errors message
|
29
|
+
# https://ruby-doc.org/stdlib-2.1.5/libdoc/test/unit/rdoc/Test/Unit/Assertions.html#method-i-assert_raise
|
30
|
+
def assert_raises_with_message(exception, expected, msg = nil, &block)
|
31
|
+
case expected
|
32
|
+
when String
|
33
|
+
assert = :assert_equal
|
34
|
+
when Regexp
|
35
|
+
assert = :assert_match
|
36
|
+
else
|
37
|
+
fail TypeError, "Expected #{expected.inspect} to be a kind of String or Regexp, not #{expected.class}"
|
38
|
+
end
|
39
|
+
|
40
|
+
ex = assert_raises(exception, *msg) { yield }
|
41
|
+
msg = message(msg, '') { "Expected Exception(#{exception}) was raised, but the message doesn't match" }
|
42
|
+
|
43
|
+
if assert == :assert_equal
|
44
|
+
assert_equal(expected, ex.message, msg)
|
45
|
+
else
|
46
|
+
msg = message(msg) { "Expected #{mu_pp expected} to match #{mu_pp ex.message}" }
|
47
|
+
assert expected =~ ex.message, msg
|
48
|
+
block.binding.eval('proc{|_|$~=_}').call($LAST_MATCH_INFO)
|
15
49
|
end
|
16
50
|
|
17
|
-
|
51
|
+
return ex
|
18
52
|
end
|
19
53
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RailsOps::Operation::Model::CreateTest < ActiveSupport::TestCase
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
BASIC_OP = Class.new(RailsOps::Operation::Model::Create) do
|
7
|
+
model Group
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_basic
|
11
|
+
op = BASIC_OP.run!(group: { name: 'test', color: 'red' })
|
12
|
+
|
13
|
+
assert_equal 'test', op.model.name
|
14
|
+
assert_equal 'red', op.model.color
|
15
|
+
assert op.model.persisted?
|
16
|
+
refute op.model.changed?
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_model_extension
|
20
|
+
cls = Class.new(RailsOps::Operation::Model::Create) do
|
21
|
+
model Group do
|
22
|
+
validates :color, presence: true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
assert cls.new.model.class < Group
|
27
|
+
|
28
|
+
assert_raises ActiveRecord::RecordInvalid do
|
29
|
+
cls.run!(group: { name: 'test' })
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_parent_op
|
34
|
+
op = BASIC_OP.new
|
35
|
+
assert_equal op, op.model.parent_op
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_always_extend_model_class
|
39
|
+
assert RailsOps::Operation::Model::Create.always_extend_model_class?
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_build
|
43
|
+
op = BASIC_OP.new
|
44
|
+
op.build_model
|
45
|
+
|
46
|
+
assert op.instance_variable_get(:@model)
|
47
|
+
|
48
|
+
assert_raises_with_message RuntimeError, 'Model can only be built once.' do
|
49
|
+
op.build_model
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RailsOps::Operation::Model::LoadTest < ActiveSupport::TestCase
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
BASIC_OP = Class.new(RailsOps::Operation::Model::Load) do
|
7
|
+
model Group
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_basic
|
11
|
+
g = Group.create
|
12
|
+
op = BASIC_OP.new(id: g.id)
|
13
|
+
assert_equal g, op.model
|
14
|
+
assert_equal Group, op.model.class
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_parent_op
|
18
|
+
g = Group.create
|
19
|
+
cls = Class.new(RailsOps::Operation::Model::Load) do
|
20
|
+
model Group do
|
21
|
+
# Nothing do do
|
22
|
+
end
|
23
|
+
end
|
24
|
+
op = cls.new(id: g.id)
|
25
|
+
assert_equal op, op.model.parent_op
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_without_id
|
29
|
+
op = BASIC_OP.new
|
30
|
+
assert_raises_with_message RuntimeError, 'Param :id must be given.' do
|
31
|
+
op.model
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_not_found
|
36
|
+
op = BASIC_OP.new(id: 5)
|
37
|
+
assert_raise ActiveRecord::RecordNotFound do
|
38
|
+
op.model
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_other_model_id_field
|
43
|
+
cls = Class.new(RailsOps::Operation::Model::Load) do
|
44
|
+
model Group
|
45
|
+
|
46
|
+
def model_id_field
|
47
|
+
:name
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
g = Group.create(name: 'g1')
|
52
|
+
assert_equal g, cls.new(name: 'g1').model
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RailsOps::Operation::Model::UpdateTest < ActiveSupport::TestCase
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
BASIC_OP = Class.new(RailsOps::Operation::Model::Update) do
|
7
|
+
model Group
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_basic
|
11
|
+
g = Group.create
|
12
|
+
op = BASIC_OP.new(id: g.id)
|
13
|
+
assert_equal g.id, op.model.id
|
14
|
+
assert op.model.class < Group
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_parent_op
|
18
|
+
g = Group.create
|
19
|
+
op = BASIC_OP.new(id: g.id)
|
20
|
+
assert_equal op, op.model.parent_op
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RailsOps::Operation::ModelTest < ActiveSupport::TestCase
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
def test_always_extend_model_class_true
|
7
|
+
cls = Class.new(RailsOps::Operation::Model) do
|
8
|
+
def self.always_extend_model_class?
|
9
|
+
true
|
10
|
+
end
|
11
|
+
|
12
|
+
model Group
|
13
|
+
end
|
14
|
+
|
15
|
+
refute_equal Group, cls.model
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_always_extend_model_class_false
|
19
|
+
cls = Class.new(RailsOps::Operation::Model) do
|
20
|
+
def self.always_extend_model_class?
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
model Group
|
25
|
+
end
|
26
|
+
|
27
|
+
assert_equal Group, cls.model
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_model_mixins
|
31
|
+
cls = Class.new(RailsOps::Operation::Model) do
|
32
|
+
def self.always_extend_model_class?
|
33
|
+
true
|
34
|
+
end
|
35
|
+
|
36
|
+
model Group
|
37
|
+
end
|
38
|
+
|
39
|
+
assert cls.model.included_modules.include?(RailsOps::ModelMixins)
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_virtual_model_name
|
43
|
+
cls = Class.new(RailsOps::Operation::Model) do
|
44
|
+
model RailsOps::VirtualModel, 'Example'
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_equal 'Example', cls.model.virtual_model_name
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_default_model_class
|
51
|
+
cls = Class.new(RailsOps::Operation::Model) do
|
52
|
+
model do
|
53
|
+
attribute :name, :string
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
assert cls.model < ActiveType::Object
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_no_model_class
|
61
|
+
assert_raises_with_message RuntimeError, 'No model class has been set.' do
|
62
|
+
Class.new(RailsOps::Operation::Model) do
|
63
|
+
model
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,145 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RailsOps::OperationTest < ActiveSupport::TestCase
|
4
|
+
include TestHelper
|
5
|
+
|
6
|
+
EXCEPTION = Class.new(StandardError)
|
7
|
+
|
8
|
+
BASIC_OP = Class.new(RailsOps::Operation) do
|
9
|
+
attr_reader :done
|
10
|
+
|
11
|
+
def validation_errors
|
12
|
+
super + [EXCEPTION]
|
13
|
+
end
|
14
|
+
|
15
|
+
def perform
|
16
|
+
fail osparams.exception if osparams.exception
|
17
|
+
@done = true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_basic_operation
|
22
|
+
op = BASIC_OP.new
|
23
|
+
op.run
|
24
|
+
assert op.done
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_static_run
|
28
|
+
assert BASIC_OP.run
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_static_run!
|
32
|
+
assert BASIC_OP.run!.done
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_non_validation_error
|
36
|
+
assert_raises_with_message RuntimeError, 'Standard exception' do
|
37
|
+
BASIC_OP.run(exception: 'Standard exception')
|
38
|
+
end
|
39
|
+
|
40
|
+
assert_raises_with_message RuntimeError, 'Standard exception' do
|
41
|
+
BASIC_OP.run!(exception: 'Standard exception')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_validation_errors
|
46
|
+
assert_raises_with_message RailsOps::Exceptions::ValidationFailed, 'A message' do
|
47
|
+
BASIC_OP.run!(exception: RailsOps::Exceptions::ValidationFailed.new('A message'))
|
48
|
+
end
|
49
|
+
|
50
|
+
refute BASIC_OP.run(exception: RailsOps::Exceptions::ValidationFailed.new('A message'))
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_constructor
|
54
|
+
context = RailsOps::Context.new
|
55
|
+
|
56
|
+
# new()
|
57
|
+
op = BASIC_OP.new
|
58
|
+
assert_not_equal context.object_id, op.context.object_id
|
59
|
+
assert_equal({}, op.params)
|
60
|
+
|
61
|
+
# new(nil)
|
62
|
+
op = BASIC_OP.new(nil)
|
63
|
+
assert_not_equal context.object_id, op.context.object_id
|
64
|
+
assert_equal({}, op.params)
|
65
|
+
|
66
|
+
# new(nil, nil)
|
67
|
+
op = BASIC_OP.new(nil)
|
68
|
+
assert_not_equal context.object_id, op.context.object_id
|
69
|
+
assert_equal({}, op.params)
|
70
|
+
|
71
|
+
# new(context, params)
|
72
|
+
op = BASIC_OP.new(context, key: :val)
|
73
|
+
assert_equal context.object_id, op.context.object_id
|
74
|
+
assert_equal({ key: :val }.with_indifferent_access, op.params)
|
75
|
+
|
76
|
+
# new(context)
|
77
|
+
op = BASIC_OP.new(context)
|
78
|
+
assert_equal context.object_id, op.context.object_id
|
79
|
+
assert_equal({}, op.params)
|
80
|
+
|
81
|
+
# new(params)
|
82
|
+
op = BASIC_OP.new(key: :val)
|
83
|
+
assert_not_equal context.object_id, op.context.object_id
|
84
|
+
assert_equal({ key: :val }.with_indifferent_access, op.params)
|
85
|
+
|
86
|
+
# new(params) with ActionController::Parameters
|
87
|
+
params = ActionController::Parameters.new(key: :val)
|
88
|
+
op = BASIC_OP.new(params)
|
89
|
+
assert_not_equal params.object_id, op.params.object_id
|
90
|
+
assert_equal({ key: :val }.with_indifferent_access, op.params)
|
91
|
+
end
|
92
|
+
|
93
|
+
def test_params
|
94
|
+
params = { a: 1, 'b': 1 }
|
95
|
+
op = BASIC_OP.new(params)
|
96
|
+
|
97
|
+
# ---------------------------------------------------------------
|
98
|
+
# Check if op.params and op.osparams are correctly populated
|
99
|
+
# ---------------------------------------------------------------
|
100
|
+
assert_equal params.with_indifferent_access, op.params
|
101
|
+
assert_equal op.params, op.osparams.to_h.with_indifferent_access
|
102
|
+
|
103
|
+
# ---------------------------------------------------------------
|
104
|
+
# Verify that operations work with a duplicate params hash,
|
105
|
+
# and op.params and op.osparams are not connected
|
106
|
+
# ---------------------------------------------------------------
|
107
|
+
|
108
|
+
# Change of outside params hash
|
109
|
+
params[:a] = 2
|
110
|
+
assert_equal 1, op.params[:a]
|
111
|
+
assert_equal 1, op.osparams[:a]
|
112
|
+
|
113
|
+
# Change of op.params hash
|
114
|
+
op.params[:a] = 3
|
115
|
+
assert_equal 2, params[:a]
|
116
|
+
assert_equal 1, op.osparams[:a]
|
117
|
+
|
118
|
+
# Change of op.osparams hash
|
119
|
+
op.osparams.a = 4
|
120
|
+
assert_equal 2, params[:a]
|
121
|
+
assert_equal 3, op.params[:a]
|
122
|
+
|
123
|
+
# ---------------------------------------------------------------
|
124
|
+
# Verify that the params hash is deep duplicated
|
125
|
+
# ---------------------------------------------------------------
|
126
|
+
params = { a: { foo: :bar } }
|
127
|
+
op = Class.new(RailsOps::Operation).new(params)
|
128
|
+
params[:a][:foo] = :baz
|
129
|
+
|
130
|
+
assert_equal :bar, op.params[:a][:foo]
|
131
|
+
assert_equal :bar, op.osparams.a[:foo]
|
132
|
+
end
|
133
|
+
|
134
|
+
def test_performed
|
135
|
+
op = BASIC_OP.new
|
136
|
+
refute op.performed?
|
137
|
+
op.run!
|
138
|
+
assert op.performed?
|
139
|
+
end
|
140
|
+
|
141
|
+
def test_inspect
|
142
|
+
assert_equal 'RailsOps::OperationTest::BASIC_OP ({"foo"=>:bar})',
|
143
|
+
BASIC_OP.new(foo: :bar).inspect
|
144
|
+
end
|
145
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_ops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sitrox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: yard
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rubocop
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +66,6 @@ dependencies:
|
|
80
66
|
- - '='
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: 0.47.1
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: redcarpet
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
70
|
name: active_type
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,21 +95,7 @@ dependencies:
|
|
123
95
|
- !ruby/object:Gem::Version
|
124
96
|
version: '0'
|
125
97
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: activerecord
|
98
|
+
name: rails
|
141
99
|
requirement: !ruby/object:Gem::Requirement
|
142
100
|
requirements:
|
143
101
|
- - ">="
|
@@ -151,7 +109,7 @@ dependencies:
|
|
151
109
|
- !ruby/object:Gem::Version
|
152
110
|
version: '0'
|
153
111
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
112
|
+
name: request_store
|
155
113
|
requirement: !ruby/object:Gem::Requirement
|
156
114
|
requirements:
|
157
115
|
- - ">="
|
@@ -222,7 +180,6 @@ files:
|
|
222
180
|
- lib/rails_ops/model_mixins.rb
|
223
181
|
- lib/rails_ops/model_mixins/ar_extension.rb
|
224
182
|
- lib/rails_ops/model_mixins/parent_op.rb
|
225
|
-
- lib/rails_ops/model_mixins/protected_attributes.rb
|
226
183
|
- lib/rails_ops/model_mixins/virtual_attributes.rb
|
227
184
|
- lib/rails_ops/model_mixins/virtual_attributes/virtual_column_wrapper.rb
|
228
185
|
- lib/rails_ops/model_mixins/virtual_has_one.rb
|
@@ -241,8 +198,72 @@ files:
|
|
241
198
|
- rails_ops.gemspec
|
242
199
|
- test/db/models.rb
|
243
200
|
- test/db/schema.rb
|
244
|
-
- test/
|
201
|
+
- test/dummy/Rakefile
|
202
|
+
- test/dummy/app/assets/config/manifest.js
|
203
|
+
- test/dummy/app/assets/images/.keep
|
204
|
+
- test/dummy/app/assets/javascripts/application.js
|
205
|
+
- test/dummy/app/assets/javascripts/cable.js
|
206
|
+
- test/dummy/app/assets/javascripts/channels/.keep
|
207
|
+
- test/dummy/app/assets/stylesheets/application.css
|
208
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
209
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
210
|
+
- test/dummy/app/controllers/application_controller.rb
|
211
|
+
- test/dummy/app/controllers/concerns/.keep
|
212
|
+
- test/dummy/app/helpers/application_helper.rb
|
213
|
+
- test/dummy/app/jobs/application_job.rb
|
214
|
+
- test/dummy/app/mailers/application_mailer.rb
|
215
|
+
- test/dummy/app/models/application_record.rb
|
216
|
+
- test/dummy/app/models/concerns/.keep
|
217
|
+
- test/dummy/app/models/group.rb
|
218
|
+
- test/dummy/app/views/layouts/application.html.erb
|
219
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
220
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
221
|
+
- test/dummy/bin/bundle
|
222
|
+
- test/dummy/bin/rails
|
223
|
+
- test/dummy/bin/rake
|
224
|
+
- test/dummy/bin/setup
|
225
|
+
- test/dummy/bin/update
|
226
|
+
- test/dummy/bin/yarn
|
227
|
+
- test/dummy/config.ru
|
228
|
+
- test/dummy/config/application.rb
|
229
|
+
- test/dummy/config/boot.rb
|
230
|
+
- test/dummy/config/cable.yml
|
231
|
+
- test/dummy/config/database.yml
|
232
|
+
- test/dummy/config/environment.rb
|
233
|
+
- test/dummy/config/environments/development.rb
|
234
|
+
- test/dummy/config/environments/production.rb
|
235
|
+
- test/dummy/config/environments/test.rb
|
236
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
237
|
+
- test/dummy/config/initializers/assets.rb
|
238
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
239
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
240
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
241
|
+
- test/dummy/config/initializers/inflections.rb
|
242
|
+
- test/dummy/config/initializers/mime_types.rb
|
243
|
+
- test/dummy/config/initializers/rails_ops.rb
|
244
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
245
|
+
- test/dummy/config/locales/en.yml
|
246
|
+
- test/dummy/config/puma.rb
|
247
|
+
- test/dummy/config/routes.rb
|
248
|
+
- test/dummy/config/secrets.yml
|
249
|
+
- test/dummy/config/spring.rb
|
250
|
+
- test/dummy/db/schema.rb
|
251
|
+
- test/dummy/lib/assets/.keep
|
252
|
+
- test/dummy/log/.keep
|
253
|
+
- test/dummy/package.json
|
254
|
+
- test/dummy/public/404.html
|
255
|
+
- test/dummy/public/422.html
|
256
|
+
- test/dummy/public/500.html
|
257
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
258
|
+
- test/dummy/public/apple-touch-icon.png
|
259
|
+
- test/dummy/public/favicon.ico
|
260
|
+
- test/dummy/tmp/.keep
|
245
261
|
- test/test_helper.rb
|
262
|
+
- test/unit/rails_ops/operation/model/create_test.rb
|
263
|
+
- test/unit/rails_ops/operation/model/load_test.rb
|
264
|
+
- test/unit/rails_ops/operation/model/update_test.rb
|
265
|
+
- test/unit/rails_ops/operation/model_test.rb
|
266
|
+
- test/unit/rails_ops/operation_test.rb
|
246
267
|
homepage:
|
247
268
|
licenses: []
|
248
269
|
metadata: {}
|
@@ -269,5 +290,69 @@ summary: An operations service layer for rails projects.
|
|
269
290
|
test_files:
|
270
291
|
- test/db/models.rb
|
271
292
|
- test/db/schema.rb
|
272
|
-
- test/
|
293
|
+
- test/dummy/Rakefile
|
294
|
+
- test/dummy/app/assets/config/manifest.js
|
295
|
+
- test/dummy/app/assets/images/.keep
|
296
|
+
- test/dummy/app/assets/javascripts/application.js
|
297
|
+
- test/dummy/app/assets/javascripts/cable.js
|
298
|
+
- test/dummy/app/assets/javascripts/channels/.keep
|
299
|
+
- test/dummy/app/assets/stylesheets/application.css
|
300
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
301
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
302
|
+
- test/dummy/app/controllers/application_controller.rb
|
303
|
+
- test/dummy/app/controllers/concerns/.keep
|
304
|
+
- test/dummy/app/helpers/application_helper.rb
|
305
|
+
- test/dummy/app/jobs/application_job.rb
|
306
|
+
- test/dummy/app/mailers/application_mailer.rb
|
307
|
+
- test/dummy/app/models/application_record.rb
|
308
|
+
- test/dummy/app/models/concerns/.keep
|
309
|
+
- test/dummy/app/models/group.rb
|
310
|
+
- test/dummy/app/views/layouts/application.html.erb
|
311
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
312
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
313
|
+
- test/dummy/bin/bundle
|
314
|
+
- test/dummy/bin/rails
|
315
|
+
- test/dummy/bin/rake
|
316
|
+
- test/dummy/bin/setup
|
317
|
+
- test/dummy/bin/update
|
318
|
+
- test/dummy/bin/yarn
|
319
|
+
- test/dummy/config.ru
|
320
|
+
- test/dummy/config/application.rb
|
321
|
+
- test/dummy/config/boot.rb
|
322
|
+
- test/dummy/config/cable.yml
|
323
|
+
- test/dummy/config/database.yml
|
324
|
+
- test/dummy/config/environment.rb
|
325
|
+
- test/dummy/config/environments/development.rb
|
326
|
+
- test/dummy/config/environments/production.rb
|
327
|
+
- test/dummy/config/environments/test.rb
|
328
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
329
|
+
- test/dummy/config/initializers/assets.rb
|
330
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
331
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
332
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
333
|
+
- test/dummy/config/initializers/inflections.rb
|
334
|
+
- test/dummy/config/initializers/mime_types.rb
|
335
|
+
- test/dummy/config/initializers/rails_ops.rb
|
336
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
337
|
+
- test/dummy/config/locales/en.yml
|
338
|
+
- test/dummy/config/puma.rb
|
339
|
+
- test/dummy/config/routes.rb
|
340
|
+
- test/dummy/config/secrets.yml
|
341
|
+
- test/dummy/config/spring.rb
|
342
|
+
- test/dummy/db/schema.rb
|
343
|
+
- test/dummy/lib/assets/.keep
|
344
|
+
- test/dummy/log/.keep
|
345
|
+
- test/dummy/package.json
|
346
|
+
- test/dummy/public/404.html
|
347
|
+
- test/dummy/public/422.html
|
348
|
+
- test/dummy/public/500.html
|
349
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
350
|
+
- test/dummy/public/apple-touch-icon.png
|
351
|
+
- test/dummy/public/favicon.ico
|
352
|
+
- test/dummy/tmp/.keep
|
273
353
|
- test/test_helper.rb
|
354
|
+
- test/unit/rails_ops/operation/model/create_test.rb
|
355
|
+
- test/unit/rails_ops/operation/model/load_test.rb
|
356
|
+
- test/unit/rails_ops/operation/model/update_test.rb
|
357
|
+
- test/unit/rails_ops/operation/model_test.rb
|
358
|
+
- test/unit/rails_ops/operation_test.rb
|