multiinsert 0.0.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.
Files changed (149) hide show
  1. data/.gitignore +15 -0
  2. data/Gemfile +49 -0
  3. data/Gemfile.lock +182 -0
  4. data/README.md +4 -0
  5. data/README.rdoc +261 -0
  6. data/Rakefile +7 -0
  7. data/app/assets/images/Dashboard.jpg +0 -0
  8. data/app/assets/images/black.png +0 -0
  9. data/app/assets/images/giff.gif +0 -0
  10. data/app/assets/images/rails.png +0 -0
  11. data/app/assets/images/sprites.png +0 -0
  12. data/app/assets/javascripts/application.js +15 -0
  13. data/app/assets/javascripts/effects.js +9 -0
  14. data/app/assets/javascripts/evaluations.js.coffee +3 -0
  15. data/app/assets/javascripts/tabs_old.js +42 -0
  16. data/app/assets/stylesheets/application.css +13 -0
  17. data/app/assets/stylesheets/evaluations.css.scss +3 -0
  18. data/app/assets/stylesheets/style.css +477 -0
  19. data/app/assets/stylesheets/tab.css +190 -0
  20. data/app/controllers/application_controller.rb +15 -0
  21. data/app/controllers/employee_heirarchies_controller.rb +2 -0
  22. data/app/controllers/evaluations_controller.rb +80 -0
  23. data/app/controllers/sessions_controller.rb +48 -0
  24. data/app/helpers/application_helper.rb +2 -0
  25. data/app/helpers/employee_heirarchies_helper.rb +2 -0
  26. data/app/helpers/evaluations_helper.rb +2 -0
  27. data/app/mailers/.gitkeep +0 -0
  28. data/app/models/.gitkeep +0 -0
  29. data/app/models/employee.rb +5 -0
  30. data/app/models/employee_heirarchy.rb +6 -0
  31. data/app/models/evaluation.rb +6 -0
  32. data/app/models/evaluation_interval.rb +5 -0
  33. data/app/models/evaluation_period.rb +6 -0
  34. data/app/models/interval_format.rb +4 -0
  35. data/app/models/role.rb +7 -0
  36. data/app/models/score.rb +3 -0
  37. data/app/models/team.rb +10 -0
  38. data/app/models/team.rb~ +10 -0
  39. data/app/models/team_value.rb +5 -0
  40. data/app/models/user.rb +49 -0
  41. data/app/models/user.rb~ +11 -0
  42. data/app/models/user_history.rb +6 -0
  43. data/app/models/user_role.rb +5 -0
  44. data/app/models/value.rb +8 -0
  45. data/app/models/value.rb~ +7 -0
  46. data/app/views/devise/confirmations/new.html.erb +12 -0
  47. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  48. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  49. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  50. data/app/views/devise/passwords/edit.html.erb +16 -0
  51. data/app/views/devise/passwords/new.html.erb +12 -0
  52. data/app/views/devise/registrations/edit.html.erb +29 -0
  53. data/app/views/devise/registrations/new.html.erb +36 -0
  54. data/app/views/devise/sessions/new.html.erb +17 -0
  55. data/app/views/devise/shared/_links.erb +25 -0
  56. data/app/views/devise/unlocks/new.html.erb +12 -0
  57. data/app/views/evaluations/edit.html.erb +21 -0
  58. data/app/views/evaluations/first.html.erb +5 -0
  59. data/app/views/evaluations/index.html.erb +7 -0
  60. data/app/views/evaluations/new.html.erb +15 -0
  61. data/app/views/evaluations/show.html.erb +21 -0
  62. data/app/views/layouts/application.html.erb +87 -0
  63. data/config.ru +4 -0
  64. data/config/application.rb +63 -0
  65. data/config/boot.rb +6 -0
  66. data/config/database.yml +31 -0
  67. data/config/database.yml~ +31 -0
  68. data/config/environment.rb +5 -0
  69. data/config/environments/development.rb +37 -0
  70. data/config/environments/production.rb +67 -0
  71. data/config/environments/test.rb +37 -0
  72. data/config/initializers/backtrace_silencers.rb +7 -0
  73. data/config/initializers/devise.rb +240 -0
  74. data/config/initializers/inflections.rb +15 -0
  75. data/config/initializers/mime_types.rb +5 -0
  76. data/config/initializers/rails_admin.rb +116 -0
  77. data/config/initializers/secret_token.rb +7 -0
  78. data/config/initializers/session_store.rb +8 -0
  79. data/config/initializers/wrap_parameters.rb +14 -0
  80. data/config/locales/devise.en.yml +59 -0
  81. data/config/locales/en.yml +5 -0
  82. data/config/routes.rb +70 -0
  83. data/db/migrate/20130220053413_devise_create_users.rb +52 -0
  84. data/db/migrate/20130220055237_create_rails_admin_histories_table.rb +18 -0
  85. data/db/migrate/20130220060116_create_values.rb +9 -0
  86. data/db/migrate/20130220060116_create_values.rb~ +8 -0
  87. data/db/migrate/20130220060206_create_scores.rb +9 -0
  88. data/db/migrate/20130220060258_create_teams.rb +8 -0
  89. data/db/migrate/20130220060347_create_team_values.rb +9 -0
  90. data/db/migrate/20130220060347_create_team_values.rb~ +10 -0
  91. data/db/migrate/20130220060427_create_roles.rb +8 -0
  92. data/db/migrate/20130220060605_create_evaluation_periods.rb +10 -0
  93. data/db/migrate/20130220060807_create_evaluation_intervals.rb +9 -0
  94. data/db/migrate/20130220060902_create_interval_formats.rb +9 -0
  95. data/db/migrate/20130220061022_create_user_histories.rb +13 -0
  96. data/db/migrate/20130220061242_create_evaluations.rb +16 -0
  97. data/db/migrate/20130305063738_create_user_roles.rb +9 -0
  98. data/db/migrate/20130305091849_create_employees.rb +12 -0
  99. data/db/migrate/20130305144125_create_employee_heirarchies.rb +13 -0
  100. data/db/migrate/20130305150244_add_foreign_keys_to_employee_heirarchies.rb +6 -0
  101. data/db/migrate/20130307035139_addmanagerid_to_evaluations.rb +9 -0
  102. data/db/schema.rb +175 -0
  103. data/db/seeds.rb +7 -0
  104. data/doc/README_FOR_APP +2 -0
  105. data/lib/assets/.gitkeep +0 -0
  106. data/lib/tasks/.gitkeep +0 -0
  107. data/log/.gitkeep +0 -0
  108. data/public/404.html +26 -0
  109. data/public/422.html +26 -0
  110. data/public/500.html +25 -0
  111. data/public/favicon.ico +0 -0
  112. data/public/robots.txt +5 -0
  113. data/script/rails +6 -0
  114. data/test/fixtures/.gitkeep +0 -0
  115. data/test/fixtures/evaluation_intervals.yml +9 -0
  116. data/test/fixtures/evaluation_periods.yml +11 -0
  117. data/test/fixtures/evaluations.yml +19 -0
  118. data/test/fixtures/interval_formats.yml +7 -0
  119. data/test/fixtures/roles.yml +7 -0
  120. data/test/fixtures/scores.yml +9 -0
  121. data/test/fixtures/team_values.yml +9 -0
  122. data/test/fixtures/teams.yml +9 -0
  123. data/test/fixtures/user_histories.yml +15 -0
  124. data/test/fixtures/users.yml +11 -0
  125. data/test/fixtures/values.yml +7 -0
  126. data/test/functional/.gitkeep +0 -0
  127. data/test/functional/employee_heirarchies_controller_test.rb +7 -0
  128. data/test/functional/evaluations_controller_test.rb +7 -0
  129. data/test/integration/.gitkeep +0 -0
  130. data/test/performance/browsing_test.rb +12 -0
  131. data/test/test_helper.rb +13 -0
  132. data/test/unit/.gitkeep +0 -0
  133. data/test/unit/evaluation_interval_test.rb +7 -0
  134. data/test/unit/evaluation_period_test.rb +7 -0
  135. data/test/unit/evaluation_test.rb +7 -0
  136. data/test/unit/helpers/employee_heirarchies_helper_test.rb +4 -0
  137. data/test/unit/helpers/evaluations_helper_test.rb +4 -0
  138. data/test/unit/interval_format_test.rb +7 -0
  139. data/test/unit/role_test.rb +7 -0
  140. data/test/unit/score_test.rb +7 -0
  141. data/test/unit/team_test.rb +7 -0
  142. data/test/unit/team_value_test.rb +7 -0
  143. data/test/unit/user_history_test.rb +7 -0
  144. data/test/unit/user_test.rb +7 -0
  145. data/test/unit/value_test.rb +7 -0
  146. data/vendor/assets/javascripts/.gitkeep +0 -0
  147. data/vendor/assets/stylesheets/.gitkeep +0 -0
  148. data/vendor/plugins/.gitkeep +0 -0
  149. metadata +258 -0
@@ -0,0 +1,8 @@
1
+ class CreateRoles < ActiveRecord::Migration
2
+ def change
3
+ create_table :roles do |t|
4
+ t.string :role_description
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ class CreateEvaluationPeriods < ActiveRecord::Migration
2
+ def change
3
+ create_table :evaluation_periods do |t|
4
+ t.time :eval_start_date
5
+ t.time :eval_end_date
6
+ t.integer :team_id
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class CreateEvaluationIntervals < ActiveRecord::Migration
2
+ def change
3
+ create_table :evaluation_intervals do |t|
4
+ t.integer :team_id
5
+ t.time :frequency
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateIntervalFormats < ActiveRecord::Migration
2
+ def change
3
+ create_table :interval_formats do |t|
4
+ #t.time :frequency
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ class CreateUserHistories < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_histories do |t|
4
+ t.integer :team_id
5
+ t.integer :user_id
6
+ t.integer :evaluation_period_id
7
+ t.time :date
8
+ t.integer :totalpoints
9
+ t.integer :manager_id
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ class CreateEvaluations < ActiveRecord::Migration
2
+ def change
3
+ create_table :evaluations do |t|
4
+ t.integer :self_points
5
+ t.integer :manager_points
6
+ t.integer :final_points
7
+ t.text :self_comments
8
+ t.text :manager_comments
9
+ t.text :final_comments
10
+ t.integer :evaluation_period_id
11
+ t.integer :value_id
12
+ t.integer :user_id
13
+ t.timestamps
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,9 @@
1
+ class CreateUserRoles < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_roles do |t|
4
+ t.integer :user_id
5
+ t.integer :role_id
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ class CreateEmployees < ActiveRecord::Migration
2
+ def change
3
+ create_table :employees do |t|
4
+ t.references :user
5
+ t.references :manager
6
+
7
+ t.timestamps
8
+ end
9
+ add_index :employees, :user_id
10
+ add_index :employees, :manager_id
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ class CreateEmployeeHeirarchies < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :employee_heirarchies do |t|
4
+ t.timestamps
5
+ t.integer :employee_id
6
+ t.integer :manager_id
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :employee_heirarchies
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ class AddForeignKeysToEmployeeHeirarchies < ActiveRecord::Migration
2
+ def change
3
+ add_foreign_key(:employee_heirarchies, :users, column: 'employee_id')
4
+ add_foreign_key(:employee_heirarchies, :users, column: 'manager_id')
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ class AddmanageridToEvaluations < ActiveRecord::Migration
2
+ def up
3
+ add_column :evaluations, :manager_id, :integer
4
+ end
5
+
6
+ def down
7
+ remove_column :evaluations, :manager_id, :integer
8
+ end
9
+ end
data/db/schema.rb ADDED
@@ -0,0 +1,175 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20130321051133) do
15
+
16
+ create_table "books", :force => true do |t|
17
+ t.string "title"
18
+ t.text "description"
19
+ t.string "author"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ create_table "employee_heirarchies", :force => true do |t|
25
+ t.datetime "created_at", :null => false
26
+ t.datetime "updated_at", :null => false
27
+ t.integer "employee_id"
28
+ t.integer "manager_id"
29
+ end
30
+
31
+ add_index "employee_heirarchies", ["employee_id"], :name => "employee_heirarchies_employee_id_fk"
32
+ add_index "employee_heirarchies", ["manager_id"], :name => "employee_heirarchies_manager_id_fk"
33
+
34
+ create_table "employees", :force => true do |t|
35
+ t.integer "user_id"
36
+ t.integer "manager_id"
37
+ t.datetime "created_at", :null => false
38
+ t.datetime "updated_at", :null => false
39
+ end
40
+
41
+ add_index "employees", ["manager_id"], :name => "index_employees_on_manager_id"
42
+ add_index "employees", ["user_id"], :name => "index_employees_on_user_id"
43
+
44
+ create_table "evaluation_intervals", :force => true do |t|
45
+ t.integer "team_id"
46
+ t.time "frequency"
47
+ t.datetime "created_at", :null => false
48
+ t.datetime "updated_at", :null => false
49
+ end
50
+
51
+ create_table "evaluation_periods", :force => true do |t|
52
+ t.time "eval_start_date"
53
+ t.time "eval_end_date"
54
+ t.integer "team_id"
55
+ t.datetime "created_at", :null => false
56
+ t.datetime "updated_at", :null => false
57
+ end
58
+
59
+ create_table "evaluations", :force => true do |t|
60
+ t.integer "self_points"
61
+ t.integer "manager_points"
62
+ t.integer "final_points"
63
+ t.text "self_comments"
64
+ t.text "manager_comments"
65
+ t.text "final_comments"
66
+ t.integer "evaluation_period_id"
67
+ t.integer "value_id"
68
+ t.integer "user_id"
69
+ t.datetime "created_at", :null => false
70
+ t.datetime "updated_at", :null => false
71
+ t.integer "manager_id"
72
+ end
73
+
74
+ create_table "interval_formats", :force => true do |t|
75
+ t.datetime "created_at", :null => false
76
+ t.datetime "updated_at", :null => false
77
+ end
78
+
79
+ create_table "rails_admin_histories", :force => true do |t|
80
+ t.text "message"
81
+ t.string "username"
82
+ t.integer "item"
83
+ t.string "table"
84
+ t.integer "month", :limit => 2
85
+ t.integer "year", :limit => 8
86
+ t.datetime "created_at", :null => false
87
+ t.datetime "updated_at", :null => false
88
+ end
89
+
90
+ add_index "rails_admin_histories", ["item", "table", "month", "year"], :name => "index_rails_admin_histories"
91
+
92
+ create_table "roles", :force => true do |t|
93
+ t.string "role_description"
94
+ t.datetime "created_at", :null => false
95
+ t.datetime "updated_at", :null => false
96
+ end
97
+
98
+ create_table "scores", :force => true do |t|
99
+ t.integer "level"
100
+ t.text "description"
101
+ t.datetime "created_at", :null => false
102
+ t.datetime "updated_at", :null => false
103
+ end
104
+
105
+ create_table "team_values", :force => true do |t|
106
+ t.integer "team_id"
107
+ t.integer "value_id"
108
+ t.datetime "created_at", :null => false
109
+ t.datetime "updated_at", :null => false
110
+ end
111
+
112
+ create_table "teams", :force => true do |t|
113
+ t.string "name"
114
+ t.datetime "created_at", :null => false
115
+ t.datetime "updated_at", :null => false
116
+ end
117
+
118
+ create_table "user_histories", :force => true do |t|
119
+ t.integer "team_id"
120
+ t.integer "user_id"
121
+ t.integer "evaluation_period_id"
122
+ t.time "date"
123
+ t.integer "totalpoints"
124
+ t.integer "manager_id"
125
+ t.datetime "created_at", :null => false
126
+ t.datetime "updated_at", :null => false
127
+ end
128
+
129
+ create_table "user_roles", :force => true do |t|
130
+ t.integer "user_id"
131
+ t.integer "role_id"
132
+ t.datetime "created_at", :null => false
133
+ t.datetime "updated_at", :null => false
134
+ end
135
+
136
+ create_table "users", :force => true do |t|
137
+ t.string "email", :default => "", :null => false
138
+ t.string "encrypted_password", :default => "", :null => false
139
+ t.string "firstname"
140
+ t.string "lastname"
141
+ t.integer "phonenum"
142
+ t.text "address"
143
+ t.integer "team_id"
144
+ t.integer "role_id"
145
+ t.string "designation"
146
+ t.string "reset_password_token"
147
+ t.datetime "reset_password_sent_at"
148
+ t.datetime "remember_created_at"
149
+ t.integer "sign_in_count", :default => 0
150
+ t.datetime "current_sign_in_at"
151
+ t.datetime "last_sign_in_at"
152
+ t.string "current_sign_in_ip"
153
+ t.string "last_sign_in_ip"
154
+ t.string "confirmation_token"
155
+ t.datetime "confirmed_at"
156
+ t.datetime "confirmation_sent_at"
157
+ t.string "unconfirmed_email"
158
+ t.datetime "created_at", :null => false
159
+ t.datetime "updated_at", :null => false
160
+ end
161
+
162
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
163
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
164
+
165
+ create_table "values", :force => true do |t|
166
+ t.text "description"
167
+ t.text "title"
168
+ t.datetime "created_at", :null => false
169
+ t.datetime "updated_at", :null => false
170
+ end
171
+
172
+ add_foreign_key "employee_heirarchies", "users", :name => "employee_heirarchies_employee_id_fk", :column => "employee_id"
173
+ add_foreign_key "employee_heirarchies", "users", :name => "employee_heirarchies_manager_id_fk", :column => "manager_id"
174
+
175
+ end
data/db/seeds.rb ADDED
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
File without changes
File without changes
data/log/.gitkeep ADDED
File without changes
data/public/404.html ADDED
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
data/public/422.html ADDED
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
data/public/500.html ADDED
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
data/public/robots.txt ADDED
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
data/script/rails ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
File without changes
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ team_id: 1
5
+ interval_format_id: 1
6
+
7
+ two:
8
+ team_id: 1
9
+ interval_format_id: 1