cocoapods-art 0.9.5 → 1.0.0
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 +4 -4
- data/lib/art_source.rb +0 -1
- data/lib/cocoapods_art.rb +1 -1
- data/lib/cocoapods_plugin.rb +19 -23
- data/lib/pod/artifactory_repo.rb +22 -0
- data/lib/pod/command/repo_art.rb +5 -0
- data/lib/pod/command/repo_art/add.rb +17 -4
- data/lib/pod/command/repo_art/lint.rb +41 -7
- data/lib/pod/command/repo_art/list.rb +13 -24
- data/lib/pod/command/repo_art/remove.rb +13 -4
- data/lib/pod/command/repo_art/update.rb +43 -54
- data/lib/util/repo_util.rb +41 -1
- metadata +15 -16
- data/Gemfile.lock +0 -79
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a57ec3a1f2bfe311aef6d7d2ca1537a326b4b3a
|
4
|
+
data.tar.gz: 1c3c40007939b2d37af8c309460213a702bd32f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1b189c95eeecc33a00b769790a9574d4d606c7003816c2846b824d390ece83626be84e0900b3336a1a580eb73e8bc964b4dafcc1cde713d4ad57df6d8d13197
|
7
|
+
data.tar.gz: 23a95dc96bb0770e854b20ddd189e5a2900e8c53ee3c29d3d6eaa29af76d11525aa824d3708c2f9f03d2d5c5a66511956c3a3c4a397da34c3d2c366bc00c6cc8
|
data/lib/art_source.rb
CHANGED
data/lib/cocoapods_art.rb
CHANGED
data/lib/cocoapods_plugin.rb
CHANGED
@@ -1,23 +1,17 @@
|
|
1
1
|
require 'pod/command/repo_art'
|
2
2
|
require 'art_source'
|
3
3
|
require 'cocoapods-downloader'
|
4
|
+
require 'cocoapods_art'
|
4
5
|
|
5
|
-
Pod::
|
6
|
-
Pod::UI.message 'cocoapods-art received source_provider hook'
|
7
|
-
return unless (sources = options['sources'])
|
8
|
-
sources.each do |source_name|
|
9
|
-
source = create_source_from_name(source_name)
|
10
|
-
context.add_source(source)
|
11
|
-
end
|
12
|
-
end
|
6
|
+
UTIL = Pod::RepoArt::RepoUtil
|
13
7
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
Pod::HooksManager.register('cocoapods-art', :source_provider) do |context, options|
|
9
|
+
Pod::UI.message 'cocoapods-art received source_provider hook'
|
10
|
+
return unless (sources = options['sources'])
|
11
|
+
sources.each do |source_name|
|
12
|
+
source = create_source_from_name(source_name)
|
13
|
+
context.add_source(source)
|
14
|
+
end
|
21
15
|
end
|
22
16
|
|
23
17
|
# @param source_name => name of source incoming from the Podfile configuration
|
@@ -25,11 +19,15 @@ end
|
|
25
19
|
# @return [ArtSource] source of the local spec repo which corresponds to to the given name
|
26
20
|
#
|
27
21
|
def create_source_from_name(source_name)
|
22
|
+
art_repo = "#{UTIL.get_repos_art_dir()}/#{source_name}"
|
28
23
|
repos_dir = Pod::Config.instance.repos_dir
|
29
24
|
repo = repos_dir + source_name
|
30
|
-
|
31
|
-
|
32
|
-
|
25
|
+
|
26
|
+
Pod::UI.puts "#{art_repo}/.artpodrc\n"
|
27
|
+
|
28
|
+
if File.exist?("#{art_repo}/.artpodrc")
|
29
|
+
url = File.read("#{art_repo}/.artpodrc")
|
30
|
+
Pod::ArtSource.new(art_repo, url)
|
33
31
|
elsif Dir.exist?("#{repo}")
|
34
32
|
Pod::ArtSource.new(repo, '');
|
35
33
|
else
|
@@ -38,8 +36,8 @@ def create_source_from_name(source_name)
|
|
38
36
|
end
|
39
37
|
|
40
38
|
#
|
41
|
-
# This
|
42
|
-
# to manage credentials.
|
39
|
+
# This patch is here just so we can pass the -n flag to curl and thus use the ~/.netrc file
|
40
|
+
# to manage credentials.
|
43
41
|
#
|
44
42
|
module Pod
|
45
43
|
module Downloader
|
@@ -71,12 +69,11 @@ module Pod
|
|
71
69
|
orig_should_flatten?
|
72
70
|
end
|
73
71
|
end
|
74
|
-
|
75
72
|
end
|
76
73
|
end
|
77
74
|
end
|
78
75
|
|
79
|
-
#
|
76
|
+
# Override pod's default behavior which is force the master spec repo if
|
80
77
|
# no sources defined - at this point the plugin sources are not yet fetched from the plugin
|
81
78
|
# with the source provider hook thus empty Podfiles that only have the plugin declared will
|
82
79
|
# force a master repo update.
|
@@ -99,7 +96,6 @@ module Pod
|
|
99
96
|
orig_sources
|
100
97
|
end
|
101
98
|
end
|
102
|
-
|
103
99
|
end
|
104
100
|
end
|
105
101
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Pod
|
2
|
+
class ArtifactoryRepo
|
3
|
+
def initialize(path, url)
|
4
|
+
@path = path
|
5
|
+
@url = url
|
6
|
+
create_name
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_name
|
10
|
+
split = @path.split("/")
|
11
|
+
if split.length > 0
|
12
|
+
@name = split[split.length - 1]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_reader :name
|
17
|
+
attr_reader :path
|
18
|
+
attr_reader :url
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
data/lib/pod/command/repo_art.rb
CHANGED
@@ -10,6 +10,8 @@ module Pod
|
|
10
10
|
require 'pod/command/repo_art/update'
|
11
11
|
require 'pod/command/repo_art/list'
|
12
12
|
|
13
|
+
UTIL = Pod::RepoArt::RepoUtil
|
14
|
+
|
13
15
|
self.abstract_command = true
|
14
16
|
self.version = CocoaPodsArt::VERSION
|
15
17
|
self.description = 'Enables working with JFrog Artifactory as a Specs repo and as a repository for Pods.'\
|
@@ -20,6 +22,9 @@ module Pod
|
|
20
22
|
|
21
23
|
self.default_subcommand = 'list'
|
22
24
|
|
25
|
+
def init
|
26
|
+
@repos_art_dir = UTIL.get_repos_art_dir()
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
25
30
|
end
|
@@ -9,8 +9,8 @@ module Pod
|
|
9
9
|
self.summary = 'Add a Specs repo from Artifactory.'
|
10
10
|
|
11
11
|
self.description = <<-DESC
|
12
|
-
Retrieves the index from an Artifactory instance at 'URL' to the local spec repos
|
13
|
-
directory at `~/.cocoapods/repos/'NAME'`.
|
12
|
+
Retrieves the index from an Artifactory instance at 'URL' to the local spec repos-art
|
13
|
+
directory at `~/.cocoapods/repos-art/'NAME'`.
|
14
14
|
DESC
|
15
15
|
|
16
16
|
self.arguments = [
|
@@ -19,6 +19,7 @@ module Pod
|
|
19
19
|
]
|
20
20
|
|
21
21
|
def initialize(argv)
|
22
|
+
init
|
22
23
|
@name, @url = argv.shift_argument, argv.shift_argument
|
23
24
|
@silent = argv.flag?('silent', false)
|
24
25
|
super
|
@@ -33,11 +34,18 @@ module Pod
|
|
33
34
|
|
34
35
|
def run
|
35
36
|
UI.section("Retrieving index from `#{@url}` into local spec repo `#{@name}`") do
|
36
|
-
|
37
|
-
|
37
|
+
# Check if a repo with the same name under repos/ already exists
|
38
|
+
repos_path = "#{Pod::Config.instance.home_dir}/repos"
|
39
|
+
raise Informative, "Path repos_path/#{@name} already exists - remove it first, "\
|
40
|
+
"or run 'pod repo-art update #{@name}' to update it" if File.exist?("#{repos_path}/#{@name}") && !@silent
|
41
|
+
|
42
|
+
# Check if a repo with the same name under repo-art/ already exists
|
43
|
+
repo_dir_root = "#{@repos_art_dir}/#{@name}"
|
38
44
|
raise Informative, "Path #{repo_dir_root} already exists - remove it first, "\
|
39
45
|
"or run 'pod repo-art update #{@name}' to update it" if File.exist?(repo_dir_root) && !@silent
|
40
46
|
|
47
|
+
FileUtils::mkdir_p repo_dir_root
|
48
|
+
|
41
49
|
repo_dir_specs = "#{repo_dir_root}/Specs"
|
42
50
|
begin
|
43
51
|
downloader = Pod::Downloader::Http.new(repo_dir_specs, "#{@url}/index/fetchIndex", :type => 'tgz', :indexDownload => true)
|
@@ -60,6 +68,11 @@ module Pod
|
|
60
68
|
raise Informative, "Cannot create file '#{artpodrc_path}' because : #{e.message}."\
|
61
69
|
'- your Artifactory-backed Specs repo will not work correctly without it!'
|
62
70
|
end
|
71
|
+
# Create a local git repository in the newly added Artifactory local repo
|
72
|
+
system "cd '#{repo_dir_root}' && git init && git add . && git commit -m 'Artifactory repo init'"
|
73
|
+
|
74
|
+
# Create local repo under repos/ which is a remote for the new local git repository
|
75
|
+
system "cd '#{repos_path}' && git clone file://#{repo_dir_root}"
|
63
76
|
end
|
64
77
|
UI.puts "Successfully added repo #{@name}".green unless @silent
|
65
78
|
end
|
@@ -7,7 +7,7 @@ module Pod
|
|
7
7
|
self.description = <<-DESC
|
8
8
|
Lints the spec-repo `NAME`. If a directory is provided it is assumed
|
9
9
|
to be the root of a repo. Finally, if `NAME` is not provided this
|
10
|
-
will lint all the spec-repos known to CocoaPods
|
10
|
+
will lint all the Artifactory-backed spec-repos known to CocoaPods.
|
11
11
|
DESC
|
12
12
|
|
13
13
|
self.arguments = [
|
@@ -21,15 +21,49 @@ module Pod
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def initialize(argv)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
@cmd.validate!
|
24
|
+
init
|
25
|
+
@name = argv.shift_argument
|
26
|
+
@only_errors = argv.flag?('only-errors')
|
27
|
+
super
|
29
28
|
end
|
30
29
|
|
31
30
|
def run
|
32
|
-
@
|
31
|
+
repos = if @name
|
32
|
+
UTIL.get_art_repo(@name)
|
33
|
+
else
|
34
|
+
UTIL.get_art_repos
|
35
|
+
end
|
36
|
+
|
37
|
+
repos.each do |repo|
|
38
|
+
UI.puts "\nLinting spec repo `#{repo.name}`\n".yellow
|
39
|
+
|
40
|
+
validator = Source::HealthReporter.new(repo.path)
|
41
|
+
validator.pre_check do |_name, _version|
|
42
|
+
UI.print '.'
|
43
|
+
end
|
44
|
+
report = validator.analyze
|
45
|
+
UI.puts
|
46
|
+
UI.puts
|
47
|
+
|
48
|
+
report.pods_by_warning.each do |message, versions_by_name|
|
49
|
+
UI.puts "-> #{message}".yellow
|
50
|
+
versions_by_name.each { |name, versions| UI.puts " - #{name} (#{versions * ', '})" }
|
51
|
+
UI.puts
|
52
|
+
end
|
53
|
+
|
54
|
+
report.pods_by_error.each do |message, versions_by_name|
|
55
|
+
UI.puts "-> #{message}".red
|
56
|
+
versions_by_name.each { |name, versions| UI.puts " - #{name} (#{versions * ', '})" }
|
57
|
+
UI.puts
|
58
|
+
end
|
59
|
+
|
60
|
+
UI.puts "Analyzed #{report.analyzed_paths.count} podspecs files.\n\n"
|
61
|
+
if report.pods_by_error.count.zero?
|
62
|
+
UI.puts 'All the specs passed validation.'.green << "\n\n"
|
63
|
+
else
|
64
|
+
raise Informative, "#{report.pods_by_error.count} podspecs failed validation."
|
65
|
+
end
|
66
|
+
end
|
33
67
|
end
|
34
68
|
|
35
69
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'util/repo_util'
|
2
|
+
require 'pod/artifactory_repo'
|
2
3
|
|
3
4
|
module Pod
|
4
5
|
class Command
|
@@ -10,7 +11,7 @@ module Pod
|
|
10
11
|
self.summary = 'List Artifactory-backed repos.'
|
11
12
|
|
12
13
|
self.description = <<-DESC
|
13
|
-
List the Artifactory repos from the local spec-repos directory at `~/.cocoapods/repos/.`
|
14
|
+
List the Artifactory repos from the local spec-repos directory at `~/.cocoapods/repos-art/.`
|
14
15
|
DESC
|
15
16
|
|
16
17
|
def self.options
|
@@ -20,41 +21,29 @@ module Pod
|
|
20
21
|
end
|
21
22
|
|
22
23
|
def initialize(argv)
|
24
|
+
init
|
23
25
|
@count_only = argv.flag?('count-only')
|
24
26
|
super
|
25
27
|
end
|
26
28
|
|
27
29
|
def run
|
28
|
-
|
29
|
-
|
30
|
-
|
30
|
+
repos = UTIL.get_art_repos
|
31
|
+
print_art_repos(repos) unless @count_only
|
32
|
+
print_art_repos_count(repos)
|
31
33
|
end
|
32
34
|
|
33
|
-
def
|
34
|
-
|
35
|
-
UI.title
|
36
|
-
|
35
|
+
def print_art_repos(repos)
|
36
|
+
for repo in repos
|
37
|
+
UI.title repo.name do
|
38
|
+
UI.puts "- URL: #{repo.url}"
|
39
|
+
UI.puts "- Path: #{repo.path}"
|
37
40
|
end
|
38
41
|
end
|
39
42
|
UI.puts "\n"
|
40
43
|
end
|
41
44
|
|
42
|
-
def
|
43
|
-
|
44
|
-
UI.puts "- URL: #{UTIL.get_art_url(source.repo)}" if UTIL.artpodrc_file_exists(source.repo)
|
45
|
-
UI.puts "- Path: #{source.repo}"
|
46
|
-
end
|
47
|
-
|
48
|
-
# @return [Source] The list of the Artifactory sources.
|
49
|
-
#
|
50
|
-
def art_sources
|
51
|
-
Pod::Config.instance.sources_manager.all.select do |source|
|
52
|
-
UTIL.art_repo?(source.repo)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def print_source_count(sources)
|
57
|
-
number_of_repos = sources.length
|
45
|
+
def print_art_repos_count(repos)
|
46
|
+
number_of_repos = repos.length
|
58
47
|
repo_string = number_of_repos != 1 ? 'repos' : 'repo'
|
59
48
|
UI.puts "#{number_of_repos} #{repo_string}\n".green
|
60
49
|
end
|
@@ -5,7 +5,7 @@ module Pod
|
|
5
5
|
self.summary = 'Remove an Artifactory-backed Specs repo'
|
6
6
|
|
7
7
|
self.description = <<-DESC
|
8
|
-
Deletes the Spec repo called 'NAME' from the local spec-repos directory at '~/.cocoapods/repos/.'
|
8
|
+
Deletes the Spec repo called 'NAME' from the local spec-repos directory at '~/.cocoapods/repos-art/.'
|
9
9
|
DESC
|
10
10
|
|
11
11
|
self.arguments = [
|
@@ -13,20 +13,29 @@ module Pod
|
|
13
13
|
]
|
14
14
|
|
15
15
|
def initialize(argv)
|
16
|
-
|
16
|
+
init
|
17
|
+
@name = argv.shift_argument
|
17
18
|
super
|
18
19
|
end
|
19
20
|
|
20
21
|
def validate!
|
21
22
|
super
|
22
|
-
@
|
23
|
+
help! 'Deleting a repo needs a `NAME`.' unless @name
|
24
|
+
help! "repo #{@name} does not exist" unless File.directory?(repo_dir_root)
|
25
|
+
help! "You do not have permission to delete the #{@name} repository." \
|
26
|
+
'Perhaps try prefixing this command with sudo.' unless File.writable?(repo_dir_root)
|
23
27
|
end
|
24
28
|
|
25
29
|
def run
|
26
|
-
@
|
30
|
+
UI.section("Removing spec repo `#{@name}`") do
|
31
|
+
FileUtils.rm_rf(repo_dir_root)
|
32
|
+
end
|
27
33
|
end
|
28
34
|
|
35
|
+
def repo_dir_root
|
36
|
+
"#{@repos_art_dir}/#{@name}"
|
29
37
|
end
|
30
38
|
end
|
31
39
|
end
|
32
40
|
end
|
41
|
+
end
|
@@ -47,80 +47,69 @@ module Pod
|
|
47
47
|
#
|
48
48
|
def update(source_name = nil, show_output = false)
|
49
49
|
if source_name
|
50
|
-
sources = [
|
50
|
+
sources = [UTIL.get_art_repo(source_name)]
|
51
51
|
else
|
52
|
-
sources =
|
52
|
+
sources = UTIL.get_art_repos()
|
53
53
|
end
|
54
|
+
|
54
55
|
sources.each do |source|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
56
|
+
UI.section "Updating spec repo `#{source.name}`" do
|
57
|
+
Dir.chdir(source.path) do
|
58
|
+
begin
|
59
|
+
# TODO HEAD to api/updateTime
|
60
|
+
# TODO unless .lastupdated >= api/updateTime do
|
61
|
+
# TODO Until we support delta downloads, update is actually add if not currently up tp date
|
62
|
+
url = UTIL.get_art_url(source.path)
|
63
|
+
if @prune
|
64
|
+
hard_update(source.name, source.path, url)
|
65
|
+
else
|
66
|
+
soft_update(source.path, url)
|
67
|
+
end
|
68
|
+
UI.puts "Successfully updated repo #{source.name}".green if show_output && !config.verbose?
|
69
|
+
rescue => e
|
70
|
+
UI.warn "Unable to update repo `#{source.name}`: #{e.message}"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
76
77
|
# Performs a 'soft' update which appends any changes from the remote without deleting out-of-sync entries
|
77
78
|
#
|
78
|
-
def soft_update(
|
79
|
-
downloader = Pod::Downloader::Http.new("#{
|
79
|
+
def soft_update(path, url)
|
80
|
+
downloader = Pod::Downloader::Http.new("#{path}", "#{url}/index/fetchIndex", :type => 'tgz', :indexDownload => true)
|
80
81
|
downloader.download
|
81
|
-
UTIL.cleanup_index_download("#{
|
82
|
-
UTIL.del_redundant_spec_dir("#{
|
82
|
+
UTIL.cleanup_index_download("#{path}")
|
83
|
+
UTIL.del_redundant_spec_dir("#{path}/Specs/Specs")
|
84
|
+
system "cd '#{path}' && git add . && git commit -m 'Artifactory repo update specs'"
|
83
85
|
end
|
84
86
|
|
85
87
|
# Performs a 'hard' update which prunes all index entries which are not sync with the remote (override)
|
86
88
|
#
|
87
|
-
def hard_update(
|
89
|
+
def hard_update(name, path, url)
|
90
|
+
UI.puts path
|
88
91
|
begin
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
+
repos_path = "#{Pod::Config.instance.home_dir}/repos/#{name}"
|
93
|
+
repos_art_path = "#{Pod::Config.instance.home_dir}/repos-art/#{name}"
|
94
|
+
|
95
|
+
repo_update_tmp = "#{repos_path}_update_tmp"
|
96
|
+
repo_art_update_tmp = "#{repos_art_path}_update_tmp"
|
97
|
+
|
98
|
+
system("mv", repos_path.to_s, repo_update_tmp)
|
99
|
+
system("mv", repos_art_path.to_s, repo_art_update_tmp)
|
100
|
+
|
101
|
+
argv = CLAide::ARGV.new([name, url, '--silent'])
|
92
102
|
Pod::Command::RepoArt::Add.new(argv).run
|
103
|
+
|
93
104
|
FileUtils.remove_entry_secure(repo_update_tmp, :force => true)
|
105
|
+
FileUtils.remove_entry_secure(repo_art_update_tmp, :force => true)
|
94
106
|
rescue => e
|
95
|
-
FileUtils.remove_entry_secure(
|
96
|
-
system("mv", repo_update_tmp,
|
107
|
+
FileUtils.remove_entry_secure(path.to_s, :force => true)
|
108
|
+
system("mv", repo_update_tmp, repos_path.to_s)
|
109
|
+
system("mv", repo_art_update_tmp, repos_art_path.to_s)
|
97
110
|
raise Informative, "Error getting the index from Artifactory at: '#{url}' : #{e.message}"
|
98
111
|
end
|
99
112
|
end
|
100
|
-
|
101
|
-
# @return [Source] The Artifactory source with the given name.
|
102
|
-
#
|
103
|
-
# @param [String] name The name of the source.
|
104
|
-
#
|
105
|
-
def art_source_named(name)
|
106
|
-
specified_source = Pod::Config.instance.sources_manager.aggregate.sources.find { |s| s.name == name }
|
107
|
-
unless specified_source
|
108
|
-
raise Informative, "Unable to find the repo called `#{name}`."
|
109
|
-
end
|
110
|
-
unless UTIL.art_repo?(specified_source.repo)
|
111
|
-
raise Informative, "Repo `#{name}` is not an Artifactory-backed repo."
|
112
|
-
end
|
113
|
-
specified_source
|
114
|
-
end
|
115
|
-
|
116
|
-
# @return [Source] The list of the Artifactory sources.
|
117
|
-
#
|
118
|
-
def art_sources
|
119
|
-
Pod::Config.instance.sources_manager.all.select do |source|
|
120
|
-
UTIL.art_repo?(source.repo)
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
113
|
end
|
125
114
|
end
|
126
115
|
end
|
data/lib/util/repo_util.rb
CHANGED
@@ -4,6 +4,41 @@ module Pod
|
|
4
4
|
class RepoArt
|
5
5
|
class RepoUtil
|
6
6
|
|
7
|
+
# @return list of Artifactory repos, read from the ~/.cocoapods/repos-art
|
8
|
+
#
|
9
|
+
def self.get_art_repos
|
10
|
+
repos_art_dir = UTIL.get_repos_art_dir()
|
11
|
+
dirs = Dir.glob "#{repos_art_dir}/*/"
|
12
|
+
repos = []
|
13
|
+
for dir in dirs
|
14
|
+
if UTIL.artpodrc_file_exists(dir)
|
15
|
+
url = UTIL.get_art_url(dir)
|
16
|
+
repos.push ArtifactoryRepo.new(dir, url)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
repos
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [Source] The Artifactory source with the given name.
|
23
|
+
#
|
24
|
+
# @param [String] name The name of the source.
|
25
|
+
#
|
26
|
+
def self.get_art_repo(name)
|
27
|
+
#specified_source = Pod::Config.instance.sources_manager.aggregate.sources.find { |s| s.name == name }
|
28
|
+
repos = get_art_repos()
|
29
|
+
art_repo = nil
|
30
|
+
for repo in repos
|
31
|
+
if repo.name == name
|
32
|
+
art_repo = repo
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
unless art_repo
|
37
|
+
raise Informative, "Unable to find the Artifactory-backed repo called `#{name}`."
|
38
|
+
end
|
39
|
+
art_repo
|
40
|
+
end
|
41
|
+
|
7
42
|
# @return whether a source is an Artifactory backed repo.
|
8
43
|
#
|
9
44
|
# @param [Pathname] repo_root_path root directory of the repo.
|
@@ -28,6 +63,12 @@ module Pod
|
|
28
63
|
File.exist?("#{dir}/.artpodrc")
|
29
64
|
end
|
30
65
|
|
66
|
+
# @return the full path to the repos-art directory
|
67
|
+
#
|
68
|
+
def self.get_repos_art_dir()
|
69
|
+
"#{Pod::Config.instance.home_dir}/repos-art"
|
70
|
+
end
|
71
|
+
|
31
72
|
# Cleans up all of the junk left over from using the Downloader
|
32
73
|
#
|
33
74
|
def self.cleanup_index_download(tmp_file_dir)
|
@@ -40,7 +81,6 @@ module Pod
|
|
40
81
|
# The default flattening the Downloader uses for tgz makes this screwy
|
41
82
|
Dir.delete(redundant_specs_dir) if (Dir.exist?(redundant_specs_dir) && Dir.glob(redundant_specs_dir + '/' + '*').empty?)
|
42
83
|
end
|
43
|
-
|
44
84
|
end
|
45
85
|
end
|
46
86
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-art
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Feldman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Enables you to use Artifactory as your spec repo, as well as a repository
|
@@ -46,22 +46,22 @@ executables: []
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- Gemfile
|
50
|
-
- Gemfile.lock
|
51
|
-
- LICENSE
|
52
|
-
- README.md
|
53
|
-
- Rakefile
|
54
49
|
- lib/art_source.rb
|
55
50
|
- lib/cocoapods_art.rb
|
56
51
|
- lib/cocoapods_plugin.rb
|
57
|
-
- lib/pod/
|
52
|
+
- lib/pod/artifactory_repo.rb
|
58
53
|
- lib/pod/command/repo_art/add.rb
|
59
54
|
- lib/pod/command/repo_art/lint.rb
|
60
55
|
- lib/pod/command/repo_art/list.rb
|
61
56
|
- lib/pod/command/repo_art/push.rb
|
62
57
|
- lib/pod/command/repo_art/remove.rb
|
63
58
|
- lib/pod/command/repo_art/update.rb
|
59
|
+
- lib/pod/command/repo_art.rb
|
64
60
|
- lib/util/repo_util.rb
|
61
|
+
- Gemfile
|
62
|
+
- LICENSE
|
63
|
+
- Rakefile
|
64
|
+
- README.md
|
65
65
|
homepage: https://github.com/JFrogDev/cocoapods-art
|
66
66
|
licenses:
|
67
67
|
- Apache-2.0
|
@@ -72,19 +72,18 @@ require_paths:
|
|
72
72
|
- lib
|
73
73
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.0.14
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Artifactory support for CocoaPods
|
89
89
|
test_files: []
|
90
|
-
has_rdoc:
|
data/Gemfile.lock
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
cocoapods-art (0.9.3)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
activesupport (4.2.6)
|
10
|
-
i18n (~> 0.7)
|
11
|
-
json (~> 1.7, >= 1.7.7)
|
12
|
-
minitest (~> 5.1)
|
13
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
14
|
-
tzinfo (~> 1.1)
|
15
|
-
claide (1.0.0)
|
16
|
-
cocoapods (1.0.1)
|
17
|
-
activesupport (>= 4.0.2)
|
18
|
-
claide (>= 1.0.0, < 2.0)
|
19
|
-
cocoapods-core (= 1.0.1)
|
20
|
-
cocoapods-deintegrate (>= 1.0.0, < 2.0)
|
21
|
-
cocoapods-downloader (>= 1.0.0, < 2.0)
|
22
|
-
cocoapods-plugins (>= 1.0.0, < 2.0)
|
23
|
-
cocoapods-search (>= 1.0.0, < 2.0)
|
24
|
-
cocoapods-stats (>= 1.0.0, < 2.0)
|
25
|
-
cocoapods-trunk (>= 1.0.0, < 2.0)
|
26
|
-
cocoapods-try (>= 1.0.0, < 2.0)
|
27
|
-
colored (~> 1.2)
|
28
|
-
escape (~> 0.0.4)
|
29
|
-
fourflusher (~> 0.3.0)
|
30
|
-
molinillo (~> 0.4.5)
|
31
|
-
nap (~> 1.0)
|
32
|
-
xcodeproj (>= 1.1.0, < 2.0)
|
33
|
-
cocoapods-core (1.0.1)
|
34
|
-
activesupport (>= 4.0.2)
|
35
|
-
fuzzy_match (~> 2.0.4)
|
36
|
-
nap (~> 1.0)
|
37
|
-
cocoapods-deintegrate (1.0.0)
|
38
|
-
cocoapods-downloader (1.0.0)
|
39
|
-
cocoapods-plugins (1.0.0)
|
40
|
-
nap
|
41
|
-
cocoapods-search (1.0.0)
|
42
|
-
cocoapods-stats (1.0.0)
|
43
|
-
cocoapods-trunk (1.0.0)
|
44
|
-
nap (>= 0.8, < 2.0)
|
45
|
-
netrc (= 0.7.8)
|
46
|
-
cocoapods-try (1.0.0)
|
47
|
-
colored (1.2)
|
48
|
-
escape (0.0.4)
|
49
|
-
fourflusher (0.3.1)
|
50
|
-
fuzzy_match (2.0.4)
|
51
|
-
i18n (0.7.0)
|
52
|
-
json (1.8.3)
|
53
|
-
minitest (5.9.0)
|
54
|
-
molinillo (0.4.5)
|
55
|
-
nap (1.1.0)
|
56
|
-
netrc (0.7.8)
|
57
|
-
rake (0.9.6)
|
58
|
-
thread_safe (0.3.5)
|
59
|
-
tzinfo (1.2.2)
|
60
|
-
thread_safe (~> 0.1)
|
61
|
-
xcodeproj (1.1.0)
|
62
|
-
activesupport (>= 3)
|
63
|
-
claide (>= 1.0.0, < 2.0)
|
64
|
-
colored (~> 1.2)
|
65
|
-
|
66
|
-
PLATFORMS
|
67
|
-
ruby
|
68
|
-
|
69
|
-
DEPENDENCIES
|
70
|
-
bundler (~> 1.3)
|
71
|
-
claide
|
72
|
-
cocoapods
|
73
|
-
cocoapods-art!
|
74
|
-
cocoapods-core
|
75
|
-
cocoapods-downloader
|
76
|
-
rake (~> 0)
|
77
|
-
|
78
|
-
BUNDLED WITH
|
79
|
-
1.12.5
|