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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 71871f7f7069edee098828c8c7766f9b788c33a5da773b3ef5afac7c04539257
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 93b56b990a315b54421c6ee081fc49a12265e5b4de4a75a17d8d59012ba3796d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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 
     | 
    
         
             
            [](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
         
     | 
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 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/ 
     | 
| 
      
 168 
     | 
    
         
            +
            homepage: https://github.com/cyrilcermak/fastlane-plugin-secrets
         
     | 
| 
       168 
169 
     | 
    
         
             
            licenses:
         
     | 
| 
       169 
170 
     | 
    
         
             
            - MIT
         
     | 
| 
       170 
171 
     | 
    
         
             
            metadata: {}
         
     |