cocoapods-fix-react-native 2018.04.17.13 → 2018.04.18.06

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: 99d823adc3a5507eff455b4a95e12794ef457ab0ff819c4e713a011726701f97
4
- data.tar.gz: c8a602d20ef5d84a1210af1d87065a02f0b7a0b143185dfab3784ed28985b386
3
+ metadata.gz: 6483c0c03cc91b74db0719ba8afb350fd5d73d59605ede6ca9d80525d94793bd
4
+ data.tar.gz: 6a5bf0a769ef5452835b4db900b4b2115091fab9987e7b357d7cd7881c5216d3
5
5
  SHA512:
6
- metadata.gz: 01c933c874472126ba228f6ae0cd75cc38afc4c2635256ace9a32777bb40c3c639b426c72959869dfb38fbd76c9a39f4c314387f011717beebbe024fd27e2c52
7
- data.tar.gz: 88d004654dd90a32a03855a075b377c6b4df81f89816c45552f249974b1c76b66286bc8739b86394c401b8a507b5c8b89ff284a50496ea21ed4c7dbda3c12d7f
6
+ metadata.gz: e541897f4baf1ca78d2f85adaf005ebae994892f9c1b96d366a4cd5511495e2b0de703a1c33ccaa9b8bfd121d2ddbcd6efab8b204fc4803d1933f63040404f3f
7
+ data.tar.gz: a4ef09c45c19ce61d69ef045897071e950567612fb81b140a8620595ca3af4a0b69ab1f309e96f453c3fe0100bb6ec1d088be20ac2c4531abfba1b33b30d1777
data/README.md CHANGED
@@ -24,7 +24,7 @@ Lazy way (bad, but ok if 1 engineer):
24
24
 
25
25
  $ gem install cocoapods-fix-react-native
26
26
 
27
- Correct way, edit your gemfile to be:
27
+ Correct way, edit [`your Gemfile`](http://www.mokacoding.com/blog/ruby-for-ios-developers-bundler/) to be:
28
28
 
29
29
  gem "cocoapods"
30
30
  gem "cocoapods-fix-react-native"
@@ -22,6 +22,7 @@ def edit_pod_file(path, old_code, new_code)
22
22
  file = File.join($root, path)
23
23
  code = File.read(file)
24
24
  if code.include?(old_code)
25
+ puts "[CPFRN] Editing #{file}" if Pod::Config.verbose
25
26
  FileUtils.chmod('+w', file)
26
27
  File.write(file, code.sub(old_code, new_code))
27
28
  end
@@ -1,3 +1,5 @@
1
+ require 'cocoapods'
2
+
1
3
  # Notes:
2
4
  #
3
5
  # - All file paths should be relative to the React repo, rather than the Pods dir, or node_modules
@@ -9,7 +11,7 @@ dev_pods_react = !File.directory?('Pods/React/React')
9
11
  # Detect CocoaPods + Frameworks
10
12
  $has_frameworks = File.exists?'Pods/Target Support Files/React/React-umbrella.h'
11
13
 
12
- # Check for whether
14
+ # Check for whether we're in a project that uses relative paths
13
15
  same_repo_node_modules = File.directory?('node_modules/react-native')
14
16
  previous_repo_node_modules = File.directory?('../node_modules/react-native')
15
17
 
@@ -25,6 +27,7 @@ def edit_pod_file(path, old_code, new_code)
25
27
  file = File.join($root, path)
26
28
  code = File.read(file)
27
29
  if code.include?(old_code)
30
+ puts "[CPFRN] Editing #{file}" if Pod::Config.verbose
28
31
  FileUtils.chmod('+w', file)
29
32
  File.write(file, code.sub(old_code, new_code))
30
33
  end
@@ -43,6 +46,7 @@ def fix_cplusplus_header_compiler_error
43
46
  file.close
44
47
 
45
48
  if contents[32].include? '&'
49
+ puts "[CPFRN] Editing #{filepath}" if Pod::Config.verbose
46
50
  contents.insert(26, '#ifdef __cplusplus')
47
51
  contents[36] = '#endif'
48
52
 
@@ -65,6 +69,7 @@ def fix_unused_yoga_headers
65
69
  file.close
66
70
 
67
71
  if contents[12].include? 'Utils.h'
72
+ puts "[CPFRN] Editing #{filepath}" if Pod::Config.verbose
68
73
  contents.delete_at(15) # #import "YGNode.h"
69
74
  contents.delete_at(15) # #import "YGNodePrint.h"
70
75
  contents.delete_at(15) # #import "Yoga-internal.h"
@@ -140,6 +145,8 @@ else
140
145
  comment_end = '#endif'
141
146
 
142
147
  if contents[22].rstrip != comment_start
148
+ puts "[CPFRN] Editing #{filepath}" if Pod::Config.verbose
149
+
143
150
  contents.insert(22, comment_start)
144
151
  contents.insert(24, comment_end)
145
152
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-fix-react-native
3
3
  version: !ruby/object:Gem::Version
4
- version: 2018.04.17.13
4
+ version: 2018.04.18.06
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-17 00:00:00.000000000 Z
11
+ date: 2018-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler