carthage_cache 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/carthage_cache.gemspec +2 -1
- data/exe/carthage_cache +2 -2
- data/lib/carthage_cache/application.rb +7 -1
- data/lib/carthage_cache/archive_builder.rb +5 -1
- data/lib/carthage_cache/configuration.rb +6 -0
- data/lib/carthage_cache/configurator.rb +1 -1
- data/lib/carthage_cache/configurator_wizard.rb +5 -0
- data/lib/carthage_cache/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d9073ae5c1c8c1606fae0af3e8fcbd4cc970174
|
4
|
+
data.tar.gz: a5b435d18b552a2f57e12ac5af3f644de3358340
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 509ab485f2f00b67e736426445b0959627bea03ec853047f4c7db4907fa78c33189f1582569edae94ca162dd6922180e2f715fd0584d394edc8034c93923bd32
|
7
|
+
data.tar.gz: b236a7d83332526ca67f4b8448f0db7840186bbcf3102ebe76b4cef1b6cf46beea878cb6c7b2c56721583552ee6bfa63570c349e2ad7ecf11b59010b50ec28c6
|
data/carthage_cache.gemspec
CHANGED
@@ -28,7 +28,8 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
29
29
|
spec.add_development_dependency "rspec"
|
30
30
|
spec.add_development_dependency "pry"
|
31
|
-
spec.add_development_dependency "
|
31
|
+
spec.add_development_dependency "simplecov"
|
32
|
+
spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
|
32
33
|
|
33
34
|
spec.add_dependency "aws-sdk", "~> 2.0"
|
34
35
|
spec.add_dependency "commander", "~> 4.3"
|
data/exe/carthage_cache
CHANGED
@@ -57,10 +57,10 @@ command :publish do |c|
|
|
57
57
|
c.option '-w', '--prune-white-list PRUNE_WHITE_LIST', String, 'Path to a YAML file containing the prune white list.'
|
58
58
|
c.option '-x', '--platforms PLATFORMS', String, 'A comma separated list of platforms that should be archived. Platforms not present in this list won\'t be archived'
|
59
59
|
c.action do |args, options|
|
60
|
-
options.default force: false
|
60
|
+
options.default force: false
|
61
61
|
app = CarthageCache::Application.new(args.first || ".", verbose, config)
|
62
62
|
platforms = options.platforms.split(",") if options.platforms
|
63
|
-
if platforms.empty?
|
63
|
+
if platforms && platforms.empty?
|
64
64
|
puts "If you pass -x or --platforms option the you must specify at least one platform."
|
65
65
|
exit 1
|
66
66
|
end
|
@@ -35,7 +35,11 @@ module CarthageCache
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
def create_archive(force = false, prune =
|
38
|
+
def create_archive(force = false, prune = nil, prune_white_list = nil, platforms = nil)
|
39
|
+
prune ||= config.prune_on_publish
|
40
|
+
platforms ||= config.platforms
|
41
|
+
prune_white_list ||= config.prune_white_list
|
42
|
+
|
39
43
|
if force || !archive_exist?
|
40
44
|
prune_build_directory(prune_white_list) if prune
|
41
45
|
archive_builder.build(platforms)
|
@@ -43,6 +47,8 @@ module CarthageCache
|
|
43
47
|
end
|
44
48
|
|
45
49
|
def prune_build_directory(white_list)
|
50
|
+
white_list ||= config.prune_white_list
|
51
|
+
|
46
52
|
if white_list && File.exist?(white_list)
|
47
53
|
terminal.vputs "Prunning build directory with white list '#{white_list}' ..."
|
48
54
|
white_list = YAML.load(File.read(white_list))
|
@@ -26,7 +26,11 @@ module CarthageCache
|
|
26
26
|
|
27
27
|
def archive(platforms = nil)
|
28
28
|
archive_path = File.join(project.tmpdir, project.archive_filename)
|
29
|
-
|
29
|
+
if platforms
|
30
|
+
terminal.puts "Archiving Carthage build directory for #{platforms.join(',')} platforms."
|
31
|
+
else
|
32
|
+
terminal.puts "Archiving Carthage build directory for all platforms."
|
33
|
+
end
|
30
34
|
filter_block = ->(platform) { platforms.map(&:downcase).include?(platform.downcase) } if platforms
|
31
35
|
archiver.archive(project.carthage_build_directory, archive_path, &filter_block)
|
32
36
|
archive_path
|
@@ -26,6 +26,9 @@ module CarthageCache
|
|
26
26
|
|
27
27
|
def self.default
|
28
28
|
@default ||= Configuration.new({
|
29
|
+
prune_on_publish: false,
|
30
|
+
platforms: nil,
|
31
|
+
prune_white_list: nil,
|
29
32
|
aws_s3_client_options: {
|
30
33
|
region: ENV['AWS_REGION'],
|
31
34
|
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
|
@@ -37,6 +40,9 @@ module CarthageCache
|
|
37
40
|
end
|
38
41
|
|
39
42
|
config_key :bucket_name
|
43
|
+
config_key :prune_on_publish
|
44
|
+
config_key :prune_white_list
|
45
|
+
config_key :platforms
|
40
46
|
config_key :aws_region
|
41
47
|
config_key :aws_access_key_id
|
42
48
|
config_key :aws_secret_access_key
|
@@ -10,6 +10,7 @@ module CarthageCache
|
|
10
10
|
def start
|
11
11
|
config = Configuration.new
|
12
12
|
config.bucket_name = ask("What is the Amazon S3 bucket name?", ENV["CARTHAGE_CACHE_DEFAULT_BUCKET_NAME"])
|
13
|
+
config.prune_on_publish = confirm("Do you want to prune unused framework when publishing?")
|
13
14
|
config.aws_region = ask("What is the Amazon S3 region?")
|
14
15
|
config.aws_access_key_id = password("What is the AWS access key?")
|
15
16
|
config.aws_secret_access_key = password(" What is the AWS secret access key?")
|
@@ -28,6 +29,10 @@ module CarthageCache
|
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
32
|
+
def confirm(message)
|
33
|
+
ask("#{message} [N/y]").downcase == 'y'
|
34
|
+
end
|
35
|
+
|
31
36
|
def password(message)
|
32
37
|
@password_proc.call(message)
|
33
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carthage_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guido Marucci Blas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: simplecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: codeclimate-test-reporter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.0
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: aws-sdk
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|