infopark_reactor 1.25.0 → 1.27.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +25 -0
  3. data/.rubocop_todo.yml +363 -0
  4. data/Rakefile +10 -13
  5. data/app/models/rails_connector/abstract_obj.rb +2 -1
  6. data/config/routes.rb +0 -1
  7. data/infopark_reactor.gemspec +16 -15
  8. data/lib/generators/cm/migration/migration_generator.rb +4 -8
  9. data/lib/infopark_reactor.rb +43 -69
  10. data/lib/reactor/already_released.rb +1 -2
  11. data/lib/reactor/attributes.rb +94 -270
  12. data/lib/reactor/attributes/date_serializer.rb +20 -16
  13. data/lib/reactor/attributes/html_serializer.rb +6 -5
  14. data/lib/reactor/attributes/link_list_extender.rb +10 -8
  15. data/lib/reactor/attributes/link_list_from_accessor.rb +2 -1
  16. data/lib/reactor/attributes/link_list_from_attr_values.rb +2 -1
  17. data/lib/reactor/attributes/link_list_serializer.rb +8 -7
  18. data/lib/reactor/attributes_handlers.rb +164 -0
  19. data/lib/reactor/cache/permission.rb +6 -9
  20. data/lib/reactor/cache/user.rb +3 -6
  21. data/lib/reactor/cm/attribute.rb +16 -16
  22. data/lib/reactor/cm/attribute_group.rb +18 -21
  23. data/lib/reactor/cm/blob_too_small_error.rb +2 -2
  24. data/lib/reactor/cm/bridge.rb +6 -9
  25. data/lib/reactor/cm/channel.rb +3 -4
  26. data/lib/reactor/cm/editorial_group.rb +2 -9
  27. data/lib/reactor/cm/group.rb +30 -43
  28. data/lib/reactor/cm/job.rb +77 -0
  29. data/lib/reactor/cm/language.rb +21 -22
  30. data/lib/reactor/cm/link.rb +38 -40
  31. data/lib/reactor/cm/live_group.rb +2 -9
  32. data/lib/reactor/cm/log_entry.rb +22 -21
  33. data/lib/reactor/cm/missing_credentials.rb +3 -2
  34. data/lib/reactor/cm/multi_xml_request.rb +22 -25
  35. data/lib/reactor/cm/obj.rb +161 -152
  36. data/lib/reactor/cm/obj_class.rb +52 -51
  37. data/lib/reactor/cm/object_base.rb +26 -21
  38. data/lib/reactor/cm/permissions.rb +7 -7
  39. data/lib/reactor/cm/user.rb +63 -46
  40. data/lib/reactor/cm/workflow.rb +11 -12
  41. data/lib/reactor/cm/xml_attribute.rb +10 -19
  42. data/lib/reactor/cm/xml_markup.rb +7 -10
  43. data/lib/reactor/cm/xml_multi_request_error.rb +1 -3
  44. data/lib/reactor/cm/xml_request.rb +21 -29
  45. data/lib/reactor/cm/xml_request_error.rb +1 -3
  46. data/lib/reactor/cm/xml_response.rb +8 -16
  47. data/lib/reactor/cm/xml_single_request_error.rb +3 -5
  48. data/lib/reactor/configuration.rb +1 -3
  49. data/lib/reactor/engine.rb +5 -10
  50. data/lib/reactor/legacy.rb +8 -9
  51. data/lib/reactor/link/external.rb +8 -5
  52. data/lib/reactor/link/internal.rb +8 -5
  53. data/lib/reactor/link/temporary_link.rb +18 -19
  54. data/lib/reactor/main.rb +11 -15
  55. data/lib/reactor/migration.rb +52 -47
  56. data/lib/reactor/no_working_version.rb +1 -2
  57. data/lib/reactor/not_permitted.rb +1 -2
  58. data/lib/reactor/permission.rb +36 -38
  59. data/lib/reactor/persistence.rb +105 -159
  60. data/lib/reactor/plans/common_attribute.rb +7 -7
  61. data/lib/reactor/plans/common_attribute_group.rb +6 -6
  62. data/lib/reactor/plans/common_channel.rb +6 -6
  63. data/lib/reactor/plans/common_group.rb +7 -14
  64. data/lib/reactor/plans/common_job.rb +32 -0
  65. data/lib/reactor/plans/common_obj_class.rb +11 -11
  66. data/lib/reactor/plans/create_attribute.rb +1 -3
  67. data/lib/reactor/plans/create_attribute_group.rb +1 -3
  68. data/lib/reactor/plans/create_channel.rb +2 -3
  69. data/lib/reactor/plans/create_group.rb +3 -10
  70. data/lib/reactor/plans/create_job.rb +22 -0
  71. data/lib/reactor/plans/create_obj.rb +12 -14
  72. data/lib/reactor/plans/create_obj_class.rb +1 -2
  73. data/lib/reactor/plans/delete_attribute.rb +1 -3
  74. data/lib/reactor/plans/delete_attribute_group.rb +2 -4
  75. data/lib/reactor/plans/delete_channel.rb +4 -4
  76. data/lib/reactor/plans/delete_group.rb +2 -9
  77. data/lib/reactor/plans/delete_job.rb +23 -0
  78. data/lib/reactor/plans/delete_obj.rb +3 -4
  79. data/lib/reactor/plans/delete_obj_class.rb +1 -2
  80. data/lib/reactor/plans/prepared.rb +3 -4
  81. data/lib/reactor/plans/rename_group.rb +4 -11
  82. data/lib/reactor/plans/rename_obj_class.rb +1 -2
  83. data/lib/reactor/plans/update_attribute.rb +1 -3
  84. data/lib/reactor/plans/update_attribute_group.rb +2 -4
  85. data/lib/reactor/plans/update_group.rb +2 -9
  86. data/lib/reactor/plans/update_job.rb +27 -0
  87. data/lib/reactor/plans/update_obj.rb +6 -7
  88. data/lib/reactor/plans/update_obj_class.rb +0 -2
  89. data/lib/reactor/rc_independent.rb +0 -1
  90. data/lib/reactor/session.rb +27 -31
  91. data/lib/reactor/session/observers.rb +3 -5
  92. data/lib/reactor/session/user.rb +6 -7
  93. data/lib/reactor/session_helper/auth_filter.rb +9 -0
  94. data/lib/reactor/session_helper/auth_helper.rb +24 -0
  95. data/lib/reactor/session_helper/rsession_helper.rb +16 -0
  96. data/lib/reactor/session_helper/session_state.rb +31 -0
  97. data/lib/reactor/streaming_upload.rb +0 -1
  98. data/lib/reactor/sudo.rb +2 -3
  99. data/lib/reactor/support/link_matcher.rb +8 -7
  100. data/lib/reactor/tools/migrator.rb +30 -35
  101. data/lib/reactor/tools/response_handler/xml_attribute.rb +37 -27
  102. data/lib/reactor/tools/smart_xml_logger.rb +20 -22
  103. data/lib/reactor/tools/sower.rb +22 -23
  104. data/lib/reactor/tools/uploader.rb +12 -17
  105. data/lib/reactor/tools/versioner.rb +29 -30
  106. data/lib/reactor/tools/where_query.rb +12 -13
  107. data/lib/reactor/tools/workflow_generator.rb +26 -28
  108. data/lib/reactor/tools/xml_attributes.rb +7 -14
  109. data/lib/reactor/tools/xpath_extractor.rb +2 -1
  110. data/lib/reactor/validations.rb +20 -16
  111. data/lib/reactor/version.rb +1 -2
  112. data/lib/reactor/workflow.rb +10 -33
  113. data/lib/reactor/workflow/comment.rb +28 -0
  114. data/lib/reactor/workflow/empty.rb +0 -1
  115. data/lib/reactor/workflow/standard.rb +4 -3
  116. data/lib/tasks/cm_migrate.rake +3 -3
  117. data/lib/tasks/cm_seeds.rake +9 -16
  118. metadata +77 -35
  119. data/app/models/rails_connector/abstract_model.rb +0 -7
  120. data/app/models/rails_connector/attribute.rb +0 -94
  121. data/app/models/rails_connector/blob_mapping.rb +0 -16
  122. data/app/models/rails_connector/channel.rb +0 -41
  123. data/app/models/rails_connector/content.rb +0 -12
  124. data/app/models/rails_connector/obj_class.rb +0 -158
  125. data/app/models/rails_connector/obj_class_attr.rb +0 -5
  126. data/app/models/rails_connector/object_with_meta_data.rb +0 -18
  127. data/lib/rails_connector/meta/eager_loader.rb +0 -91
  128. data/lib/reactor/rails_connector_meta.rb +0 -149
  129. data/lib/reactor/session_helper.rb +0 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0239fbc0807b9a31e6fa80298930ca37465af29d
