fruity_builder 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fruity_builder.rb +24 -12
- data/lib/fruity_builder/plistutil.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16412bb7e55a1c0f1872c37d1a63609ca8efdcf0
|
4
|
+
data.tar.gz: a63167548a0c1fecc2213a979f3b564568892b9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9050248a0edf8da4341c705518246c5598a515f8664e0ecc69d47ae923ce6ec34812521de8459d8e574838515b246052568dfc4665a4790e0953dddd5b0b06b
|
7
|
+
data.tar.gz: d57b536f65848d0aca184b6776435df42175a2b19a27da6aadaf80166f24e2e24bca64a9c4fde6c75e3d655d01a1497e49eb9e9f391c767e73cbbf7c412fdd3d
|
data/lib/fruity_builder.rb
CHANGED
@@ -25,19 +25,16 @@ module FruityBuilder
|
|
25
25
|
@path = path
|
26
26
|
end
|
27
27
|
|
28
|
+
def has_project?
|
29
|
+
return true if get_projects.count > 0
|
30
|
+
false
|
31
|
+
end
|
32
|
+
|
28
33
|
def project
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
projects = Dir["#{@path}/**/*.xcodeproj"]
|
34
|
-
projects = projects.select { |project| !project.include?('Pods')}
|
35
|
-
raise HelperCommandError.new('Project not found') if projects.empty?
|
36
|
-
raise HelperCommandError.new('Mulitple projects found, please specify one') if projects.count > 1
|
37
|
-
project = projects.first
|
38
|
-
@project = project
|
39
|
-
end
|
40
|
-
@project
|
34
|
+
projects = get_projects
|
35
|
+
raise HelperCommandError.new('Project not found') if projects.empty?
|
36
|
+
raise HelperCommandError.new('Mulitple projects found, please specify one') if projects.count > 1
|
37
|
+
@project = projects.first
|
41
38
|
end
|
42
39
|
|
43
40
|
def workspace
|
@@ -67,6 +64,21 @@ module FruityBuilder
|
|
67
64
|
end
|
68
65
|
@xcode
|
69
66
|
end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
def get_projects
|
71
|
+
if @project.nil?
|
72
|
+
if @path.scan(/.*xcodeproj$/).count > 0
|
73
|
+
@project = @path
|
74
|
+
return @path
|
75
|
+
end
|
76
|
+
projects = Dir["#{@path}/**/*.xcodeproj"]
|
77
|
+
projects.select { |project| !project.include?('Pods') }
|
78
|
+
else
|
79
|
+
@project
|
80
|
+
end
|
81
|
+
end
|
70
82
|
end
|
71
83
|
end
|
72
84
|
|
@@ -4,12 +4,16 @@ module FruityBuilder
|
|
4
4
|
module IOS
|
5
5
|
class Plistutil < Execution
|
6
6
|
|
7
|
-
def self.
|
7
|
+
def self.get_xml(options = {})
|
8
8
|
if options.key?(:file)
|
9
|
-
|
9
|
+
IO.read(options[:file])
|
10
10
|
elsif options.key?(:xml)
|
11
|
-
|
11
|
+
options[:xml]
|
12
12
|
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.get_bundle_id(options = {})
|
16
|
+
xml = get_xml(options)
|
13
17
|
|
14
18
|
raise PlistutilCommandError.new('No XML was passed') unless xml
|
15
19
|
|
@@ -20,11 +24,7 @@ module FruityBuilder
|
|
20
24
|
end
|
21
25
|
|
22
26
|
def self.replace_bundle_id(options = {})
|
23
|
-
|
24
|
-
xml = IO.read(options[:file])
|
25
|
-
elsif options.key?(:xml)
|
26
|
-
xml = options[:xml]
|
27
|
-
end
|
27
|
+
xml = get_xml(options)
|
28
28
|
|
29
29
|
raise PlistutilCommandError.new('No XML was passed') unless xml
|
30
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fruity_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: iOS code signing utilities - used to replace bundle IDs, development
|
15
15
|
teams and provisioning profiles programmatically
|