fastlane-plugin-deploy_aws_s3_cloudfront 0.3.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 929bf6275e265d2b534b43a466839e3c25d2ec7c
4
- data.tar.gz: 707870aebec51d4ae80787b901e334caec96ad63
2
+ SHA256:
3
+ metadata.gz: dcfef5e57f88fe7192ff1c5b1c837fd8ea0f48be0dabdf0b980564fe71877c14
4
+ data.tar.gz: 853b65d48b0e399f2db34920b5d0f38463c9ab9887dac88ee9e9c374aec3d037
5
5
  SHA512:
6
- metadata.gz: a2af86f57e4296732d7323a72a0ddc9085544bf83be60d8e4afa55425fca4e2ebec992f5c2e282740752dd4125e09a35f59179de035f897d7a7cb8c6bcda6aab
7
- data.tar.gz: e9d9020693d53d22c187dd7235da1f9c049be254a398387936e47d569394da78575087521178b41af53ec7e3182d87be2ca44c93d6cd7ef6519904f811e15c95
6
+ metadata.gz: 901cc74bdee6a1162af8f43d82cb72641c7e0bbc6871f663a51d1594ec25eab24d3906c0ce33e246fb4a3eab02605d4878200b3cd904bf072e895ef871d237dc
7
+ data.tar.gz: ff2e49425c2c66fec416a7cb87572dd1c048d17f6187a93b30cbf5b12021a33ae8b271b5bafe602491466fb992ce8b0ee78b011be31e6daf73a1f53668f9d621
data/README.md CHANGED
@@ -12,16 +12,13 @@ fastlane add_plugin deploy_aws_s3_cloudfront
12
12
 
13
13
  ## About deploy_aws_s3_cloudfront
14
14
 
15
- Deploy local directory to AWS S3 bucket and invalidate CloudFront
16
-
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
15
+ Syncs a local directory to an AWS S3 bucket and invalidate CloudFront distribution.
16
+ This plugin is based in the [deploy-aws-s3-cloudfront](https://www.npmjs.com/package/deploy-aws-s3-cloudfront) project.
18
17
 
19
18
  ## Example
20
19
 
21
20
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
21
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
-
25
22
  ## Run tests for this plugin
26
23
 
27
24
  To run both the tests, and code style validation, run
@@ -17,12 +17,12 @@ module Fastlane
17
17
 
18
18
  files = get_files_from_source(source)
19
19
 
20
- paths = files.map {|file|
20
+ paths = files.map do |file|
21
21
  key = file.relative_path_from(Pathname(source)).to_s
22
22
  content_type = get_content_type(file)
23
- s3client.put_object({body: file.open("rb"), bucket: bucket, key: key.to_s, content_type: content_type})
23
+ s3client.put_object({ body: file.open("rb"), bucket: bucket, key: key.to_s, content_type: content_type })
24
24
  "/" + key
25
- }
25
+ end
26
26
 
27
27
  cloudfront = Aws::CloudFront::Client.new
28
28
 
@@ -31,18 +31,17 @@ module Fastlane
31
31
  invalidation_batch: {
32
32
  paths: {
33
33
  quantity: paths.size,
34
- items: paths,
34
+ items: paths
35
35
  },
36
36
  caller_reference: SecureRandom.hex
37
- },
37
+ }
38
38
  }
39
39
 
40
40
  cloudfront.create_invalidation(invalidation)
41
-
42
41
  end
43
42
 
44
43
  def self.get_files_from_source(source)
45
- return Dir.glob("#{source}/**/*").select {|f| File.file? f}.map {|f| Pathname(f)}
44
+ return Dir.glob("#{source}/**/*").select { |f| File.file?(f) }.map { |f| Pathname(f) }
46
45
  end
47
46
 
48
47
  def self.get_content_type(file)
@@ -70,21 +69,21 @@ module Fastlane
70
69
 
71
70
  def self.available_options
72
71
  [
73
- FastlaneCore::ConfigItem.new(key: :bucket,
74
- env_name: "DEPLOY_AWS_S3_CLOUDFRONT_YOUR_OPTION",
75
- description: "A description of your option",
76
- optional: false,
77
- type: String),
78
- FastlaneCore::ConfigItem.new(key: :source,
79
- env_name: "DEPLOY_AWS_S3_CLOUDFRONT_YOUR_OPTION",
80
- description: "A description of your option",
81
- optional: false,
82
- type: String),
83
- FastlaneCore::ConfigItem.new(key: :distribution_id,
84
- env_name: "DEPLOY_AWS_S3_CLOUDFRONT_YOUR_OPTION",
85
- description: "A description of your option",
86
- optional: false,
87
- type: String)
72
+ FastlaneCore::ConfigItem.new(key: :bucket,
73
+ env_name: "DEPLOY_AWS_S3_CLOUDFRONT_YOUR_OPTION",
74
+ description: "A description of your option",
75
+ optional: false,
76
+ type: String),
77
+ FastlaneCore::ConfigItem.new(key: :source,
78
+ env_name: "DEPLOY_AWS_S3_CLOUDFRONT_YOUR_OPTION",
79
+ description: "A description of your option",
80
+ optional: false,
81
+ type: String),
82
+ FastlaneCore::ConfigItem.new(key: :distribution_id,
83
+ env_name: "DEPLOY_AWS_S3_CLOUDFRONT_YOUR_OPTION",
84
+ description: "A description of your option",
85
+ optional: false,
86
+ type: String)
88
87
  ]
89
88
  end
90
89
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module DeployAwsS3Cloudfront
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-deploy_aws_s3_cloudfront
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hector
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -209,8 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubyforge_project:
213
- rubygems_version: 2.5.2.3
212
+ rubygems_version: 3.0.3
214
213
  signing_key:
215
214
  specification_version: 4
216
215
  summary: Deploy local directory to AWS S3 bucket and invalidate CloudFront