earlgrey 0.0.13 → 0.0.14
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 +4 -4
- data/lib/earlgrey/configure_earlgrey.rb +15 -8
- data/lib/earlgrey/version.rb +1 -1
- 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: 65c301807050c57123110ae6f49ca194084836b1
|
4
|
+
data.tar.gz: c2971e809b71d8966b05d0d9af0e147b74d9cff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e0ec4554e0216c1d3b1f2c023dadd684f38ae00b2526502b00102d1730575748f60f0bd3e3db27abc3e4b770056ad5d554aaf63a1c07b19e45daee641dc1f81
|
7
|
+
data.tar.gz: 6e34a68b52fac4afaeba8068e6691d500a34ed33b43e1f4647263b6d7c1874553ff46b97f6b7bd0275e8ed09e4aab5337800c86ef2b9477ffe4545712e8c354e
|
@@ -20,21 +20,27 @@ end
|
|
20
20
|
|
21
21
|
module EarlGrey
|
22
22
|
class << self
|
23
|
-
attr_reader :project_name, :test_target, :test_target_name, :scheme_file,
|
23
|
+
attr_reader :project_name, :installer, :test_target, :test_target_name, :scheme_file,
|
24
24
|
:user_project, :carthage, :swift, :swift_version
|
25
25
|
|
26
26
|
# Returns path to Xcode file, prepending current working dir if necessary.
|
27
|
-
# @param
|
27
|
+
# @param project_name [String] name of the .xcodeproj file
|
28
28
|
# @param ext [String] xcode file extension
|
29
29
|
# @return [String] path to Xcode file
|
30
|
-
def path_for(
|
31
|
-
ext_match = File.extname(
|
32
|
-
return
|
33
|
-
|
34
|
-
path = File.join(Dir.pwd, File.basename(xcode_file, '.*') + ext)
|
30
|
+
def path_for(project_name, ext)
|
31
|
+
ext_match = File.extname(project_name) == ext
|
32
|
+
return project_name if File.exist?(project_name) && ext_match
|
33
|
+
path = File.join(dir_path, File.basename(project_name, '.*') + ext)
|
35
34
|
path ? path : nil
|
36
35
|
end
|
37
36
|
|
37
|
+
# Returns the project's directory. If CocoaPods hasn't had it passed in, then the current
|
38
|
+
# directory is chosen.
|
39
|
+
# @return [String] directory path for the Xcode project
|
40
|
+
def dir_path
|
41
|
+
installer ? installer.config.installation_root : Dir.pwd
|
42
|
+
end
|
43
|
+
|
38
44
|
# Strips each line in a string
|
39
45
|
# @param string [String] the string to process
|
40
46
|
# @return [String] the modified string
|
@@ -67,6 +73,7 @@ module EarlGrey
|
|
67
73
|
@swift = opts.fetch(:swift, false)
|
68
74
|
@carthage = opts.fetch(:carthage, false)
|
69
75
|
@swift_version = opts.fetch(:swift_version, '3.0')
|
76
|
+
@installer = installer
|
70
77
|
|
71
78
|
puts_blue "Checking and Updating #{project_name} for EarlGrey."
|
72
79
|
pods_project = installer ? installer.pods_project : true
|
@@ -349,7 +356,7 @@ module EarlGrey
|
|
349
356
|
user_project.save
|
350
357
|
|
351
358
|
src_root = File.join(__dir__, 'files')
|
352
|
-
dst_root = File.join(
|
359
|
+
dst_root = File.join(dir_path, test_target_name)
|
353
360
|
raise "Missing target folder #{dst_root}" unless File.exist? dst_root
|
354
361
|
|
355
362
|
src_header_name = 'BridgingHeader.h'
|
data/lib/earlgrey/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: earlgrey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khandpur
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-10-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: colored
|