typus 0.9.38 → 0.9.39
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/.gitignore +0 -9
- data/AUTHORS.md +34 -0
- data/CHANGES +2 -2
- data/README.md +75 -0
- data/VERSION +1 -0
- data/app/views/admin/shared/_feedback.html.erb +1 -1
- data/lib/typus.rb +0 -3
- data/lib/typus/user.rb +6 -2
- data/test/config/working/application_roles.yml +1 -1
- data/test/fixtures/app/models/asset.rb +5 -0
- data/test/fixtures/app/models/category.rb +11 -0
- data/test/fixtures/app/models/comment.rb +6 -0
- data/test/fixtures/app/models/custom_user.rb +2 -0
- data/test/fixtures/app/models/delayed/task.rb +5 -0
- data/test/fixtures/app/models/page.rb +5 -0
- data/test/fixtures/app/models/post.rb +21 -0
- data/test/fixtures/app/models/view.rb +5 -0
- data/test/unit/typus_user_roles_test.rb +8 -1
- data/typus.gemspec +284 -0
- metadata +23 -8
- data/AUTHORS +0 -34
- data/README.rdoc +0 -94
- data/lib/typus/version.rb +0 -3
- data/test/models.rb +0 -67
data/.gitignore
CHANGED
data/AUTHORS.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
Typus was designed & developed by Francesc Esplugas (fesplugas).
|
2
|
+
|
3
|
+
Special thanks to the following individuals:
|
4
|
+
|
5
|
+
* [Laia Gargallo](http://azotacalles.net): Lover & tea provider.
|
6
|
+
* [Isaac Feliu](http://www.vesne.com): Code review on first public release.
|
7
|
+
* [Lluis Folch](http://wet-floor.com): Feedback.
|
8
|
+
* [Sergio Espeja](http://github.com/spejman): Code.
|
9
|
+
* [Eadz](http://github.com/eadz): Code.
|
10
|
+
* [Anthony Underwood](http://github.com/aunderwo): Code.
|
11
|
+
* [Felipe Talavera](http://github.com/flype): Spanish translation & code.
|
12
|
+
* [Erik Tigerholm](http://github.com/eriktigerholm): Code.
|
13
|
+
* [George Guimarães](http://github.com/georgeguimaraes): Portuguese translation & code)
|
14
|
+
* [José Valim](http://github.com/josevalim): Code.
|
15
|
+
* [Luqman Amjad](http://github.com/luqman): Code.
|
16
|
+
* [Alexey Noskov](http://github.com/alno) Russian translation & code.
|
17
|
+
* [Andres Gutierres](http://github.com/andresgutgon): Bugfixes & feedback.
|
18
|
+
* [Komzák Nándor](http://github.com/rubymood): Code, bugfixes & feedback.
|
19
|
+
* [Michael Grunewalder](http://michael.grunewalder.com) : German translation.
|
20
|
+
* [Tim Harvey](http://www.timharvey.net): Code.
|
21
|
+
* [Ned Baldessin](http://github.com/nedbaldessin) : French translation & code.
|
22
|
+
* Robert Rouse: Ruby 1.9 compatibility fixes.
|
23
|
+
* [Rytis Lukoseviciu](http://rytis.net): Code.
|
24
|
+
* [WesEd Interactive](http://www.wested.org/): Code.
|
25
|
+
|
26
|
+
Somehow involved in the project
|
27
|
+
|
28
|
+
* [Yukihiro "matz" Matsumoto](http://www.rubyist.net/~matz/) creator of
|
29
|
+
[Ruby](http://ruby-lang.org/) the most beautiful programming language I've ever seen.
|
30
|
+
* [David Heinemeier Hansson](http://loudthinking.com/) for creating
|
31
|
+
[Ruby on Rails](http://rubyonrails.org/).
|
32
|
+
* [Django Admin](http://www.djangoproject.com) who inspired part of the
|
33
|
+
development, in special the templates rendering & UI.
|
34
|
+
* [Paginator](http://github.com/bruce/paginator) by [Bruce Williams](http://codefluency.com).
|
data/CHANGES
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
= 0.9.
|
1
|
+
= 0.9.39 / 2009-??-??
|
2
2
|
|
3
|
-
*
|
3
|
+
* ...
|
data/README.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Typus: Admin interface for Rails applications
|
2
|
+
|
3
|
+
**Typus** is designed for a single activity:
|
4
|
+
|
5
|
+
Trusted users editing structured content.
|
6
|
+
|
7
|
+
**Typus** doesn't try to be all the things to all the people but it's
|
8
|
+
extensible enough to match lots of use cases.
|
9
|
+
|
10
|
+
## Key Features
|
11
|
+
|
12
|
+
- Access control by users and roles.
|
13
|
+
- CRUD and custom actions for your models on a clean interface.
|
14
|
+
- Internationalized.
|
15
|
+
- Extensible and overwritable templates.
|
16
|
+
- Low memory footprint.
|
17
|
+
- Released under the MIT License.
|
18
|
+
|
19
|
+
## Links
|
20
|
+
|
21
|
+
- [Project site and documentation](http://intraducibles.com/projects/typus)
|
22
|
+
- [Plugin source](http://github.com/fesplugas/typus)
|
23
|
+
- [Mailing list](http://groups.google.com/group/typus)
|
24
|
+
- [Bug reports](http://github.com/fesplugas/typus/issues)
|
25
|
+
- [Gems](http://gemcutter.org/gems/typus)
|
26
|
+
|
27
|
+
## Impatients to see it working?
|
28
|
+
|
29
|
+
**Step 1:** Create a Rails application using a template.
|
30
|
+
|
31
|
+
$ rails example.com -m http://tr.im/typus_example
|
32
|
+
|
33
|
+
**Step 2:** Start the server.
|
34
|
+
|
35
|
+
$ cd example.com && script/server
|
36
|
+
|
37
|
+
**Step 3:** Go to the admin area (<http://0.0.0.0:3000/admin>) and enjoy it!
|
38
|
+
|
39
|
+
|
40
|
+
## Want to see a demo working?
|
41
|
+
|
42
|
+
Demo application is hosted at Heroku (<http://typus.heroku.com/>).
|
43
|
+
|
44
|
+
Use the following credentials to log in.
|
45
|
+
|
46
|
+
Email: userdemo@intraducibles.com
|
47
|
+
Password: userdemo
|
48
|
+
|
49
|
+
## Installing
|
50
|
+
|
51
|
+
Install from GitHub the latest version which it's compatible with Rails 2.3.4.
|
52
|
+
|
53
|
+
$ script/plugin install git://github.com/fesplugas/typus.git
|
54
|
+
|
55
|
+
Once `typus` is installed, run the generator to create required files and migrate your
|
56
|
+
database. (<tt>typus_users</tt> table is created)
|
57
|
+
|
58
|
+
$ script/generate typus
|
59
|
+
$ rake db:migrate
|
60
|
+
|
61
|
+
To create the first user, start the application server, go to
|
62
|
+
http://0.0.0.0:3000/admin and follow the instructions.
|
63
|
+
|
64
|
+
## Support
|
65
|
+
|
66
|
+
As an experiment we encourage you to support this project by
|
67
|
+
[donating][1] 90 € if you are a developer or studio. Donations do
|
68
|
+
allow us to spend more time working and supporting the project.
|
69
|
+
|
70
|
+
## License
|
71
|
+
|
72
|
+
Copyright © 2007-2009 Francesc Esplugas Marti, released under the
|
73
|
+
MIT license
|
74
|
+
|
75
|
+
[1]:http://intraducibles.com/projects/typus/donate
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.9.39
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<p>
|
2
|
-
<%= link_to _("Submit a bug report"), 'http://
|
2
|
+
<%= link_to _("Submit a bug report"), 'http://github.com/fesplugas/typus/issues', :rel => 'external' %> ·
|
3
3
|
<%= link_to _("Documentation"), 'http://intraducibles.com/projects/typus', :rel => 'external' %> ·
|
4
4
|
<%= mail_to "hello@intraducibles.com", _("Send us feedback") %> ·
|
5
5
|
<%= link_to _("License"), "http://intraducibles.com/projects/typus/mit-license", :rel => 'external' %>
|
data/lib/typus.rb
CHANGED
@@ -100,9 +100,6 @@ module Typus
|
|
100
100
|
Typus::Configuration.config!
|
101
101
|
Typus::Configuration.roles!
|
102
102
|
|
103
|
-
# Require the test/models on when testing.
|
104
|
-
require File.dirname(__FILE__) + '/../test/models' if testing?
|
105
|
-
|
106
103
|
# Rails Extensions.
|
107
104
|
require 'typus/active_record'
|
108
105
|
require 'typus/extensions/routes'
|
data/lib/typus/user.rb
CHANGED
@@ -77,7 +77,11 @@ module Typus
|
|
77
77
|
|
78
78
|
def can_perform?(resource, action, options = {})
|
79
79
|
|
80
|
-
|
80
|
+
# We are getting a Class, so we need to convert it to string.
|
81
|
+
resource = resource.to_s
|
82
|
+
|
83
|
+
return false if !resources.include?(resource)
|
84
|
+
return true if resources[resource].include?('all')
|
81
85
|
|
82
86
|
_action = if options[:special]
|
83
87
|
action
|
@@ -93,7 +97,7 @@ module Typus
|
|
93
97
|
end
|
94
98
|
end
|
95
99
|
|
96
|
-
resources[resource
|
100
|
+
resources[resource].split(', ').include?(_action)
|
97
101
|
|
98
102
|
end
|
99
103
|
|
@@ -2,7 +2,7 @@ admin:
|
|
2
2
|
Asset: create, read, update, delete
|
3
3
|
Category: create, read, update, delete
|
4
4
|
Comment: create, read, update, delete
|
5
|
-
Delayed::Task:
|
5
|
+
Delayed::Task: all
|
6
6
|
Git: index, commit
|
7
7
|
Order:
|
8
8
|
Page: create, read, update, delete, rebuild, rebuild_all
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Post < ActiveRecord::Base
|
2
|
+
|
3
|
+
validates_presence_of :title, :body
|
4
|
+
has_and_belongs_to_many :categories
|
5
|
+
has_many :assets, :as => :resource, :dependent => :destroy
|
6
|
+
has_many :comments
|
7
|
+
has_many :views
|
8
|
+
belongs_to :favorite_comment, :class_name => 'Comment'
|
9
|
+
|
10
|
+
def self.status
|
11
|
+
%w( true false pending published unpublished )
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.typus
|
15
|
+
'plugin'
|
16
|
+
end
|
17
|
+
|
18
|
+
def asset_file_name
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -23,7 +23,7 @@ class TypusUserRolesTest < ActiveSupport::TestCase
|
|
23
23
|
models.delete_if { |m| resources.include?(m) }
|
24
24
|
|
25
25
|
%w( create read update destroy ).each do |action|
|
26
|
-
models.each { |model| assert typus_user.can_perform?(model, action) }
|
26
|
+
models.each { |model| assert typus_user.can_perform?(model, action), "Error on #{model} #{action}" }
|
27
27
|
end
|
28
28
|
|
29
29
|
# Order resource doesn't have an index action, so we current user
|
@@ -87,4 +87,11 @@ class TypusUserRolesTest < ActiveSupport::TestCase
|
|
87
87
|
|
88
88
|
end
|
89
89
|
|
90
|
+
def test_admin_can_perform_any_action_on_delayed_task_model
|
91
|
+
typus_user = typus_users(:admin)
|
92
|
+
action = 'whatever_i_want_to'
|
93
|
+
klass = Delayed::Task
|
94
|
+
assert typus_user.can_perform?(klass, action), "Admin can't perform `#{action}` on `#{klass}`."
|
95
|
+
end
|
96
|
+
|
90
97
|
end
|
data/typus.gemspec
ADDED
@@ -0,0 +1,284 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{typus}
|
8
|
+
s.version = "0.9.39"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Francesc Esplugas"]
|
12
|
+
s.date = %q{2009-10-24}
|
13
|
+
s.description = %q{Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)}
|
14
|
+
s.email = %q{francesc@intraducibles.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.md"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"AUTHORS.md",
|
21
|
+
"CHANGES",
|
22
|
+
"MIT-LICENSE",
|
23
|
+
"README.md",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"app/controllers/admin/master_controller.rb",
|
27
|
+
"app/controllers/typus_controller.rb",
|
28
|
+
"app/helpers/admin/form_helper.rb",
|
29
|
+
"app/helpers/admin/master_helper.rb",
|
30
|
+
"app/helpers/admin/public_helper.rb",
|
31
|
+
"app/helpers/admin/sidebar_helper.rb",
|
32
|
+
"app/helpers/admin/table_helper.rb",
|
33
|
+
"app/helpers/typus_helper.rb",
|
34
|
+
"app/models/typus_mailer.rb",
|
35
|
+
"app/models/typus_user.rb",
|
36
|
+
"app/views/admin/dashboard/_sidebar.html.erb",
|
37
|
+
"app/views/admin/resources/edit.html.erb",
|
38
|
+
"app/views/admin/resources/index.html.erb",
|
39
|
+
"app/views/admin/resources/new.html.erb",
|
40
|
+
"app/views/admin/resources/show.html.erb",
|
41
|
+
"app/views/admin/shared/_feedback.html.erb",
|
42
|
+
"app/views/admin/shared/_footer.html.erb",
|
43
|
+
"app/views/admin/shared/_pagination.html.erb",
|
44
|
+
"app/views/admin/templates/_boolean.html.erb",
|
45
|
+
"app/views/admin/templates/_date.html.erb",
|
46
|
+
"app/views/admin/templates/_datetime.html.erb",
|
47
|
+
"app/views/admin/templates/_file.html.erb",
|
48
|
+
"app/views/admin/templates/_password.html.erb",
|
49
|
+
"app/views/admin/templates/_selector.html.erb",
|
50
|
+
"app/views/admin/templates/_string.html.erb",
|
51
|
+
"app/views/admin/templates/_text.html.erb",
|
52
|
+
"app/views/admin/templates/_time.html.erb",
|
53
|
+
"app/views/admin/templates/_tiny_mce.html.erb",
|
54
|
+
"app/views/layouts/admin.html.erb",
|
55
|
+
"app/views/layouts/typus.html.erb",
|
56
|
+
"app/views/typus/dashboard.html.erb",
|
57
|
+
"app/views/typus/recover_password.html.erb",
|
58
|
+
"app/views/typus/reset_password.html.erb",
|
59
|
+
"app/views/typus/sign_in.html.erb",
|
60
|
+
"app/views/typus/sign_up.html.erb",
|
61
|
+
"app/views/typus_mailer/reset_password_link.erb",
|
62
|
+
"config/locales/de.yml",
|
63
|
+
"config/locales/es.yml",
|
64
|
+
"config/locales/fr.yml",
|
65
|
+
"config/locales/language.yml.template",
|
66
|
+
"config/locales/pt-BR.yml",
|
67
|
+
"config/locales/ru.yml",
|
68
|
+
"config/routes.rb",
|
69
|
+
"generators/typus/templates/auto/index.html.erb",
|
70
|
+
"generators/typus/templates/auto/resource_controller.rb.erb",
|
71
|
+
"generators/typus/templates/auto/resource_controller_test.rb.erb",
|
72
|
+
"generators/typus/templates/auto/resources_controller.rb.erb",
|
73
|
+
"generators/typus/templates/config/initializers/typus.rb",
|
74
|
+
"generators/typus/templates/config/typus/README",
|
75
|
+
"generators/typus/templates/config/typus/application.yml",
|
76
|
+
"generators/typus/templates/config/typus/application_roles.yml",
|
77
|
+
"generators/typus/templates/config/typus/typus.yml",
|
78
|
+
"generators/typus/templates/config/typus/typus_roles.yml",
|
79
|
+
"generators/typus/templates/db/create_typus_users.rb",
|
80
|
+
"generators/typus/templates/lib/tasks/typus_tasks.rake",
|
81
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_closebox.png",
|
82
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_left.png",
|
83
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_progress.png",
|
84
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_right.png",
|
85
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_e.png",
|
86
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_n.png",
|
87
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_ne.png",
|
88
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_nw.png",
|
89
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_s.png",
|
90
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_se.png",
|
91
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_sw.png",
|
92
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_shadow_w.png",
|
93
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_title_left.png",
|
94
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_title_main.png",
|
95
|
+
"generators/typus/templates/public/images/admin/fancybox/fancy_title_right.png",
|
96
|
+
"generators/typus/templates/public/images/admin/ui-icons.png",
|
97
|
+
"generators/typus/templates/public/javascripts/admin/application.js",
|
98
|
+
"generators/typus/templates/public/javascripts/admin/jquery-1.3.2.min.js",
|
99
|
+
"generators/typus/templates/public/javascripts/admin/jquery.fancybox-1.2.1.min.js",
|
100
|
+
"generators/typus/templates/public/stylesheets/admin/jquery.fancybox.css",
|
101
|
+
"generators/typus/templates/public/stylesheets/admin/reset.css",
|
102
|
+
"generators/typus/templates/public/stylesheets/admin/screen.css",
|
103
|
+
"generators/typus/typus_generator.rb",
|
104
|
+
"generators/typus_update_schema_to_01/templates/config/typus.yml",
|
105
|
+
"generators/typus_update_schema_to_01/templates/migration.rb",
|
106
|
+
"generators/typus_update_schema_to_01/typus_update_schema_to_01_generator.rb",
|
107
|
+
"generators/typus_update_schema_to_02/templates/migration.rb",
|
108
|
+
"generators/typus_update_schema_to_02/typus_update_schema_to_02_generator.rb",
|
109
|
+
"lib/typus.rb",
|
110
|
+
"lib/typus/active_record.rb",
|
111
|
+
"lib/typus/authentication.rb",
|
112
|
+
"lib/typus/configuration.rb",
|
113
|
+
"lib/typus/extensions/routes.rb",
|
114
|
+
"lib/typus/extensions/routes_hack.rb",
|
115
|
+
"lib/typus/format.rb",
|
116
|
+
"lib/typus/hash.rb",
|
117
|
+
"lib/typus/object.rb",
|
118
|
+
"lib/typus/preferences.rb",
|
119
|
+
"lib/typus/preview.rb",
|
120
|
+
"lib/typus/quick_edit.rb",
|
121
|
+
"lib/typus/reloader.rb",
|
122
|
+
"lib/typus/string.rb",
|
123
|
+
"lib/typus/user.rb",
|
124
|
+
"lib/vendor/active_record.rb",
|
125
|
+
"lib/vendor/paginator.rb",
|
126
|
+
"lib/vendor/rss_parser.rb",
|
127
|
+
"rails/init.rb",
|
128
|
+
"tasks/typus_tasks.rake",
|
129
|
+
"test/config/broken/application.yml",
|
130
|
+
"test/config/broken/application_roles.yml",
|
131
|
+
"test/config/broken/empty.yml",
|
132
|
+
"test/config/broken/empty_roles.yml",
|
133
|
+
"test/config/broken/undefined.yml",
|
134
|
+
"test/config/broken/undefined_roles.yml",
|
135
|
+
"test/config/default/typus.yml",
|
136
|
+
"test/config/default/typus_roles.yml",
|
137
|
+
"test/config/empty/empty_01.yml",
|
138
|
+
"test/config/empty/empty_01_roles.yml",
|
139
|
+
"test/config/empty/empty_02.yml",
|
140
|
+
"test/config/empty/empty_02_roles.yml",
|
141
|
+
"test/config/locales/es.yml",
|
142
|
+
"test/config/ordered/001_roles.yml",
|
143
|
+
"test/config/ordered/002_roles.yml",
|
144
|
+
"test/config/unordered/app_one_roles.yml",
|
145
|
+
"test/config/unordered/app_two_roles.yml",
|
146
|
+
"test/config/working/application.yml",
|
147
|
+
"test/config/working/application_roles.yml",
|
148
|
+
"test/config/working/typus.yml",
|
149
|
+
"test/config/working/typus_roles.yml",
|
150
|
+
"test/fixtures/app/controllers/admin/assets_controller.rb",
|
151
|
+
"test/fixtures/app/controllers/admin/categories_controller.rb",
|
152
|
+
"test/fixtures/app/controllers/admin/comments_controller.rb",
|
153
|
+
"test/fixtures/app/controllers/admin/pages_controller.rb",
|
154
|
+
"test/fixtures/app/controllers/admin/posts_controller.rb",
|
155
|
+
"test/fixtures/app/controllers/admin/status_controller.rb",
|
156
|
+
"test/fixtures/app/controllers/admin/typus_users_controller.rb",
|
157
|
+
"test/fixtures/app/controllers/admin/watch_dog_controller.rb",
|
158
|
+
"test/fixtures/app/models/asset.rb",
|
159
|
+
"test/fixtures/app/models/category.rb",
|
160
|
+
"test/fixtures/app/models/comment.rb",
|
161
|
+
"test/fixtures/app/models/custom_user.rb",
|
162
|
+
"test/fixtures/app/models/delayed/task.rb",
|
163
|
+
"test/fixtures/app/models/page.rb",
|
164
|
+
"test/fixtures/app/models/post.rb",
|
165
|
+
"test/fixtures/app/models/view.rb",
|
166
|
+
"test/fixtures/app/views/admin/dashboard/_content.html.erb",
|
167
|
+
"test/fixtures/app/views/admin/dashboard/_sidebar.html.erb",
|
168
|
+
"test/fixtures/app/views/admin/posts/_edit.html.erb",
|
169
|
+
"test/fixtures/app/views/admin/posts/_index.html.erb",
|
170
|
+
"test/fixtures/app/views/admin/posts/_new.html.erb",
|
171
|
+
"test/fixtures/app/views/admin/posts/_show.html.erb",
|
172
|
+
"test/fixtures/app/views/admin/posts/_sidebar.html.erb",
|
173
|
+
"test/fixtures/app/views/admin/resources/_sidebar.html.erb",
|
174
|
+
"test/fixtures/app/views/admin/shared/_footer.html.erb",
|
175
|
+
"test/fixtures/app/views/admin/status/index.html.erb",
|
176
|
+
"test/fixtures/app/views/admin/templates/_datepicker.html.erb",
|
177
|
+
"test/fixtures/assets.yml",
|
178
|
+
"test/fixtures/categories.yml",
|
179
|
+
"test/fixtures/comments.yml",
|
180
|
+
"test/fixtures/pages.yml",
|
181
|
+
"test/fixtures/posts.yml",
|
182
|
+
"test/fixtures/typus_users.yml",
|
183
|
+
"test/functional/admin/master_controller_assets_relationships.rb",
|
184
|
+
"test/functional/admin/master_controller_categories_lists_test.rb",
|
185
|
+
"test/functional/admin/master_controller_posts_before_test.rb",
|
186
|
+
"test/functional/admin/master_controller_posts_crud_test.rb",
|
187
|
+
"test/functional/admin/master_controller_posts_formats_test.rb",
|
188
|
+
"test/functional/admin/master_controller_posts_permissions_test.rb",
|
189
|
+
"test/functional/admin/master_controller_posts_relationships_test.rb",
|
190
|
+
"test/functional/admin/master_controller_posts_roles.rb",
|
191
|
+
"test/functional/admin/master_controller_posts_toggle_test.rb",
|
192
|
+
"test/functional/admin/master_controller_posts_views_test.rb",
|
193
|
+
"test/functional/admin/master_controller_tableless_resource_test.rb",
|
194
|
+
"test/functional/admin/master_controller_typus_users_test.rb",
|
195
|
+
"test/functional/typus_controller_test.rb",
|
196
|
+
"test/helper.rb",
|
197
|
+
"test/helpers/admin/form_helper_test.rb",
|
198
|
+
"test/helpers/admin/master_helper_test.rb",
|
199
|
+
"test/helpers/admin/public_helper_test.rb",
|
200
|
+
"test/helpers/admin/sidebar_helper_test.rb",
|
201
|
+
"test/helpers/admin/table_helper_test.rb",
|
202
|
+
"test/helpers/typus_helper_test.rb",
|
203
|
+
"test/lib/active_record_test.rb",
|
204
|
+
"test/lib/configuration_test.rb",
|
205
|
+
"test/lib/hash_test.rb",
|
206
|
+
"test/lib/routes_test.rb",
|
207
|
+
"test/lib/string_test.rb",
|
208
|
+
"test/lib/typus_test.rb",
|
209
|
+
"test/schema.rb",
|
210
|
+
"test/unit/typus_mailer_test.rb",
|
211
|
+
"test/unit/typus_test.rb",
|
212
|
+
"test/unit/typus_user_roles_test.rb",
|
213
|
+
"test/unit/typus_user_test.rb",
|
214
|
+
"test/vendor/active_record_test.rb",
|
215
|
+
"test/vendor/paginator_test.rb",
|
216
|
+
"typus.gemspec"
|
217
|
+
]
|
218
|
+
s.homepage = %q{http://intraducibles.com/projects/typus}
|
219
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
220
|
+
s.require_paths = ["lib"]
|
221
|
+
s.rubygems_version = %q{1.3.5}
|
222
|
+
s.summary = %q{Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)}
|
223
|
+
s.test_files = [
|
224
|
+
"test/fixtures/app/controllers/admin/assets_controller.rb",
|
225
|
+
"test/fixtures/app/controllers/admin/categories_controller.rb",
|
226
|
+
"test/fixtures/app/controllers/admin/comments_controller.rb",
|
227
|
+
"test/fixtures/app/controllers/admin/pages_controller.rb",
|
228
|
+
"test/fixtures/app/controllers/admin/posts_controller.rb",
|
229
|
+
"test/fixtures/app/controllers/admin/status_controller.rb",
|
230
|
+
"test/fixtures/app/controllers/admin/typus_users_controller.rb",
|
231
|
+
"test/fixtures/app/controllers/admin/watch_dog_controller.rb",
|
232
|
+
"test/fixtures/app/models/asset.rb",
|
233
|
+
"test/fixtures/app/models/category.rb",
|
234
|
+
"test/fixtures/app/models/comment.rb",
|
235
|
+
"test/fixtures/app/models/custom_user.rb",
|
236
|
+
"test/fixtures/app/models/delayed/task.rb",
|
237
|
+
"test/fixtures/app/models/page.rb",
|
238
|
+
"test/fixtures/app/models/post.rb",
|
239
|
+
"test/fixtures/app/models/view.rb",
|
240
|
+
"test/functional/admin/master_controller_assets_relationships.rb",
|
241
|
+
"test/functional/admin/master_controller_categories_lists_test.rb",
|
242
|
+
"test/functional/admin/master_controller_posts_before_test.rb",
|
243
|
+
"test/functional/admin/master_controller_posts_crud_test.rb",
|
244
|
+
"test/functional/admin/master_controller_posts_formats_test.rb",
|
245
|
+
"test/functional/admin/master_controller_posts_permissions_test.rb",
|
246
|
+
"test/functional/admin/master_controller_posts_relationships_test.rb",
|
247
|
+
"test/functional/admin/master_controller_posts_roles.rb",
|
248
|
+
"test/functional/admin/master_controller_posts_toggle_test.rb",
|
249
|
+
"test/functional/admin/master_controller_posts_views_test.rb",
|
250
|
+
"test/functional/admin/master_controller_tableless_resource_test.rb",
|
251
|
+
"test/functional/admin/master_controller_typus_users_test.rb",
|
252
|
+
"test/functional/typus_controller_test.rb",
|
253
|
+
"test/helper.rb",
|
254
|
+
"test/helpers/admin/form_helper_test.rb",
|
255
|
+
"test/helpers/admin/master_helper_test.rb",
|
256
|
+
"test/helpers/admin/public_helper_test.rb",
|
257
|
+
"test/helpers/admin/sidebar_helper_test.rb",
|
258
|
+
"test/helpers/admin/table_helper_test.rb",
|
259
|
+
"test/helpers/typus_helper_test.rb",
|
260
|
+
"test/lib/active_record_test.rb",
|
261
|
+
"test/lib/configuration_test.rb",
|
262
|
+
"test/lib/hash_test.rb",
|
263
|
+
"test/lib/routes_test.rb",
|
264
|
+
"test/lib/string_test.rb",
|
265
|
+
"test/lib/typus_test.rb",
|
266
|
+
"test/schema.rb",
|
267
|
+
"test/unit/typus_mailer_test.rb",
|
268
|
+
"test/unit/typus_test.rb",
|
269
|
+
"test/unit/typus_user_roles_test.rb",
|
270
|
+
"test/unit/typus_user_test.rb",
|
271
|
+
"test/vendor/active_record_test.rb",
|
272
|
+
"test/vendor/paginator_test.rb"
|
273
|
+
]
|
274
|
+
|
275
|
+
if s.respond_to? :specification_version then
|
276
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
277
|
+
s.specification_version = 3
|
278
|
+
|
279
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
280
|
+
else
|
281
|
+
end
|
282
|
+
else
|
283
|
+
end
|
284
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesc Esplugas
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-24 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -20,14 +20,15 @@ executables: []
|
|
20
20
|
extensions: []
|
21
21
|
|
22
22
|
extra_rdoc_files:
|
23
|
-
- README.
|
23
|
+
- README.md
|
24
24
|
files:
|
25
25
|
- .gitignore
|
26
|
-
- AUTHORS
|
26
|
+
- AUTHORS.md
|
27
27
|
- CHANGES
|
28
28
|
- MIT-LICENSE
|
29
|
-
- README.
|
29
|
+
- README.md
|
30
30
|
- Rakefile
|
31
|
+
- VERSION
|
31
32
|
- app/controllers/admin/master_controller.rb
|
32
33
|
- app/controllers/typus_controller.rb
|
33
34
|
- app/helpers/admin/form_helper.rb
|
@@ -126,7 +127,6 @@ files:
|
|
126
127
|
- lib/typus/reloader.rb
|
127
128
|
- lib/typus/string.rb
|
128
129
|
- lib/typus/user.rb
|
129
|
-
- lib/typus/version.rb
|
130
130
|
- lib/vendor/active_record.rb
|
131
131
|
- lib/vendor/paginator.rb
|
132
132
|
- lib/vendor/rss_parser.rb
|
@@ -161,6 +161,14 @@ files:
|
|
161
161
|
- test/fixtures/app/controllers/admin/status_controller.rb
|
162
162
|
- test/fixtures/app/controllers/admin/typus_users_controller.rb
|
163
163
|
- test/fixtures/app/controllers/admin/watch_dog_controller.rb
|
164
|
+
- test/fixtures/app/models/asset.rb
|
165
|
+
- test/fixtures/app/models/category.rb
|
166
|
+
- test/fixtures/app/models/comment.rb
|
167
|
+
- test/fixtures/app/models/custom_user.rb
|
168
|
+
- test/fixtures/app/models/delayed/task.rb
|
169
|
+
- test/fixtures/app/models/page.rb
|
170
|
+
- test/fixtures/app/models/post.rb
|
171
|
+
- test/fixtures/app/models/view.rb
|
164
172
|
- test/fixtures/app/views/admin/dashboard/_content.html.erb
|
165
173
|
- test/fixtures/app/views/admin/dashboard/_sidebar.html.erb
|
166
174
|
- test/fixtures/app/views/admin/posts/_edit.html.erb
|
@@ -204,7 +212,6 @@ files:
|
|
204
212
|
- test/lib/routes_test.rb
|
205
213
|
- test/lib/string_test.rb
|
206
214
|
- test/lib/typus_test.rb
|
207
|
-
- test/models.rb
|
208
215
|
- test/schema.rb
|
209
216
|
- test/unit/typus_mailer_test.rb
|
210
217
|
- test/unit/typus_test.rb
|
@@ -212,6 +219,7 @@ files:
|
|
212
219
|
- test/unit/typus_user_test.rb
|
213
220
|
- test/vendor/active_record_test.rb
|
214
221
|
- test/vendor/paginator_test.rb
|
222
|
+
- typus.gemspec
|
215
223
|
has_rdoc: true
|
216
224
|
homepage: http://intraducibles.com/projects/typus
|
217
225
|
licenses: []
|
@@ -249,6 +257,14 @@ test_files:
|
|
249
257
|
- test/fixtures/app/controllers/admin/status_controller.rb
|
250
258
|
- test/fixtures/app/controllers/admin/typus_users_controller.rb
|
251
259
|
- test/fixtures/app/controllers/admin/watch_dog_controller.rb
|
260
|
+
- test/fixtures/app/models/asset.rb
|
261
|
+
- test/fixtures/app/models/category.rb
|
262
|
+
- test/fixtures/app/models/comment.rb
|
263
|
+
- test/fixtures/app/models/custom_user.rb
|
264
|
+
- test/fixtures/app/models/delayed/task.rb
|
265
|
+
- test/fixtures/app/models/page.rb
|
266
|
+
- test/fixtures/app/models/post.rb
|
267
|
+
- test/fixtures/app/models/view.rb
|
252
268
|
- test/functional/admin/master_controller_assets_relationships.rb
|
253
269
|
- test/functional/admin/master_controller_categories_lists_test.rb
|
254
270
|
- test/functional/admin/master_controller_posts_before_test.rb
|
@@ -275,7 +291,6 @@ test_files:
|
|
275
291
|
- test/lib/routes_test.rb
|
276
292
|
- test/lib/string_test.rb
|
277
293
|
- test/lib/typus_test.rb
|
278
|
-
- test/models.rb
|
279
294
|
- test/schema.rb
|
280
295
|
- test/unit/typus_mailer_test.rb
|
281
296
|
- test/unit/typus_test.rb
|
data/AUTHORS
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
Typus was designed & developed by Francesc Esplugas (fesplugas).
|
2
|
-
|
3
|
-
Special thanks to the following individuals:
|
4
|
-
|
5
|
-
* Laia Gargallo (Lover & tea provider) http://azotacalles.net
|
6
|
-
* Isaac Feliu (Codereview on first public release) http://www.vesne.com
|
7
|
-
* Lluis Folch (Icons, feedback & crazy ideas) http://wet*floor.com
|
8
|
-
* Sergio Espeja (Code) http://github.com/spejman
|
9
|
-
* Eadz (Code) http://github.com/eadz
|
10
|
-
* Anthony Underwood (Code) http://github.com/aunderwo
|
11
|
-
* Felipe Talavera (Code) http://github.com/flype
|
12
|
-
* Erik Tigerholm (Code) http://github.com/eriktigerholm
|
13
|
-
* George Guimarães (Portuguese translation & code) http://github.com/georgeguimaraes
|
14
|
-
* José Valim (Code) http://github.com/josevalim
|
15
|
-
* Luqman Amjad (Code) http://github.com/luqman
|
16
|
-
* Alexey Noskov (Russian translation & code) http://github.com/alno
|
17
|
-
* Andres Gutierres (Bugfixes & feedback) http://github.com/andresgutgon
|
18
|
-
* Komzák Nándor (Code, bugfixes & feedback) http://github.com/rubymood
|
19
|
-
* Michael Grunewalder (German translation) http://michael.grunewalder.com
|
20
|
-
* Tim Harvey (Code) http://www.timharvey.net/
|
21
|
-
* Ned Baldessin (French translation & code) http://github.com/nedbaldessin
|
22
|
-
* Robert Rouse (Code) * Ruby 1.9 compatibility fixes.
|
23
|
-
|
24
|
-
Somehow involved in the project
|
25
|
-
|
26
|
-
* Yukihiro "matz" Matsumoto (http://www.rubyist.net/~matz/) creator of Ruby
|
27
|
-
(http://ruby-lang.org/) the most beautiful programming language I've ever seen.
|
28
|
-
* David Heinemeier Hansson (http://loudthinking.com/) for creating
|
29
|
-
Ruby on Rails (http://rubyonrails.org/).
|
30
|
-
* Django Admin (http://www.djangoproject.com) who inspired part of the
|
31
|
-
development, in special the templates rendering & UI.
|
32
|
-
* Paginator (http://github.com/bruce/paginator/tree/master) by
|
33
|
-
Bruce Williams (http://codefluency.com) which is used by **Typus** to
|
34
|
-
paginate records.
|
data/README.rdoc
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
= Typus: Effortless admin interface for your Rails application
|
2
|
-
|
3
|
-
*Typus* is designed for a single activity:
|
4
|
-
|
5
|
-
Trusted users editing structured content.
|
6
|
-
|
7
|
-
*Typus* doesn't try to be all the things to all the people but it's
|
8
|
-
extensible enough to match lots of use cases.
|
9
|
-
|
10
|
-
- Project site and documentation http://intraducibles.com/projects/typus
|
11
|
-
- Plugin source http://github.com/fesplugas/typus
|
12
|
-
- Google Group http://groups.google.com/group/typus
|
13
|
-
- Bugs http://github.com/fesplugas/typus/issues
|
14
|
-
- Gems: http://gemcutter.org/gems/typus
|
15
|
-
|
16
|
-
== Impatients to see it working?
|
17
|
-
|
18
|
-
Step 1: Create a Rails application using a template.
|
19
|
-
|
20
|
-
$ rails example.com -m http://gist.github.com/86613.txt
|
21
|
-
|
22
|
-
Step 2: Start the server:
|
23
|
-
|
24
|
-
$ cd example.com && script/server
|
25
|
-
|
26
|
-
Step 3: Go to the admin area and enjoy it!
|
27
|
-
|
28
|
-
http://0.0.0.0:3000/admin
|
29
|
-
|
30
|
-
== Want to see a demo working?
|
31
|
-
|
32
|
-
There's an application running at Heroku.
|
33
|
-
|
34
|
-
http://typus.heroku.com/
|
35
|
-
|
36
|
-
Use the following credentials to log in.
|
37
|
-
|
38
|
-
Email: userdemo@intraducibles.com
|
39
|
-
Password: userdemo
|
40
|
-
|
41
|
-
Notes on the application demo:
|
42
|
-
|
43
|
-
- Runs under SSL.
|
44
|
-
- Has an Assets model to show how assets can work.
|
45
|
-
- User can only edit the posts they have generated.
|
46
|
-
- User cannot edit Categories, just view them.
|
47
|
-
- Shows how TinyMCE is integrated with Pages.
|
48
|
-
|
49
|
-
== Installing
|
50
|
-
|
51
|
-
Install from GitHub the latest version which it's compatible with Rails 2.3.4.
|
52
|
-
|
53
|
-
$ script/plugin install git://github.com/fesplugas/typus.git
|
54
|
-
|
55
|
-
Once *Typus* is installed, run the generator to create required files and migrate your
|
56
|
-
database. (<tt>typus_users</tt> table is created)
|
57
|
-
|
58
|
-
$ script/generate typus
|
59
|
-
$ rake db:migrate
|
60
|
-
|
61
|
-
To create the first user, start the application server, go to
|
62
|
-
http://0.0.0.0:3000/admin and follow the instructions.
|
63
|
-
|
64
|
-
== Support Typus
|
65
|
-
|
66
|
-
*Typus* is licensed under the MIT license. As an experiment we
|
67
|
-
encourage you to support this project by donating[http://intraducibles.com/projects/typus/donate]
|
68
|
-
90 euros if you are a developer or studio. Donations do allow us to spend more
|
69
|
-
time working and supporting the project. All contributions are much appreciated!
|
70
|
-
|
71
|
-
Hire us to work on your next project. We build large and small websites.
|
72
|
-
|
73
|
-
Contribute your patches to the community & support people on the
|
74
|
-
mailing list.
|
75
|
-
|
76
|
-
Tell everybody about *Typus*, tell your friends and colleagues about
|
77
|
-
*Typus* and blog about *Typus*.
|
78
|
-
|
79
|
-
== Using Typus as a Gem?
|
80
|
-
|
81
|
-
If you are using *Typus* as a gem add the following line at the end of the
|
82
|
-
<tt>Rakefile</tt> on the root of your Rails application.
|
83
|
-
|
84
|
-
Dir["#{RAILS_ROOT}/vendor/gems/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
|
85
|
-
|
86
|
-
== Acknowledgments
|
87
|
-
|
88
|
-
- *Typus* uses "Paginator" by Bruce Williams http://codefluency.com.
|
89
|
-
- *Typus* has been inspired by "Django Admin" http://djangoproject.com.
|
90
|
-
- *Typus* uses http://fancybox.net.
|
91
|
-
- *Typus* uses UI icons from http://jqueryui.com.
|
92
|
-
|
93
|
-
Copyright (c) 2007-2009 Francesc Esplugas Marti, released under the
|
94
|
-
MIT license
|
data/lib/typus/version.rb
DELETED
data/test/models.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
class Asset < ActiveRecord::Base
|
2
|
-
|
3
|
-
belongs_to :resource, :polymorphic => true
|
4
|
-
|
5
|
-
end
|
6
|
-
|
7
|
-
class Category < ActiveRecord::Base
|
8
|
-
|
9
|
-
acts_as_list if defined?(ActiveRecord::Acts::List)
|
10
|
-
|
11
|
-
validates_presence_of :name
|
12
|
-
has_and_belongs_to_many :posts
|
13
|
-
|
14
|
-
def self.typus
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
class Comment < ActiveRecord::Base
|
20
|
-
|
21
|
-
validates_presence_of :name, :email, :body
|
22
|
-
belongs_to :post
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
class CustomUser < ActiveRecord::Base
|
27
|
-
end
|
28
|
-
|
29
|
-
class Page < ActiveRecord::Base
|
30
|
-
|
31
|
-
acts_as_tree if defined?(ActiveRecord::Acts::Tree)
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
class Post < ActiveRecord::Base
|
36
|
-
|
37
|
-
validates_presence_of :title, :body
|
38
|
-
has_and_belongs_to_many :categories
|
39
|
-
has_many :assets, :as => :resource, :dependent => :destroy
|
40
|
-
has_many :comments
|
41
|
-
has_many :views
|
42
|
-
belongs_to :favorite_comment, :class_name => 'Comment'
|
43
|
-
|
44
|
-
def self.status
|
45
|
-
%w( true false pending published unpublished )
|
46
|
-
end
|
47
|
-
|
48
|
-
def self.typus
|
49
|
-
'plugin'
|
50
|
-
end
|
51
|
-
|
52
|
-
def asset_file_name
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
class View < ActiveRecord::Base
|
58
|
-
|
59
|
-
belongs_to :post
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
class Delayed::Task < ActiveRecord::Base
|
64
|
-
|
65
|
-
set_table_name 'delayed_tasks'
|
66
|
-
|
67
|
-
end
|