cocoapods-developing-folder 0.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fc94e87bdc2acc0f40918fcff1297a5516943057
4
+ data.tar.gz: 1d5a0756eb55878ed42b86e07428ed1c2b36e6ae
5
+ SHA512:
6
+ metadata.gz: 9768925aa40ac0af86fac632ec7207eb8d3ee733110edba7abf5846fecf46dc471152692eea8e7b924b852f624da8baf3c8e50b500ae1ca56aa5f05753db6d37
7
+ data.tar.gz: e250c7e3770444796674112e2701376ff66c026ccb9088672b7489c331da148465e6b64f700be49baceeeddc3920b3fb70928648556a5d173ddb8341d452d167
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-developing-folder.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'cocoapods'
8
+
9
+ gem 'mocha'
10
+ gem 'bacon'
11
+ gem 'mocha-on-bacon'
12
+ gem 'prettybacon'
13
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-developing-folder (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ CFPropertyList (2.3.6)
10
+ activesupport (4.2.10)
11
+ i18n (~> 0.7)
12
+ minitest (~> 5.1)
13
+ thread_safe (~> 0.3, >= 0.3.4)
14
+ tzinfo (~> 1.1)
15
+ bacon (1.2.0)
16
+ claide (1.0.2)
17
+ cocoapods (1.3.1)
18
+ activesupport (>= 4.0.2, < 5)
19
+ claide (>= 1.0.2, < 2.0)
20
+ cocoapods-core (= 1.3.1)
21
+ cocoapods-deintegrate (>= 1.0.1, < 2.0)
22
+ cocoapods-downloader (>= 1.1.3, < 2.0)
23
+ cocoapods-plugins (>= 1.0.0, < 2.0)
24
+ cocoapods-search (>= 1.0.0, < 2.0)
25
+ cocoapods-stats (>= 1.0.0, < 2.0)
26
+ cocoapods-trunk (>= 1.2.0, < 2.0)
27
+ cocoapods-try (>= 1.1.0, < 2.0)
28
+ colored2 (~> 3.1)
29
+ escape (~> 0.0.4)
30
+ fourflusher (~> 2.0.1)
31
+ gh_inspector (~> 1.0)
32
+ molinillo (~> 0.5.7)
33
+ nap (~> 1.0)
34
+ ruby-macho (~> 1.1)
35
+ xcodeproj (>= 1.5.1, < 2.0)
36
+ cocoapods-core (1.3.1)
37
+ activesupport (>= 4.0.2, < 6)
38
+ fuzzy_match (~> 2.0.4)
39
+ nap (~> 1.0)
40
+ cocoapods-deintegrate (1.0.1)
41
+ cocoapods-downloader (1.1.3)
42
+ cocoapods-plugins (1.0.0)
43
+ nap
44
+ cocoapods-search (1.0.0)
45
+ cocoapods-stats (1.0.0)
46
+ cocoapods-trunk (1.3.0)
47
+ nap (>= 0.8, < 2.0)
48
+ netrc (~> 0.11)
49
+ cocoapods-try (1.1.0)
50
+ colored2 (3.1.2)
51
+ concurrent-ruby (1.0.5)
52
+ escape (0.0.4)
53
+ fourflusher (2.0.1)
54
+ fuzzy_match (2.0.4)
55
+ gh_inspector (1.0.3)
56
+ i18n (0.9.1)
57
+ concurrent-ruby (~> 1.0)
58
+ metaclass (0.0.4)
59
+ minitest (5.11.1)
60
+ mocha (1.3.0)
61
+ metaclass (~> 0.0.1)
62
+ mocha-on-bacon (0.2.3)
63
+ mocha (>= 0.13.0)
64
+ molinillo (0.5.7)
65
+ nanaimo (0.2.3)
66
+ nap (1.1.0)
67
+ netrc (0.11.0)
68
+ prettybacon (0.0.2)
69
+ bacon (~> 1.2)
70
+ rake (12.3.0)
71
+ ruby-macho (1.1.0)
72
+ thread_safe (0.3.6)
73
+ tzinfo (1.2.4)
74
+ thread_safe (~> 0.1)
75
+ xcodeproj (1.5.4)
76
+ CFPropertyList (~> 2.3.3)
77
+ claide (>= 1.0.2, < 2.0)
78
+ colored2 (~> 3.1)
79
+ nanaimo (~> 0.2.3)
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ bacon
86
+ bundler (~> 1.3)
87
+ cocoapods
88
+ cocoapods-developing-folder!
89
+ mocha
90
+ mocha-on-bacon
91
+ prettybacon
92
+ rake
93
+
94
+ BUNDLED WITH
95
+ 1.14.3
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2018 GaoJi <gaoji@mobike.com>
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # cocoapods-developing-folder
2
+
3
+ A description of cocoapods-developing-folder.
4
+
5
+ ## Installation
6
+
7
+ $ gem install cocoapods-developing-folder
8
+
9
+ ## Usage
10
+
11
+ $ pod spec folder POD_NAME
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ def specs(dir)
4
+ FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
5
+ end
6
+
7
+ desc 'Runs all the specs'
8
+ task :specs do
9
+ sh "bundle exec bacon #{specs('**')}"
10
+ end
11
+
12
+ task :default => :specs
13
+
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods-developing-folder/gem_version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-developing-folder'
8
+ spec.version = CocoapodsDevelopingFolder::VERSION
9
+ spec.authors = ['leavez']
10
+ spec.email = ['gaojiji@gmail.com']
11
+ spec.description = %q{Preserve the folder hierarchy for development pods in xcode.}
12
+ spec.summary = %q{Preserve the folder hierarchy for development pods in xcode}
13
+ spec.homepage = 'https://github.com/leavez/cocoapods-developing-folder'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.3'
22
+ spec.add_development_dependency 'rake'
23
+ end
@@ -0,0 +1,7 @@
1
+ module Pod
2
+ class Podfile
3
+ def use_folders
4
+ require 'cocoapods-developing-folder/command/patch.rb'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,96 @@
1
+
2
+
3
+ module Xcodeproj
4
+ class Project
5
+ module Object
6
+ class PBXGroup
7
+ def isPodGroup
8
+ @isPodGroup
9
+ end
10
+ def setIsPodGroup(isRealPod)
11
+ @isPodGroup = isRealPod
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+
19
+ require 'pathname'
20
+
21
+ module Pod
22
+ class Project
23
+
24
+ # return the absolute path of podfile
25
+ def pod_file_path
26
+ File.expand_path("../..", path)
27
+ end
28
+
29
+ def get_parent_development_pod_group(pod_name, path)
30
+
31
+ basePath = Pathname.new pod_file_path
32
+ targetPath = Pathname.new path
33
+ relativePath = targetPath.relative_path_from basePath
34
+ parentPath = relativePath.dirname.to_s
35
+
36
+ def getGroup(pathArray, rootGroup)
37
+ if pathArray.empty?
38
+ return rootGroup
39
+ end
40
+ headName = pathArray[0]
41
+ g = rootGroup.children.objects.find do |group|
42
+ group.name == headName and !group.isPodGroup
43
+ end
44
+ if g == nil
45
+ g = rootGroup.new_group(headName, nil, :group)
46
+ g.setIsPodGroup false
47
+ end
48
+ return getGroup(pathArray[1..-1], g)
49
+ end
50
+ pathArray = parentPath.split("/").select {|component| component.length > 0}
51
+ if parentPath == "."
52
+ pathArray = []
53
+ end
54
+
55
+ getGroup(pathArray, development_pods)
56
+ end
57
+
58
+
59
+ # ---- modified methods ----
60
+ def add_pod_group(pod_name, path, development = false, absolute = false)
61
+ # copy from original
62
+ raise '[BUG]' if pod_group(pod_name)
63
+ parent_group = development ? development_pods : pods
64
+ # end of copy from original
65
+
66
+ if development
67
+ parent_group = get_parent_development_pod_group(pod_name, path)
68
+ end
69
+
70
+ # copy from original
71
+ source_tree = absolute ? :absolute : :group
72
+ group = parent_group.new_group(pod_name, path, source_tree)
73
+ group.setIsPodGroup true
74
+ group
75
+ # end of copy from original
76
+ end
77
+
78
+ def pod_groups
79
+ def children(podGroup)
80
+ realGroups = podGroup.children.objects.select do |object|
81
+ object.isPodGroup
82
+ end
83
+ folders = podGroup.children.objects.select do |object|
84
+ !object.isPodGroup
85
+ end
86
+ folders.each do |folder|
87
+ realGroups.concat(children(folder))
88
+ end
89
+ return realGroups
90
+ end
91
+ pods.children.objects + children(development_pods)
92
+ end
93
+
94
+
95
+ end
96
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-developing-folder/command/folder'
@@ -0,0 +1,3 @@
1
+ module CocoapodsDevelopingFolder
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-developing-folder/gem_version'
@@ -0,0 +1 @@
1
+ require 'cocoapods-developing-folder/command'
@@ -0,0 +1,12 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ module Pod
4
+ describe Command::Folder do
5
+ describe 'CLAide' do
6
+ it 'registers it self' do
7
+ Command.parse(%w{ folder }).should.be.instance_of Command::Folder
8
+ end
9
+ end
10
+ end
11
+ end
12
+
@@ -0,0 +1,50 @@
1
+ require 'pathname'
2
+ ROOT = Pathname.new(File.expand_path('../../', __FILE__))
3
+ $:.unshift((ROOT + 'lib').to_s)
4
+ $:.unshift((ROOT + 'spec').to_s)
5
+
6
+ require 'bundler/setup'
7
+ require 'bacon'
8
+ require 'mocha-on-bacon'
9
+ require 'pretty_bacon'
10
+ require 'pathname'
11
+ require 'cocoapods'
12
+
13
+ Mocha::Configuration.prevent(:stubbing_non_existent_method)
14
+
15
+ require 'cocoapods_plugin'
16
+
17
+ #-----------------------------------------------------------------------------#
18
+
19
+ module Pod
20
+
21
+ # Disable the wrapping so the output is deterministic in the tests.
22
+ #
23
+ UI.disable_wrap = true
24
+
25
+ # Redirects the messages to an internal store.
26
+ #
27
+ module UI
28
+ @output = ''
29
+ @warnings = ''
30
+
31
+ class << self
32
+ attr_accessor :output
33
+ attr_accessor :warnings
34
+
35
+ def puts(message = '')
36
+ @output << "#{message}\n"
37
+ end
38
+
39
+ def warn(message = '', actions = [])
40
+ @warnings << "#{message}\n"
41
+ end
42
+
43
+ def print(message)
44
+ @output << message
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ #-----------------------------------------------------------------------------#
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-developing-folder
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - leavez
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Preserve the folder hierarchy for development pods in xcode.
42
+ email:
43
+ - gaojiji@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - cocoapods-developing-folder.gemspec
55
+ - lib/cocoapods-developing-folder.rb
56
+ - lib/cocoapods-developing-folder/command.rb
57
+ - lib/cocoapods-developing-folder/command/folder.rb
58
+ - lib/cocoapods-developing-folder/command/patch.rb
59
+ - lib/cocoapods-developing-folder/gem_version.rb
60
+ - lib/cocoapods_plugin.rb
61
+ - spec/command/folder_spec.rb
62
+ - spec/spec_helper.rb
63
+ homepage: https://github.com/leavez/cocoapods-developing-folder
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.6.8
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Preserve the folder hierarchy for development pods in xcode
87
+ test_files:
88
+ - spec/command/folder_spec.rb
89
+ - spec/spec_helper.rb