bookyt_projects 0.14.0 → 0.18.1
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.
- data/app/models/work_day.rb +6 -3
 - data/lib/bookyt_projects/version.rb +1 -1
 - metadata +6 -7
 
    
        data/app/models/work_day.rb
    CHANGED
    
    | 
         @@ -15,10 +15,13 @@ class WorkDay < ActiveRecord::Base 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
              def self.create_for_current_employment(employee)
         
     | 
| 
       17 
17 
     | 
    
         
             
                if employee.employments.current
         
     | 
| 
       18 
     | 
    
         
            -
                   
     | 
| 
       19 
     | 
    
         
            -
                   
     | 
| 
      
 18 
     | 
    
         
            +
                  workdays = WorkDay.where(:person_id => employee.id)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  start_date = workdays.last.date unless workdays.empty?
         
     | 
| 
      
 20 
     | 
    
         
            +
                  start_date ||= employee.employments.current.duration_from
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                  (start_date..Date.today).each do |date|
         
     | 
| 
       20 
23 
     | 
    
         
             
                    WorkDay.create(:person => employee, :date => date)
         
     | 
| 
       21 
     | 
    
         
            -
                  end
         
     | 
| 
      
 24 
     | 
    
         
            +
                  end if workdays.last && (workdays.last.date < start_date)
         
     | 
| 
       22 
25 
     | 
    
         
             
                end
         
     | 
| 
       23 
26 
     | 
    
         
             
              end
         
     | 
| 
       24 
27 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: bookyt_projects
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 85
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 0
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 8 
     | 
    
         
            +
              - 18
         
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.18.1
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - Roman Simecek (CyT)
         
     | 
| 
         @@ -16,7 +16,7 @@ autorequire: 
     | 
|
| 
       16 
16 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
17 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
            date: 2012-01- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2012-01-19 00:00:00 Z
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       22 
22 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -179,10 +179,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       179 
179 
     | 
    
         
             
            requirements: []
         
     | 
| 
       180 
180 
     | 
    
         | 
| 
       181 
181 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       182 
     | 
    
         
            -
            rubygems_version: 1.8. 
     | 
| 
      
 182 
     | 
    
         
            +
            rubygems_version: 1.8.12
         
     | 
| 
       183 
183 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       184 
184 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       185 
185 
     | 
    
         
             
            summary: Project management plugin for bookyt
         
     | 
| 
       186 
186 
     | 
    
         
             
            test_files: []
         
     | 
| 
       187 
187 
     | 
    
         | 
| 
       188 
     | 
    
         
            -
            has_rdoc: 
         
     |