xcfit 2.1.0 → 3.1.3

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: 99d5de4758e70d5a315f6d9f65a071858df867b5
4
- data.tar.gz: 8c689e4f39965fdd41560322f5ab048aa67f4fc8
3
+ metadata.gz: a89cfa8568372d32b5f2489f362ec6ba32d1ceb6
4
+ data.tar.gz: 9e0316c46b2b815ce225004a693830b34fabcbb6
5
5
  SHA512:
6
- metadata.gz: 234fdc96936a9781b9fbba756fa3efe4511348638c4a289b7a7c864ef15e1a92ec7345dc85a5f51dddb1d7d703097c289e9e580ec22265d95145d4a0e3787571
7
- data.tar.gz: 364eb6687e2d85252fef93a71bc4ebdad3508ff64717f0f7b7cbd01e2e0a85ab94e01f177c0de9d4be48c89dc38b9865edbc3a056ff514e8e54296284b573b0e
6
+ metadata.gz: c3e601f7c0e74606d4f5acfb76a3bc4f4b9f4299ac9677612a4bc4aa01c0c82a05f0985905dfae03349b542bf581b329e71862209ce3ab19789ad147516cdec6
7
+ data.tar.gz: 6d7a8a0cfb72771191112ddd6582372802cdcab419d2299d64e86d5aee1733975470cc328d257aeba0fb84acd952cce599914bc81574790ac434c9348b570e11
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcfit (2.0.9)
4
+ xcfit (3.1.1)
5
5
  thor (~> 0.17.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  **XCFit a.k.a ([XCUI](https://developer.apple.com/videos/play/wwdc2015/406/0), [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish) and [Fitnesse](https://github.com/paulstringer/OCSlimProject) Integrations Tests) is a full stack Xcode BDD framework for [Swift](https://swift.org) iOS apps. XCFit allows us to write BDD Style API/Contract level, UI and Acceptance Tests with Swift in human readable language using tools like [Cucumber](https://cucumber.io/) and [Fitnesse](http://fitnesse.org/) in Xcode. We can still use Apple's brand new UI Testing framework (XCUI) under the hood of XCFit and Cucumberish. XCFit is fully automated solution for Cucumberish and Fitnesse. You can use 80(Fitnesse):20(Cucumberish) formula to automate Acceptance and UI Testing for better coverage and faster feedback. XCFit is available on [Homebrew](http://brew.sh), [RubyGem](https://rubygems.org/gems/xcfit), [CocoaPods](http://cocoadocs.org/docsets/XCFit), Carthage and Swift Package Manager.**
9
9
 
10
- ### XCFit
10
+ ### XCFit
11
11
 
12
12
 
13
13
  * [XCFit : Full Stack BDD in Xcode](#xcfit--full-stack-bdd-in-xcode)
@@ -31,19 +31,19 @@
31
31
  ***
32
32
  - You can now write Given When Then (Gherkin), Predefined BDD Steps and Decision Table in Xcode. In Short, you can do BDD in Xcode for your iOS app.
33
33
  - You can now write/Execute all your Acceptance Tests and UI Tests using Apple's brand new programming language "Swift" in Xcode. Goodbye Appium, Calabash, Frank, KIF and Goodbye Ruby,Java, Python. It's pure Swift !!
34
- - XCFit provides automated Xcode Target Templates for Cucumberish, Fitnesse and Page Object Pattern(XCUI) targets which reduce hectic Xcode configuration steps. It also arrange code in Xcode groups.
34
+ - XCFit provides automated Xcode Target Templates for Cucumberish, Fitnesse and Page Object Pattern(XCUI) targets which reduce hectic Xcode configuration steps. It also arrange code in Xcode groups.
35
35
  - XCFit will setup Xcode Template with skeleton code and provide BDD Style Steps with Swift Framework which is available on Cocoapods, Carthage and Swift Package Manager.
36
36
 
37
37
 
38
- ### XCFIT Templates & Related Frameworks
39
-
38
+ ### XCFIT Templates & Related Frameworks
39
+
40
40
  * **XCFit Swift Framework with Pre-defined BDD Steps and Page Object Pattern Templates**
41
41
 
42
- XCFit setup [Page Object Pattern](http://martinfowler.com/bliki/PageObject.html) for Apple's [XCUI Test](https://developer.apple.com/videos/play/wwdc2015/406/) using 'XCUI POM Test Bundle' Templates. We can get pre-defined BDD steps by using XCFit Swift Framework from [CocoaPods](http://cocoadocs.org/docsets/XCFit), Carthage and Swift Package Manager.
43
-
42
+ XCFit setup [Page Object Pattern](http://martinfowler.com/bliki/PageObject.html) for Apple's [XCUI Test](https://developer.apple.com/videos/play/wwdc2015/406/) using 'XCUI POM Test Bundle' Templates. We can get pre-defined BDD steps by using XCFit Swift Framework from [CocoaPods](http://cocoadocs.org/docsets/XCFit), Carthage and Swift Package Manager.
43
+
44
44
  * **Cucumberish BDD Framework and Cucucmber Style Xcode Templates**
45
45
 
46
- XCFit setup [Cucumber](https://cucumber.io) style BDD framework with "[Cucumberish](https://github.com/Ahmed-Ali/Cucumberish) UI Test Bundle' Templates.
46
+ XCFit setup [Cucumber](https://cucumber.io) style BDD framework with "[Cucumberish](https://github.com/Ahmed-Ali/Cucumberish) UI Test Bundle' Templates.
47
47
  * **Fitnesse Acceptance Tests for iOS using OCSlim Project**
48
48
 
49
49
  XCFit allows us to setup [Fitnesse](http://fitnesse.org/) style decision table test framework with [OCSlimProject](https://github.com/paulstringer/OCSlimProject) using 'Acceptance Tests Bundle' templates.
@@ -53,13 +53,13 @@
53
53
 
54
54
  ##### XCFit Swift Framework
55
55
 
56
- * **CocoaPods** -- [XCFit-CocoaPods](http://cocoadocs.org/docsets/XCFit) : XCFit Swift Frameworks and BDD Style predefined steps for the iOS App.
57
- * **Carthage** -- You can install XCFit Swift Framework with Carthage as well for iOS Projects
58
- * **Swift Package Manager** -- Swift Package Manager doesn't support iOS projects yet but XCFit is compatible with Swift Package manager as well.
56
+ * **CocoaPods** -- [XCFit-CocoaPods](http://cocoadocs.org/docsets/XCFit) : XCFit Swift Frameworks and BDD Style predefined steps for the iOS App.
57
+ * **Carthage** -- You can install XCFit Swift Framework with Carthage as well for iOS Projects
58
+ * **Swift Package Manager** -- Swift Package Manager doesn't support iOS projects yet but XCFit is compatible with Swift Package manager as well.
59
59
 
60
60
  ##### XCFit Templates
61
61
 
62
- * **Homebrew** - We can tap 'shashikant86/homebrew-taps' and Install XCFit to download Xcode Templates
62
+ * **Homebrew** - We can tap 'shashikant86/homebrew-taps' and Install XCFit to download Xcode Templates
63
63
 
64
64
  * **RubyGems** -- [xcfit-RubyGem](https://rubygems.org/gems/xcfit) to get automated Xcode Templates
65
65
 
@@ -71,7 +71,7 @@ XCFit uses a number of open source projects to work properly. You need to have f
71
71
 
72
72
  **Hardware**
73
73
 
74
- You must have Mac Operating System with OSX/MacOS Sierra.
74
+ You must have Mac Operating System with OSX/MacOS Sierra.
75
75
 
76
76
  **Software**
77
77
 
@@ -96,22 +96,22 @@ You must have Mac Operating System with OSX/MacOS Sierra.
96
96
 
97
97
  # Installation
98
98
 
99
- XCFit installtion has two steps.
99
+ XCFit installtion has two steps.
100
100
 
101
101
  * **Xcode Template Installtion**
102
102
 
103
- This will install Xcode Templates with skeloton code to support BDD in iOS app. The templates are XCUI Page Object Templates, Cucumberish BDD Templated and OCSlim Fitnesse Templates. The templates can be installed with [xcfit-RubyGem](https://rubygems.org/gems/xcfit) or [Homebrew](http://brew.sh).
103
+ This will install Xcode Templates with skeloton code to support BDD in iOS app. The templates are XCUI Page Object Templates, Cucumberish BDD Templated and OCSlim Fitnesse Templates. The templates can be installed with [xcfit-RubyGem](https://rubygems.org/gems/xcfit) or [Homebrew](http://brew.sh).
104
104
 
105
- * **Framework Installtion**
105
+ * **Framework Installtion**
106
106
 
107
- XCFit Swift Framework provided pre-defined BDD Style steps with XCUI and supporting Frameworks like Cucumberish and OCSlim used to write BDD Steps. XCFit Swift Framework is available on [XCFit-CocoaPods](http://cocoadocs.org/docsets/XCFit), Carthage and Swift Package manager. Cucumberish](https://github.com/Ahmed-Ali/Cucumberish) and [OCSlimProject](https://github.com/paulstringer/OCSlimProject) are available on Cocoapods.
107
+ XCFit Swift Framework provided pre-defined BDD Style steps with XCUI and supporting Frameworks like Cucumberish and OCSlim used to write BDD Steps. XCFit Swift Framework is available on [XCFit-CocoaPods](http://cocoadocs.org/docsets/XCFit), Carthage and Swift Package manager. Cucumberish](https://github.com/Ahmed-Ali/Cucumberish) and [OCSlimProject](https://github.com/paulstringer/OCSlimProject) are available on Cocoapods.
108
108
 
109
- XCFit can be installed using [Homebrew](http://brew.sh) or using [RubyGems](https://rubygems.org/).
109
+ XCFit can be installed using [Homebrew](http://brew.sh) or using [RubyGems](https://rubygems.org/).
110
110
 
111
111
  ## Template Installtion
112
112
 
113
113
  XCFit templates can be installed using Homebrew or Rubygem.
114
- ### Homebrew Installtion
114
+ ### Homebrew Installtion
115
115
  Assuming you have already installed [Homebrew](http://brew.sh). Let's tap the formula
116
116
 
117
117
  brew tap shashikant86/homebrew-taps
@@ -127,9 +127,9 @@ If you can't use HomeBrew for some reason then XCFit can be installed using [Rub
127
127
 
128
128
  $ gem install xcfit
129
129
 
130
- You need to use with 'sudo' if you are using system (pre-installed) Ruby(2.0). XCFit gem will be used to set all the Xcode Templates for Xcode.
130
+ You need to use with 'sudo' if you are using system (pre-installed) Ruby(2.0). XCFit gem will be used to set all the Xcode Templates for Xcode.
131
131
 
132
- You can choose any of the above method. Rubygems method is prefered.
132
+ You can choose any of the above method. Rubygems method is prefered.
133
133
 
134
134
 
135
135
  ---
@@ -138,14 +138,18 @@ You can choose any of the above method. Rubygems method is prefered.
138
138
 
139
139
  In existing app or brand new app, we have to enable the Xcode templates for targets to speed up the things.
140
140
  ##### Xcode 8
141
- To setup Templates for Xcode 8.
141
+ To setup Templates for Xcode 8 for XCUI, Cucumberish target and Gherkin File Type.
142
142
 
143
143
 
144
144
  ```sh
145
- $ xcfit set_xcode_templates
145
+ $ xcfit setup_xcfit_templates
146
146
 
147
147
  ```
148
+ To Setup Fitnesse Templates
148
149
 
150
+ ```
151
+ $ xcfit setup_fitnesse_templates
152
+ ```
149
153
 
150
154
  - This will add couple of templates to your Xcode for iOS and macOS apps. In your app if you go to 'File--->New--->Target'
151
155
 
@@ -153,16 +157,16 @@ You will see new option for iOS i.e 'XCFit'. Once Clicked on it. You will see Cu
153
157
 
154
158
  ![image](https://github.com/Shashikant86/XCFit-GIFS/blob/master/Xcode8-Templates.png)
155
159
 
156
- ## Framework Installtion
160
+ ## Framework Installtion
157
161
 
158
- XCFit, Cucumberish or OCSlimProject Framework can be installed using Cocoapods. XCFit and Cuucmberish can be installed using Carthage as well but we will use Cocoapods as it's more automated than Carthage. We can create `Podfile` and add specific dependency for the target
162
+ XCFit, Cucumberish or OCSlimProject Framework can be installed using Cocoapods. XCFit and Cuucmberish can be installed using Carthage as well but we will use Cocoapods as it's more automated than Carthage. We can create `Podfile` and add specific dependency for the target
159
163
 
160
164
  ```ruby
161
165
  target '$_YOUR__TARGET' do
162
166
  pod 'XCFit'
163
167
  end
164
168
  ```
165
- Same way we can get 'Cucumberish' and 'OCSlim' for the specific target.
169
+ Same way we can get 'Cucumberish' and 'OCSlim' for the specific target.
166
170
 
167
171
  ```sh
168
172
  $ pod install
@@ -172,9 +176,9 @@ You need to close the existing Xcode session and Xcode Workspace .xcworkspace ne
172
176
 
173
177
 
174
178
  ---
175
- # XCFit Swift Framework : XCUI Page Object Pattern + Pre-Defined Steps
179
+ # XCFit Swift Framework : XCUI Page Object Pattern + Pre-Defined Steps
176
180
 
177
- XCFit templates gives an option to use very polular [Page Object Pattern](http://martinfowler.com/bliki/PageObject.html) with Apple's Xcode UI Testing framework. You can install templates and start using the code straight way, no need to use framework unless you want to use pre-defined BDD style tests.
181
+ XCFit templates gives an option to use very polular [Page Object Pattern](http://martinfowler.com/bliki/PageObject.html) with Apple's Xcode UI Testing framework. You can install templates and start using the code straight way, no need to use framework unless you want to use pre-defined BDD style tests.
178
182
 
179
183
 
180
184
  ## Setup 'XCUI POM Test bundle' Target
@@ -208,32 +212,32 @@ This group has all the test for our app. Currently demo template has two tests '
208
212
 
209
213
  Testbase is group where we can abstract all setup, teardown and common stuff in the base class. Every Screen then use this class as base. You can add more stuff as needed e.g Fixtures, Launch Arguments
210
214
 
211
- ## Getting XCFit Framework for pre-defined BDD Style steps
215
+ ## Getting XCFit Framework for pre-defined BDD Style steps
212
216
 
213
- ### Cocoapods
214
- You can get XCFit Framework eaily. Create `Podfile` and add specific dependency for the target
217
+ ### Cocoapods
218
+ You can get XCFit Framework eaily. Create `Podfile` and add specific dependency for the target
215
219
 
216
220
  ```ruby
217
221
  target '$_YOUR__TARGET' do
218
222
  pod 'XCFit'
219
223
  end
220
224
  ```
221
- Same way we can get 'Cucumberish' and 'OCSlim' for the specific target.
225
+ Same way we can get 'Cucumberish' and 'OCSlim' for the specific target.
222
226
 
223
227
  ```sh
224
228
  $ pod install
225
229
  ```
226
- Close existing Xcode Session and Open `.xcworkspace/`. Now in the 'testBase' class just `import XCFit` and extend the class to `XCFit` class. The predefined steps are ready to use.
230
+ Close existing Xcode Session and Open `.xcworkspace/`. Now in the 'testBase' class just `import XCFit` and extend the class to `XCFit` class. The predefined steps are ready to use.
227
231
 
228
232
  ![image](https://github.com/Shashikant86/xcfitgif/blob/master/Pod_install_XCFit.gif)
229
233
 
230
- ### Carthage
234
+ ### Carthage
231
235
 
232
- If you are using Carthage then it's easy to install XCFit. Add following to `Cartfile`
236
+ If you are using Carthage then it's easy to install XCFit. Add following to `Cartfile`
233
237
 
234
238
  github "Shashikant86/XCFit"
235
-
236
- Now fetch dependency and build XCFit using.
239
+
240
+ Now fetch dependency and build XCFit using.
237
241
 
238
242
  $ carthage update --platform iOS
239
243
  This will create 'Carthage' directory with built framework. We need to manually drag and drop this to our XCUIPoMTest' target build settings. On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
@@ -242,15 +246,15 @@ Now fetch dependency and build XCFit using.
242
246
  and add the paths to the frameworks you want to use under “Input Files”, e.g.:
243
247
 
244
248
  $(SRCROOT)/Carthage/Build/iOS/XCFit.framework
245
-
246
- Here is Carthage looks like
249
+
250
+ Here is Carthage looks like
247
251
  ![image](https://github.com/Shashikant86/xcfitgif/blob/master/XCFit_Carthage.gif)
248
252
 
249
- You can choose any of the above method but Cocoapods is easy and less manual.
253
+ You can choose any of the above method but Cocoapods is easy and less manual.
250
254
 
251
- ### Import XCFit & Use Predefined Steps
255
+ ### Import XCFit & Use Predefined Steps
252
256
 
253
- There are some predefined XCFit steps we can use by importing `XCFit` and extending out test base class to `XCFit`. Your test will read something like this:
257
+ There are some predefined XCFit steps we can use by importing `XCFit` and extending out test base class to `XCFit`. Your test will read something like this:
254
258
 
255
259
  ```
256
260
  import XCTest
@@ -265,7 +269,7 @@ class XCFitTests: XCFit {
265
269
  override func tearDown() {
266
270
  super.tearDown()
267
271
  }
268
-
272
+
269
273
  func testCheckAlertPresent() {
270
274
  givenILaunchedApplication()
271
275
  whenITap(on: HomeScreen().homeButtuon)
@@ -276,8 +280,8 @@ class XCFitTests: XCFit {
276
280
 
277
281
  ```
278
282
 
279
-
280
- You will get access to lots of predefined BDD style human redable steps. It's not mandatory to use those steps unless you wish.
283
+
284
+ You will get access to lots of predefined BDD style human redable steps. It's not mandatory to use those steps unless you wish.
281
285
  ![image](https://github.com/Shashikant86/xcfitgif/blob/master/pre-defined_xcfit_steps.gif)
282
286
 
283
287
 
@@ -463,9 +467,9 @@ Now if you select “AcceptanceUnitTarget” and press CMD+U.
463
467
  Now we can see that FitNesse tests are running as shown above. We can add this to main scheme to make sure we are running it after the unit tests to follow proper development workflow. We can build and run it as our normal unit tests.
464
468
 
465
469
 
466
- # Continuous Integration with Xcode Server
470
+ # Continuous Integration with Xcode Server
467
471
 
468
- Coming Soon
472
+ Coming Soon
469
473
 
470
474
  # XCFit: Swift Package Manager
471
475
 
@@ -3,6 +3,8 @@
3
3
  require 'fileutils'
4
4
  require 'tempfile'
5
5
 
6
+ VERSION = "3.1.3"
7
+
6
8
  @root_dir = File.expand_path('~')
7
9
  @root_lib_dir = File.join(@root_dir, 'Library')
8
10
  @root_developer_dir = File.join(@root_lib_dir, 'Developer')
@@ -20,23 +22,22 @@ puts "==================XXXXXXXX==========================="
20
22
 
21
23
  def clone_xcfit
22
24
  # system("cd /tmp")
23
- system("cd /tmp && curl -sL https://github.com/Shashikant86/XCFit/archive/3.1.0.tar.gz | tar xz")
25
+ system("cd /tmp && curl -sL https://github.com/Shashikant86/XCFit/archive/#{VERSION}.tar.gz | tar xz")
24
26
  puts "*******======= Downloading XCFit Templates for the Xcode =============***"
25
- @xcfit_template_dir = "/tmp/XCFit-3.1.0/XCFit_Templates/XCFit"
26
- @gherkin_template_dir = "/tmp/XCFit-3.1.0/XCFit_Templates/Gherkin"
27
+ @xcfit_template_dir = "/tmp/XCFit-#{VERSION}/XCFit_Templates/XCFit"
28
+ @gherkin_template_dir = "/tmp/XCFit-#{VERSION}/XCFit_Templates/Gherkin"
27
29
  end
28
30
 
29
31
  def clean_xcfit
30
- system("rm -rf /tmp/XCFit-3.1.0/")
32
+ system("rm -rf /tmp/XCFit-#{VERSION}/")
31
33
  end
32
34
 
33
- def setup_xcode_templates
35
+ def setup_xcfit_templates
34
36
  if File.exist?(@root_xcfit_dir)
35
37
  puts "==================XXXXXXXX==========================="
36
- puts 'There is already XCFit directory in Xcode Templates. Have you tried XCFit Before? '
37
- puts 'Please remove/move existing ~/Library/Developer/Xcode/Templates/XCFit directory to carry on'
38
+ puts 'There is already XCFit directory in Xcode Templates. Looks like you are trying Fitnesse Templates '
39
+ puts 'Templates are being installed at ~/Library/Developer/Xcode/Templates/XCFit directory'
38
40
  puts "==================XXXXXXXX==========================="
39
- exit 1
40
41
  end
41
42
  clone_xcfit
42
43
  puts "==================XXXXXXXX==========================="
@@ -52,28 +53,6 @@ def setup_xcode_templates
52
53
  puts " ***************** Enjoy XCFit *****************"
53
54
  end
54
55
 
55
- def setup_gherkin_template
56
- if File.exist?(@root_gherkin_dir)
57
- puts 'There is already Gherkin directory. Please move existing Gherkin directory to carry on '
58
- puts "==================XXXXXXXX==========================="
59
- exit 1
60
- end
61
- puts "==================XXXXXXXX==========================="
62
- puts 'Creating XCode Template for XCFit'
63
- puts 'This Template will allow you create Cucumberish and Fitnesse targets'
64
- puts "==================XXXXXXXX==========================="
65
- clone_xcfit
66
- FileUtils.cp_r(@gherkin_template_dir, @root_template_dir)
67
- clean_xcfit
68
- puts 'Now Your Xcode will have XCFIT iOS and macOS tagets for Cucumberish and Fitnesse'
69
- puts "==================XXXXXXXX==========================="
70
- puts 'File -> New -->Target-->XCFit'
71
- puts 'You wont need to restart Xcode but do so if nesessary!'
72
- puts " ***************** Enjoy XCFit *****************"
73
-
74
- end
75
-
76
- desc 'setup_fitnesse_templates', 'Downloads Fitnesse Xcode Templates from OCSlim'
77
56
  def setup_fitnesse_templates
78
57
  puts "==================XXXXXXXX==========================="
79
58
  puts 'Downloading Fitnesse Templates'
@@ -85,17 +64,6 @@ def setup_fitnesse_templates
85
64
  puts "==================XXXXXXXX==========================="
86
65
  end
87
66
 
88
- def get_cucumberish
89
- puts "==================XXXXXXXX==========================="
90
- puts 'Downloading Cucumberish in the current working directory'
91
- puts 'You Should execute this command from Cucumberish Xcode target directory'
92
- puts "==================XXXXXXXX==========================="
93
- system("curl -sL https://github.com/Ahmed-Ali/Cucumberish/archive/v1.0.6.tar.gz | tar xz")
94
- cucumberish_dir = "Cucumberish-1.0.6" + "/Cucumberish/"
95
- system("mv #{cucumberish_dir} .")
96
- system("rm -rf Cucumberish-1.0.6")
97
- end
98
-
99
67
 
100
68
  def print_usage
101
69
  puts <<EOF
@@ -103,14 +71,10 @@ def print_usage
103
71
  Usage: xcfit <command-name>
104
72
 
105
73
  <command-name> can be one of
106
- setup_xcode_templates
74
+ setup_xcfit_templates
107
75
  generate a Xcode 8 Templates for the XCUI and Cucumberish
108
76
  setup_fitnesse_templates
109
77
  generate a Xcode 8 Templates for Fitnesse
110
- setup_gherkin_template
111
- generate Xcode Templates for the Gherkin Feature Files
112
- get_cucumberish
113
- Downloads Cucumberish directory into UI Testing target
114
78
  version
115
79
  prints the XCFit version
116
80
  help
@@ -129,23 +93,18 @@ def print_help
129
93
 
130
94
  <command-name> can be one of
131
95
  help
132
- setup_xcode_templates
96
+ setup_xcfit_templates
133
97
  setup_fitnesse_templates
134
- setup_gherkin_tmplate
135
98
  version
136
99
 
137
100
  Commands:
138
101
  help : prints more detailed help information.
139
102
 
140
- setup_xcode_templates : Generate a Xcode8 Templates for the XCUI and Cucumberish
103
+ setup_xcfit_templates : Generate a Xcode Target and File Templates for the XCUI and Cucumberish
141
104
 
142
105
  setup_fitnesse_templates : Generate Xcode templates for the Fitnesse
143
106
 
144
- setup_gherkin_template : Generate Xcode Templates for the Gherkin Feature Files
145
-
146
- get_cucumberish VERSION : Downloads Cucumberish version
147
-
148
- version : prints the gem version
107
+ version : prints the XCFit version
149
108
 
150
109
  <Options>
151
110
  -v, --verbose Turns on verbose logging
@@ -158,16 +117,12 @@ else
158
117
  cmd = ARGV.shift
159
118
  if cmd == 'help'
160
119
  print_help
161
- elsif cmd == 'setup_xcode_templates'
162
- setup_xcode_templates
120
+ elsif cmd == 'setup_xcfit_templates'
121
+ setup_xcfit_templates
163
122
  elsif cmd == 'setup_fitnesse_templates'
164
123
  setup_fitnesse_templates
165
- elsif cmd == 'get_cucumberish'
166
- get_cucumberish
167
124
  elsif cmd == 'version'
168
- puts "2.x"
169
- elsif cmd == 'setup_gherkin_template'
170
- setup_gherkin_template
125
+ puts "#{VERSION}"
171
126
  else
172
127
  print_usage
173
128
  end
@@ -29,41 +29,19 @@ module XCFit
29
29
  say XCFit::VERSION
30
30
  end
31
31
 
32
- desc 'set_xcode_templates', 'Generate All Xcode Templates for the Gherkin Feature Files & targets for Cucumberish and Fitnesse'
33
- def set_xcode_templates
32
+ desc 'setup_xcfit_templates', 'Generate All Xcode Templates for the Gherkin Feature Files & targets for Cucumberish and Fitnesse'
33
+ def setup_xcfit_templates
34
34
  if File.exist?($root_xcfit_dir)
35
35
  puts "==================XXXXXXXX==========================="
36
- puts 'There is already XCFit directory in Xcode Templates. Have you tried XCFit Before? '
37
- puts 'Please remove/move existing ~/Library/Developer/Xcode/Templates/XCFit directory to carry on'
38
- puts "==================XXXXXXXX==========================="
39
- exit 1
40
- end
41
- puts "==================XXXXXXXX==========================="
42
- puts 'Creating XCode Template for XCFit'
43
- puts 'This Template will allow you create Cucumberish and Fitnesse targets'
44
- puts "==================XXXXXXXX==========================="
45
- FileUtils.cp_r($source_xcfit_dir, $root_template_dir)
46
- puts 'Now Your Xcode will have XCFIT iOS and macOS tagets for Cucumberish and Fitnesse'
47
- puts "==================XXXXXXXX==========================="
48
- puts 'File -> New -->Target-->XCFit'
49
- puts 'You wont need to restart Xcode but do so if nesessary!'
50
- puts " ***************** Enjoy XCFit *****************"
51
- end
52
-
53
- desc 'set_xcode7_templates', 'Generate a Xcode7 Templates for the Cucumberish and Fitnesse'
54
- def set_xcode7_templates
55
- if File.exist?($root_xcfit_dir)
36
+ puts 'There is already XCFit directory in Xcode Templates. Looks like you are trying Fitnesse Templates '
37
+ puts 'Templates are being installed at ~/Library/Developer/Xcode/Templates/XCFit directory'
56
38
  puts "==================XXXXXXXX==========================="
57
- puts 'There is already XCFit directory in Xcode Templates. Have you tried XCFit Before? '
58
- puts 'Please remove/move existing ~/Library/Developer/Xcode/Templates/XCFit directory to carry on'
59
- puts "==================XXXXXXXX==========================="
60
- exit 1
61
39
  end
62
40
  puts "==================XXXXXXXX==========================="
63
41
  puts 'Creating XCode Template for XCFit'
64
42
  puts 'This Template will allow you create Cucumberish and Fitnesse targets'
65
43
  puts "==================XXXXXXXX==========================="
66
- FileUtils.cp_r($source_xcfit_xcode7_dir, $root_template_dir)
44
+ FileUtils.cp_r($source_xcfit_dir, $root_template_dir)
67
45
  puts 'Now Your Xcode will have XCFIT iOS and macOS tagets for Cucumberish and Fitnesse'
68
46
  puts "==================XXXXXXXX==========================="
69
47
  puts 'File -> New -->Target-->XCFit'
@@ -71,27 +49,6 @@ module XCFit
71
49
  puts " ***************** Enjoy XCFit *****************"
72
50
  end
73
51
 
74
- desc 'create_xcgherkin', 'Generate Xcode Templates for the Gherkin Feature Files', :hide => true
75
- def create_xcgherkin
76
- if File.exist?($root_gherkin_dir)
77
- puts "==================XXXXXXXX==========================="
78
- puts 'There is already Gherkin directory in Xcode Templates. Have you tried XCFit Before? '
79
- puts 'Please remove/move existing ~/Library/Developer/Xcode/Templates/Gherkin directory to carry on'
80
- puts "==================XXXXXXXX==========================="
81
- exit 1
82
- end
83
- puts "==================XXXXXXXX==========================="
84
- puts 'Creating XCode Template for Gherkin'
85
- puts 'This Template will allow you create new Gherkin Feature file '
86
- puts "==================XXXXXXXX==========================="
87
- FileUtils.cp_r($source_gherkin_dir, $root_template_dir)
88
- puts 'Now Your Xcode will have ability to creat new Gherkin Feature File'
89
- puts "==================XXXXXXXX==========================="
90
- puts 'File -> New -->File-->Gherkin'
91
- puts 'You wont need to restart Xcode but do so if nesessary!'
92
- puts " ***************** Enjoy XCFit *****************"
93
- end
94
-
95
52
  desc 'setup_fitnesse_templates', 'Downloads Fitnesse Xcode Templates from OCSlim'
96
53
  def setup_fitnesse_templates
97
54
  puts "==================XXXXXXXX==========================="
@@ -103,44 +60,5 @@ module XCFit
103
60
  puts "=======Created Xcode Templates for the Fitnesse ===="
104
61
  puts "==================XXXXXXXX==========================="
105
62
  end
106
-
107
-
108
- desc 'get_cucumberish VERSION', 'Downloads Cucumberish version and Create Features directory. You must execute this from Cucumberish Xcode Target directory'
109
- def get_cucumberish(version="1.0.0")
110
- puts "==================XXXXXXXX==========================="
111
- puts 'Downloading Cucumberish in the current working directory'
112
- puts 'You Should execute this command from Cucumberish Xcode target directory'
113
- puts "==================XXXXXXXX==========================="
114
- system("curl -sL https://github.com/Ahmed-Ali/Cucumberish/archive/v#{version}.tar.gz | tar xz")
115
- cucumberish_dir = "Cucumberish-#{version}" + "/Cucumberish/"
116
- system("mv #{cucumberish_dir} .")
117
- system("rm -rf Cucumberish-#{version}")
118
- puts "==================XXXXXXXX==========================="
119
- puts "=======Now creating Feature Directory with Demo Feature ===="
120
- puts "==================XXXXXXXX==========================="
121
- system("mkdir -p Features")
122
- demo_feature_file = $source_template_dir + "/demo.feature"
123
- # system("cp #{demo_feature_file} Features/")
124
- # puts $source_cucumberish_template_dir
125
- puts "==================XXXXXXXX==========================="
126
- puts "=======Created Feature Directory. Add New Gherkin Feature ===="
127
- puts "==================XXXXXXXX==========================="
128
- end
129
-
130
- desc 'get_fitnesse', "Download Fitnesse JAR file from Internet. You must execute this from Xcode Fitnesse Acceptance Test Xcode Target directory"
131
- def get_fitnesse
132
- puts "==================XXXXXXXX==========================="
133
- puts 'Downloading Fitnesse JAR file in the current working directory'
134
- puts 'You Should execute this command from Fitnesse Acceptance Test Xcode target directory'
135
- puts "==================XXXXXXXX==========================="
136
- system('curl -H "Accept: application/zip" http://fitnesse.org/fitnesse-standalone.jar\?responder\=releaseDownload\&release\=20160618 -o fitnesse-standalone.jar')
137
- if File.exist?("fitnesse-standalone.jar")
138
- puts "==================XXXXXXXX==========================="
139
- puts "=======SUccessfuly Downloaded Fitnesse JAR===="
140
- puts "==================XXXXXXXX==========================="
141
- else
142
- puts "=======Error downloading Fitnesse JAR===="
143
- end
144
- end
145
63
  end
146
64
  end
@@ -1,3 +1,3 @@
1
1
  module XCFit
2
- VERSION = "2.1.0"
2
+ VERSION = "3.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcfit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant86
@@ -78,10 +78,10 @@ files:
78
78
  - Rakefile
79
79
  - XCFit.gemspec
80
80
  - XCFit.podspec
81
- - XCFit_Templates/Gherkin/Cucumber Feature.xctemplate/TemplateIcon.png
82
- - XCFit_Templates/Gherkin/Cucumber Feature.xctemplate/TemplateIcon@2x.png
83
- - XCFit_Templates/Gherkin/Cucumber Feature.xctemplate/TemplateInfo.plist
84
- - XCFit_Templates/Gherkin/Cucumber Feature.xctemplate/___FILEBASENAME___.feature
81
+ - XCFit_Templates/XCFit/Cucumber Feature.xctemplate/TemplateIcon.png
82
+ - XCFit_Templates/XCFit/Cucumber Feature.xctemplate/TemplateIcon@2x.png
83
+ - XCFit_Templates/XCFit/Cucumber Feature.xctemplate/TemplateInfo.plist
84
+ - XCFit_Templates/XCFit/Cucumber Feature.xctemplate/___FILEBASENAME___.feature
85
85
  - XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift
86
86
  - XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift
87
87
  - XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift