typus 3.0.11.rc5 → 3.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. data/.gitmodules +3 -0
  2. data/app/views/admin/templates/_text_with_ckeditor.html.erb +13 -0
  3. data/lib/typus/version.rb +1 -1
  4. metadata +20 -272
  5. data/test/fixtures/rails_app/.gitignore +0 -4
  6. data/test/fixtures/rails_app/Capfile +0 -6
  7. data/test/fixtures/rails_app/README +0 -256
  8. data/test/fixtures/rails_app/Rakefile +0 -7
  9. data/test/fixtures/rails_app/app/controllers/admin/animals_controller.rb +0 -2
  10. data/test/fixtures/rails_app/app/controllers/admin/articles_controller.rb +0 -2
  11. data/test/fixtures/rails_app/app/controllers/admin/assets_controller.rb +0 -51
  12. data/test/fixtures/rails_app/app/controllers/admin/birds_controller.rb +0 -2
  13. data/test/fixtures/rails_app/app/controllers/admin/cases_controller.rb +0 -2
  14. data/test/fixtures/rails_app/app/controllers/admin/categories_controller.rb +0 -2
  15. data/test/fixtures/rails_app/app/controllers/admin/comments_controller.rb +0 -2
  16. data/test/fixtures/rails_app/app/controllers/admin/dogs_controller.rb +0 -2
  17. data/test/fixtures/rails_app/app/controllers/admin/entries_controller.rb +0 -2
  18. data/test/fixtures/rails_app/app/controllers/admin/hits_controller.rb +0 -37
  19. data/test/fixtures/rails_app/app/controllers/admin/image_holders_controller.rb +0 -2
  20. data/test/fixtures/rails_app/app/controllers/admin/invoices_controller.rb +0 -2
  21. data/test/fixtures/rails_app/app/controllers/admin/orders_controller.rb +0 -2
  22. data/test/fixtures/rails_app/app/controllers/admin/pages_controller.rb +0 -7
  23. data/test/fixtures/rails_app/app/controllers/admin/posts_controller.rb +0 -2
  24. data/test/fixtures/rails_app/app/controllers/admin/project_collaborators_controller.rb +0 -2
  25. data/test/fixtures/rails_app/app/controllers/admin/projects_controller.rb +0 -2
  26. data/test/fixtures/rails_app/app/controllers/admin/status_controller.rb +0 -2
  27. data/test/fixtures/rails_app/app/controllers/admin/typus_users_controller.rb +0 -2
  28. data/test/fixtures/rails_app/app/controllers/admin/users_controller.rb +0 -2
  29. data/test/fixtures/rails_app/app/controllers/admin/views_controller.rb +0 -8
  30. data/test/fixtures/rails_app/app/controllers/admin/watch_dog_controller.rb +0 -2
  31. data/test/fixtures/rails_app/app/controllers/admin_user.rb +0 -3
  32. data/test/fixtures/rails_app/app/controllers/application_controller.rb +0 -3
  33. data/test/fixtures/rails_app/app/helpers/application_helper.rb +0 -2
  34. data/test/fixtures/rails_app/app/helpers/form_helper.rb +0 -3
  35. data/test/fixtures/rails_app/app/models/animal.rb +0 -21
  36. data/test/fixtures/rails_app/app/models/article.rb +0 -10
  37. data/test/fixtures/rails_app/app/models/asset.rb +0 -45
  38. data/test/fixtures/rails_app/app/models/bird.rb +0 -2
  39. data/test/fixtures/rails_app/app/models/case.rb +0 -2
  40. data/test/fixtures/rails_app/app/models/category.rb +0 -31
  41. data/test/fixtures/rails_app/app/models/comment.rb +0 -17
  42. data/test/fixtures/rails_app/app/models/delayed/task.rb +0 -5
  43. data/test/fixtures/rails_app/app/models/dog.rb +0 -2
  44. data/test/fixtures/rails_app/app/models/entry.rb +0 -23
  45. data/test/fixtures/rails_app/app/models/hit.rb +0 -27
  46. data/test/fixtures/rails_app/app/models/image_holder.rb +0 -21
  47. data/test/fixtures/rails_app/app/models/invoice.rb +0 -10
  48. data/test/fixtures/rails_app/app/models/order.rb +0 -9
  49. data/test/fixtures/rails_app/app/models/page.rb +0 -24
  50. data/test/fixtures/rails_app/app/models/post.rb +0 -32
  51. data/test/fixtures/rails_app/app/models/project.rb +0 -17
  52. data/test/fixtures/rails_app/app/models/project_collaborator.rb +0 -16
  53. data/test/fixtures/rails_app/app/models/site.rb +0 -16
  54. data/test/fixtures/rails_app/app/models/typus_user.rb +0 -22
  55. data/test/fixtures/rails_app/app/models/user.rb +0 -10
  56. data/test/fixtures/rails_app/app/models/view.rb +0 -19
  57. data/test/fixtures/rails_app/app/views/admin/assets/_index.html.erb +0 -3
  58. data/test/fixtures/rails_app/app/views/admin/cases/_index.html.erb +0 -3
  59. data/test/fixtures/rails_app/app/views/admin/categories/_index.html.erb +0 -3
  60. data/test/fixtures/rails_app/app/views/admin/dashboard/_sidebar.html.erb +0 -11
  61. data/test/fixtures/rails_app/app/views/admin/entries/_index.html.erb +0 -3
  62. data/test/fixtures/rails_app/app/views/admin/hits/_edit.html.erb +0 -7
  63. data/test/fixtures/rails_app/app/views/admin/hits/_index.html.erb +0 -3
  64. data/test/fixtures/rails_app/app/views/admin/hits/index.html.erb +0 -28
  65. data/test/fixtures/rails_app/app/views/admin/pages/_index.html.erb +0 -3
  66. data/test/fixtures/rails_app/app/views/admin/posts/_edit.html.erb +0 -1
  67. data/test/fixtures/rails_app/app/views/admin/posts/_index.html.erb +0 -5
  68. data/test/fixtures/rails_app/app/views/admin/posts/_new.html.erb +0 -1
  69. data/test/fixtures/rails_app/app/views/admin/posts/_show.html.erb +0 -1
  70. data/test/fixtures/rails_app/app/views/admin/resources/_sidebar.html.erb +0 -1
  71. data/test/fixtures/rails_app/app/views/admin/status/index.html.erb +0 -9
  72. data/test/fixtures/rails_app/app/views/admin/templates/_datepicker.html.erb +0 -1
  73. data/test/fixtures/rails_app/app/views/admin/watch_dog/index.html.erb +0 -9
  74. data/test/fixtures/rails_app/config.ru +0 -4
  75. data/test/fixtures/rails_app/config/application.rb +0 -44
  76. data/test/fixtures/rails_app/config/boot.rb +0 -6
  77. data/test/fixtures/rails_app/config/database.yml +0 -34
  78. data/test/fixtures/rails_app/config/deploy.rb +0 -32
  79. data/test/fixtures/rails_app/config/environment.rb +0 -5
  80. data/test/fixtures/rails_app/config/environments/development.rb +0 -32
  81. data/test/fixtures/rails_app/config/environments/production.rb +0 -54
  82. data/test/fixtures/rails_app/config/environments/test.rb +0 -40
  83. data/test/fixtures/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  84. data/test/fixtures/rails_app/config/initializers/dragonfly.rb +0 -1
  85. data/test/fixtures/rails_app/config/initializers/inflections.rb +0 -12
  86. data/test/fixtures/rails_app/config/initializers/mime_types.rb +0 -5
  87. data/test/fixtures/rails_app/config/initializers/secret_token.rb +0 -7
  88. data/test/fixtures/rails_app/config/initializers/session_store.rb +0 -8
  89. data/test/fixtures/rails_app/config/initializers/typus.rb +0 -5
  90. data/test/fixtures/rails_app/config/initializers/typus_resources.rb +0 -27
  91. data/test/fixtures/rails_app/config/locales/en.yml +0 -5
  92. data/test/fixtures/rails_app/config/mongoid.yml +0 -20
  93. data/test/fixtures/rails_app/config/routes.rb +0 -61
  94. data/test/fixtures/rails_app/config/typus/README +0 -68
  95. data/test/fixtures/rails_app/config/typus/crud_basic.yml +0 -10
  96. data/test/fixtures/rails_app/config/typus/crud_basic_roles.yml +0 -2
  97. data/test/fixtures/rails_app/config/typus/crud_extended.yml +0 -66
  98. data/test/fixtures/rails_app/config/typus/crud_extended_roles.yml +0 -18
  99. data/test/fixtures/rails_app/config/typus/has_many.yml +0 -0
  100. data/test/fixtures/rails_app/config/typus/has_many_roles.yml +0 -0
  101. data/test/fixtures/rails_app/config/typus/has_many_through.yml +0 -23
  102. data/test/fixtures/rails_app/config/typus/has_many_through_roles.yml +0 -4
  103. data/test/fixtures/rails_app/config/typus/has_one.yml +0 -12
  104. data/test/fixtures/rails_app/config/typus/has_one_roles.yml +0 -3
  105. data/test/fixtures/rails_app/config/typus/mongo_db.yml +0 -4
  106. data/test/fixtures/rails_app/config/typus/mongo_db_roles.yml +0 -2
  107. data/test/fixtures/rails_app/config/typus/polymorphic.yml +0 -17
  108. data/test/fixtures/rails_app/config/typus/polymorphic_roles.yml +0 -5
  109. data/test/fixtures/rails_app/config/typus/resource_roles.yml +0 -7
  110. data/test/fixtures/rails_app/config/typus/sti.yml +0 -5
  111. data/test/fixtures/rails_app/config/typus/sti_roles.yml +0 -2
  112. data/test/fixtures/rails_app/config/typus/typus.yml +0 -13
  113. data/test/fixtures/rails_app/config/typus/typus_roles.yml +0 -2
  114. data/test/fixtures/rails_app/config/typus/unknown.yml +0 -3
  115. data/test/fixtures/rails_app/config/typus/unknown_roles.yml +0 -5
  116. data/test/fixtures/rails_app/db/.gitkeep +0 -0
  117. data/test/fixtures/rails_app/db/schema.rb +0 -200
  118. data/test/fixtures/rails_app/db/seeds.rb +0 -54
  119. data/test/fixtures/rails_app/db/seeds/assets/000.jpg +0 -0
  120. data/test/fixtures/rails_app/db/seeds/assets/001.jpg +0 -0
  121. data/test/fixtures/rails_app/db/seeds/assets/002.jpg +0 -0
  122. data/test/fixtures/rails_app/db/seeds/assets/003.jpg +0 -0
  123. data/test/fixtures/rails_app/db/seeds/assets/004.jpg +0 -0
  124. data/test/fixtures/rails_app/public/404.html +0 -26
  125. data/test/fixtures/rails_app/public/422.html +0 -26
  126. data/test/fixtures/rails_app/public/500.html +0 -26
  127. data/test/fixtures/rails_app/public/favicon.ico +0 -0
  128. data/test/fixtures/rails_app/public/images/rails.png +0 -0
  129. data/test/fixtures/rails_app/public/robots.txt +0 -5
  130. data/test/fixtures/rails_app/public/stylesheets/.gitkeep +0 -0
  131. data/test/fixtures/rails_app/script/rails +0 -6
@@ -1,23 +0,0 @@
1
- Project:
2
- fields:
3
- default: name, user
4
- form: name, user
5
- relationships: collaborators
6
- application: HasManyThrough
7
- filters: user
8
-
9
- ProjectCollaborator:
10
- fields:
11
- default: user
12
- form: user, project
13
- filters: project, user
14
- application: HasManyThrough
15
-
16
- User:
17
- fields:
18
- default: name, email
19
- list: name, email, projects
20
- relationships: projects #, third_party_projects
21
- application: HasManyThrough
22
- filters: projects
23
- order_by: name
@@ -1,4 +0,0 @@
1
- admin:
2
- Project: all
3
- ProjectCollaborator: all
4
- User: all
@@ -1,12 +0,0 @@
1
- Invoice:
2
- fields:
3
- default: number, order
4
- relationships: order
5
- application: HasOne
6
-
7
- Order:
8
- fields:
9
- default: number
10
- form: number
11
- relationships: invoice
12
- application: HasOne
@@ -1,3 +0,0 @@
1
- admin:
2
- Invoice: all
3
- Order: all
@@ -1,4 +0,0 @@
1
- Hit:
2
- fields:
3
- default: name, description
4
- application: MongoDB
@@ -1,2 +0,0 @@
1
- admin:
2
- Hit: all
@@ -1,17 +0,0 @@
1
- Animal: &ANIMAL_BASE
2
- fields:
3
- default: name
4
- relationships: image_holders
5
- application: Polymorphic
6
-
7
- Bird:
8
- <<: *ANIMAL_BASE
9
-
10
- Dog:
11
- <<: *ANIMAL_BASE
12
-
13
- ImageHolder:
14
- fields:
15
- default: name, imageable_id, imageable_type
16
- form: name
17
- application: Polymorphic
@@ -1,5 +0,0 @@
1
- admin:
2
- # Animal: all
3
- Bird: all
4
- Dog: all
5
- ImageHolder: all
@@ -1,7 +0,0 @@
1
- admin:
2
- Git: index, commit
3
- Status: index
4
- WatchDog: index, cleanup
5
-
6
- editor:
7
- Git: index
@@ -1,5 +0,0 @@
1
- Case:
2
- fields:
3
- default: title
4
- form: title, content
5
- application: STI
@@ -1,2 +0,0 @@
1
- admin:
2
- Case: all
@@ -1,13 +0,0 @@
1
- TypusUser:
2
- fields:
3
- default: first_name, last_name, role, email, locale
4
- list: email, role, status
5
- form: first_name, last_name, role, email, password, password_confirmation, locale
6
- options:
7
- selectors: role, locale
8
- booleans:
9
- status: Active, Inactive
10
- filters: status, role
11
- search: first_name, last_name, email, role
12
- application: Admin
13
- description: System Users Administration
@@ -1,2 +0,0 @@
1
- admin:
2
- TypusUser: create, read, update, delete
@@ -1,3 +0,0 @@
1
- View:
2
- fields:
3
- default: ip, post
@@ -1,5 +0,0 @@
1
- admin:
2
- View: create, read, update, delete
3
-
4
- editor:
5
- View: create, read, update, delete
File without changes
@@ -1,200 +0,0 @@
1
- ActiveRecord::Migration.verbose = false
2
-
3
- ActiveRecord::Schema.define do
4
-
5
- create_table :admin_users, :force => true do |t|
6
- t.string :first_name
7
- t.string :last_name
8
- t.string :role, :null => false
9
- t.string :email, :null => false
10
- t.string :password_digest, :null => false
11
- t.string :preferences
12
- t.boolean :status, :default => false
13
- t.timestamps
14
- end
15
-
16
- create_table :articles, :force => true do |t|
17
- t.string :title
18
- t.text :body
19
- t.timestamps
20
- end
21
-
22
- create_table :assets, :force => true do |t|
23
- t.string :caption
24
- # Dragonfly Attachment
25
- t.string :dragonfly_uid
26
- t.string :dragonfly_required_uid
27
- # Paperclip Attachment
28
- t.string :paperclip_file_name
29
- t.string :paperclip_content_type
30
- t.integer :paperclip_file_size
31
- t.datetime :paperclip_updated_at
32
- # Paperclip Required Attachment
33
- t.string :paperclip_required_file_name
34
- t.string :paperclip_required_content_type
35
- t.integer :paperclip_required_file_size
36
- t.datetime :paperclip_required_updated_at
37
- end
38
-
39
- create_table :categories, :force => true do |t|
40
- t.string :name
41
- t.string :permalink
42
- t.text :description
43
- t.integer :position
44
- end
45
-
46
- create_table :comments, :force => true do |t|
47
- t.string :email, :name
48
- t.text :body
49
- t.integer :post_id
50
- t.boolean :spam, :default => false
51
- end
52
-
53
- add_index :comments, :post_id
54
-
55
- create_table :delayed_tasks, :force => true do |t|
56
- t.string :name
57
- end
58
-
59
- create_table :entries, :force => true do |t|
60
- t.string :title, :null => false
61
- t.text :content
62
- t.string :type
63
- t.boolean :published, :null => false, :default => false
64
- end
65
-
66
- create_table :categories_entries, :force => true, :id => false do |t|
67
- t.column :category_id, :integer
68
- t.column :entry_id, :integer
69
- end
70
-
71
- create_table :pages, :force => true do |t|
72
- t.string :title
73
- t.text :body
74
- t.boolean :status
75
- t.integer :parent_id
76
- end
77
-
78
- add_index :pages, :parent_id
79
-
80
- create_table :posts, :force => true do |t|
81
- t.string :title
82
- t.text :body
83
- t.string :status
84
- t.integer :favorite_comment_id
85
- t.datetime :published_at
86
- t.integer :typus_user_id
87
- t.boolean :published
88
- t.timestamps
89
- end
90
-
91
- add_index :posts, :favorite_comment_id
92
- add_index :posts, :typus_user_id
93
-
94
- create_table :pictures, :force => true do |t|
95
- t.string :title
96
- t.string :picture_file_name
97
- t.string :picture_content_type
98
- t.integer :picture_file_size
99
- t.datetime :picture_updated_at
100
- t.integer :typus_user_id
101
- t.timestamps
102
- end
103
-
104
- add_index :pictures, :typus_user_id
105
-
106
- create_table :typus_users, :force => true do |t|
107
- t.string :first_name, :default => "", :null => false
108
- t.string :last_name, :default => "", :null => false
109
- t.string :role, :null => false
110
- t.string :email, :null => false
111
- t.boolean :status, :default => false
112
- t.string :token, :null => false
113
- t.string :salt, :null => false
114
- t.string :crypted_password, :null => false
115
- t.string :preferences
116
- t.timestamps
117
- end
118
-
119
- add_index :typus_users, :token
120
-
121
- create_table :views, :force => true do |t|
122
- t.string :ip, :default => '127.0.0.1'
123
- t.integer :post_id
124
- t.integer :site_id
125
- t.timestamps
126
- end
127
-
128
- add_index :views, :post_id
129
-
130
- create_table :categories_posts, :force => true, :id => false do |t|
131
- t.column :category_id, :integer
132
- t.column :post_id, :integer
133
- end
134
-
135
- add_index :categories_posts, :category_id
136
- add_index :categories_posts, :post_id
137
-
138
- ##
139
- # has_one relationships
140
- #
141
-
142
- create_table :invoices, :force => true do |t|
143
- t.string :number
144
- t.integer :order_id
145
- t.integer :typus_user_id
146
- t.timestamps
147
- end
148
-
149
- create_table :orders, :force => true do |t|
150
- t.string :number
151
- t.timestamps
152
- end
153
-
154
- ##
155
- # has_many through relationships
156
- #
157
-
158
- create_table :users, :force => true do |t|
159
- t.string :name, :null => false
160
- t.string :email
161
- t.timestamps
162
- end
163
-
164
- create_table :projects, :force => true do |t|
165
- t.string :name, :null => false
166
- t.integer :user_id, :null => false
167
- t.timestamps
168
- end
169
-
170
- create_table :project_collaborators, :force => true do |t|
171
- t.integer :user_id, :null => false
172
- t.integer :project_id, :null => false
173
- t.timestamps
174
- end
175
-
176
- ##
177
- # Polymorphic
178
- #
179
-
180
- create_table :animals, :force => true do |t|
181
- t.string :name, :null => false
182
- t.string :type
183
- end
184
-
185
- create_table :image_holders, :force => true do |t|
186
- t.string :name
187
- t.integer :imageable_id
188
- t.string :imageable_type
189
- end
190
-
191
- ##
192
- # Context
193
- #
194
-
195
- create_table :sites, :force => true do |t|
196
- t.string :name, :null => false
197
- t.string :domain, :null => false
198
- end
199
-
200
- end
@@ -1,54 +0,0 @@
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 => 'Daley', :city => cities.first)
8
-
9
- require '../../factories'
10
-
11
- ##
12
- # CRUD
13
- ##
14
-
15
- 50.times { Factory(:entry) }
16
-
17
- ##
18
- # CRUD Extended
19
- ##
20
-
21
- 5.times { Factory(:category) }
22
- 5.times { Factory(:post) }
23
-
24
- assets_path = "#{Rails.root}/db/seeds/assets"
25
- 5.times { |i| Factory(:asset,
26
- :dragonfly => File.new("#{assets_path}/00#{i}.jpg"),
27
- :dragonfly_required => File.new("#{assets_path}/00#{i}.jpg"),
28
- :paperclip => File.new("#{assets_path}/00#{i}.jpg")) }
29
-
30
- ##
31
- # HasManyThrough
32
- ##
33
-
34
- 5.times do
35
- project = Factory(:project)
36
- 50.times do
37
- project.collaborators << Factory(:user)
38
- end
39
- end
40
-
41
- ##
42
- # HasOne
43
- ##
44
-
45
- 5.times { Factory(:invoice) }
46
-
47
- ##
48
- # Polymorphic
49
- ##
50
-
51
- 5.times do
52
- Factory(:bird)
53
- Factory(:dog)
54
- end
@@ -1,26 +0,0 @@
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>
@@ -1,26 +0,0 @@
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>