Revision 974:b2e0731c5438 extra/soundsoftware

View differences:

extra/soundsoftware/get-statistics.rb
38 38
   weeks << end_date
39 39
end
40 40

  
41

  
42
users = []
43 41
# dates = months_between(d1, d2)
44 42
dates = weeks_between(d1, d2)
45
private_projects = []
46
all_projects = []
47
public_projects = []
48
top_level_and_private_projects = []
49

  
50 43

  
51 44
dates.each do |date|
52
  users <<  User.find(:all, :conditions => {:created_on  => d1..date})
53
  all_projects <<  Project.find(:all, :conditions => {:created_on  => d1..date})
54
  private_projects <<  Project.find(:all, :conditions => {:created_on  => d1..date, 
45
  users =  User.find(:all, :conditions => {:created_on  => d1..date})
46
  all_projects =  Project.find(:all, :conditions => {:created_on  => d1..date})
47
  private_projects =  Project.find(:all, :conditions => {:created_on  => d1..date, 
55 48
                                                          :is_public => false})
56
  top_level_and_private_projects <<  Project.find(:all, :conditions => {:created_on  => d1..date,
49
  top_level_and_private_projects =  Project.find(:all, :conditions => {:created_on  => d1..date,
57 50
                                                                        :is_public => false, 
58 51
                                                                        :parent_id => nil})
59 52

  
60
  puts "#{date} #{users.size} #{all_projects.size} #{private_projects.size} \n"
53
  puts "#{date} #{users.count} #{all_projects.count} #{private_projects.count} #{top_level_and_private_projects.count}\n"
61 54

  
62 55
end
63 56

  
64 57

  
65 58

  
66 59

  
67

  
68

  
69

  
70

  
71
#nusers.each_with_index do |num, idx|
72
#  puts "#{dates[idx]} #{num}\n"
73
#end
74

  
75

  
76

  
77
 
78

  

Also available in: Unified diff