cocoapods-art 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 870aa39f965c0b9299969cfeb721dd7e2a99fb127f8897b6cd4a4625ba4d97a9
4
- data.tar.gz: d45dc5116f076aa0e6470398c3f337e7511fee88402ea6965acd8a7c8699220b
3
+ metadata.gz: 6766dae826818897438c0508ad91862de9ed358fa0ae373c12f321bacd1a9e56
4
+ data.tar.gz: 64a40d3fcf1774c102b492fff4bd0dbe0c9f83939ffe5be87fef4ffd115ed8f7
5
5
  SHA512:
6
- metadata.gz: f3d8d53970f76ac2044a709356e96a134305b7782967712a4b46681b8d08537b4397355aa0f5850df8bfaee27a86da724de787e9f7297ccd7b3774c298100447
7
- data.tar.gz: 49f413bcae0b4354aff602ab23883126f51741ef5cc01e2f13cdd5b15eb082cad181290801725c2299be9b491fd44debf6b66ba9a23a3042b0f8bf69c8f01acb
6
+ metadata.gz: 71ef2693733214201065da26895dd4c70f8734172025a43ef424a3fd2550e1b9f5b6ecff38af6cd5d925a87d028ef1d4111441d764522d992c9993722835d110
7
+ data.tar.gz: 14c9d9a133c9286e2ef159c886813b6b681769f6e2a01252ad475033d2fd30f1a54455e61265bc121885d5b7f351b01589219bb9aaf0b1e05dd25fc872fe595b
data/Gemfile.lock ADDED
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-art (1.0.4)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ CFPropertyList (3.0.1)
10
+ activesupport (4.2.11.1)
11
+ i18n (~> 0.7)
12
+ minitest (~> 5.1)
13
+ thread_safe (~> 0.3, >= 0.3.4)
14
+ tzinfo (~> 1.1)
15
+ algoliasearch (1.27.0)
16
+ httpclient (~> 2.8, >= 2.8.3)
17
+ json (>= 1.5.1)
18
+ atomos (0.1.3)
19
+ claide (1.0.3)
20
+ cocoapods (1.9.3)
21
+ activesupport (>= 4.0.2, < 5)
22
+ claide (>= 1.0.2, < 2.0)
23
+ cocoapods-core (= 1.9.3)
24
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
25
+ cocoapods-downloader (>= 1.2.2, < 2.0)
26
+ cocoapods-plugins (>= 1.0.0, < 2.0)
27
+ cocoapods-search (>= 1.0.0, < 2.0)
28
+ cocoapods-stats (>= 1.0.0, < 2.0)
29
+ cocoapods-trunk (>= 1.4.0, < 2.0)
30
+ cocoapods-try (>= 1.1.0, < 2.0)
31
+ colored2 (~> 3.1)
32
+ escape (~> 0.0.4)
33
+ fourflusher (>= 2.3.0, < 3.0)
34
+ gh_inspector (~> 1.0)
35
+ molinillo (~> 0.6.6)
36
+ nap (~> 1.0)
37
+ ruby-macho (~> 1.4)
38
+ xcodeproj (>= 1.11.1, < 2.0)
39
+ cocoapods-core (1.9.3)
40
+ activesupport (>= 4.0.2, < 6)
41
+ algoliasearch (~> 1.0)
42
+ concurrent-ruby (~> 1.0)
43
+ fuzzy_match (~> 2.0.4)
44
+ nap (~> 1.0)
45
+ cocoapods-deintegrate (1.0.4)
46
+ cocoapods-downloader (1.4.0)
47
+ cocoapods-plugins (1.0.0)
48
+ nap
49
+ cocoapods-search (1.0.0)
50
+ cocoapods-stats (1.1.0)
51
+ cocoapods-trunk (1.4.0)
52
+ nap (>= 0.8, < 2.0)
53
+ netrc (~> 0.11)
54
+ cocoapods-try (1.1.0)
55
+ colored2 (3.1.2)
56
+ concurrent-ruby (1.1.5)
57
+ escape (0.0.4)
58
+ fourflusher (2.3.1)
59
+ fuzzy_match (2.0.4)
60
+ gh_inspector (1.1.3)
61
+ httpclient (2.8.3)
62
+ i18n (0.9.5)
63
+ concurrent-ruby (~> 1.0)
64
+ json (2.2.0)
65
+ minitest (5.12.0)
66
+ molinillo (0.6.6)
67
+ nanaimo (0.2.6)
68
+ nap (1.1.0)
69
+ netrc (0.11.0)
70
+ rake (0.9.6)
71
+ ruby-macho (1.4.0)
72
+ thread_safe (0.3.6)
73
+ tzinfo (1.2.5)
74
+ thread_safe (~> 0.1)
75
+ xcodeproj (1.12.0)
76
+ CFPropertyList (>= 2.3.3, < 4.0)
77
+ atomos (~> 0.1.3)
78
+ claide (>= 1.0.2, < 2.0)
79
+ colored2 (~> 3.1)
80
+ nanaimo (~> 0.2.6)
81
+
82
+ PLATFORMS
83
+ ruby
84
+
85
+ DEPENDENCIES
86
+ bundler (~> 2.0.2)
87
+ claide
88
+ cocoapods
89
+ cocoapods-art!
90
+ cocoapods-core
91
+ cocoapods-downloader
92
+ rake (~> 0)
93
+
94
+ BUNDLED WITH
95
+ 2.0.2
data/README.md CHANGED
@@ -33,6 +33,20 @@ If your .netrc file is not located in your home directory, you can specify its l
33
33
  export COCOAPODS_ART_NETRC_PATH=$HOME/myproject/.netrc
