cwtestgen 0.1.4 → 0.1.5
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/.gitignore +1 -0
- data/lib/cwtestgen/cli.rb +3 -1
- data/lib/cwtestgen/generators/project.rb +13 -2
- data/lib/cwtestgen/version.rb +1 -1
- metadata +1 -4
- data/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/cwtestgen/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c083fa953f0f29c00d0f09f86f42abe89ef6f6c1
|
4
|
+
data.tar.gz: 2a8081f5815a9383e547c9efb95a24d29154a7a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae955854b0f30a1d4d5b1f2209c10cd3d60f1574433d02554d2c39c25b6afcb8469e54efb44f4e18b37773b2b1bb93b419c77ffced1c7488d16da0332c384733
|
7
|
+
data.tar.gz: 4b15b890cd4f8d849c36112fb872647d02c3e31a324d81e0c38f7dcb3e60981b523ba5683e11df093973accaf950ae290e004d20467b4f5155b22878634f7d91
|
data/.gitignore
CHANGED
data/lib/cwtestgen/cli.rb
CHANGED
@@ -6,10 +6,12 @@ module CwTestGen
|
|
6
6
|
|
7
7
|
desc "project <project_name>", "Create a new test project"
|
8
8
|
method_option :with_page_templates, :type => :boolean, :desc => "Copy page templates to features/support/pages/"
|
9
|
+
method_option :with_lib_symlink, :type => :boolean, :desc => "Create a fixed symlink to ../lib"
|
9
10
|
|
10
11
|
def project(name)
|
11
12
|
with_page_templates = options[:with_page_templates] ? 'true' : 'false'
|
12
|
-
|
13
|
+
with_lib_symlink = options[:with_lib_symlink] ? 'true' : 'false'
|
14
|
+
CwTestGen::Generators::Project.start([name, with_page_templates, with_lib_symlink])
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
@@ -7,6 +7,7 @@ module CwTestGen
|
|
7
7
|
|
8
8
|
argument :name, :type => :string, :desc => 'The name of the project'
|
9
9
|
argument :with_page_templates, :type => :string, :desc => 'Place Page Templates into features/support/pages/'
|
10
|
+
argument :with_lib_symlink, :type => :string, :desc => 'Create a symlink to ../lib inside features/support/'
|
10
11
|
desc "Generates a project structure for testing with Cucumber"
|
11
12
|
|
12
13
|
def self.source_root
|
@@ -57,8 +58,14 @@ module CwTestGen
|
|
57
58
|
end
|
58
59
|
|
59
60
|
def create_symlink_to_lib
|
60
|
-
if
|
61
|
-
File.symlink(
|
61
|
+
if gen_symlink_to_lib
|
62
|
+
if File.symlink?("lib")
|
63
|
+
return nil
|
64
|
+
end
|
65
|
+
|
66
|
+
if File.directory?("../lib")
|
67
|
+
File.symlink(Dir.pwd + "/../lib","#{name}/features/support/lib")
|
68
|
+
end
|
62
69
|
end
|
63
70
|
end
|
64
71
|
|
@@ -68,6 +75,10 @@ module CwTestGen
|
|
68
75
|
with_page_templates == 'true'
|
69
76
|
end
|
70
77
|
|
78
|
+
def gen_symlink_to_lib
|
79
|
+
with_lib_symlink == 'true'
|
80
|
+
end
|
81
|
+
|
71
82
|
end
|
72
83
|
end
|
73
84
|
end
|
data/lib/cwtestgen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cwtestgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey S. Morgan
|
@@ -133,7 +133,6 @@ executables:
|
|
133
133
|
extensions: []
|
134
134
|
extra_rdoc_files: []
|
135
135
|
files:
|
136
|
-
- .DS_Store
|
137
136
|
- .gitignore
|
138
137
|
- .ruby-gemset
|
139
138
|
- .ruby-version
|
@@ -152,9 +151,7 @@ files:
|
|
152
151
|
- features/with_gametel_option.feature
|
153
152
|
- features/with_lib_option.feature
|
154
153
|
- features/with_mojawk_option.feature
|
155
|
-
- lib/.DS_Store
|
156
154
|
- lib/cwtestgen.rb
|
157
|
-
- lib/cwtestgen/.DS_Store
|
158
155
|
- lib/cwtestgen/cli.rb
|
159
156
|
- lib/cwtestgen/generators/project.rb
|
160
157
|
- lib/cwtestgen/generators/project/Rakefile
|
data/.DS_Store
DELETED
Binary file
|
data/lib/.DS_Store
DELETED
Binary file
|
data/lib/cwtestgen/.DS_Store
DELETED
Binary file
|