peck-on-rails 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/peck_on_rails.rb +4 -2
- metadata +6 -6
data/lib/peck_on_rails.rb
CHANGED
|
@@ -211,7 +211,9 @@ class Peck
|
|
|
211
211
|
HELPER_RE = /Helper$/
|
|
212
212
|
|
|
213
213
|
def self.context_type_for_subject(context, subject)
|
|
214
|
-
if subject
|
|
214
|
+
if subject.nil?
|
|
215
|
+
:plain
|
|
216
|
+
elsif subject < ActionController::Base
|
|
215
217
|
:controller
|
|
216
218
|
elsif subject < ActiveRecord::Base
|
|
217
219
|
:model
|
|
@@ -226,7 +228,7 @@ class Peck
|
|
|
226
228
|
context_type =
|
|
227
229
|
context_type_for_description(context, subject) ||
|
|
228
230
|
context_type_for_subject(context, subject)
|
|
229
|
-
Peck.log("Using `#{context_type}' as context type for `#{subject.name}'")
|
|
231
|
+
Peck.log("Using `#{context_type}' as context type for `#{subject.respond_to?(:name) ? subject.name : subject}'")
|
|
230
232
|
context_type
|
|
231
233
|
end
|
|
232
234
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: peck-on-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-07-
|
|
12
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: peck
|
|
@@ -32,17 +32,17 @@ dependencies:
|
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
33
33
|
none: false
|
|
34
34
|
requirements:
|
|
35
|
-
- -
|
|
35
|
+
- - ! '>='
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
|
-
version:
|
|
37
|
+
version: '0'
|
|
38
38
|
type: :development
|
|
39
39
|
prerelease: false
|
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
41
|
none: false
|
|
42
42
|
requirements:
|
|
43
|
-
- -
|
|
43
|
+
- - ! '>='
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version:
|
|
45
|
+
version: '0'
|
|
46
46
|
description: ! ' Peck-On-Rails is an extension for Peck to make testing Rails easier.
|
|
47
47
|
|
|
48
48
|
'
|