testspace 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/lib/testspace.rb +0 -1
- data/lib/testspace/rspec/metadata.rb +11 -2
- data/lib/testspace/rspec/metadata/extensions/description/anonymous.rb +7 -0
- data/lib/testspace/rspec/metadata/extensions/description/general.rb +8 -2
- data/testspace.gemspec +1 -6
- metadata +3 -3
- data/lib/testspace/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51e4136cd4023d3388623d55a1b95632ea9794f
|
4
|
+
data.tar.gz: b1ca8f35f8973ac8f63508719058efcb341e2165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcbc0a549df091aac62645b0b41ab633b797418487f7d48830d60366e73081b4379c61ec38221ee0a325e1229de6116ef4e0ba8c701dc74066ae4ae0bf62da85
|
7
|
+
data.tar.gz: d5c5b6f4574dea5e41c3a868eff3f5dab008f8b1556d4bb82089f677b232bbe4c2c47f541a90175e7683fafdd9f2172f9fb865926329f6cb3a092e2a296bbf14
|
data/lib/testspace.rb
CHANGED
@@ -16,12 +16,21 @@ module Testspace::Rspec
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
def root?
|
20
|
+
!parent
|
21
|
+
end
|
22
|
+
|
19
23
|
def root
|
20
|
-
@root ||=
|
24
|
+
@root ||= root? ? self : parent.root
|
21
25
|
end
|
22
26
|
|
23
27
|
def dir
|
24
|
-
@dir ||=
|
28
|
+
@dir ||= begin
|
29
|
+
a = []
|
30
|
+
a << (root? ? root_dir : parent.dir)
|
31
|
+
a << local_dir
|
32
|
+
a.compact.join('/')
|
33
|
+
end
|
25
34
|
end
|
26
35
|
|
27
36
|
def description_arg
|
@@ -1,9 +1,15 @@
|
|
1
1
|
module Testspace::Rspec::Metadata::Extensions::Description
|
2
2
|
module General
|
3
|
+
def root_dir
|
4
|
+
@root_dir ||= "#{::Dir.pwd}/spec/features"
|
5
|
+
end
|
6
|
+
|
3
7
|
def local_dir
|
4
8
|
@local_dir ||= begin
|
5
|
-
s = description_arg
|
6
|
-
|
9
|
+
s = description_arg
|
10
|
+
.gsub(/\s+/, '_')
|
11
|
+
.downcase
|
12
|
+
root.is_a?(General) ? s : '-' + s
|
7
13
|
end
|
8
14
|
end
|
9
15
|
end
|
data/testspace.gemspec
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'testspace/version'
|
5
|
-
|
6
1
|
Gem::Specification.new do |spec|
|
7
2
|
spec.name = "testspace"
|
8
|
-
spec.version =
|
3
|
+
spec.version = "0.1.4"
|
9
4
|
spec.authors = ["mosop"]
|
10
5
|
spec.email = ["mosop@a.b.com"]
|
11
6
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mosop
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: quir
|
@@ -101,13 +101,13 @@ files:
|
|
101
101
|
- lib/testspace/modules.rb
|
102
102
|
- lib/testspace/rspec/helpers.rb
|
103
103
|
- lib/testspace/rspec/metadata.rb
|
104
|
+
- lib/testspace/rspec/metadata/extensions/description/anonymous.rb
|
104
105
|
- lib/testspace/rspec/metadata/extensions/description/class_method.rb
|
105
106
|
- lib/testspace/rspec/metadata/extensions/description/general.rb
|
106
107
|
- lib/testspace/rspec/metadata/extensions/description/instance_method.rb
|
107
108
|
- lib/testspace/rspec/metadata/extensions/description/module.rb
|
108
109
|
- lib/testspace/space.rb
|
109
110
|
- lib/testspace/testspaces.rb
|
110
|
-
- lib/testspace/version.rb
|
111
111
|
- testspace.gemspec
|
112
112
|
homepage: https://github.com/mosop/testspace
|
113
113
|
licenses: []
|
data/lib/testspace/version.rb
DELETED