fastlane-plugin-itargetchecker 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: 83742a4a0554b2d9f3c5690e72468f676076490c182489ca3e7eddc123e0cad8
4
- data.tar.gz: bf0c5fecebbd00805688529c8ea25c45afa07d2fbdecb5d65788c5d221e4b627
3
+ metadata.gz: 361ae55562520ed9382bb3e157fd687b5835cba5540ab9a42f4e0be322e112a7
4
+ data.tar.gz: ff20c6932179d4a0b1f397a849f60370f11fdb9df7bae16807917a3389f021d3
5
5
  SHA512:
6
- metadata.gz: 06ea3ebfa2a0bb190e4e202c99f3701a8e4590c766876a0678e68c9d66f57184c256622b2be79d758690ffd7505fd4cb12959a4811735474f80bbeb76c104cec
7
- data.tar.gz: f20466382e362d6df387c312e954b498cd50c69f61e26af999b52c745b8974edfcd03c22d439fe22d8b4c870e305c507128cc345793a65a5bdeede747c1b3b81
6
+ metadata.gz: 7d7db6418fe33be8bb6c5780f524d7b94a24d923c708300471d118786123848d5fa775dd0572c9e7f449e70208432fe8b88b38a0c7e4e3f9f48390eb410141ec
7
+ data.tar.gz: 24f18915380277b12828935b1c10f928b7716d97c77ff04b21e177476532755bf83c3db0cae49ea1a67d17e629d5dfbe174b71fbb8d422b18a4f2a2495ed2033
data/README.md CHANGED
@@ -2,14 +2,6 @@
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-itargetchecker)
4
4
 
5
- ## Getting Started
6
-
7
- This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-itargetchecker`, add it to your project by running:
8
-
9
- ```bash
10
- fastlane add_plugin itargetchecker
11
- ```
12
-
13
5
  ## About itargetchecker
14
6
 
15
7
  Checks the xcode proj file for targets and points out which files from the project are not present in a certain target.
@@ -17,13 +9,38 @@ Usualy this helps if you have a project with multiple targets and you want to ma
17
9
 
18
10
  At the first run you should check the plugin without passing some ignore files just to see what the plugin finds. After the first run, you should check for false alarms and add those files to youre custom ignore list.
19
11
 
12
+ ## Getting Started
13
+
14
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin.
15
+
16
+ If you are new to Fastlane or haven't installed a plugin for Fastlane before, please check the plugins section below.
17
+ Shortcut for those who don't have time to read more:
18
+ - Execute the following commands:
19
+ ```bash
20
+ fastlane add_plugin fastlane-plugin-itargetchecker
21
+ fastlane install_plugins
22
+ ```
23
+
24
+ After these you should be able to use the plugin as pointed in the example below.
25
+
26
+
20
27
  ## Example
21
28
 
22
29
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
30
+ You can now use regex in the ignored files strings passed to the plugin. That can help you to ignore certain file types like .h or Tests.m.
23
31
 
24
32
  **Note:** The ignored files added in the sample should be changed to match your own rules.
25
33
 
26
- ## Run tests for this plugin
34
+ **Quick ussage sample:**
35
+
36
+ ```ruby
37
+ itargetchecker(project_path:"../YourProj.xcodeproj",
38
+ ignore_files:["SwiftyJSON.framework", "CoreLocation.framework", "Pods-YourProjRelease.release.xcconfig",
39
+ "Pods-YourProjRelease.debug.xcconfig", "Pods-YourProj.release.xcconfig", "Pods-YourProj.debug.xcconfig", "Info.plist", "Base", "BRASL.h"],
40
+ ignore_targets:["YourProjTests"])
41
+ ```
42
+
43
+ ## Run tests for this plugin (to be continued..)
27
44
 
28
45
  To run both the tests, and code style validation, run
29
46
 
@@ -10,13 +10,19 @@ module Fastlane
10
10
  project = Xcodeproj::Project.open(params[:project_path])
11
11
 
12
12
  lostFiles = Array.new
13
+ ignoredFiles = params[:ignore_files]
13
14
 
14
15
  # loop through all the project files
15
16
  project.files.each do |file|
16
17
 
17
18
  faultyFile = file.name == nil || file.name == ""
18
- if params[:ignore_files]
19
- faultyFile = faultyFile || (params[:ignore_files].include? file.name)
19
+ if ignoredFiles
20
+ ignoredFiles.each do |ignoredItem|
21
+ faultyFile = faultyFile || file.name.match(ignoredItem)
22
+ if faultyFile
23
+ next
24
+ end
25
+ end
20
26
  end
21
27
 
22
28
  if faultyFile
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Itargetchecker
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-itargetchecker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Catalin Prata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-06 00:00:00.000000000 Z
11
+ date: 2018-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj