raykit 0.0.431 → 0.0.432
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/lib/raykit/git/repository.rb +24 -4
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0f84669885a536244a302403c81a215bd05617d305a08846cf243801660a99fa
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5d34b8de189e8b9c09f018a4f324f3982c8852c029d39516ad24d66ba2253b0b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9d60b509002305fe26bf0d9fd4b502483bef19415ad7dddc9ee6637f791a97bf3e52ab3e0f02e388eefa0fe4288f13d293edee0c5cde45844fae3015382d32fd
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6dfc9830ecb45b46d540e21bb022a3468571a098e79d36773e56a024e30b88277bbd23aa06786276eefd633c22ca3246e59f69d339dda1a6ba3f62402b378d9b
         
     | 
| 
         @@ -127,11 +127,11 @@ module Raykit 
     | 
|
| 
       127 
127 
     | 
    
         
             
                  def clobber
         
     | 
| 
       128 
128 
     | 
    
         
             
                    ["work", "clone", "make"].each { |d|
         
     | 
| 
       129 
129 
     | 
    
         
             
                      dir = get_dev_dir(d)
         
     | 
| 
       130 
     | 
    
         
            -
                      if (Dir. 
     | 
| 
      
 130 
     | 
    
         
            +
                      if (Dir.exist?(dir))
         
     | 
| 
       131 
131 
     | 
    
         
             
                        begin
         
     | 
| 
       132 
132 
     | 
    
         
             
                          puts "  deleting #{dir}"
         
     | 
| 
       133 
133 
     | 
    
         
             
                          FileUtils.rm_rf(dir)
         
     | 
| 
       134 
     | 
    
         
            -
                          FileUtils.rm(dir) if (Dir. 
     | 
| 
      
 134 
     | 
    
         
            +
                          FileUtils.rm(dir) if (Dir.exist?(dir))
         
     | 
| 
       135 
135 
     | 
    
         
             
                        rescue
         
     | 
| 
       136 
136 
     | 
    
         
             
                          puts "  problem while deleting #{dir}"
         
     | 
| 
       137 
137 
     | 
    
         
             
                        end
         
     | 
| 
         @@ -144,6 +144,26 @@ module Raykit 
     | 
|
| 
       144 
144 
     | 
    
         
             
                    update_local_clone_directory
         
     | 
| 
       145 
145 
     | 
    
         
             
                  end
         
     | 
| 
       146 
146 
     | 
    
         | 
| 
      
 147 
     | 
    
         
            +
                  def work(command)
         
     | 
| 
      
 148 
     | 
    
         
            +
                    pull if (!Dir.exists?(get_dev_dir("work")))
         
     | 
| 
      
 149 
     | 
    
         
            +
                    filename = "#{Raykit::Environment::log_dir}/work_#{relative_path.gsub("/", "-")}.json"
         
     | 
| 
      
 150 
     | 
    
         
            +
                    if (Raykit::Git::Directory.new(get_dev_dir("work")).outstanding_commit?)
         
     | 
| 
      
 151 
     | 
    
         
            +
                      puts "  outstanding commit in #{get_dev_dir("work")}"
         
     | 
| 
      
 152 
     | 
    
         
            +
                      work_cmd = Raykit::Git::Repository::work(url, command)
         
     | 
| 
      
 153 
     | 
    
         
            +
                      work_cmd.save_as(filename)
         
     | 
| 
      
 154 
     | 
    
         
            +
                      return work_cmd
         
     | 
| 
      
 155 
     | 
    
         
            +
                    else
         
     | 
| 
      
 156 
     | 
    
         
            +
                      if (File.exists?(filename))
         
     | 
| 
      
 157 
     | 
    
         
            +
                        return Raykit::Command::parse(IO.read(filename))
         
     | 
| 
      
 158 
     | 
    
         
            +
                        #work_cmd.summary(true).details_on_failure
         
     | 
| 
      
 159 
     | 
    
         
            +
                      else
         
     | 
| 
      
 160 
     | 
    
         
            +
                        work_cmd = Raykit::Git::Repository::work_url(url, command)
         
     | 
| 
      
 161 
     | 
    
         
            +
                        work_cmd.save_as(filename)
         
     | 
| 
      
 162 
     | 
    
         
            +
                      end
         
     | 
| 
      
 163 
     | 
    
         
            +
                      #
         
     | 
| 
      
 164 
     | 
    
         
            +
                    end
         
     | 
| 
      
 165 
     | 
    
         
            +
                  end
         
     | 
| 
      
 166 
     | 
    
         
            +
             
     | 
| 
       147 
167 
     | 
    
         
             
                  def self.work_pull(url)
         
     | 
| 
       148 
168 
     | 
    
         
             
                    repo = Raykit::Git::Repository.new(url)
         
     | 
| 
       149 
169 
     | 
    
         
             
                    work_dir = repo.get_dev_dir("work")
         
     | 
| 
         @@ -163,7 +183,7 @@ module Raykit 
     | 
|
| 
       163 
183 
     | 
    
         
             
                    end
         
     | 
| 
       164 
184 
     | 
    
         
             
                  end
         
     | 
| 
       165 
185 
     | 
    
         | 
| 
       166 
     | 
    
         
            -
                  def self. 
     | 
| 
      
 186 
     | 
    
         
            +
                  def self.work_url(url, cmd)
         
     | 
| 
       167 
187 
     | 
    
         
             
                    repo = Raykit::Git::Repository.new(url)
         
     | 
| 
       168 
188 
     | 
    
         
             
                    work_dir = repo.get_dev_dir("work")
         
     | 
| 
       169 
189 
     | 
    
         
             
                    repo.clone(work_dir) if !Dir.exist?(work_dir)
         
     | 
| 
         @@ -171,7 +191,7 @@ module Raykit 
     | 
|
| 
       171 
191 
     | 
    
         
             
                      run("git pull")
         
     | 
| 
       172 
192 
     | 
    
         
             
                      #run(cmd)
         
     | 
| 
       173 
193 
     | 
    
         
             
                      cmd = Raykit::Command.new(cmd)
         
     | 
| 
       174 
     | 
    
         
            -
                      cmd = cmd.run() 
     | 
| 
      
 194 
     | 
    
         
            +
                      cmd = cmd.run() ##.summary().details_on_failure
         
     | 
| 
       175 
195 
     | 
    
         
             
                      cmd
         
     | 
| 
       176 
196 
     | 
    
         
             
                    end
         
     | 
| 
       177 
197 
     | 
    
         
             
                  end
         
     |