csproj 0.1.0 → 0.1.1

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: 9b51606e022b0c08f21b2c07f60aa9d6862c75bd01f84417ddced763ca117271
4
- data.tar.gz: fa9e7f6425ccaa4b48afe3d77461fbb32bcaef9e1ab843bf4b0f1f598ae58f4d
3
+ metadata.gz: 23ef7f977ea9b0e6566f895132f4f537af33d163e713649dc40b526b75a0768e
4
+ data.tar.gz: 6185389645ef0ef84e9e442b01b2e7cfcfe38a422de8f8ca2eebeb31d44aee26
5
5
  SHA512:
6
- metadata.gz: acd8730f0ff2616cf9f7c7f578da59acb4afb18e51a4ae39913bfd92a96172ec5523597797021d96144b88ca73877d0bb1ec0b4d0831d0c744fe59fa4a5fb045
7
- data.tar.gz: 317f7c8266f767e0b9a6e07ab48a4afa0d3dc2764d31bfb2527f535eef416e923e7b7ec5706fb0ef99b05d82f20cd4a939e178f274271a125cd8df2116a238dc
6
+ metadata.gz: 0b6a5f7fa15da21a9f8561a3db35b05587e331fdf7d2a90f6fb4518b2f429581889459c6439bd34425f29f441b52dbe382d91e5206966018713ee91d35901f3e
7
+ data.tar.gz: 60a0137166a5e55f7053a44117e65e545963d95d61f83e1e95f05575338a706b345e4294c6d8b6538907e54c196cb5049bb394b7fa4284c2e4cfadd19640302a
@@ -95,14 +95,18 @@ module CsProj
95
95
  def self.detect_info_plist
96
96
  return if CsProj.config[:plist_path] || (CsProj.config[:platform] != Platform::IOS)
97
97
 
98
- plist_path = find_file("*/Info.plist", 1)
98
+ plist_path = abs_project_path find_file("Info.plist", 1)
99
99
 
100
100
  unless plist_path
101
- puts "Not able to find Info.plist automatically, try to specify it via `plist_path` parameter."
102
- exit
101
+ plist_path = abs_project_path "Info.plist"
102
+
103
+ unless File.exist? plist_path
104
+ puts "Not able to find Info.plist automatically, try to specify it via `plist_path` parameter."
105
+ exit
106
+ end
103
107
  end
104
108
 
105
- CsProj.config[:plist_path] = abs_project_path plist_path
109
+ CsProj.config[:plist_path] = plist_path
106
110
  end
107
111
 
108
112
  def self.detect_assembly_name(doc_csproj)
@@ -147,16 +151,18 @@ module CsProj
147
151
  end
148
152
 
149
153
  def self.abs_project_path(path)
154
+ return nil if path.nil?
155
+
150
156
  path = path.tr('\\', "/")
151
157
  platform_path = CsProj.config[:project_path]
152
- path = "#{File.dirname platform_path}/#{path}"
153
- path
158
+ "#{File.dirname(platform_path)}/#{path}"
154
159
  end
155
160
 
156
161
  def self.abs_path(path)
162
+ return nil if path.nil?
163
+
157
164
  path = path.tr('\\', "/")
158
- path = File.expand_path(path)
159
- path
165
+ File.expand_path(path)
160
166
  end
161
167
  end
162
168
  end
@@ -1,3 +1,3 @@
1
1
  module CsProj
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Barnby