4
- data.tar.gz: 73f6561b9a114871fce30a050ca677e828e6ecf4
3
+ metadata.gz: 89c72df0c5a6bd7e4cf4dd7ff29322d969f36587
4
+ data.tar.gz: 506449b0a149136c8a82a974f907b7456facf6d2
5
5
  SHA512:
6
- metadata.gz: f7bf7b6f924abb2bba8b8d6dd916641c407d99cd6644812005689a1e78cf288871a67e7393db59623e50a6cbc66faa6ecf9e5befa9b4009a628d901a7e230c4b
7
- data.tar.gz: 4760a747861ac8d05d4b315cfddf3a3820a76213146eb11b08208ab03b98e120c5438abd3738b94337a65a2693d6c22a190f0569b1c9f4c6996a6fc728c3f8b0
6
+ metadata.gz: 3d2c5f856c7a87fdc5d64b53b08c2b6ec08cf691acfba972f26142cde57bad0f38e08895365a7e4baf0107dcff0a9e4c3a77fd393efd046b0e49def557828d8f
7
+ data.tar.gz: beaf24b211c41d1227b253ff2f181f8ab107ae750f764946c786a2f66c9f47cd5df0e485cd4ed1698354eb850284793fd9cc5d83438133e0290231f82a4159af
@@ -0,0 +1,25 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require:
4
+ - rubocop-performance
5
+
6
+ AllCops:
7
+ NewCops: enable
8
+ Exclude:
9
+ - lib/generators/cm/migration/templates/**/*
10
+
11
+ Style/StringLiterals:
12
+ EnforcedStyle: double_quotes
13
+ Style/StringLiteralsInInterpolation:
14
+ EnforcedStyle: double_quotes
15
+ Style/PercentLiteralDelimiters:
16
+ PreferredDelimiters:
17
+ "%i": "()"
18
+ "%w": "()"
19
+ "%W": "()"
20
+ Style/Alias:
21
+ EnforcedStyle: prefer_alias_method
22
+ Style/RedundantBegin:
23
+ Enabled: false
24
+ Style/StructInheritance:
25
+ Enabled: false
@@ -0,0 +1,363 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config --auto-gen-only-exclude`
3
+ # on 2020-07-17 11:04:06 UTC using RuboCop version 0.87.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
12
+ # SupportedStylesAlignWith: start_of_line, def
13
+ Layout/DefEndAlignment:
14
+ Exclude:
15
+ - 'lib/reactor/cm/user.rb'
16
+ - 'lib/reactor/plans/create_group.rb'
17
+
18
+ # Offense count: 4
19
+ # Cop supports --auto-correct.
20
+ # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
21
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
22
+ Layout/EndAlignment:
23
+ Exclude:
24
+ - 'lib/reactor/attributes.rb'
25
+ - 'lib/reactor/link/temporary_link.rb'
26
+ - 'lib/reactor/tools/smart_xml_logger.rb'
27
+ - 'lib/reactor/tools/workflow_generator.rb'
28
+
29
+ # Offense count: 9
30
+ Lint/IneffectiveAccessModifier:
31
+ Exclude:
32
+ - 'lib/reactor/cm/editorial_group.rb'
33
+ - 'lib/reactor/cm/group.rb'
34
+ - 'lib/reactor/cm/live_group.rb'
35
+ - 'lib/reactor/cm/obj.rb'
36
+ - 'lib/reactor/cm/user.rb'
37
+ - 'lib/reactor/permission.rb'
38
+ - 'lib/reactor/tools/uploader.rb'
39
+
40
+ # Offense count: 1
41
+ Lint/LiteralAsCondition:
42
+ Exclude:
43
+ - 'lib/reactor/persistence.rb'
44
+
45
+ # Offense count: 2
46
+ Lint/ShadowingOuterLocalVariable:
47
+ Exclude:
48
+ - 'lib/reactor/cm/group.rb'
49
+ - 'lib/reactor/cm/obj_class.rb'
50
+
51
+ # Offense count: 2
52
+ # Configuration parameters: AllowComments.
53
+ Lint/SuppressedException:
54
+ Exclude:
55
+ - 'lib/reactor/tools/sower.rb'
56
+
57
+ # Offense count: 8
58
+ Lint/UselessAssignment:
59
+ Exclude:
60
+ - 'lib/reactor/plans/create_channel.rb'
61
+ - 'lib/reactor/plans/create_job.rb'
62
+ - 'lib/reactor/plans/delete_attribute.rb'
63
+ - 'lib/reactor/plans/delete_channel.rb'
64
+ - 'lib/reactor/plans/delete_job.rb'
65
+ - 'lib/reactor/plans/delete_obj_class.rb'
66
+ - 'lib/reactor/plans/update_attribute.rb'
67
+ - 'lib/reactor/plans/update_obj_class.rb'
68
+
69
+ # Offense count: 47
70
+ # Configuration parameters: IgnoredMethods.
71
+ Metrics/AbcSize:
72
+ Max: 54
73
+
74
+ # Offense count: 5
75
+ # Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods.
76
+ # ExcludedMethods: refine
77
+ Metrics/BlockLength:
78
+ Exclude:
79
+ - '**/*.gemspec'
80
+ - 'lib/reactor/attributes/link_list_extender.rb'
81
+ - 'lib/reactor/attributes_handlers.rb'
82
+ - 'lib/reactor/cm/obj_class.rb'
83
+ - 'lib/tasks/cm_seeds.rake'
84
+
85
+ # Offense count: 7
86
+ # Configuration parameters: CountComments, Max, CountAsOne.
87
+ Metrics/ClassLength:
88
+ Exclude:
89
+ - 'lib/reactor/attributes_handlers.rb'
90
+ - 'lib/reactor/cm/group.rb'
91
+ - 'lib/reactor/cm/link.rb'
92
+ - 'lib/reactor/cm/obj.rb'
93
+ - 'lib/reactor/cm/obj_class.rb'
94
+ - 'lib/reactor/cm/object_base.rb'
95
+ - 'lib/reactor/tools/workflow_generator.rb'
96
+
97
+ # Offense count: 12
98
+ # Configuration parameters: IgnoredMethods, Max.
99
+ Metrics/CyclomaticComplexity:
100
+ Exclude:
101
+ - 'lib/reactor/attributes/date_serializer.rb'
102
+ - 'lib/reactor/attributes/link_list_extender.rb'
103
+ - 'lib/reactor/attributes_handlers.rb'
104
+ - 'lib/reactor/cm/obj.rb'
105
+ - 'lib/reactor/cm/obj_class.rb'
106
+ - 'lib/reactor/legacy.rb'
107
+ - 'lib/reactor/link/temporary_link.rb'
108
+ - 'lib/reactor/persistence.rb'
109
+ - 'lib/reactor/tools/response_handler/xml_attribute.rb'
110
+ - 'lib/reactor/tools/smart_xml_logger.rb'
111
+ - 'lib/reactor/tools/where_query.rb'
112
+ - 'lib/reactor/validations.rb'
113
+
114
+ # Offense count: 55
115
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
116
+ Metrics/MethodLength:
117
+ Max: 79
118
+
119
+ # Offense count: 2
120
+ # Configuration parameters: CountComments, Max, CountAsOne.
121
+ Metrics/ModuleLength:
122
+ Exclude:
123
+ - 'lib/reactor/attributes.rb'
124
+ - 'lib/reactor/persistence.rb'
125
+
126
+ # Offense count: 5
127
+ # Configuration parameters: IgnoredMethods, Max.
128
+ Metrics/PerceivedComplexity:
129
+ Exclude:
130
+ - 'lib/reactor/attributes/date_serializer.rb'
131
+ - 'lib/reactor/cm/obj.rb'
132
+ - 'lib/reactor/legacy.rb'
133
+ - 'lib/reactor/tools/smart_xml_logger.rb'
134
+ - 'lib/reactor/tools/sower.rb'
135
+
136
+ # Offense count: 7
137
+ Naming/AccessorMethodName:
138
+ Exclude:
139
+ - 'lib/reactor/cm/group.rb'
140
+ - 'lib/reactor/cm/obj.rb'
141
+ - 'lib/reactor/cm/object_base.rb'
142
+ - 'lib/reactor/cm/permissions.rb'
143
+ - 'lib/reactor/cm/xml_markup.rb'
144
+ - 'lib/reactor/persistence.rb'
145
+
146
+ # Offense count: 1
147
+ Naming/ConstantName:
148
+ Exclude:
149
+ - 'app/models/rails_connector/abstract_obj.rb'
150
+
151
+ # Offense count: 9
152
+ # Configuration parameters: ForbiddenDelimiters.
153
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
154
+ Naming/HeredocDelimiterNaming:
155
+ Exclude:
156
+ - 'lib/reactor/attributes_handlers.rb'
157
+ - 'lib/reactor/cm/object_base.rb'
158
+
159
+ # Offense count: 4
160
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
161
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
162
+ Naming/MemoizedInstanceVariableName:
163
+ Exclude:
164
+ - 'lib/reactor/attributes.rb'
165
+ - 'lib/reactor/attributes/date_serializer.rb'
166
+ - 'lib/reactor/session_helper/rsession_helper.rb'
167
+
168
+ # Offense count: 5
169
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
170
+ # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
171
+ Naming/MethodParameterName:
172
+ Exclude:
173
+ - 'lib/reactor/cm/bridge.rb'
174
+ - 'lib/reactor/cm/obj.rb'
175
+ - 'lib/reactor/tools/sower.rb'
176
+
177
+ # Offense count: 9
178
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
179
+ # NamePrefix: is_, has_, have_
180
+ # ForbiddenPrefixes: is_, has_, have_
181
+ # AllowedMethods: is_a?
182
+ # MethodDefinitionMacros: define_method, define_singleton_method
183
+ Naming/PredicateName:
184
+ Exclude:
185
+ - 'spec/**/*'
186
+ - 'lib/reactor/cm/link.rb'
187
+ - 'lib/reactor/cm/obj_class.rb'
188
+ - 'lib/reactor/cm/user.rb'
189
+ - 'lib/reactor/permission.rb'
190
+ - 'lib/reactor/persistence.rb'
191
+
192
+ # Offense count: 15
193
+ # Configuration parameters: EnforcedStyle.
194
+ # SupportedStyles: snake_case, camelCase
195
+ Naming/VariableName:
196
+ Exclude:
197
+ - 'lib/reactor/cm/bridge.rb'
198
+ - 'lib/reactor/cm/obj.rb'
199
+ - 'lib/reactor/plans/create_obj.rb'
200
+ - 'lib/reactor/tools/sower.rb'
201
+
202
+ # Offense count: 1
203
+ # Cop supports --auto-correct.
204
+ Security/YAMLLoad:
205
+ Exclude:
206
+ - 'lib/reactor/tools/versioner.rb'
207
+
208
+ # Offense count: 1
209
+ # Configuration parameters: AllowedChars.
210
+ Style/AsciiComments:
211
+ Exclude:
212
+ - 'lib/reactor/cm/language.rb'
213
+
214
+ # Offense count: 3
215
+ # Cop supports --auto-correct.
216
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
217
+ # SupportedStyles: nested, compact
218
+ Style/ClassAndModuleChildren:
219
+ Exclude:
220
+ - 'lib/reactor/no_working_version.rb'
221
+ - 'lib/reactor/not_permitted.rb'
222
+ - 'lib/reactor/session.rb'
223
+
224
+ # Offense count: 2
225
+ Style/ClassVars:
226
+ Exclude:
227
+ - 'lib/reactor/cache/permission.rb'
228
+ - 'lib/reactor/cache/user.rb'
229
+
230
+ # Offense count: 2
231
+ Style/CommentedKeyword:
232
+ Exclude:
233
+ - 'lib/reactor/cm/obj.rb'
234
+ - 'lib/reactor/validations.rb'
235
+
236
+ # Offense count: 118
237
+ Style/Documentation:
238
+ Enabled: false
239
+
240
+ # Offense count: 2
241
+ Style/EvalWithLocation:
242
+ Exclude:
243
+ - 'lib/reactor/attributes_handlers.rb'
244
+ - 'lib/reactor/cm/object_base.rb'
245
+
246
+ # Offense count: 115
247
+ # Cop supports --auto-correct.
248
+ # Configuration parameters: EnforcedStyle.
249
+ # SupportedStyles: always, always_true, never
250
+ Style/FrozenStringLiteralComment:
251
+ Enabled: false
252
+
253
+ # Offense count: 4
254
+ # Configuration parameters: MinBodyLength.
255
+ Style/GuardClause:
256
+ Exclude:
257
+ - 'lib/reactor/attributes/link_list_extender.rb'
258
+ - 'lib/reactor/cm/log_entry.rb'
259
+ - 'lib/reactor/plans/create_obj.rb'
260
+ - 'lib/reactor/tools/uploader.rb'
261
+
262
+ # Offense count: 8
263
+ # Cop supports --auto-correct.
264
+ Style/HashEachMethods:
265
+ Exclude:
266
+ - 'lib/reactor/permission.rb'
267
+ - 'lib/reactor/plans/common_attribute.rb'
268
+ - 'lib/reactor/plans/common_attribute_group.rb'
269
+ - 'lib/reactor/plans/common_channel.rb'
270
+ - 'lib/reactor/plans/common_group.rb'
271
+ - 'lib/reactor/plans/common_job.rb'
272
+ - 'lib/reactor/plans/common_obj_class.rb'
273
+ - 'lib/reactor/tools/workflow_generator.rb'
274
+
275
+ # Offense count: 4
276
+ Style/IdenticalConditionalBranches:
277
+ Exclude:
278
+ - 'lib/reactor/tools/workflow_generator.rb'
279
+ - 'lib/reactor/tools/xml_attributes.rb'
280
+
281
+ # Offense count: 9
282
+ # Cop supports --auto-correct.
283
+ Style/IfUnlessModifier:
284
+ Exclude:
285
+ - 'lib/reactor/attributes.rb'
286
+ - 'lib/reactor/cm/obj.rb'
287
+ - 'lib/reactor/permission.rb'
288
+ - 'lib/reactor/persistence.rb'
289
+ - 'lib/reactor/plans/create_obj.rb'
290
+ - 'lib/reactor/tools/sower.rb'
291
+ - 'lib/reactor/validations.rb'
292
+
293
+ # Offense count: 1
294
+ # Cop supports --auto-correct.
295
+ # Configuration parameters: InverseMethods, InverseBlocks.
296
+ Style/InverseMethods:
297
+ Exclude:
298
+ - 'lib/reactor/plans/prepared.rb'
299
+
300
+ # Offense count: 1
301
+ Style/MethodMissingSuper:
302
+ Exclude:
303
+ - 'lib/reactor/migration.rb'
304
+
305
+ # Offense count: 1
306
+ Style/MissingRespondToMissing:
307
+ Exclude:
308
+ - 'lib/reactor/migration.rb'
309
+
310
+ # Offense count: 1
311
+ # Cop supports --auto-correct.
312
+ # Configuration parameters: IncludeSemanticChanges.
313
+ Style/NonNilCheck:
314
+ Exclude:
315
+ - 'lib/reactor/permission.rb'
316
+
317
+ # Offense count: 1
318
+ # Cop supports --auto-correct.
319
+ # Configuration parameters: .
320
+ # SupportedStyles: use_perl_names, use_english_names
321
+ Style/SpecialGlobalVars:
322
+ EnforcedStyle: use_perl_names
323
+
324
+ # Offense count: 3
325
+ # Cop supports --auto-correct.
326
+ # Configuration parameters: IgnoredMethods.
327
+ # IgnoredMethods: respond_to, define_method
328
+ Style/SymbolProc:
329
+ Exclude:
330
+ - 'lib/reactor/cm/obj.rb'
331
+ - 'lib/reactor/cm/obj_class.rb'
332
+ - 'lib/reactor/tools/smart_xml_logger.rb'
333
+
334
+ # Offense count: 1
335
+ # Cop supports --auto-correct.
336
+ # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
337
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
338
+ Style/TernaryParentheses:
339
+ Exclude:
340
+ - 'lib/reactor/cm/obj.rb'
341
+
342
+ # Offense count: 2
343
+ # Cop supports --auto-correct.
344
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
345
+ # AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
346
+ Style/TrivialAccessors:
347
+ Exclude:
348
+ - 'lib/reactor/plans/common_attribute_group.rb'
349
+
350
+ # Offense count: 1
351
+ # Cop supports --auto-correct.
352
+ # Configuration parameters: EnforcedStyle.
353
+ # SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
354
+ Style/YodaCondition:
355
+ Exclude:
356
+ - 'lib/reactor/validations.rb'
357
+
358
+ # Offense count: 29
359
+ # Cop supports --auto-correct.
360
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
361
+ # URISchemes: http, https
362
+ Layout/LineLength:
363
+ Max: 248
data/Rakefile CHANGED
@@ -1,25 +1,22 @@
1
- require 'bundler'
2
- #require 'yard'
1
+ require "bundler"
2
+ # require 'yard'
3
3
  Bundler::GemHelper.install_tasks
4
4
 
5
- #YARD::Rake::YardocTask.new do |t|
5
+ # YARD::Rake::YardocTask.new do |t|
6
6
  # t.files = ['lib/**/*.rb'] # optional
7
7
  ## t.options = ['--any', '--extra', '--opts'] # optional
8
- #end
9
-
8
+ # end
10
9
 
11
10
  # remove this task, when this gem is distributed as a `real` gem (and not included in Gemfile through `:path =>` )
12
11
  task :update_gemspec_for_distribution do
13
-
14
- fn = Dir[File.expand_path('../*.gemspec', __FILE__)].first
12
+ fn = Dir[File.expand_path("*.gemspec", __dir__)].first
15
13
  source_gemspec = File.read(fn)
16
14
 
17
- source_gemspec.gsub!(/^([\t ]*)((s.files\s*=)[^\n]+\n)/m) {|s| "#{$1}##{$2}#{$1}#{$3} #{`git ls-files`.split("\n").inspect}\n"}
18
- source_gemspec.gsub!(/^([\t ]*)((s.test_files\s*=)[^\n]+\n)/m) {|s| "#{$1}##{$2}#{$1}#{$3} #{`git ls-files -- {test,spec,features}/*`.split("\n").inspect}\n"}
19
- source_gemspec.gsub!(/^([\t ]*)((s.executables\s*=)[^\n]+\n)/m) {|s| "#{$1}##{$2}#{$1}#{$3} #{`git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }.inspect}\n"}
15
+ source_gemspec.gsub!(/^([\t ]*)((s.files\s*=)[^\n]+\n)/m) { |_s| "#{Regexp.last_match(1)}##{Regexp.last_match(2)}#{Regexp.last_match(1)}#{Regexp.last_match(3)} #{`git ls-files`.split("\n").inspect}\n" }
16
+ source_gemspec.gsub!(/^([\t ]*)((s.test_files\s*=)[^\n]+\n)/m) { |_s| "#{Regexp.last_match(1)}##{Regexp.last_match(2)}#{Regexp.last_match(1)}#{Regexp.last_match(3)} #{`git ls-files -- {test,spec,features}/*`.split("\n").inspect}\n" }
17
+ source_gemspec.gsub!(/^([\t ]*)((s.executables\s*=)[^\n]+\n)/m) { |_s| "#{Regexp.last_match(1)}##{Regexp.last_match(2)}#{Regexp.last_match(1)}#{Regexp.last_match(3)} #{`git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }.inspect}\n" }
20
18
 
21
- File.open("#{fn}.resolved", 'w') do |f|
19
+ File.open("#{fn}.resolved", "w") do |f|
22
20
  f.write source_gemspec
23
21
  end
24
-
25
- end
22
+ end
@@ -1,3 +1,4 @@
1
+ # TODO: RailsConnector for rails version 5 has only support for newer version of RailsConnector
1
2
  module RailsConnector
2
3
  # This trick is a workaround to provide compatiblity with both
3
4
  # ObjExtensions-enabled versions (older versions) and ObjExtensions-deprecated
@@ -25,7 +26,7 @@ module RailsConnector
25
26
 
26
27
  class AbstractObj
27
28
  def self.compute_type(type_name)
28
- try_type { type_name.constantize } || self
29
+ try_type { type_name.constantize } || self
29
30
  end
30
31
  end
31
32
  end