pod-builder 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad6a4171e77fb154576cdf5d9d001d9c35cd966f88e311553b1188b5bde9ae98
4
- data.tar.gz: 1b856409f52b5af2fb03e7e10784e623c97184079fb1d729daa287a0df71314b
3
+ metadata.gz: 9c7986b97b11b43e98381dc45c2a6609e0e11a37b126b27ebe12685cb931ee3d
4
+ data.tar.gz: 2e662d642edddc503316edf689d0d9af5326a0c6ba6cf87b587684d0277dac9b
5
5
  SHA512:
6
- metadata.gz: 3f372e904f9affdfbb9b8a860fab8d0c8704fdbe73fbacbc8954fa75eeb7375bab837b3adb14e0488c9579777d4c46ccaa760127727e302904e90dcc0b5306f2
7
- data.tar.gz: af340400b14fb314d9ff0a678037751c713675e4f32d75c1c2ac6fe8fb9b064db52a38f9328d0ea3a41de4f4349780de5c8b4dda3151d10b5cc6a4ef58c5838b
6
+ metadata.gz: c5a23bb253a08ef0f8f2013934d8ab358b818a0b71f9b24cc7f88c46143ed1e82dcc26a32646b8030cc7c3c9340ee5c63b7c6d582c88c1c0b33c798cbfbed9d8
7
+ data.tar.gz: 3e960da37ddbb1772b87400b5001d91ec1f2a99a3bc3784a5fff3ed9575114b2f960d0828b945f83e503063edc4389b69ecacf3b27d050caafe64f9d464f3b87
@@ -8,7 +8,7 @@
8
8
  "name": "No Command",
9
9
  "type": "Ruby",
10
10
  "request": "launch",
11
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
11
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
12
12
  "useBundler": true,
13
13
  "program": "${workspaceRoot}/exe/pod_builder",
14
14
  "showDebuggerOutput": true,
@@ -21,7 +21,7 @@
21
21
  "name": "Init",
22
22
  "type": "Ruby",
23
23
  "request": "launch",
24
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
24
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
25
25
  "useBundler": true,
26
26
  "program": "${workspaceRoot}/exe/pod_builder",
27
27
  "showDebuggerOutput": true,
@@ -34,7 +34,7 @@
34
34
  "name": "Deintegrate",
35
35
  "type": "Ruby",
36
36
  "request": "launch",
37
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
37
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
38
38
  "useBundler": true,
39
39
  "program": "${workspaceRoot}/exe/pod_builder",
40
40
  "showDebuggerOutput": true,
@@ -47,7 +47,7 @@
47
47
  "name": "Build",
48
48
  "type": "Ruby",
49
49
  "request": "launch",
50
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
50
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
51
51
  "useBundler": true,
52
52
  "program": "${workspaceRoot}/exe/pod_builder",
53
53
  "showDebuggerOutput": true,
@@ -65,7 +65,7 @@
65
65
  "name": "Build All",
66
66
  "type": "Ruby",
67
67
  "request": "launch",
68
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
68
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
69
69
  "useBundler": true,
70
70
  "program": "${workspaceRoot}/exe/pod_builder",
71
71
  "showDebuggerOutput": true,
@@ -80,7 +80,7 @@
80
80
  "name": "Restore All",
81
81
  "type": "Ruby",
82
82
  "request": "launch",
83
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
83
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
84
84
  "useBundler": true,
85
85
  "program": "${workspaceRoot}/exe/pod_builder",
86
86
  "showDebuggerOutput": true,
@@ -94,7 +94,7 @@
94
94
  "name": "Clean",
95
95
  "type": "Ruby",
96
96
  "request": "launch",
97
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
97
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
98
98
  "useBundler": true,
99
99
  "program": "${workspaceRoot}/exe/pod_builder",
100
100
  "showDebuggerOutput": true,
@@ -107,7 +107,7 @@
107
107
  "name": "Install sources",
108
108
  "type": "Ruby",
109
109
  "request": "launch",
110
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
110
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
111
111
  "useBundler": true,
112
112
  "program": "${workspaceRoot}/exe/pod_builder",
113
113
  "showDebuggerOutput": true,
@@ -120,7 +120,7 @@
120
120
  "name": "Generate podspec",
121
121
  "type": "Ruby",
122
122
  "request": "launch",
123
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
123
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
124
124
  "useBundler": true,
125
125
  "program": "${workspaceRoot}/exe/pod_builder",
126
126
  "showDebuggerOutput": true,
@@ -133,7 +133,7 @@
133
133
  "name": "Switch pod",
134
134
  "type": "Ruby",
