rock_motive 1.0.0.beta2 → 1.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rock_motive/context.rb +32 -8
- data/lib/rock_motive/version.rb +1 -1
- data/test/dummy/app/roles/fake/pigeon_role.rb +5 -0
- data/test/dummy/log/test.log +795 -0
- data/test/rock_motive/context_test.rb +30 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b543ff62271096cca68859c3078476e6d258a88
|
4
|
+
data.tar.gz: 49daeb058eaa556f659afcaefd673f29115a2044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0b41603b71be41d8bf227ce390ff128a3e8456d1fe1129cc7278e27c2b0f773eba3a3399706c35b135c266faf2026fd343ac94e634cfa29769fb63ffbcaf475
|
7
|
+
data.tar.gz: 93b6b53633ce71cf438b469755b2f2ff3ee918612e5d0fe6283d74939941e7cf2f9ee0528e1fb0c61d7b27889995ad206e96ec91cd52fd67604569fdc159d4c5
|
data/lib/rock_motive/context.rb
CHANGED
@@ -9,6 +9,33 @@ class RockMotive::Context
|
|
9
9
|
new.execute(*args)
|
10
10
|
end
|
11
11
|
|
12
|
+
def scopes
|
13
|
+
@scopes ||= name.to_s.split('::').inject(['']) do |scopes, ns|
|
14
|
+
scopes + ["#{scopes.last}::#{ns}"]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def scope(*nss)
|
19
|
+
nss.each do |ns|
|
20
|
+
scopes.push(ns.to_s.classify)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def actors
|
25
|
+
@actors ||= []
|
26
|
+
end
|
27
|
+
|
28
|
+
def get_role_by_name(name)
|
29
|
+
role_name = name.to_s.classify
|
30
|
+
|
31
|
+
const = scopes.inject(nil) do |c, ns|
|
32
|
+
name = "#{ns}::#{role_name}"
|
33
|
+
(name.safe_constantize || "#{name}Role".safe_constantize) || c
|
34
|
+
end
|
35
|
+
|
36
|
+
(const.is_a?(Module) && !const.is_a?(Class)) ? const : nil
|
37
|
+
end
|
38
|
+
|
12
39
|
private
|
13
40
|
|
14
41
|
def method_added(method_name)
|
@@ -29,11 +56,16 @@ class RockMotive::Context
|
|
29
56
|
end
|
30
57
|
|
31
58
|
def roles_by_execute_method
|
59
|
+
@actors = []
|
60
|
+
|
32
61
|
for_args = []
|
33
62
|
for_keywords = {}
|
34
63
|
|
35
64
|
execute_method.parameters.each do |param|
|
36
65
|
type, name = *param
|
66
|
+
|
67
|
+
@actors << name.to_s.to_sym
|
68
|
+
|
37
69
|
case type
|
38
70
|
when :req, :opt
|
39
71
|
for_args << get_role_by_name(name)
|
@@ -45,14 +77,6 @@ class RockMotive::Context
|
|
45
77
|
[for_args, for_keywords]
|
46
78
|
end
|
47
79
|
|
48
|
-
def get_role_by_name(name)
|
49
|
-
role_name = name.to_s.classify
|
50
|
-
|
51
|
-
const = role_name.safe_constantize || "#{role_name}Role".safe_constantize
|
52
|
-
|
53
|
-
(const.is_a?(Module) && !const.is_a?(Class)) ? const : nil
|
54
|
-
end
|
55
|
-
|
56
80
|
def override_execute_method(for_args, for_keywords)
|
57
81
|
method_definition = ['def execute_with_roles(*args, &block)']
|
58
82
|
method_definition << 'kv = args.last'
|
data/lib/rock_motive/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -2081,5 +2081,800 @@ RockMotive::ContextTest: test_#execute_with_extend
|
|
2081
2081
|
[1m[35m (0.0ms)[0m begin transaction
|
2082
2082
|
--------------------------
|
2083
2083
|
RockMotiveTest: test_truth
|
2084
|
+
--------------------------
|
2085
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2086
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2087
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2088
|
+
------------------------------------------------------------
|
2089
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2090
|
+
------------------------------------------------------------
|
2091
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2092
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2093
|
+
--------------------------------------------------
|
2094
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2095
|
+
--------------------------------------------------
|
2096
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2097
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2098
|
+
--------------------------------------
|
2099
|
+
RockMotive::ContextTest: test_.execute
|
2100
|
+
--------------------------------------
|
2101
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2102
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2103
|
+
----------------------------------------------------
|
2104
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2105
|
+
----------------------------------------------------
|
2106
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2107
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2108
|
+
------------------------------------------------------
|
2109
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2110
|
+
------------------------------------------------------
|
2111
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2112
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2113
|
+
--------------------------
|
2114
|
+
RockMotiveTest: test_truth
|
2115
|
+
--------------------------
|
2116
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2117
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2118
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2119
|
+
----------------------------------------------------
|
2120
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2121
|
+
----------------------------------------------------
|
2122
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2123
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2124
|
+
------------------------------------------------------------
|
2125
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2126
|
+
------------------------------------------------------------
|
2127
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2128
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2129
|
+
--------------------------------------
|
2130
|
+
RockMotive::ContextTest: test_.execute
|
2131
|
+
--------------------------------------
|
2132
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2133
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2134
|
+
------------------------------------------------------
|
2135
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2136
|
+
------------------------------------------------------
|
2137
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2138
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2139
|
+
--------------------------------------------------
|
2140
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2141
|
+
--------------------------------------------------
|
2142
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2143
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2144
|
+
--------------------------
|
2145
|
+
RockMotiveTest: test_truth
|
2146
|
+
--------------------------
|
2147
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2148
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2149
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2150
|
+
------------------------------------------------------
|
2151
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2152
|
+
------------------------------------------------------
|
2153
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2154
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2155
|
+
--------------------------------------
|
2156
|
+
RockMotive::ContextTest: test_.execute
|
2157
|
+
--------------------------------------
|
2158
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2159
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2160
|
+
----------------------------------------------------
|
2161
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2162
|
+
----------------------------------------------------
|
2163
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2164
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2165
|
+
--------------------------------------------------
|
2166
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2167
|
+
--------------------------------------------------
|
2168
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2169
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2170
|
+
------------------------------------------------------------
|
2171
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2172
|
+
------------------------------------------------------------
|
2173
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2174
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2175
|
+
--------------------------
|
2176
|
+
RockMotiveTest: test_truth
|
2177
|
+
--------------------------
|
2178
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2179
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2180
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2181
|
+
--------------------------
|
2182
|
+
RockMotiveTest: test_truth
|
2183
|
+
--------------------------
|
2184
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2185
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2186
|
+
--------------------------------------
|
2187
|
+
RockMotive::ContextTest: test_.execute
|
2188
|
+
--------------------------------------
|
2189
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2190
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2191
|
+
------------------------------------------------------------
|
2192
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2193
|
+
------------------------------------------------------------
|
2194
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2195
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2196
|
+
------------------------------------------------------
|
2197
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2198
|
+
------------------------------------------------------
|
2199
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2200
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2201
|
+
----------------------------------------------------
|
2202
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2203
|
+
----------------------------------------------------
|
2204
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2205
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2206
|
+
--------------------------------------------------
|
2207
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2208
|
+
--------------------------------------------------
|
2209
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2210
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2211
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2212
|
+
--------------------------
|
2213
|
+
RockMotiveTest: test_truth
|
2214
|
+
--------------------------
|
2215
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2216
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2217
|
+
------------------------------------------------------------
|
2218
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2219
|
+
------------------------------------------------------------
|
2220
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2221
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2222
|
+
-------------------------------------
|
2223
|
+
RockMotive::ContextTest: test_.scopes
|
2224
|
+
-------------------------------------
|
2225
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2226
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2227
|
+
--------------------------------------
|
2228
|
+
RockMotive::ContextTest: test_.execute
|
2229
|
+
--------------------------------------
|
2230
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2231
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2232
|
+
--------------------------------------------------
|
2233
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2234
|
+
--------------------------------------------------
|
2235
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2236
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2237
|
+
----------------------------------------------------
|
2238
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2239
|
+
----------------------------------------------------
|
2240
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2241
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2242
|
+
------------------------------------------------------
|
2243
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2244
|
+
------------------------------------------------------
|
2245
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2246
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2247
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2248
|
+
--------------------------------------------------
|
2249
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2250
|
+
--------------------------------------------------
|
2251
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2252
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2253
|
+
------------------------------------------------------------
|
2254
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2255
|
+
------------------------------------------------------------
|
2256
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
2257
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2258
|
+
-------------------------------------
|
2259
|
+
RockMotive::ContextTest: test_.scopes
|
2260
|
+
-------------------------------------
|
2261
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2262
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2263
|
+
------------------------------------------------------
|
2264
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2265
|
+
------------------------------------------------------
|
2266
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2267
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2268
|
+
----------------------------------------------------
|
2269
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2270
|
+
----------------------------------------------------
|
2271
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2272
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2273
|
+
--------------------------------------
|
2274
|
+
RockMotive::ContextTest: test_.execute
|
2275
|
+
--------------------------------------
|
2276
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2277
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2278
|
+
--------------------------
|
2279
|
+
RockMotiveTest: test_truth
|
2280
|
+
--------------------------
|
2281
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2282
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2283
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2284
|
+
------------------------------------------------------------
|
2285
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2286
|
+
------------------------------------------------------------
|
2287
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2288
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2289
|
+
--------------------------------------------------
|
2290
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2291
|
+
--------------------------------------------------
|
2292
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2293
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2294
|
+
-------------------------------------
|
2295
|
+
RockMotive::ContextTest: test_.scopes
|
2296
|
+
-------------------------------------
|
2297
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2298
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2299
|
+
-------------------------------------------------
|
2300
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2301
|
+
-------------------------------------------------
|
2302
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2303
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2304
|
+
--------------------------------------
|
2305
|
+
RockMotive::ContextTest: test_.execute
|
2306
|
+
--------------------------------------
|
2307
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2308
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2309
|
+
----------------------------------------------------
|
2310
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2311
|
+
----------------------------------------------------
|
2312
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2313
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2314
|
+
------------------------------------------------------
|
2315
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2316
|
+
------------------------------------------------------
|
2317
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2318
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2319
|
+
--------------------------
|
2320
|
+
RockMotiveTest: test_truth
|
2321
|
+
--------------------------
|
2322
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2323
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2324
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2325
|
+
--------------------------
|
2326
|
+
RockMotiveTest: test_truth
|
2327
|
+
--------------------------
|
2328
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2329
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2330
|
+
-------------------------------------------------
|
2331
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2332
|
+
-------------------------------------------------
|
2333
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2334
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2335
|
+
------------------------------------------------------------
|
2336
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2337
|
+
------------------------------------------------------------
|
2338
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2339
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2340
|
+
------------------------------------------------------
|
2341
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2342
|
+
------------------------------------------------------
|
2343
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2344
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2345
|
+
-------------------------------------
|
2346
|
+
RockMotive::ContextTest: test_.scopes
|
2347
|
+
-------------------------------------
|
2348
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2349
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2350
|
+
--------------------------------------
|
2351
|
+
RockMotive::ContextTest: test_.execute
|
2352
|
+
--------------------------------------
|
2353
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2354
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2355
|
+
----------------------------------------------------
|
2356
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2357
|
+
----------------------------------------------------
|
2358
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2359
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2360
|
+
--------------------------------------------------
|
2361
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2362
|
+
--------------------------------------------------
|
2363
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2364
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2365
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2366
|
+
--------------------------
|
2367
|
+
RockMotiveTest: test_truth
|
2368
|
+
--------------------------
|
2369
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2370
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2371
|
+
--------------------------------------------------
|
2372
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2373
|
+
--------------------------------------------------
|
2374
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2375
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2376
|
+
----------------------------------------------------
|
2377
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2378
|
+
----------------------------------------------------
|
2379
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2380
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2381
|
+
-------------------------------------------------
|
2382
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2383
|
+
-------------------------------------------------
|
2384
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2385
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2386
|
+
-------------------------------------
|
2387
|
+
RockMotive::ContextTest: test_.scopes
|
2388
|
+
-------------------------------------
|
2389
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2390
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2391
|
+
------------------------------------------------------
|
2392
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2393
|
+
------------------------------------------------------
|
2394
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2395
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2396
|
+
------------------------------------------------------------
|
2397
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2398
|
+
------------------------------------------------------------
|
2399
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2400
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2401
|
+
--------------------------------------
|
2402
|
+
RockMotive::ContextTest: test_.execute
|
2403
|
+
--------------------------------------
|
2404
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2405
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2406
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2407
|
+
----------------------------------------------------
|
2408
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2409
|
+
----------------------------------------------------
|
2410
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2411
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2412
|
+
------------------------------------------------------------
|
2413
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2414
|
+
------------------------------------------------------------
|
2415
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2416
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2417
|
+
--------------------------------------
|
2418
|
+
RockMotive::ContextTest: test_.execute
|
2419
|
+
--------------------------------------
|
2420
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2421
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2422
|
+
-------------------------------------------------
|
2423
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2424
|
+
-------------------------------------------------
|
2425
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2426
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2427
|
+
------------------------------------------------------
|
2428
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2429
|
+
------------------------------------------------------
|
2430
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2431
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2432
|
+
--------------------------------------------------
|
2433
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2434
|
+
--------------------------------------------------
|
2435
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2436
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2437
|
+
-------------------------------------
|
2438
|
+
RockMotive::ContextTest: test_.scopes
|
2439
|
+
-------------------------------------
|
2440
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2441
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2442
|
+
--------------------------
|
2443
|
+
RockMotiveTest: test_truth
|
2444
|
+
--------------------------
|
2445
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2446
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2447
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2448
|
+
--------------------------
|
2449
|
+
RockMotiveTest: test_truth
|
2450
|
+
--------------------------
|
2451
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2452
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2453
|
+
--------------------------------------------------
|
2454
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2455
|
+
--------------------------------------------------
|
2456
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2457
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2458
|
+
------------------------------------------------------------
|
2459
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2460
|
+
------------------------------------------------------------
|
2461
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2462
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2463
|
+
-------------------------------------------------
|
2464
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2465
|
+
-------------------------------------------------
|
2466
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2467
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2468
|
+
-------------------------------------
|
2469
|
+
RockMotive::ContextTest: test_.scopes
|
2470
|
+
-------------------------------------
|
2471
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2472
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2473
|
+
------------------------------------------------------
|
2474
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2475
|
+
------------------------------------------------------
|
2476
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2477
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2478
|
+
----------------------------------------------------
|
2479
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2480
|
+
----------------------------------------------------
|
2481
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2482
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2483
|
+
--------------------------------------
|
2484
|
+
RockMotive::ContextTest: test_.execute
|
2485
|
+
--------------------------------------
|
2486
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2487
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2488
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2489
|
+
----------------------------------------------------
|
2490
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2491
|
+
----------------------------------------------------
|
2492
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2493
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2494
|
+
--------------------------------------------------
|
2495
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2496
|
+
--------------------------------------------------
|
2497
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2498
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2499
|
+
--------------------------------------
|
2500
|
+
RockMotive::ContextTest: test_.execute
|
2501
|
+
--------------------------------------
|
2502
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2503
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2504
|
+
------------------------------------------------------
|
2505
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2506
|
+
------------------------------------------------------
|
2507
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2508
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2509
|
+
-------------------------------------
|
2510
|
+
RockMotive::ContextTest: test_.scopes
|
2511
|
+
-------------------------------------
|
2512
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2513
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2514
|
+
------------------------------------------------------------
|
2515
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2516
|
+
------------------------------------------------------------
|
2517
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2518
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2519
|
+
-------------------------------------------------
|
2520
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2521
|
+
-------------------------------------------------
|
2522
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2523
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2524
|
+
--------------------------
|
2525
|
+
RockMotiveTest: test_truth
|
2526
|
+
--------------------------
|
2527
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2528
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2529
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2530
|
+
--------------------------
|
2531
|
+
RockMotiveTest: test_truth
|
2532
|
+
--------------------------
|
2533
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2534
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2535
|
+
-------------------------------------
|
2536
|
+
RockMotive::ContextTest: test_.scopes
|
2537
|
+
-------------------------------------
|
2538
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2539
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2540
|
+
------------------------------------------------------
|
2541
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2542
|
+
------------------------------------------------------
|
2543
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2544
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2545
|
+
--------------------------------------------------
|
2546
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2547
|
+
--------------------------------------------------
|
2548
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2549
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2550
|
+
--------------------------------------
|
2551
|
+
RockMotive::ContextTest: test_.execute
|
2552
|
+
--------------------------------------
|
2553
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2554
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2555
|
+
------------------------------------------------------------
|
2556
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2557
|
+
------------------------------------------------------------
|
2558
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2559
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2560
|
+
-------------------------------------------------
|
2561
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2562
|
+
-------------------------------------------------
|
2563
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2564
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2565
|
+
----------------------------------------------------
|
2566
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2567
|
+
----------------------------------------------------
|
2568
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2569
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2570
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2571
|
+
--------------------------
|
2572
|
+
RockMotiveTest: test_truth
|
2573
|
+
--------------------------
|
2574
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2575
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2576
|
+
--------------------------------------
|
2577
|
+
RockMotive::ContextTest: test_.execute
|
2578
|
+
--------------------------------------
|
2579
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2580
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2581
|
+
------------------------------------------------------------
|
2582
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2583
|
+
------------------------------------------------------------
|
2584
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2585
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2586
|
+
--------------------------------------------------
|
2587
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2588
|
+
--------------------------------------------------
|
2589
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2590
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2591
|
+
-------------------------------------
|
2592
|
+
RockMotive::ContextTest: test_.scopes
|
2593
|
+
-------------------------------------
|
2594
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2595
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2596
|
+
-------------------------------------------------
|
2597
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2598
|
+
-------------------------------------------------
|
2599
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2600
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2601
|
+
----------------------------------------------------
|
2602
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2603
|
+
----------------------------------------------------
|
2604
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2605
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2606
|
+
------------------------------------------------------
|
2607
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2608
|
+
------------------------------------------------------
|
2609
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2610
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2611
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2612
|
+
--------------------------
|
2613
|
+
RockMotiveTest: test_truth
|
2614
|
+
--------------------------
|
2615
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2616
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2617
|
+
-------------------------------------------------
|
2618
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2619
|
+
-------------------------------------------------
|
2620
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2621
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2622
|
+
------------------------------------------------------
|
2623
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2624
|
+
------------------------------------------------------
|
2625
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2626
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2627
|
+
----------------------------------------------------
|
2628
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2629
|
+
----------------------------------------------------
|
2630
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2631
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2632
|
+
------------------------------------------------------------
|
2633
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2634
|
+
------------------------------------------------------------
|
2635
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2636
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2637
|
+
-------------------------------------
|
2638
|
+
RockMotive::ContextTest: test_.scopes
|
2639
|
+
-------------------------------------
|
2640
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2641
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2642
|
+
--------------------------------------------------
|
2643
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2644
|
+
--------------------------------------------------
|
2645
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2646
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2647
|
+
--------------------------------------
|
2648
|
+
RockMotive::ContextTest: test_.execute
|
2649
|
+
--------------------------------------
|
2650
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2651
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2652
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2653
|
+
-------------------------------------
|
2654
|
+
RockMotive::ContextTest: test_.actors
|
2655
|
+
-------------------------------------
|
2656
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2657
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2658
|
+
----------------------------------------------------
|
2659
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2660
|
+
----------------------------------------------------
|
2661
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2662
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2663
|
+
------------------------------------------------------
|
2664
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2665
|
+
------------------------------------------------------
|
2666
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2667
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2668
|
+
-------------------------------------
|
2669
|
+
RockMotive::ContextTest: test_.scopes
|
2670
|
+
-------------------------------------
|
2671
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2672
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2673
|
+
------------------------------------------------------------
|
2674
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2675
|
+
------------------------------------------------------------
|
2676
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2677
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2678
|
+
-------------------------------------------------
|
2679
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2680
|
+
-------------------------------------------------
|
2681
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2682
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2683
|
+
--------------------------------------
|
2684
|
+
RockMotive::ContextTest: test_.execute
|
2685
|
+
--------------------------------------
|
2686
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2687
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2688
|
+
--------------------------------------------------
|
2689
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2690
|
+
--------------------------------------------------
|
2691
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2692
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2693
|
+
--------------------------
|
2694
|
+
RockMotiveTest: test_truth
|
2695
|
+
--------------------------
|
2696
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2697
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2698
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2699
|
+
-------------------------------------------------
|
2700
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2701
|
+
-------------------------------------------------
|
2702
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2703
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2704
|
+
----------------------------------------------------
|
2705
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2706
|
+
----------------------------------------------------
|
2707
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2708
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2709
|
+
--------------------------------------------------
|
2710
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2711
|
+
--------------------------------------------------
|
2712
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2713
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2714
|
+
------------------------------------------------------
|
2715
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2716
|
+
------------------------------------------------------
|
2717
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2718
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2719
|
+
-------------------------------------
|
2720
|
+
RockMotive::ContextTest: test_.scopes
|
2721
|
+
-------------------------------------
|
2722
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2723
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2724
|
+
------------------------------------------------------------
|
2725
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2726
|
+
------------------------------------------------------------
|
2727
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2728
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2729
|
+
--------------------------------------
|
2730
|
+
RockMotive::ContextTest: test_.execute
|
2731
|
+
--------------------------------------
|
2732
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2733
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2734
|
+
-------------------------------------
|
2735
|
+
RockMotive::ContextTest: test_.actors
|
2736
|
+
-------------------------------------
|
2737
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2738
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2739
|
+
--------------------------
|
2740
|
+
RockMotiveTest: test_truth
|
2741
|
+
--------------------------
|
2742
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2743
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2744
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2745
|
+
-------------------------------------------------
|
2746
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2747
|
+
-------------------------------------------------
|
2748
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2749
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2750
|
+
------------------------------------------------------------
|
2751
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2752
|
+
------------------------------------------------------------
|
2753
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2754
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2755
|
+
--------------------------------------------------
|
2756
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2757
|
+
--------------------------------------------------
|
2758
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2759
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2760
|
+
-------------------------------------
|
2761
|
+
RockMotive::ContextTest: test_.scopes
|
2762
|
+
-------------------------------------
|
2763
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2764
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2765
|
+
-------------------------------------
|
2766
|
+
RockMotive::ContextTest: test_.actors
|
2767
|
+
-------------------------------------
|
2768
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2769
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2770
|
+
--------------------------------------
|
2771
|
+
RockMotive::ContextTest: test_.execute
|
2772
|
+
--------------------------------------
|
2773
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2774
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2775
|
+
------------------------------------------------------
|
2776
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2777
|
+
------------------------------------------------------
|
2778
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2779
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2780
|
+
----------------------------------------------------
|
2781
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2782
|
+
----------------------------------------------------
|
2783
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2784
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2785
|
+
--------------------------
|
2786
|
+
RockMotiveTest: test_truth
|
2787
|
+
--------------------------
|
2788
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2789
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2790
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2791
|
+
--------------------------
|
2792
|
+
RockMotiveTest: test_truth
|
2793
|
+
--------------------------
|
2794
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2795
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2796
|
+
--------------------------------------------------
|
2797
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2798
|
+
--------------------------------------------------
|
2799
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2800
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2801
|
+
----------------------------------------------------
|
2802
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2803
|
+
----------------------------------------------------
|
2804
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2805
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2806
|
+
------------------------------------------------------------
|
2807
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2808
|
+
------------------------------------------------------------
|
2809
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2810
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2811
|
+
-------------------------------------------------
|
2812
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2813
|
+
-------------------------------------------------
|
2814
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2815
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2816
|
+
------------------------------------------------------
|
2817
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2818
|
+
------------------------------------------------------
|
2819
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2820
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2821
|
+
--------------------------------------
|
2822
|
+
RockMotive::ContextTest: test_.execute
|
2823
|
+
--------------------------------------
|
2824
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2825
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2826
|
+
-------------------------------------
|
2827
|
+
RockMotive::ContextTest: test_.actors
|
2828
|
+
-------------------------------------
|
2829
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2830
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2831
|
+
-------------------------------------
|
2832
|
+
RockMotive::ContextTest: test_.scopes
|
2833
|
+
-------------------------------------
|
2834
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2835
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2836
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2837
|
+
--------------------------------------
|
2838
|
+
RockMotive::ContextTest: test_.execute
|
2839
|
+
--------------------------------------
|
2840
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2841
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2842
|
+
-------------------------------------------------
|
2843
|
+
RockMotive::ContextTest: test_#execute_with_scope
|
2844
|
+
-------------------------------------------------
|
2845
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2846
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2847
|
+
----------------------------------------------------
|
2848
|
+
RockMotive::ContextTest: test_.execute_with_override
|
2849
|
+
----------------------------------------------------
|
2850
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2851
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2852
|
+
-------------------------------------
|
2853
|
+
RockMotive::ContextTest: test_.scopes
|
2854
|
+
-------------------------------------
|
2855
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2856
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2857
|
+
-------------------------------------
|
2858
|
+
RockMotive::ContextTest: test_.actors
|
2859
|
+
-------------------------------------
|
2860
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2861
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2862
|
+
--------------------------------------------------
|
2863
|
+
RockMotive::ContextTest: test_#execute_with_extend
|
2864
|
+
--------------------------------------------------
|
2865
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2866
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2867
|
+
------------------------------------------------------------
|
2868
|
+
RockMotive::ContextTest: test_#execute_with_keyword_argument
|
2869
|
+
------------------------------------------------------------
|
2870
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2871
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2872
|
+
------------------------------------------------------
|
2873
|
+
RockMotive::ContextTest: test_#execute_with_unextended
|
2874
|
+
------------------------------------------------------
|
2875
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2876
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2877
|
+
--------------------------
|
2878
|
+
RockMotiveTest: test_truth
|
2084
2879
|
--------------------------
|
2085
2880
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
@@ -10,6 +10,18 @@ class RockMotive::ContextTest < ActiveSupport::TestCase
|
|
10
10
|
assert { context_class_with_override_execute.execute }
|
11
11
|
end
|
12
12
|
|
13
|
+
test '.scopes' do
|
14
|
+
context_class.scope 'hoge'
|
15
|
+
|
16
|
+
assert { RockMotive::Context.scopes.length == 3 }
|
17
|
+
assert { context_class.scopes.length == 2 }
|
18
|
+
end
|
19
|
+
|
20
|
+
test '.actors' do
|
21
|
+
assert { context_class.actors == [] }
|
22
|
+
assert { context_class_with_role.actors == [:pigeon] }
|
23
|
+
end
|
24
|
+
|
13
25
|
test '#execute with extend' do
|
14
26
|
bird = Bird.new(name: 'hato')
|
15
27
|
|
@@ -34,6 +46,14 @@ class RockMotive::ContextTest < ActiveSupport::TestCase
|
|
34
46
|
assert { bird.singleton_class.ancestors.exclude?(PigeonRole) }
|
35
47
|
end
|
36
48
|
|
49
|
+
test '#execute with scope' do
|
50
|
+
bird = Bird.new(name: 'hato')
|
51
|
+
|
52
|
+
context_class_with_scope.execute(bird)
|
53
|
+
|
54
|
+
assert { bird.singleton_class.ancestors.exclude?(Fake::PigeonRole) }
|
55
|
+
end
|
56
|
+
|
37
57
|
private
|
38
58
|
|
39
59
|
def context_class
|
@@ -60,6 +80,16 @@ class RockMotive::ContextTest < ActiveSupport::TestCase
|
|
60
80
|
end
|
61
81
|
end
|
62
82
|
|
83
|
+
def context_class_with_scope
|
84
|
+
@context_class_with_scope ||= Class.new(RockMotive::Context) do
|
85
|
+
scope 'fake'
|
86
|
+
|
87
|
+
def execute(pigeon)
|
88
|
+
pigeon.fly
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
63
93
|
# rubocop:disable all
|
64
94
|
def context_class_with_keyword
|
65
95
|
@context_class_with_keyword ||= Class.new(RockMotive::Context) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rock_motive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- test/dummy/app/controllers/application_controller.rb
|
172
172
|
- test/dummy/app/helpers/application_helper.rb
|
173
173
|
- test/dummy/app/models/bird.rb
|
174
|
+
- test/dummy/app/roles/fake/pigeon_role.rb
|
174
175
|
- test/dummy/app/roles/pigeon_role.rb
|
175
176
|
- test/dummy/app/views/layouts/application.html.erb
|
176
177
|
- test/dummy/bin/bundle
|
@@ -238,6 +239,7 @@ test_files:
|
|
238
239
|
- test/dummy/app/controllers/application_controller.rb
|
239
240
|
- test/dummy/app/helpers/application_helper.rb
|
240
241
|
- test/dummy/app/models/bird.rb
|
242
|
+
- test/dummy/app/roles/fake/pigeon_role.rb
|
241
243
|
- test/dummy/app/roles/pigeon_role.rb
|
242
244
|
- test/dummy/app/views/layouts/application.html.erb
|
243
245
|
- test/dummy/bin/bundle
|