gonative-cli 0.7.0 → 0.7.4

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: 55b0e7973184f8e9bc0ff3bc8bba55ef782da09c076b586b310f3ffbf53777d7
4
- data.tar.gz: 9857622f12a738bd94ea83f7a481acecbf2f18b47d64e02c07f6aacc4900ea18
3
+ metadata.gz: de0fa406ef4825049a04def2bb32072130d53323c1b89be5237f94a9776b67ac
4
+ data.tar.gz: 1d6caf03031a63381e05b503267c8976694a3adb846369ac60e86b5d5dde6dcc
5
5
  SHA512:
6
- metadata.gz: e5ceef6920dd707f7e404be1ddae19020b0b20bb028fa49ed0c79e1094c5e7898d188e511b6988638be1b436f5ea8554b182aa14c62a45ed605cc6267e3c54b0
7
- data.tar.gz: 26ffb12906aa1fb7d03c4cd62247e7e1eeecb48dd58b8425d776c002fc3978808721c2dcbd68e87f2b0655299489db8a9d89e825bfc3c535de61181287f43ccd
6
+ metadata.gz: e60492959eb263f49f8d3afd5a992a777acb176591ccc8f5c1fd18bda354c175c46f8858c7ffc053fc454cd1467d788573c86e2cdbfc3d63d617a0ecca400e37
7
+ data.tar.gz: 52070fd24c63032b3713d281006b0ce55d828fe4b6b653e590906984aea39b41e17d41cff30bade24c260b9011a609f71a1f566ca3759fba409cf0b88aeeca12
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.6.0)
4
+ gonative-cli (0.7.3)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'cocoapods'
4
4
  require 'xcodeproj'
5
+ require 'active_support/core_ext/string/inflections'
5
6
 
6
7
  module GoNative
7
8
  module Plugins
@@ -16,7 +17,7 @@ module GoNative
16
17
  attr_reader :plugin_name
17
18
 
18
19
  def initialize
19
- @plugin_name = Utils::SanitizePluginName.call(FileUtils.pwd.split('/').last, 'ios')
20
+ @plugin_name = Utils::SanitizePluginName.call(FileUtils.pwd.split('/').last, 'ios').capitalize + 'Plugin'
20
21
  end
21
22
 
22
23
  def call
@@ -26,13 +27,13 @@ module GoNative
26
27
  run_pod_install
27
28
  chmod_frameworks_script!
28
29
  build_framework!
30
+ move_framework_file
29
31
  ensure
30
32
  FileUtils.cd('..')
31
33
  FileUtils.rm_rf('build')
32
34
  end
33
35
 
34
36
  def setup_dirs
35
- FileUtils.cd(plugin_name)
36
37
  build_dir = File.join(FileUtils.pwd, 'build')
37
38
  FileUtils.mkdir(build_dir)
38
39
  FileUtils.cd(build_dir)
@@ -40,7 +41,7 @@ module GoNative
40
41
 
41
42
  def create_framework_proj
42
43
  proj = Xcodeproj::Project.new(FileUtils.pwd)
43
- target = proj.new_target(:framework, "#{plugin_name}Framework", :ios, '10.0')
44
+ target = proj.new_target(:framework, "#{plugin_name}", :ios, '10.0')
44
45
  main_group = proj.new_group(plugin_name, plugin_name)
45
46
  classes_group = main_group.new_group('Classes', 'Classes')
46
47
  references = Dir.glob("../#{plugin_name}/Classes/**").map{ |file| classes_group.new_file("../../#{file}") }
@@ -72,6 +73,10 @@ module GoNative
72
73
 
73
74
  raise Error, "Error building framework. Please run the create-framework file manually to fix any errors"
74
75
  end
76
+
77
+ def move_framework_file
78
+ FileUtils.mv("XCFramework", '..', force: true)
79
+ end
75
80
  end
76
81
  end
77
82
  end
@@ -6,6 +6,8 @@ module GoNative
6
6
  module Plugins
7
7
  module IOS
8
8
  class Create
9
+ autoload :FileUtils, 'fileutils'
10
+
9
11
  extend DSL::Serviceable
10
12
 
11
13
  TEMPLATE_DIRECTORY_PATH = File.expand_path(File.join(__dir__, '../../../..', 'templates', 'plugins', 'ios'))
@@ -7,15 +7,8 @@ module GoNative
7
7
  extend DSL::Serviceable
8
8
 
9
9
  def call
10
- assert_valid_plugin!
11
10
  assert_staging_clear!
12
11
  end
13
-
14
- def assert_valid_plugin!
15
- return if File.file?('create-framework.sh')
16
-
17
- raise Error, "File 'create-framework.sh' does not exist. Please make sure this is a valid GoNative plugin directory"
18
- end
19
12
 
20
13
  def assert_staging_clear!
21
14
  return if `git status --porcelain`.empty?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.7.0"
4
+ VERSION = "0.7.4"
5
5
  end
@@ -3,7 +3,7 @@ platform :ios, '10.0'
3
3
  source 'https://cdn.cocoapods.org/'
4
4
  source 'git@github.com:gonativeio/gonative-specs.git'
5
5
 
6
- target '#{plugin_name}Framework' do
6
+ target '#{plugin_name}' do
7
7
  use_frameworks!
8
8
 
9
9
  #{plugin_dependencies}
@@ -9,7 +9,7 @@ FRAMEWORK_NAME="#{plugin_name}"
9
9
 
10
10
  FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework"
11
11
 
12
- BUILD_SCHEME="#{plugin_name}Framework"
12
+ BUILD_SCHEME="#{plugin_name}"
13
13
 
14
14
  SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonative-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-07 00:00:00.000000000 Z
11
+ date: 2022-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli