fastlyctl 1.0.12 → 1.0.13
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 +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +4 -0
- data/lib/fastlyctl/commands/logging/bigquery.rb +8 -0
- data/lib/fastlyctl/commands/snippet.rb +9 -3
- data/lib/fastlyctl/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c2ae1f51d01ae7427213464df500005c82a6f7e88539189b4ac930a4251c5334
         | 
| 4 | 
            +
              data.tar.gz: 487ee8363712ca396b5c02b1305000a0136336227ec18bc2531bc706123e7f93
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 15a29375aced1dc02313e6aef32539200529b64414b3812588bed4b74f0c55746bf5f8c1a9a0136e2d3d57a10e3eac091f02bc42cabf72921499517474c8fe70
         | 
| 7 | 
            +
              data.tar.gz: fc607eed5bbbba636be71737750e4a5cdb6cd1fd108df8cac3c7f02bac73394b2430d3b7b594e95811c4e6f4e4cc478c6e8093180dc32e51f8c6fca81ca9e720
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                fastlyctl (1.0. | 
| 4 | 
            +
                fastlyctl (1.0.13)
         | 
| 5 5 | 
             
                  diffy (~> 3.2.1)
         | 
| 6 6 | 
             
                  launchy (~> 2.4.3, >= 2.4.3)
         | 
| 7 7 | 
             
                  thor (~> 0.19.4)
         | 
| @@ -15,10 +15,10 @@ GEM | |
| 15 15 | 
             
                diffy (3.2.1)
         | 
| 16 16 | 
             
                ethon (0.12.0)
         | 
| 17 17 | 
             
                  ffi (>= 1.3.0)
         | 
| 18 | 
            -
                ffi (1. | 
| 18 | 
            +
                ffi (1.11.1)
         | 
| 19 19 | 
             
                launchy (2.4.3)
         | 
| 20 20 | 
             
                  addressable (~> 2.3)
         | 
| 21 | 
            -
                public_suffix (3. | 
| 21 | 
            +
                public_suffix (3.1.1)
         | 
| 22 22 | 
             
                thor (0.19.4)
         | 
| 23 23 | 
             
                typhoeus (1.3.1)
         | 
| 24 24 | 
             
                  ethon (>= 0.9.0)
         | 
| @@ -30,4 +30,4 @@ DEPENDENCIES | |
| 30 30 | 
             
              fastlyctl!
         | 
| 31 31 |  | 
| 32 32 | 
             
            BUNDLED WITH
         | 
| 33 | 
            -
                | 
| 33 | 
            +
               2.0.2
         | 
    
        data/README.md
    CHANGED
    
    | @@ -366,6 +366,10 @@ fastlyctl watch [pop] | |
| 366 366 |  | 
| 367 367 | 
             
            Flags:
         | 
| 368 368 | 
             
              * --s: The service ID to watch. Current working directory is assumed.
         | 
| 369 | 
            +
              
         | 
| 370 | 
            +
            ## Debug Mode
         | 
| 371 | 
            +
             | 
| 372 | 
            +
            The `--debug` flag is available on any command. Using it will cause fastlyctl to print the libcurl output for any requests it makes.
         | 
| 369 373 |  | 
| 370 374 | 
             
            ## Contributing
         | 
| 371 375 |  | 
| @@ -59,11 +59,15 @@ module BigQuery | |
| 59 59 |  | 
| 60 60 | 
             
                    params[:name] = options[:name] 
         | 
| 61 61 | 
             
                    params[:format] = parsed_format 
         | 
| 62 | 
            +
                    params[:format_version] = options[:format_version] unless options[:format_version].nil?
         | 
| 62 63 | 
             
                    params[:user] = options[:user]
         | 
| 63 64 | 
             
                    params[:secret_key] = parsed_key
         | 
| 64 65 | 
             
                    params[:project_id] = options[:project_id]
         | 
| 65 66 | 
             
                    params[:dataset] = options[:dataset]
         | 
| 66 67 | 
             
                    params[:table] = options[:table]
         | 
| 68 | 
            +
                    params[:template_suffix] = options[:template_suffix] unless options[:template_suffix].nil?
         | 
| 69 | 
            +
                    params[:placement] = options[:placement] unless options[:placement].nil?
         | 
| 70 | 
            +
                    params[:response_condition] = options[:response_condition] unless options[:response_condition].nil?
         | 
| 67 71 |  | 
| 68 72 | 
             
                    FastlyCTL::Fetcher.api_request(:post, "/service/#{id}/version/#{version}/logging/bigquery", body: params)
         | 
| 69 73 | 
             
                    puts "BigQuery logging provider created in service id #{id} on version #{version}"
         | 
| @@ -86,11 +90,15 @@ module BigQuery | |
| 86 90 |  | 
| 87 91 | 
             
                    params[:name] = options[:new_name] unless options[:new_name].nil? 
         | 
| 88 92 | 
             
                    params[:format] = parsed_format unless options[:format_file].nil?
         | 
| 93 | 
            +
                    params[:format_version] = options[:format_version] unless options[:format_version].nil?
         | 
| 89 94 | 
             
                    params[:user] = options[:user] unless options[:user].nil?
         | 
| 90 95 | 
             
                    params[:secret_key] = parsed_key  unless options[:secret_key_file].nil?
         | 
| 91 96 | 
             
                    params[:project_id] = options[:project_id] unless options[:project_id].nil?
         | 
| 92 97 | 
             
                    params[:dataset] = options[:dataset] unless options[:dataset].nil?
         | 
| 93 98 | 
             
                    params[:table] = options[:table] unless options[:table].nil?
         | 
| 99 | 
            +
                    params[:template_suffix] = options[:template_suffix] unless options[:template_suffix].nil?
         | 
| 100 | 
            +
                    params[:placement] = options[:placement] unless options[:placement].nil?
         | 
| 101 | 
            +
                    params[:response_condition] = options[:response_condition] unless options[:response_condition].nil?
         | 
| 94 102 |  | 
| 95 103 | 
             
                    FastlyCTL::Fetcher.api_request(:put, "/service/#{id}/version/#{version}/logging/bigquery/#{options[:name]}", body: params)
         | 
| 96 104 | 
             
                    puts "BigQuery logging provider update in service id #{id} on version #{version}"
         | 
| @@ -6,6 +6,9 @@ module FastlyCTL | |
| 6 6 | 
             
                method_option :type, :aliases => ["--t"]
         | 
| 7 7 | 
             
                method_option :dynamic, :aliases => ["--d"]
         | 
| 8 8 | 
             
                method_option :yes, :aliases => ["--y"]
         | 
| 9 | 
            +
                method_option :priority, :aliases => ["--p"]
         | 
| 10 | 
            +
                method_option :filename, :aliases => ["--f"] 
         | 
| 11 | 
            +
             | 
| 9 12 | 
             
                def snippet(action,name=false)
         | 
| 10 13 | 
             
                  id = FastlyCTL::Utils.parse_directory unless options[:service]
         | 
| 11 14 | 
             
                  id ||= options[:service]
         | 
| @@ -17,7 +20,7 @@ module FastlyCTL | |
| 17 20 |  | 
| 18 21 | 
             
                  encoded_name = URI.escape(name) if name
         | 
| 19 22 |  | 
| 20 | 
            -
                  filename = "#{name}.snippet"
         | 
| 23 | 
            +
                  filename = options.key?(:filename) ? options[:filename] : "#{name}.snippet"
         | 
| 21 24 |  | 
| 22 25 | 
             
                  case action
         | 
| 23 26 | 
             
                  when "upload"
         | 
| @@ -46,6 +49,7 @@ module FastlyCTL | |
| 46 49 | 
             
                    snippet = FastlyCTL::Fetcher.api_request(:get, "/service/#{id}/snippet/#{snippet["id"]}")
         | 
| 47 50 |  | 
| 48 51 | 
             
                    new_content = File.read(filename)
         | 
| 52 | 
            +
                    priority = options.key(:priority) ? options[:priority] : snippet[:priority]
         | 
| 49 53 |  | 
| 50 54 | 
             
                    unless options.key?(:yes)
         | 
| 51 55 | 
             
                      say(FastlyCTL::Utils.get_diff(snippet["content"],new_content))
         | 
| @@ -53,7 +57,8 @@ module FastlyCTL | |
| 53 57 | 
             
                    end
         | 
| 54 58 |  | 
| 55 59 | 
             
                    FastlyCTL::Fetcher.api_request(:put, "/service/#{id}/snippet/#{snippet["snippet_id"]}", {:endpoint => :api, body: {
         | 
| 56 | 
            -
                        content: new_content
         | 
| 60 | 
            +
                        content: new_content,
         | 
| 61 | 
            +
                        priority: priority.to_s
         | 
| 57 62 | 
             
                      }
         | 
| 58 63 | 
             
                    })
         | 
| 59 64 |  | 
| @@ -68,7 +73,8 @@ module FastlyCTL | |
| 68 73 | 
             
                        name: name,
         | 
| 69 74 | 
             
                        type: options[:type] ? options[:type] : "recv",
         | 
| 70 75 | 
             
                        content: content,
         | 
| 71 | 
            -
                        dynamic: options.key?(:dynamic) ? 1 : 0
         | 
| 76 | 
            +
                        dynamic: options.key?(:dynamic) ? 1 : 0,
         | 
| 77 | 
            +
                        priority: options.key?(:priority) ? options[:priority].to_s : "100"
         | 
| 72 78 | 
             
                      }
         | 
| 73 79 | 
             
                    })
         | 
| 74 80 | 
             
                    say("#{name} created on #{id} version #{version}")
         | 
    
        data/lib/fastlyctl/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fastlyctl
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.13
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Stephen Basile
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019- | 
| 11 | 
            +
            date: 2019-09-16 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: typhoeus
         |