snake-eyes 0.1.0 → 1.0.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
  SHA1:
3
- metadata.gz: e5d87558dd242a686cdeb61d193ff4785f0dca88
4
- data.tar.gz: 3342dc90f6aa0cb230758f303d9ba7694135369a
3
+ metadata.gz: 88a300e546ae808376833e94ab9b17f2b33adf32
4
+ data.tar.gz: '09c35643682438b1b4101d50eefa73fb9de5e7fa'
5
5
  SHA512:
6
- metadata.gz: 2b52f46eb4f20de9c95d6b00e8ba465c98c40fcae292d06508c3ec6a35b856d25b4f06f41b78cad1364d301c82c0f4ad375ba501f94ee16c63bf89f8db980140
7
- data.tar.gz: accbf453ddafdf9b49b598a1e89cc01de69285e204a7417fb157de84918224adfd372b1c8860f76940dab4dbccf721119b2c32d0a6dfbe7d88d34b359b2cfc94
6
+ metadata.gz: 41c5b9cadc36ab390107ee6e9f289a0b1038174a77b16ab4f5284ac024e9e6ee8268f625c3408c13fd42bea5e1956bdbabfe8fbd9dba949a3d03760c4449cd7a
7
+ data.tar.gz: 5dc4f29e0f87bd583b7649e4e5d46f5328a28d4e313638751be7b7985deeff611f7cb76bbb1afe4940d2f1e676946f919aec15671e9aff37044e10af1ee550a6
@@ -5,6 +5,20 @@ module SnakeEyes
5
5
  "action"
6
6
  ]
7
7
 
8
+ if Rails::VERSION::MAJOR >= 5
9
+ def _prepare(transformed_params)
10
+ # We permit all parameter values so that we many convert it to a hash, to work
11
+ # with ActionPack 5.2's ActionController::Parameters initializer
12
+ _transform_params = transformed_params.dup
13
+ _transform_params.permit!
14
+ _transform_params.to_h
15
+ end
16
+ else
17
+ def _prepare(transformed_params)
18
+ transformed_params
19
+ end
20
+ end
21
+
8
22
  def params(options = {})
9
23
  validate_options(options)
10
24
 
@@ -30,9 +44,10 @@ module SnakeEyes
30
44
 
31
45
  return @previous_params[options] if @previous_params[options]
32
46
 
33
- transformed_params = deep_transform(original_params, options)
47
+ transformed_params = deep_transform(_prepare(original_params), options)
34
48
 
35
- @previous_params[options] = @snake_eyes_params = ActionController::Parameters.new(transformed_params)
49
+ @previous_params[options] =
50
+ @snake_eyes_params = ActionController::Parameters.new(transformed_params)
36
51
 
37
52
  log_snakized_params
38
53
 
@@ -49,11 +64,10 @@ module SnakeEyes
49
64
 
50
65
  def log_snakized_params
51
66
  if SnakeEyes.log_snake_eyes_parameters
52
-
53
67
  ignored_params = ActionController::LogSubscriber::INTERNAL_PARAMS
54
68
  filtered_params = request.send(:parameter_filter).filter(@snake_eyes_params.except(*ignored_params))
55
69
 
56
- logger.info " SnakeEyes Parameters: #{filtered_params.inspect}"
70
+ logger.info " SnakeEyes Parameters: #{_prepare(filtered_params).inspect}"
57
71
  end
58
72
  end
59
73
 
@@ -1,3 +1,3 @@
1
1
  module SnakeEyes
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -7102,3 +7102,438 @@ Processing by AnonymousController#index as HTML
7102
7102
  Rendered text template (0.0ms)
7103
7103
  Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
7104
7104
   (0.0ms) rollback transaction
7105
+  (3.2ms) begin transaction
7106
+ Processing by AnonymousController#index as HTML
7107
+ Rendered text template (0.0ms)
7108
+ Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms)
7109
+  (0.1ms) rollback transaction
7110
+  (0.0ms) begin transaction
7111
+ Processing by AnonymousController#index as HTML
7112
+ Parameters: {"integer"=>"3", "string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}, "arrayOfObjects"=>[{"name"=>"object1"}, {"name"=>"object2"}, {"name"=>"object3"}], "complexObject"=>{"nestedObject"=>{"deeperNestedObject"=>{"name"=>"deeplyNested"}}, "anotherNestedObject"=>{"deeperNestedObject"=>{"name"=>"anotherDeeplyNested", "deepestNestedObject"=>{"name"=>"deeplyNested"}}}}, "arrayOfNestedObjects"=>[{"level"=>"1", "children"=>[{"index"=>"1"}, {"index"=>"2"}, {"index"=>"3"}]}, {"level"=>"1", "parent"=>{"index"=>"1"}}]}
7113
+ SnakeEyes Parameters: {"integer"=>"3", "string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}, "array_of_objects"=>[{"name"=>"object1"}, {"name"=>"object2"}, {"name"=>"object3"}], "complex_object"=>{"nested_object"=>{"deeper_nested_object"=>{"name"=>"deeplyNested"}}, "another_nested_object"=>{"deeper_nested_object"=>{"name"=>"anotherDeeplyNested", "deepest_nested_object"=>{"name"=>"deeplyNested"}}}}, "array_of_nested_objects"=>[{"level"=>"1", "children"=>[{"index"=>"1"}, {"index"=>"2"}, {"index"=>"3"}]}, {"level"=>"1", "parent"=>{"index"=>"1"}}]}
7114
+ Rendered text template (0.0ms)
7115
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
7116
+  (0.0ms) rollback transaction
7117
+  (0.0ms) begin transaction
7118
+ Processing by AnonymousController#index as HTML
7119
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7120
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7121
+ Rendered text template (0.0ms)
7122
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
7123
+  (0.0ms) rollback transaction
7124
+  (0.0ms) begin transaction
7125
+ Processing by AnonymousController#index as HTML
7126
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7127
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute_attributes"=>"value"}}
7128
+ Rendered text template (0.0ms)
7129
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7130
+  (0.0ms) rollback transaction
7131
+  (0.0ms) begin transaction
7132
+ Processing by AnonymousController#index as HTML
7133
+ Parameters: {"array"=>[{"string"=>"string"}, {"string"=>"string2"}]}
7134
+ SnakeEyes Parameters: {"array"=>[{"string_attributes"=>"string"}, {"string_attributes"=>"string2"}]}
7135
+ Rendered text template (0.0ms)
7136
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
7137
+  (0.0ms) rollback transaction
7138
+  (0.0ms) begin transaction
7139
+ Processing by AnonymousController#index as HTML
7140
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7141
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute"=>"value"}}
7142
+ Rendered text template (0.0ms)
7143
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
7144
+  (0.0ms) rollback transaction
7145
+  (0.0ms) begin transaction
7146
+ Processing by AnonymousController#index as HTML
7147
+ Parameters: {"string"=>"string"}
7148
+ SnakeEyes Parameters: {"string_attributes"=>"string"}
7149
+ Rendered text template (0.0ms)
7150
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
7151
+  (0.0ms) rollback transaction
7152
+  (0.0ms) begin transaction
7153
+ Processing by AnonymousController#index as HTML
7154
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7155
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7156
+ Rendered text template (0.0ms)
7157
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
7158
+  (0.0ms) rollback transaction
7159
+  (0.0ms) begin transaction
7160
+ Processing by AnonymousController#index as HTML
7161
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7162
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute_attributes"=>"value"}}
7163
+ Rendered text template (0.0ms)
7164
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7165
+  (0.0ms) rollback transaction
7166
+  (0.0ms) begin transaction
7167
+ Processing by AnonymousController#index as HTML
7168
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7169
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute_attributes"=>"value"}}
7170
+ Rendered text template (0.0ms)
7171
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7172
+  (0.0ms) rollback transaction
7173
+  (0.0ms) begin transaction
7174
+ Processing by AnonymousController#index as HTML
7175
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7176
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7177
+ Rendered text template (0.0ms)
7178
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
7179
+  (0.0ms) rollback transaction
7180
+  (0.0ms) begin transaction
7181
+ Processing by AnonymousController#index as HTML
7182
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"abc"}}
7183
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute"=>"123"}}
7184
+ Rendered text template (0.0ms)
7185
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
7186
+  (0.0ms) rollback transaction
7187
+  (0.0ms) begin transaction
7188
+ Processing by AnonymousController#index as HTML
7189
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7190
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute"=>"value"}}
7191
+ Rendered text template (0.0ms)
7192
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7193
+  (0.0ms) rollback transaction
7194
+  (0.0ms) begin transaction
7195
+ Processing by AnonymousController#index as HTML
7196
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7197
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7198
+ Rendered text template (0.0ms)
7199
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
7200
+  (0.0ms) rollback transaction
7201
+  (0.0ms) begin transaction
7202
+ Processing by AnonymousController#index as HTML
7203
+ Parameters: {"array"=>[{"shallowObject"=>{"nestedAttribute"=>"value"}}]}
7204
+ SnakeEyes Parameters: {"array"=>[{"shallow_object"=>{"nested_attribute"=>"value"}}]}
7205
+ Rendered text template (0.0ms)
7206
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
7207
+  (0.0ms) rollback transaction
7208
+  (0.0ms) begin transaction
7209
+ Processing by AnonymousController#index as HTML
7210
+ Parameters: {"array"=>[{"shallowObject"=>{"nestedAttribute"=>"abc"}}]}
7211
+ SnakeEyes Parameters: {"array"=>[{"shallow_object"=>{"nested_attribute"=>"123"}}]}
7212
+ Rendered text template (0.0ms)
7213
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7214
+  (0.0ms) rollback transaction
7215
+  (0.0ms) begin transaction
7216
+ Processing by AnonymousController#index as HTML
7217
+ Parameters: {"string"=>"abc"}
7218
+ SnakeEyes Parameters: {"string"=>"123"}
7219
+ Rendered text template (0.0ms)
7220
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
7221
+  (0.1ms) rollback transaction
7222
+  (0.0ms) begin transaction
7223
+ Processing by AnonymousController#index as HTML
7224
+ Parameters: {"string"=>"cde"}
7225
+ SnakeEyes Parameters: {"string"=>"456"}
7226
+ Rendered text template (0.0ms)
7227
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7228
+  (0.0ms) rollback transaction
7229
+  (0.0ms) begin transaction
7230
+ Processing by AnonymousController#index as HTML
7231
+ Parameters: {"string"=>"string"}
7232
+ SnakeEyes Parameters: {"string"=>"string"}
7233
+ Rendered text template (0.0ms)
7234
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7235
+  (0.1ms) rollback transaction
7236
+  (0.0ms) begin transaction
7237
+ Processing by AnonymousController#index as HTML
7238
+ Parameters: {"string"=>"abc"}
7239
+ SnakeEyes Parameters: {"string"=>"123"}
7240
+ Rendered text template (0.0ms)
7241
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
7242
+  (0.0ms) rollback transaction
7243
+  (0.0ms) begin transaction
7244
+ Processing by AnonymousController#index as HTML
7245
+ Parameters: {"string"=>"string"}
7246
+ SnakeEyes Parameters: {"string"=>"string"}
7247
+ Rendered text template (0.0ms)
7248
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
7249
+  (0.0ms) rollback transaction
7250
+  (0.4ms) begin transaction
7251
+ Processing by AnonymousController#index as HTML
7252
+ Parameters: {"array"=>[{"shallowObject"=>{"nestedAttribute"=>"value"}}]}
7253
+ SnakeEyes Parameters: {"array"=>[{"shallow_object"=>{"nested_attribute"=>"value"}}]}
7254
+ Rendered text template (0.0ms)
7255
+ Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms)
7256
+  (0.1ms) rollback transaction
7257
+  (0.0ms) begin transaction
7258
+ Processing by AnonymousController#index as HTML
7259
+ Parameters: {"array"=>[{"shallowObject"=>{"nestedAttribute"=>"abc"}}]}
7260
+ SnakeEyes Parameters: {"array"=>[{"shallow_object"=>{"nested_attribute"=>"123"}}]}
7261
+ Rendered text template (0.0ms)
7262
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7263
+  (0.0ms) rollback transaction
7264
+  (0.0ms) begin transaction
7265
+ Processing by AnonymousController#index as HTML
7266
+ Parameters: {"string"=>"abc"}
7267
+ SnakeEyes Parameters: {"string"=>"123"}
7268
+ Rendered text template (0.0ms)
7269
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7270
+  (0.0ms) rollback transaction
7271
+  (0.0ms) begin transaction
7272
+ Processing by AnonymousController#index as HTML
7273
+ Parameters: {"string"=>"string"}
7274
+ SnakeEyes Parameters: {"string"=>"string"}
7275
+ Rendered text template (0.0ms)
7276
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7277
+  (0.0ms) rollback transaction
7278
+  (0.0ms) begin transaction
7279
+ Processing by AnonymousController#index as HTML
7280
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7281
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7282
+ Rendered text template (0.0ms)
7283
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7284
+  (0.0ms) rollback transaction
7285
+  (0.0ms) begin transaction
7286
+ Processing by AnonymousController#index as HTML
7287
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7288
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7289
+ Rendered text template (0.0ms)
7290
+ Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)
7291
+  (0.0ms) rollback transaction
7292
+  (0.0ms) begin transaction
7293
+ Processing by AnonymousController#index as HTML
7294
+ Parameters: {"string"=>"string"}
7295
+ SnakeEyes Parameters: {"string"=>"string"}
7296
+ Rendered text template (0.0ms)
7297
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
7298
+  (0.0ms) rollback transaction
7299
+  (0.0ms) begin transaction
7300
+ Processing by AnonymousController#index as HTML
7301
+ Parameters: {"string"=>"cde"}
7302
+ SnakeEyes Parameters: {"string"=>"456"}
7303
+ Rendered text template (0.0ms)
7304
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7305
+  (0.0ms) rollback transaction
7306
+  (0.0ms) begin transaction
7307
+ Processing by AnonymousController#index as HTML
7308
+ Parameters: {"string"=>"abc"}
7309
+ SnakeEyes Parameters: {"string"=>"123"}
7310
+ Rendered text template (0.0ms)
7311
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7312
+  (0.0ms) rollback transaction
7313
+  (0.0ms) begin transaction
7314
+ Processing by AnonymousController#index as HTML
7315
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7316
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute"=>"value"}}
7317
+ Rendered text template (0.0ms)
7318
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
7319
+  (0.0ms) rollback transaction
7320
+  (0.0ms) begin transaction
7321
+ Processing by AnonymousController#index as HTML
7322
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"abc"}}
7323
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute"=>"123"}}
7324
+ Rendered text template (0.0ms)
7325
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7326
+  (0.0ms) rollback transaction
7327
+  (0.0ms) begin transaction
7328
+ Processing by AnonymousController#index as HTML
7329
+ Parameters: {"integer"=>"3", "string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}, "arrayOfObjects"=>[{"name"=>"object1"}, {"name"=>"object2"}, {"name"=>"object3"}], "complexObject"=>{"nestedObject"=>{"deeperNestedObject"=>{"name"=>"deeplyNested"}}, "anotherNestedObject"=>{"deeperNestedObject"=>{"name"=>"anotherDeeplyNested", "deepestNestedObject"=>{"name"=>"deeplyNested"}}}}, "arrayOfNestedObjects"=>[{"level"=>"1", "children"=>[{"index"=>"1"}, {"index"=>"2"}, {"index"=>"3"}]}, {"level"=>"1", "parent"=>{"index"=>"1"}}]}
7330
+ SnakeEyes Parameters: {"integer"=>"3", "string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}, "array_of_objects"=>[{"name"=>"object1"}, {"name"=>"object2"}, {"name"=>"object3"}], "complex_object"=>{"nested_object"=>{"deeper_nested_object"=>{"name"=>"deeplyNested"}}, "another_nested_object"=>{"deeper_nested_object"=>{"name"=>"anotherDeeplyNested", "deepest_nested_object"=>{"name"=>"deeplyNested"}}}}, "array_of_nested_objects"=>[{"level"=>"1", "children"=>[{"index"=>"1"}, {"index"=>"2"}, {"index"=>"3"}]}, {"level"=>"1", "parent"=>{"index"=>"1"}}]}
7331
+ Rendered text template (0.0ms)
7332
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
7333
+  (0.0ms) rollback transaction
7334
+  (0.0ms) begin transaction
7335
+ Processing by AnonymousController#index as HTML
7336
+ Rendered text template (0.0ms)
7337
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
7338
+  (0.0ms) rollback transaction
7339
+  (0.0ms) begin transaction
7340
+ Processing by AnonymousController#index as HTML
7341
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7342
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute_attributes"=>"value"}}
7343
+ Rendered text template (0.0ms)
7344
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7345
+  (0.0ms) rollback transaction
7346
+  (0.0ms) begin transaction
7347
+ Processing by AnonymousController#index as HTML
7348
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7349
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute_attributes"=>"value"}}
7350
+ Rendered text template (0.0ms)
7351
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
7352
+  (0.0ms) rollback transaction
7353
+  (0.1ms) begin transaction
7354
+ Processing by AnonymousController#index as HTML
7355
+ Parameters: {"string"=>"string"}
7356
+ SnakeEyes Parameters: {"string_attributes"=>"string"}
7357
+ Rendered text template (0.0ms)
7358
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7359
+  (0.0ms) rollback transaction
7360
+  (0.1ms) begin transaction
7361
+ Processing by AnonymousController#index as HTML
7362
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7363
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute"=>"value"}}
7364
+ Rendered text template (0.0ms)
7365
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7366
+  (0.0ms) rollback transaction
7367
+  (0.0ms) begin transaction
7368
+ Processing by AnonymousController#index as HTML
7369
+ Parameters: {"array"=>[{"string"=>"string"}, {"string"=>"string2"}]}
7370
+ SnakeEyes Parameters: {"array"=>[{"string_attributes"=>"string"}, {"string_attributes"=>"string2"}]}
7371
+ Rendered text template (0.0ms)
7372
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7373
+  (0.0ms) rollback transaction
7374
+  (0.0ms) begin transaction
7375
+ Processing by AnonymousController#index as HTML
7376
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7377
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7378
+ Rendered text template (0.0ms)
7379
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
7380
+  (0.0ms) rollback transaction
7381
+  (0.0ms) begin transaction
7382
+ Processing by AnonymousController#index as HTML
7383
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7384
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7385
+ Rendered text template (0.0ms)
7386
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
7387
+  (0.0ms) rollback transaction
7388
+  (0.0ms) begin transaction
7389
+ Processing by AnonymousController#index as HTML
7390
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7391
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute_attributes"=>"value"}}
7392
+ Rendered text template (0.0ms)
7393
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7394
+  (0.0ms) rollback transaction
7395
+  (2.6ms) begin transaction
7396
+ Processing by AnonymousController#index as HTML
7397
+ Parameters: {"array"=>[{"string"=>"string"}, {"string"=>"string2"}]}
7398
+ SnakeEyes Parameters: {"array"=>[{"string_attributes"=>"string"}, {"string_attributes"=>"string2"}]}
7399
+ Rendered text template (0.0ms)
7400
+ Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms)
7401
+  (0.0ms) rollback transaction
7402
+  (0.0ms) begin transaction
7403
+ Processing by AnonymousController#index as HTML
7404
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7405
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute_attributes"=>"value"}}
7406
+ Rendered text template (0.0ms)
7407
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
7408
+  (0.0ms) rollback transaction
7409
+  (0.0ms) begin transaction
7410
+ Processing by AnonymousController#index as HTML
7411
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7412
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute"=>"value"}}
7413
+ Rendered text template (0.0ms)
7414
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
7415
+  (0.0ms) rollback transaction
7416
+  (0.0ms) begin transaction
7417
+ Processing by AnonymousController#index as HTML
7418
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7419
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7420
+ Rendered text template (0.0ms)
7421
+ Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)
7422
+  (0.1ms) rollback transaction
7423
+  (0.0ms) begin transaction
7424
+ Processing by AnonymousController#index as HTML
7425
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7426
+ SnakeEyes Parameters: {"shallow_object_attributes"=>{"nested_attribute_attributes"=>"value"}}
7427
+ Rendered text template (0.0ms)
7428
+ Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms)
7429
+  (0.1ms) rollback transaction
7430
+  (0.0ms) begin transaction
7431
+ Processing by AnonymousController#index as HTML
7432
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7433
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7434
+ Rendered text template (0.0ms)
7435
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7436
+  (0.0ms) rollback transaction
7437
+  (0.0ms) begin transaction
7438
+ Processing by AnonymousController#index as HTML
7439
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7440
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute_attributes"=>"value"}}
7441
+ Rendered text template (0.0ms)
7442
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7443
+  (0.0ms) rollback transaction
7444
+  (0.0ms) begin transaction
7445
+ Processing by AnonymousController#index as HTML
7446
+ Parameters: {"string"=>"string"}
7447
+ SnakeEyes Parameters: {"string_attributes"=>"string"}
7448
+ Rendered text template (0.0ms)
7449
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7450
+  (0.0ms) rollback transaction
7451
+  (0.0ms) begin transaction
7452
+ Processing by AnonymousController#index as HTML
7453
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7454
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7455
+ Rendered text template (0.0ms)
7456
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7457
+  (0.0ms) rollback transaction
7458
+  (0.0ms) begin transaction
7459
+ Processing by AnonymousController#index as HTML
7460
+ Parameters: {"string"=>"abc"}
7461
+ SnakeEyes Parameters: {"string"=>"123"}
7462
+ Rendered text template (0.0ms)
7463
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7464
+  (0.0ms) rollback transaction
7465
+  (0.0ms) begin transaction
7466
+ Processing by AnonymousController#index as HTML
7467
+ Parameters: {"string"=>"string"}
7468
+ SnakeEyes Parameters: {"string"=>"string"}
7469
+ Rendered text template (0.0ms)
7470
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7471
+  (0.0ms) rollback transaction
7472
+  (0.0ms) begin transaction
7473
+ Processing by AnonymousController#index as HTML
7474
+ Parameters: {"string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}}
7475
+ SnakeEyes Parameters: {"string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}}
7476
+ Rendered text template (0.0ms)
7477
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
7478
+  (0.0ms) rollback transaction
7479
+  (0.0ms) begin transaction
7480
+ Processing by AnonymousController#index as HTML
7481
+ Parameters: {"string"=>"string"}
7482
+ SnakeEyes Parameters: {"string"=>"string"}
7483
+ Rendered text template (0.0ms)
7484
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7485
+  (0.1ms) rollback transaction
7486
+  (0.0ms) begin transaction
7487
+ Processing by AnonymousController#index as HTML
7488
+ Parameters: {"string"=>"abc"}
7489
+ SnakeEyes Parameters: {"string"=>"123"}
7490
+ Rendered text template (0.0ms)
7491
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7492
+  (0.0ms) rollback transaction
7493
+  (0.0ms) begin transaction
7494
+ Processing by AnonymousController#index as HTML
7495
+ Parameters: {"string"=>"cde"}
7496
+ SnakeEyes Parameters: {"string"=>"456"}
7497
+ Rendered text template (0.0ms)
7498
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7499
+  (0.0ms) rollback transaction
7500
+  (0.0ms) begin transaction
7501
+ Processing by AnonymousController#index as HTML
7502
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"value"}}
7503
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute"=>"value"}}
7504
+ Rendered text template (0.0ms)
7505
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
7506
+  (0.0ms) rollback transaction
7507
+  (0.0ms) begin transaction
7508
+ Processing by AnonymousController#index as HTML
7509
+ Parameters: {"shallowObject"=>{"nestedAttribute"=>"abc"}}
7510
+ SnakeEyes Parameters: {"shallow_object"=>{"nested_attribute"=>"123"}}
7511
+ Rendered text template (0.0ms)
7512
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7513
+  (0.0ms) rollback transaction
7514
+  (0.0ms) begin transaction
7515
+ Processing by AnonymousController#index as HTML
7516
+ Parameters: {"array"=>[{"shallowObject"=>{"nestedAttribute"=>"value"}}]}
7517
+ SnakeEyes Parameters: {"array"=>[{"shallow_object"=>{"nested_attribute"=>"value"}}]}
7518
+ Rendered text template (0.0ms)
7519
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
7520
+  (0.0ms) rollback transaction
7521
+  (0.0ms) begin transaction
7522
+ Processing by AnonymousController#index as HTML
7523
+ Parameters: {"array"=>[{"shallowObject"=>{"nestedAttribute"=>"abc"}}]}
7524
+ SnakeEyes Parameters: {"array"=>[{"shallow_object"=>{"nested_attribute"=>"123"}}]}
7525
+ Rendered text template (0.0ms)
7526
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7527
+  (0.0ms) rollback transaction
7528
+  (0.0ms) begin transaction
7529
+ Processing by AnonymousController#index as HTML
7530
+ Parameters: {"integer"=>"3", "string"=>"string", "boolean"=>true, "simpleArray"=>["0", "1", "2"], "shallowObject"=>{"nestedAttribute"=>"value"}, "arrayOfObjects"=>[{"name"=>"object1"}, {"name"=>"object2"}, {"name"=>"object3"}], "complexObject"=>{"nestedObject"=>{"deeperNestedObject"=>{"name"=>"deeplyNested"}}, "anotherNestedObject"=>{"deeperNestedObject"=>{"name"=>"anotherDeeplyNested", "deepestNestedObject"=>{"name"=>"deeplyNested"}}}}, "arrayOfNestedObjects"=>[{"level"=>"1", "children"=>[{"index"=>"1"}, {"index"=>"2"}, {"index"=>"3"}]}, {"level"=>"1", "parent"=>{"index"=>"1"}}]}
7531
+ SnakeEyes Parameters: {"integer"=>"3", "string"=>"string", "boolean"=>true, "simple_array"=>["0", "1", "2"], "shallow_object"=>{"nested_attribute"=>"value"}, "array_of_objects"=>[{"name"=>"object1"}, {"name"=>"object2"}, {"name"=>"object3"}], "complex_object"=>{"nested_object"=>{"deeper_nested_object"=>{"name"=>"deeplyNested"}}, "another_nested_object"=>{"deeper_nested_object"=>{"name"=>"anotherDeeplyNested", "deepest_nested_object"=>{"name"=>"deeplyNested"}}}}, "array_of_nested_objects"=>[{"level"=>"1", "children"=>[{"index"=>"1"}, {"index"=>"2"}, {"index"=>"3"}]}, {"level"=>"1", "parent"=>{"index"=>"1"}}]}
7532
+ Rendered text template (0.0ms)
7533
+ Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.0ms)
7534
+  (0.0ms) rollback transaction
7535
+  (0.0ms) begin transaction
7536
+ Processing by AnonymousController#index as HTML
7537
+ Rendered text template (0.0ms)
7538
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
7539
+  (0.0ms) rollback transaction
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snake-eyes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleck Greenham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-16 00:00:00.000000000 Z
11
+ date: 2019-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.2.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.5
27
27
  - !ruby/object:Gem::Dependency
@@ -155,49 +155,49 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.2.2
158
+ rubygems_version: 2.5.2.1
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Automatically convert params in your controllers from camel case to snake
162
162
  case
163
163
  test_files:
164
+ - spec/spec_helper.rb
165
+ - spec/dummy/app/controllers/application_controller.rb
166
+ - spec/dummy/app/views/layouts/application.html.erb
164
167
  - spec/dummy/app/assets/javascripts/application.js
165
168
  - spec/dummy/app/assets/stylesheets/application.css
166
- - spec/dummy/app/controllers/application_controller.rb
167
169
  - spec/dummy/app/helpers/application_helper.rb
168
- - spec/dummy/app/views/layouts/application.html.erb
169
- - spec/dummy/bin/bundle
170
- - spec/dummy/bin/rails
171
170
  - spec/dummy/bin/rake
172
171
  - spec/dummy/bin/setup
173
- - spec/dummy/config/application.rb
174
- - spec/dummy/config/boot.rb
175
- - spec/dummy/config/database.yml
176
- - spec/dummy/config/environment.rb
177
- - spec/dummy/config/environments/development.rb
172
+ - spec/dummy/bin/bundle
173
+ - spec/dummy/bin/rails
174
+ - spec/dummy/config/secrets.yml
175
+ - spec/dummy/config/routes.rb
176
+ - spec/dummy/config/locales/en.yml
178
177
  - spec/dummy/config/environments/production.rb
