fastlane-plugin-secrets 0.0.1 → 0.0.2

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
2
  SHA256:
3
- metadata.gz: 060d33a034c47e7318d5bad3cea1930afa705c920eddbbfb0ea9dd583e872e50
4
- data.tar.gz: 7d65b0c138410241701d532f39fa9ea761cf72b1f25fefb1cdd5ab4f258b5e56
3
+ metadata.gz: 71871f7f7069edee098828c8c7766f9b788c33a5da773b3ef5afac7c04539257
4
+ data.tar.gz: 93b56b990a315b54421c6ee081fc49a12265e5b4de4a75a17d8d59012ba3796d
5
5
  SHA512:
6
- metadata.gz: 2dc780c0f767a55d764f189157f381a54b1a22d371d045aebaf38f7b086ec9e19164ebaed37b360419800a7fe27997dc5f8042e6e2aaec09a8f7c5bd3943e2e0
7
- data.tar.gz: 0a0adc5e09eb7b419d443911f65031d18e8d0b041371b1c5525f076d72f839e143813de2d63d01b60ca67563c68294f9d1ec08d10984ae615c9115746e8346c5
6
+ metadata.gz: cf7e636a0ff13dbeb7e853859c8bdade9cb96238f7d77cf5e6a168f96c718b6e3195e97201304ca369f60bb66e6e34385948767866e322d639b8d57a2970f14e
7
+ data.tar.gz: 180057515b63dda145c3b61629dd15f09e81e6276877abde5dacf73e82e20f50c805bf93b3b04ae6287b1d0f672e0fde4038543e8fb4e4cfe9d049f99d2947f1
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # secrets plugin
2
+ Working with this plugin is described in detail here:
3
+ https://medium.com/@cyrilcermak/mobile-secrets-8458ceaf4c16
2
4
 
3
5
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-secrets)
4
6
 
@@ -15,7 +15,6 @@ module Fastlane
15
15
 
16
16
  return secrets_handler.inject_secrets [[]], target_path if empty
17
17
 
18
-
19
18
  clean tmp_decrypted_secrets_file
20
19
  if private_key_path && password
21
20
  sh("gpg", "-v", "--pinentry-mode", "loopback", "--passphrase", password, "--import", private_key_path)
@@ -0,0 +1,32 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
5
+
6
+ module Helper
7
+ class SecretsHelper
8
+
9
+ def self.inject_secrets(secret_bytes, file)
10
+ template = IO.read "#{__dir__}/SecretsTemplate.swift"
11
+ secret_bytes = "#{secret_bytes}".gsub "],", "],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
12
+ bytes_variable = "private let bytes: [[UInt8]] = #{secret_bytes}"
13
+ swift_secrets = template.sub "/* SECRET BYTES */", bytes_variable
14
+
15
+ File.open(file, "w") do |f|
16
+ f.puts swift_secrets
17
+ end
18
+ end
19
+
20
+ def self.xor_chiper(key, string)
21
+ key_chars = key.chars
22
+ result = ""
23
+ codepoints = string.each_codepoint.to_a
24
+ codepoints.each_index do |i|
25
+ result += (codepoints[i] ^ key_chars[i % key_chars.size].ord).chr
26
+ end
27
+ result
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Secrets
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-secrets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Cermak
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-10-04 00:00:00.000000000 Z
12
+ date: 2019-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mobile-secrets
@@ -163,8 +163,9 @@ files:
163
163
  - lib/fastlane/plugin/secrets/actions/decrypt_secrets_action.rb
164
164
  - lib/fastlane/plugin/secrets/actions/encrypt_secrets_action.rb
165
165
  - lib/fastlane/plugin/secrets/helper/SecretsTemplate.swift
166
+ - lib/fastlane/plugin/secrets/helper/secrets_helper.rb
166
167
  - lib/fastlane/plugin/secrets/version.rb
167
- homepage: https://github.com/nestele/fastlane-plugin-secrets
168
+ homepage: https://github.com/cyrilcermak/fastlane-plugin-secrets
168
169
  licenses:
169
170
  - MIT
170
171
  metadata: {}