135
135
  "request": "launch",
136
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
136
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
137
137
  "useBundler": true,
138
138
  "program": "${workspaceRoot}/exe/pod_builder",
139
139
  "showDebuggerOutput": true,
@@ -148,7 +148,7 @@
148
148
  "name": "Update LFS",
149
149
  "type": "Ruby",
150
150
  "request": "launch",
151
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
151
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
152
152
  "useBundler": true,
153
153
  "program": "${workspaceRoot}/exe/pod_builder",
154
154
  "showDebuggerOutput": true,
@@ -161,7 +161,7 @@
161
161
  "name": "Synch Podfile",
162
162
  "type": "Ruby",
163
163
  "request": "launch",
164
- "cwd": "/Users/tomas/Documents/Xcode/Subito4",
164
+ "cwd": "/Users/tomas/Downloads/willhaben-ios",
165
165
  "useBundler": true,
166
166
  "program": "${workspaceRoot}/exe/pod_builder",
167
167
  "showDebuggerOutput": true,
@@ -5,7 +5,12 @@ module PodBuilder
5
5
  class Init
6
6
  def self.call(options)
7
7
  raise "\n\nAlready initialized\n".red if Configuration.exists
8
- raise "\n\nXcode workspace not found\n".red if PodBuilder::project_path.nil?
8
+
9
+ xcworkspace = Dir.glob("*.xcworkspace")
10
+ raise "\n\nNo xcworkspace found in current folder\n" if xcworkspace.count == 0
11
+ raise "\n\nToo many xcworkspaces found in current folder\n#{xcworkspace}\n" if xcworkspace.count > 1
12
+
13
+ Configuration.project_name = File.basename(xcworkspace.first, ".*")
9
14
 
10
15
  options[:prebuild_path] ||= Configuration.base_path
11
16
 
@@ -37,6 +37,7 @@ module PodBuilder
37
37
  attr_accessor :dev_pods_configuration_filename
38
38
  attr_accessor :lfs_min_file_size
39
39
  attr_accessor :update_lfs_gitattributes
40
+ attr_accessor :project_name
40
41
  end
41
42
 
42
43
  @build_settings = DEFAULT_BUILD_SETTINGS
@@ -54,6 +55,7 @@ module PodBuilder
54
55
  @dev_pods_configuration_filename = "PodBuilderDevPodsPaths.json".freeze
55
56
  @lfs_min_file_size = MIN_LFS_SIZE_KB
56
57
  @update_lfs_gitattributes = false
58
+ @project_name = ""
57
59
 
58
60
  def self.check_inited
59
61
  raise "\n\nNot inited, run `pod_builder init`\n".red if podbuilder_path.nil?
@@ -72,6 +74,7 @@ module PodBuilder
72
74
 
73
75
  if exists
74
76
  json = JSON.parse(File.read(config_path))
77
+
75
78
  if value = json["spec_overrides"]
76
79
  if value.is_a?(Hash) && value.keys.count > 0
77
80
  Configuration.spec_overrides = value
@@ -126,6 +129,11 @@ module PodBuilder
126
129
  end
127
130
  end
128
131
  end
132
+ if value = json["project_name"]
133
+ if value.is_a?(String) && value.length > 0
134
+ Configuration.project_name = value
135
+ end
136
+ end
129
137
 
130
138
  Configuration.build_settings.freeze
131
139
  else
@@ -144,6 +152,7 @@ module PodBuilder
144
152
  def self.write
145
153
  config = {}
146
154
 
155
+ config["project_name"] = Configuration.project_name
147
156
  config["spec_overrides"] = Configuration.spec_overrides
148
157
  config["skip_licenses"] = Configuration.skip_licenses
149
158
  config["skip_pods"] = Configuration.skip_pods
@@ -54,7 +54,7 @@ module PodBuilder
54
54
  end
55
55
 
56
56
  def self.find_xcodeworkspace
57
- xcworkspaces = Dir.glob("#{home}/**/*.xcworkspace").select { |x| !x.include?("/Pods/") && !x.include?("/Sources/") && !x.include?(basepath) && !x.include?(".xcodeproj/") }
57
+ xcworkspaces = Dir.glob("#{home}/**/#{Configuration.project_name}*.xcworkspace").select { |x| !x.include?("/Pods/") && !x.include?("/Sources/") && !x.include?(basepath) && !x.include?(".xcodeproj/") }
58
58
  raise "xcworkspace not found!".red if xcworkspaces.count == 0
59
59
  raise "Found multiple xcworkspaces:\n#{xcworkspaces.join("\n")}".red if xcworkspaces.count > 1
60
60
 
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler