semaphore_client 2.1.2 → 2.1.3
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 +1 -1
 - data/lib/semaphore_client/api/config_file.rb +8 -2
 - data/lib/semaphore_client/api/env_var.rb +8 -2
 - data/lib/semaphore_client/api/project.rb +12 -3
 - data/lib/semaphore_client/api/shared_config.rb +12 -3
 - data/lib/semaphore_client/api/team.rb +12 -3
 - data/lib/semaphore_client/api/user.rb +12 -3
 - data/lib/semaphore_client/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 1a9a08db0c4d653d5153087b7b962ad0ecb5e0ad
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 797ed226c2c947e42769ab6872ba0a79ae3f9a21
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: fe495f22fa71502fb95c1c633ba469dba84791c04a9be90a6ee75ecb782313a5706cce7311c829f57d13551342d9e2b614c3292a17556207c37dd1ef29e8163b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 64624e37b30c879554a0f52c4250aceae8009c75a0585ee4f485eb865a06d0eb15159d164f03a287c86b81d7c59f5db648f0e7fbea9ff53484c5d5f7cb511c26
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -46,7 +46,10 @@ class SemaphoreClient 
     | 
|
| 
       46 
46 
     | 
    
         
             
                  end
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
                  def list_for_project!(project_id, query = nil)
         
     | 
| 
       49 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 49 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 50 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 51 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 52 
     | 
    
         
            +
                      end
         
     | 
| 
       50 
53 
     | 
    
         | 
| 
       51 
54 
     | 
    
         
             
                    response = @http_client.get([:projects, project_id, :config_files, query_string].compact)
         
     | 
| 
       52 
55 
     | 
    
         | 
| 
         @@ -72,7 +75,10 @@ class SemaphoreClient 
     | 
|
| 
       72 
75 
     | 
    
         
             
                  end
         
     | 
| 
       73 
76 
     | 
    
         | 
| 
       74 
77 
     | 
    
         
             
                  def list_for_shared_config!(shared_config_id, query = nil)
         
     | 
| 
       75 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 78 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 79 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 80 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 81 
     | 
    
         
            +
                      end
         
     | 
| 
       76 
82 
     | 
    
         | 
| 
       77 
83 
     | 
    
         
             
                    response = @http_client.get([:shared_configs, shared_config_id, :config_files, query_string].compact)
         
     | 
| 
       78 
84 
     | 
    
         | 
| 
         @@ -46,7 +46,10 @@ class SemaphoreClient 
     | 
|
| 
       46 
46 
     | 
    
         
             
                  end
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
                  def list_for_project!(project_id, query = nil)
         
     | 
| 
       49 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 49 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 50 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 51 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 52 
     | 
    
         
            +
                      end
         
     | 
| 
       50 
53 
     | 
    
         | 
| 
       51 
54 
     | 
    
         
             
                    response = @http_client.get([:projects, project_id, :env_vars, query_string].compact)
         
     | 
| 
       52 
55 
     | 
    
         | 
| 
         @@ -72,7 +75,10 @@ class SemaphoreClient 
     | 
|
| 
       72 
75 
     | 
    
         
             
                  end
         
     | 
| 
       73 
76 
     | 
    
         | 
| 
       74 
77 
     | 
    
         
             
                  def list_for_shared_config!(shared_config_id, query = nil)
         
     | 
| 
       75 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 78 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 79 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 80 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 81 
     | 
    
         
            +
                      end
         
     | 
| 
       76 
82 
     | 
    
         | 
| 
       77 
83 
     | 
    
         
             
                    response = @http_client.get([:shared_configs, shared_config_id, :env_vars, query_string].compact)
         
     | 
| 
       78 
84 
     | 
    
         | 
| 
         @@ -31,7 +31,10 @@ class SemaphoreClient 
     | 
|
| 
       31 
31 
     | 
    
         
             
                  end
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                  def list_for_org!(org_id, query = nil)
         
     | 
| 
       34 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 34 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 35 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 36 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 37 
     | 
    
         
            +
                      end
         
     | 
| 
       35 
38 
     | 
    
         | 
| 
       36 
39 
     | 
    
         
             
                    response = @http_client.get([:orgs, org_id, :projects, query_string].compact)
         
     | 
| 
       37 
40 
     | 
    
         | 
| 
         @@ -45,7 +48,10 @@ class SemaphoreClient 
     | 
|
| 
       45 
48 
     | 
    
         
             
                  end
         
     | 
| 
       46 
49 
     | 
    
         | 
| 
       47 
50 
     | 
    
         
             
                  def list_for_team!(team_id, query = nil)
         
     | 
| 
       48 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 51 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 52 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 53 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 54 
     | 
    
         
            +
                      end
         
     | 
| 
       49 
55 
     | 
    
         | 
| 
       50 
56 
     | 
    
         
             
                    response = @http_client.get([:teams, team_id, :projects, query_string].compact)
         
     | 
| 
       51 
57 
     | 
    
         | 
| 
         @@ -71,7 +77,10 @@ class SemaphoreClient 
     | 
|
| 
       71 
77 
     | 
    
         
             
                  end
         
     | 
| 
       72 
78 
     | 
    
         | 
| 
       73 
79 
     | 
    
         
             
                  def list_for_shared_config!(shared_config_id, query = nil)
         
     | 
| 
       74 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 80 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 81 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 82 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 83 
     | 
    
         
            +
                      end
         
     | 
| 
       75 
84 
     | 
    
         | 
| 
       76 
85 
     | 
    
         
             
                    response = @http_client.get([:shared_configs, shared_config_id, :projects, query_string].compact)
         
     | 
| 
       77 
86 
     | 
    
         | 
| 
         @@ -61,7 +61,10 @@ class SemaphoreClient 
     | 
|
| 
       61 
61 
     | 
    
         
             
                  end
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
       63 
63 
     | 
    
         
             
                  def list_for_org!(org_id, query = nil)
         
     | 
| 
       64 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 64 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 65 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 66 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 67 
     | 
    
         
            +
                      end
         
     | 
| 
       65 
68 
     | 
    
         | 
| 
       66 
69 
     | 
    
         
             
                    response = @http_client.get([:orgs, org_id, :shared_configs, query_string].compact)
         
     | 
| 
       67 
70 
     | 
    
         | 
| 
         @@ -85,7 +88,10 @@ class SemaphoreClient 
     | 
|
| 
       85 
88 
     | 
    
         
             
                  end
         
     | 
| 
       86 
89 
     | 
    
         | 
| 
       87 
90 
     | 
    
         
             
                  def list_for_team!(team_id, query = nil)
         
     | 
| 
       88 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 91 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 92 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 93 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 94 
     | 
    
         
            +
                      end
         
     | 
| 
       89 
95 
     | 
    
         | 
| 
       90 
96 
     | 
    
         
             
                    response = @http_client.get([:teams, team_id, :shared_configs, query_string].compact)
         
     | 
| 
       91 
97 
     | 
    
         | 
| 
         @@ -111,7 +117,10 @@ class SemaphoreClient 
     | 
|
| 
       111 
117 
     | 
    
         
             
                  end
         
     | 
| 
       112 
118 
     | 
    
         | 
| 
       113 
119 
     | 
    
         
             
                  def list_for_project!(project_id, query = nil)
         
     | 
| 
       114 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 120 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 121 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 122 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 123 
     | 
    
         
            +
                      end
         
     | 
| 
       115 
124 
     | 
    
         | 
| 
       116 
125 
     | 
    
         
             
                    response = @http_client.get([:projects, project_id, :shared_configs, query_string].compact)
         
     | 
| 
       117 
126 
     | 
    
         | 
| 
         @@ -41,7 +41,10 @@ class SemaphoreClient 
     | 
|
| 
       41 
41 
     | 
    
         
             
                  end
         
     | 
| 
       42 
42 
     | 
    
         | 
| 
       43 
43 
     | 
    
         
             
                  def list_for_org!(org_id, query = nil)
         
     | 
