cocoapods-imy-bin 0.2.7 → 0.3.1.2

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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -453
  3. data/lib/cocoapods-imy-bin/command/bin/archive.rb +43 -5
  4. data/lib/cocoapods-imy-bin/command/bin/auto.rb +22 -15
  5. data/lib/cocoapods-imy-bin/command/bin/dup.rb +78 -0
  6. data/lib/cocoapods-imy-bin/config/config.rb +1 -1
  7. data/lib/cocoapods-imy-bin/config/config_builder.rb +39 -2
  8. data/lib/cocoapods-imy-bin/gem_version.rb +1 -1
  9. data/lib/cocoapods-imy-bin/helpers.rb +1 -0
  10. data/lib/cocoapods-imy-bin/helpers/Info.plist +0 -0
  11. data/lib/cocoapods-imy-bin/helpers/build_helper.rb +15 -7
  12. data/lib/cocoapods-imy-bin/helpers/build_utils.rb +63 -0
  13. data/lib/cocoapods-imy-bin/helpers/framework.rb +25 -2
  14. data/lib/cocoapods-imy-bin/helpers/framework_builder.rb +165 -54
  15. data/lib/cocoapods-imy-bin/helpers/library.rb +2 -2
  16. data/lib/cocoapods-imy-bin/helpers/sources_helper.rb +5 -2
  17. data/lib/cocoapods-imy-bin/helpers/spec_source_creator.rb +65 -8
  18. data/lib/cocoapods-imy-bin/helpers/upload_helper.rb +8 -3
  19. data/lib/cocoapods-imy-bin/native.rb +4 -0
  20. data/lib/cocoapods-imy-bin/native/analyzer.rb +2 -0
  21. data/lib/cocoapods-imy-bin/native/file_accessor.rb +28 -0
  22. data/lib/cocoapods-imy-bin/native/installer.rb +22 -2
  23. data/lib/cocoapods-imy-bin/native/pod_target_installer.rb +94 -0
  24. data/lib/cocoapods-imy-bin/native/podfile_generator.rb +11 -2
  25. data/lib/cocoapods-imy-bin/native/target_validator.rb +41 -0
  26. data/lib/cocoapods-imy-bin/native/validator.rb +1 -38
  27. data/lib/cocoapods-imy-bin/source_provider_hook.rb +35 -23
  28. metadata +12 -12
  29. data/lib/cocoapods-imy-bin/command/bin/local.rb +0 -156
  30. data/lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb +0 -57
  31. data/lib/cocoapods-imy-bin/helpers/local/local_build_helper.rb +0 -146
  32. data/lib/cocoapods-imy-bin/helpers/local/local_framework.rb +0 -65
  33. data/lib/cocoapods-imy-bin/helpers/local/local_framework_builder.rb +0 -174
  34. data/lib/cocoapods-imy-bin/helpers/local/local_library_builder.rb +0 -92
@@ -1,92 +0,0 @@
1
-
2
-
3
-
4
- # copy from https://github.com/CocoaPods/cocoapods-packager
5
-
6
- require 'cocoapods-imy-bin/helpers/framework.rb'
7
- require 'cocoapods-imy-bin/helpers/library.rb'
8
-
9
- require 'English'
10
-
11
- module CBin
12
- class LocalLibrary
13
- class Builder
14
- include Pod
15
-
16
- def initialize(spec, file_accessor, platform, source_dir,framework_path)
17
- @spec = spec
18
- @source_dir = source_dir
19
- @file_accessor = file_accessor
20
- @platform = platform
21
- @framework = framework_path
22
- @source_files = "#{@source_dir}/#{library.name_path}"
23
- @source_zip_file = "#{@source_files}.zip"
24
- end
25
-
26
- def build
27
- UI.section("Building static library #{@spec}") do
28
-
29
- clean_source_dir
30
-
31
- copy_headers
32
- copy_library
33
- copy_resources
34
-
35
- cp_to_source_dir
36
- end
37
- end
38
-
39
- private
40
-
41
- def clean_source_dir
42
- FileUtils.rm_rf(@source_files) if File.exist?(@source_files)
43
- FileUtils.rm_rf(@source_zip_file) if File.exist?(@source_zip_file)
44
- end
45
-
46
- def cp_to_source_dir
47
- target_dir = library.versions_path
48
- dest_file = "#{@source_dir}/#{library.name_path}"
49
- FileUtils.rm_rf(dest_file) if File.exist?(dest_file)
50
-
51
- `cp -fa #{target_dir} #{dest_file}/`
52
- end
53
-
54
- def copy_headers
55
- FileUtils.cp_r(framework.headers_path,library.versions_path) if File.exist?(framework.headers_path)
56
- end
57
-
58
- def copy_library
59
- src_file = "#{framework.versions_path}/#{@spec.name}"
60
- unless File.exist?(src_file)
61
- raise Informative, "framework没有文件:#{src_file}"
62
- end
63
-
64
- dest_file = "#{library.versions_path}/#{@spec.name}"
65
- rename_dest_file = "#{library.versions_path}/lib#{@spec.name}.a"
66
- FileUtils.cp_r(src_file,dest_file)
67
- File.rename(dest_file, rename_dest_file ) if File.exist?(dest_file)
68
- end
69
-
70
- def copy_resources
71
- FileUtils.cp_r(framework.resources_path,library.versions_path) if File.exist?(framework.resources_path)
72
- end
73
-
74
-
75
- def framework
76
- @framework ||= begin
77
- framework = Framework.new(@spec.name, @platform.name.to_s)
78
- framework.make
79
- framework
80
- end
81
- end
82
-
83
- def library
84
- @library ||= begin
85
- library = Library.new(@spec.name, @platform.name.to_s,@spec.version)
86
- library.make
87
- library
88
- end
89
- end
90
- end
91
- end
92
- end