34
34
  ```
35
35
 
36
+ Alternatively, you can specify a username and password/API key directly from an environment variable rather than utilizing the .netrc file, by setting the value of `COCOAPODS_ART_CREDENTIALS` to your Artifactory username and the password separated by a colon:
37
+
38
+ ```
39
+ export COCOAPODS_ART_CREDENTIALS="admin:password"
40
+ ````
41
+
42
+ If the `COCOAPODS_ART_CREDENTIALS` variable is set, its value will supersede any credentials specified in your .netrc file, causing them to be ignored.
43
+
44
+ You could set the following environment variable: COCOAPODS_ART_SSL_NO_REVOKE, this will add the flag --ssl-no-revoke to curl command.
45
+ If your are running on an environment where access to CRL isn't available you would still be able to access Artifactory via HTTPS using the cocoapods-art plugin on windows.
46
+ ```
47
+ set COCOAPODS_ART_SSL_NO_REVOKE=true
48
+ ```
49
+
36
50
  ## Artifactory Configuration
37
51
  See the [Artifactory User Guide](https://www.jfrog.com/confluence/display/RTF/CocoaPods+Repositories)
38
52
 
data/checkout.sh ADDED
@@ -0,0 +1,2 @@
1
+ git fetch origin pull/$1/head:pr-$1
2
+ git checkout pr-$1
@@ -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_art'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-art'
8
+ spec.version = CocoaPodsArt::VERSION
9
+ spec.authors = ['Dan Feldman']
10
+ spec.email = ['art-dev@jfrog.com']
11
+ spec.description = %q{Enables you to use Artifactory as your spec repo, as well as a repository for your pods}
12
+ spec.summary = %q{Artifactory support for CocoaPods}
13
+ spec.homepage = 'https://github.com/JFrogDev/cocoapods-art'
14
+ spec.license = 'Apache-2.0'
15
+
16
+ spec.files = Dir['lib/**/*.rb']
17
+ spec.files += Dir['[A-Z]*'] + Dir['test/**/*']
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 2.0.2'
22
+ spec.add_development_dependency 'rake', '~> 0'
23
+ end
data/lib/cocoapods_art.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # The namespace of the CocoaPods Artifactory plugin.
3
3
  #
4
4
  module CocoaPodsArt
5
- VERSION = '1.0.2'
5
+ VERSION = '1.1.0'
6
6
  end
@@ -44,19 +44,35 @@ module Pod
44
44
  class Http
45
45
  # Force flattening of index downloads with :indexDownload => true
46
46
  def self.options
47
- [:type, :flatten, :sha1, :sha256, :indexDownload]
47
+ [:type, :flatten, :sha1, :sha256, :indexDownload, :headers]
48
48
  end
49
49
 
50
50
  alias_method :orig_download_file, :download_file
51
51
  alias_method :orig_should_flatten?, :should_flatten?
52
52
 
53
53
  def download_file(full_filename)
54
- curl_options = ["-f", "-L", "-o", full_filename, url, "--create-dirs", "--netrc-optional"]
54
+ parameters = ["-f", "-L", "-o", full_filename, url, "--create-dirs", "--netrc-optional", '--retry', '2']
55
+ parameters << user_agent_argument if headers.nil? ||
56
+ headers.none? { |header| header.casecmp(USER_AGENT_HEADER).zero? }
57
+
58
+ ssl_conf = ["--cert", `git config --global http.sslcert`.gsub("\n", ""), "--key", `git config --global http.sslkey`.gsub("\n", "")]
59
+ parameters.concat(ssl_conf) if !ssl_conf.any?(&:blank?)
55
60
 
56
61
  netrc_path = ENV["COCOAPODS_ART_NETRC_PATH"]
57
- curl_options.concat(["--netrc-file", Pathname.new(netrc_path).expand_path]) if netrc_path
62
+ parameters.concat(["--netrc-file", Pathname.new(netrc_path).expand_path]) if netrc_path
63
+
64
+ art_credentials = ENV["COCOAPODS_ART_CREDENTIALS"]
65
+ parameters.concat(["--user", art_credentials]) if art_credentials
66
+
67
+ winssl_no_revoke = ENV["COCOAPODS_ART_SSL_NO_REVOKE"]
68
+ parameters.concat(["--ssl-no-revoke"]) if defined? winssl_no_revoke && "true".casecmp(winssl_no_revoke)
58
69
 
59
- curl! curl_options
70
+ headers.each do |h|
71
+ parameters << '-H'
72
+ parameters << h
73
+ end unless headers.nil?
74
+
75
+ curl! parameters
60
76
  end
61
77
 
62
78
  # Note that we disabled flattening here for the ENTIRE client to deal with
@@ -103,4 +119,36 @@ module Pod
103
119
  end
104
120
  end
105
121
  end
106
- end
122
+ end
123
+
124
+ module Pod
125
+ class Source
126
+ class Manager
127
+
128
+ alias_method :orig_source_from_path, :source_from_path
129
+
130
+ # @return [Source] The Source at a given path.
131
+ #
132
+ # @param [Pathname] path
133
+ # The local file path to one podspec repo.
134
+ #
135
+ def source_from_path(path)
136
+ @sources_by_path ||= Hash.new do |hash, key|
137
+ art_repo = "#{UTIL.get_repos_art_dir()}/#{key.basename}"
138
+ hash[key] = case
139
+ when key.basename.to_s == Pod::TrunkSource::TRUNK_REPO_NAME
140
+ TrunkSource.new(key)
141
+ when (key + '.url').exist?
142
+ CDNSource.new(key)
143
+ when File.exist?("#{art_repo}/.artpodrc")
144
+ create_source_from_name(key.basename)
145
+ else
146
+ Source.new(key)
147
+ end
148
+ end
149
+ @sources_by_path[path]
150
+ end
151
+
152
+ end
153
+ end
154
+ end
@@ -36,7 +36,7 @@ module Pod
36
36
  UI.section("Retrieving index from `#{@url}` into local spec repo `#{@name}`") do
37
37
  # Check if a repo with the same name under repos/ already exists
38
38
  repos_path = "#{Pod::Config.instance.home_dir}/repos"
39
- raise Informative, "Path repos_path/#{@name} already exists - remove it first, "\
39
+ raise Informative, "Path #{repos_path}/#{@name} already exists - remove it first, "\
40
40
  "or run 'pod repo-art update #{@name}' to update it" if File.exist?("#{repos_path}/#{@name}") && !@silent
41
41
 
42
42
  # Check if a repo with the same name under repo-art/ already exists
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-art
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.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: 2018-11-21 00:00:00.000000000 Z
11
+ date: 2021-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: 2.0.2
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
- version: '1.3'
26
+ version: 2.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -47,9 +47,12 @@ extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
49
  - Gemfile
50
+ - Gemfile.lock
50
51
  - LICENSE
51
52
  - README.md
52
53
  - Rakefile
54
+ - checkout.sh
55
+ - cocoapods_art.gemspec
53
56
  - lib/art_source.rb
54
57
  - lib/cocoapods_art.rb
55
58
  - lib/cocoapods_plugin.rb
@@ -81,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
84
  - !ruby/object:Gem::Version
82
85
  version: '0'
83
86
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.7.6
87
+ rubygems_version: 3.0.3
86
88
  signing_key:
87
89
  specification_version: 4
88
90
  summary: Artifactory support for CocoaPods