| 
       44 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 44 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 45 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 46 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 47 
     | 
    
         
            +
                      end
         
     | 
| 
       45 
48 
     | 
    
         | 
| 
       46 
49 
     | 
    
         
             
                    response = @http_client.get([:orgs, org_id, :teams, query_string].compact)
         
     | 
| 
       47 
50 
     | 
    
         | 
| 
         @@ -91,7 +94,10 @@ class SemaphoreClient 
     | 
|
| 
       91 
94 
     | 
    
         
             
                  end
         
     | 
| 
       92 
95 
     | 
    
         | 
| 
       93 
96 
     | 
    
         
             
                  def list_for_project!(project_id, query = nil)
         
     | 
| 
       94 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 97 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 98 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 99 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 100 
     | 
    
         
            +
                      end
         
     | 
| 
       95 
101 
     | 
    
         | 
| 
       96 
102 
     | 
    
         
             
                    response = @http_client.get([:projects, project_id, :teams, query_string].compact)
         
     | 
| 
       97 
103 
     | 
    
         | 
| 
         @@ -105,7 +111,10 @@ class SemaphoreClient 
     | 
|
| 
       105 
111 
     | 
    
         
             
                  end
         
     | 
| 
       106 
112 
     | 
    
         | 
| 
       107 
113 
     | 
    
         
             
                  def list_for_shared_config!(shared_config_id, query = nil)
         
     | 
| 
       108 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 114 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 115 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 116 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 117 
     | 
    
         
            +
                      end
         
     | 
| 
       109 
118 
     | 
    
         | 
| 
       110 
119 
     | 
    
         
             
                    response = @http_client.get([:shared_configs, shared_config_id, :teams, query_string].compact)
         
     | 
| 
       111 
120 
     | 
    
         | 
| 
         @@ -31,7 +31,10 @@ class SemaphoreClient 
     | 
|
| 
       31 
31 
     | 
    
         
             
                  end
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                  def list_for_org!(org_id, query = nil)
         
     | 
| 
       34 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 34 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 35 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 36 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 37 
     | 
    
         
            +
                      end
         
     | 
| 
       35 
38 
     | 
    
         | 
| 
       36 
39 
     | 
    
         
             
                    response = @http_client.get([:orgs, org_id, :users, query_string].compact)
         
     | 
| 
       37 
40 
     | 
    
         | 
| 
         @@ -45,7 +48,10 @@ class SemaphoreClient 
     | 
|
| 
       45 
48 
     | 
    
         
             
                  end
         
     | 
| 
       46 
49 
     | 
    
         | 
| 
       47 
50 
     | 
    
         
             
                  def list_for_team!(team_id, query = nil)
         
     | 
| 
       48 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 51 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 52 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 53 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 54 
     | 
    
         
            +
                      end
         
     | 
| 
       49 
55 
     | 
    
         | 
| 
       50 
56 
     | 
    
         
             
                    response = @http_client.get([:teams, team_id, :users, query_string].compact)
         
     | 
| 
       51 
57 
     | 
    
         | 
| 
         @@ -71,7 +77,10 @@ class SemaphoreClient 
     | 
|
| 
       71 
77 
     | 
    
         
             
                  end
         
     | 
| 
       72 
78 
     | 
    
         | 
| 
       73 
79 
     | 
    
         
             
                  def list_for_project!(project_id, query = nil)
         
     | 
| 
       74 
     | 
    
         
            -
                    query_string = 
     | 
| 
      
 80 
     | 
    
         
            +
                    query_string =
         
     | 
| 
      
 81 
     | 
    
         
            +
                      unless query.nil? || query.empty?
         
     | 
| 
      
 82 
     | 
    
         
            +
                        "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
         
     | 
| 
      
 83 
     | 
    
         
            +
                      end
         
     | 
| 
       75 
84 
     | 
    
         | 
| 
       76 
85 
     | 
    
         
             
                    response = @http_client.get([:projects, project_id, :users, query_string].compact)
         
     | 
| 
       77 
86 
     | 
    
         |