docman 0.0.46 → 0.0.47
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/application.rb +12 -3
 - data/lib/docman/builders/builder.rb +10 -0
 - data/lib/docman/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d4c6999c9cd46020989d9bebddaffef57bda5c7d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f40373fff862edfb2f19c084ab320b84a32faaa8
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9b7da2dd764dbe322e3b263cd998188237c6b7f6f345913886514089764be0c97a89bf54283c139814874f222b1ac8a96cd76665396ef9ded256d11857a57b24
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9b075493b16f620feb04744414e3e3029e085a46fffe5f96a52cdf410070938230931b54a0f323616492a379ab3403f0012b56168a9f8db7e045930c71baa01e
         
     | 
    
        data/lib/application.rb
    CHANGED
    
    | 
         @@ -90,7 +90,7 @@ module Docman 
     | 
|
| 
       90 
90 
     | 
    
         
             
                    @docroot_config = DocrootConfig.new(@workspace_dir, deploy_target)
         
     | 
| 
       91 
91 
     | 
    
         
             
                    @docroot_config.states_dependin_on(name, version).keys.each do |state|
         
     | 
| 
       92 
92 
     | 
    
         
             
                      execute('deploy', state, name)
         
     | 
| 
       93 
     | 
    
         
            -
                      write_environment 
     | 
| 
      
 93 
     | 
    
         
            +
                      write_environment(@deploy_target['states'][state], name)
         
     | 
| 
       94 
94 
     | 
    
         
             
                      write_state state
         
     | 
| 
       95 
95 
     | 
    
         
             
                      result = state
         
     | 
| 
       96 
96 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -116,9 +116,18 @@ module Docman 
     | 
|
| 
       116 
116 
     | 
    
         
             
                  File.open(filepath, 'w') { |file| file.write(state) }
         
     | 
| 
       117 
117 
     | 
    
         
             
                end
         
     | 
| 
       118 
118 
     | 
    
         | 
| 
       119 
     | 
    
         
            -
                def write_environment( 
     | 
| 
      
 119 
     | 
    
         
            +
                def write_environment(env, name)
         
     | 
| 
      
 120 
     | 
    
         
            +
                  environment = environment(env)
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
                  properties = {}
         
     | 
| 
      
 123 
     | 
    
         
            +
                  properties['ENV'] = env
         
     | 
| 
      
 124 
     | 
    
         
            +
                  properties['project_last_result'] = environment['previous'][name]['result'] unless environment['previous'][name]['result'].nil?
         
     | 
| 
      
 125 
     | 
    
         
            +
                  properties['last_project'] = name
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
       120 
127 
     | 
    
         
             
                  filepath = File.join(@workspace_dir, 'last_deploy.properties')
         
     | 
| 
       121 
     | 
    
         
            -
                  File.open(filepath, 'w')  
     | 
| 
      
 128 
     | 
    
         
            +
                  File.open(filepath, 'w') do |file|
         
     | 
| 
      
 129 
     | 
    
         
            +
                    properties.each {|key, value| file.puts "#{key}=#{value}\n" }
         
     | 
| 
      
 130 
     | 
    
         
            +
                  end
         
     | 
| 
       122 
131 
     | 
    
         
             
                end
         
     | 
| 
       123 
132 
     | 
    
         | 
| 
       124 
133 
     | 
    
         
             
                def execute(action, state, name = nil, tag = nil)
         
     | 
| 
         @@ -24,8 +24,18 @@ module Docman 
     | 
|
| 
       24 
24 
     | 
    
         
             
                    super
         
     | 
| 
       25 
25 
     | 
    
         
             
                    @version = nil
         
     | 
| 
       26 
26 
     | 
    
         
             
                    environment = Application.instance.environment(@context.environment_name)
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
       27 
28 
     | 
    
         
             
                    clean_changed = environment['clean_changed'].nil? ? true : environment['clean_changed']
         
     | 
| 
       28 
29 
     | 
    
         
             
                    add_action('before_execute', {'type' => :clean_changed}, @context) if clean_changed
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                    info_file = File.join(@context['full_build_path'], 'info.yaml')
         
     | 
| 
      
 32 
     | 
    
         
            +
                    info = YAML::load_file(info_file) if File.file? info_file
         
     | 
| 
      
 33 
     | 
    
         
            +
                    if info
         
     | 
| 
      
 34 
     | 
    
         
            +
                      name = @context['name']
         
     | 
| 
      
 35 
     | 
    
         
            +
                      environment['previous'] = {}
         
     | 
| 
      
 36 
     | 
    
         
            +
                      environment['previous'][name] = info
         
     | 
| 
      
 37 
     | 
    
         
            +
                    end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
       29 
39 
     | 
    
         
             
                  end
         
     | 
| 
       30 
40 
     | 
    
         | 
| 
       31 
41 
     | 
    
         
             
                  def validate_command
         
     | 
    
        data/lib/docman/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: docman
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.47
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Alexander Tolstikov
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-06-17 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       221 
221 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       222 
222 
     | 
    
         
             
            requirements: []
         
     | 
| 
       223 
223 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       224 
     | 
    
         
            -
            rubygems_version: 2.0. 
     | 
| 
      
 224 
     | 
    
         
            +
            rubygems_version: 2.0.3
         
     | 
| 
       225 
225 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       226 
226 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       227 
227 
     | 
    
         
             
            summary: Docman made for DOCroot MANagement for Drupal projects
         
     |