178
+ - spec/dummy/config/environments/development.rb
179
179
  - spec/dummy/config/environments/test.rb
180
- - spec/dummy/config/initializers/assets.rb
180
+ - spec/dummy/config/environment.rb
181
+ - spec/dummy/config/application.rb
182
+ - spec/dummy/config/database.yml
183
+ - spec/dummy/config/boot.rb
181
184
  - spec/dummy/config/initializers/backtrace_silencers.rb
182
- - spec/dummy/config/initializers/cookies_serializer.rb
183
- - spec/dummy/config/initializers/filter_parameter_logging.rb
184
- - spec/dummy/config/initializers/inflections.rb
185
185
  - spec/dummy/config/initializers/mime_types.rb
186
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
186
187
  - spec/dummy/config/initializers/session_store.rb
187
188
  - spec/dummy/config/initializers/wrap_parameters.rb
188
- - spec/dummy/config/locales/en.yml
189
- - spec/dummy/config/routes.rb
190
- - spec/dummy/config/secrets.yml
189
+ - spec/dummy/config/initializers/assets.rb
190
+ - spec/dummy/config/initializers/cookies_serializer.rb
191
+ - spec/dummy/config/initializers/inflections.rb
191
192
  - spec/dummy/config.ru
192
- - spec/dummy/db/test.sqlite3
193
- - spec/dummy/log/test.log
194
- - spec/dummy/public/404.html
193
+ - spec/dummy/Rakefile
194
+ - spec/dummy/public/favicon.ico
195
195
  - spec/dummy/public/422.html
196
196
  - spec/dummy/public/500.html
197
- - spec/dummy/public/favicon.ico
198
- - spec/dummy/Rakefile
197
+ - spec/dummy/public/404.html
198
+ - spec/dummy/db/test.sqlite3
199
+ - spec/dummy/log/test.log
199
200
  - spec/dummy/README.rdoc
200
201
  - spec/nested_attributes_spec.rb
201
202
  - spec/params_spec.rb
202
- - spec/spec_helper.rb
203
203
  - spec/substitutions_spec.rb