cwtestgen 0.1.4 → 0.1.5

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: 6dff694aadd658a17821e67ea67ea243cf78e942
4
- data.tar.gz: 764c6f064cf688193d2733a6693ca79e49140368
3
+ metadata.gz: c083fa953f0f29c00d0f09f86f42abe89ef6f6c1
4
+ data.tar.gz: 2a8081f5815a9383e547c9efb95a24d29154a7a6
5
5
  SHA512:
6
- metadata.gz: ac58cdd6016125120725f39a4975645422a64bc9a53f04be665fa8599fc6e85ed80dcaf8de09f5853bb20e344b7721ae0feb195b6f88260e6e261822d67281f5
7
- data.tar.gz: e6b8c536ed04037ddd0f3bc6a3dda4514f93369057f3a7f7f6cbe17ac9379fa26769e1919bbf9b9bde0fee093c6c904fba7ce3e0309ca1919976e2275f9e97d4
6
+ metadata.gz: ae955854b0f30a1d4d5b1f2209c10cd3d60f1574433d02554d2c39c25b6afcb8469e54efb44f4e18b37773b2b1bb93b419c77ffced1c7488d16da0332c384733
7
+ data.tar.gz: 4b15b890cd4f8d849c36112fb872647d02c3e31a324d81e0c38f7dcb3e60981b523ba5683e11df093973accaf950ae290e004d20467b4f5155b22878634f7d91
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
+ *.DS_Store
2
3
  .bundle
3
4
  Gemfile.lock
4
5
  pkg/*
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
- CwTestGen::Generators::Project.start([name, with_page_templates])
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 File.directory?("lib")
61
- File.symlink(Dir.pwd + "/lib","#{name}/features/support/lib")
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
@@ -1,3 +1,3 @@
1
1
  module CwTestGen
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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
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
Binary file