administer 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/README.rdoc +3 -4
  2. data/app/controllers/administer/application_controller.rb +12 -0
  3. data/app/controllers/administer/entities_controller.rb +76 -0
  4. data/app/helpers/administer/dashboard_helper.rb +1 -1
  5. data/app/helpers/administer/entities_helper.rb +2 -0
  6. data/app/views/administer/dashboard/index.html.haml +1 -1
  7. data/app/views/administer/entities/_form.haml +9 -0
  8. data/app/views/administer/entities/edit.html.haml +9 -0
  9. data/app/views/administer/entities/index.html.haml +21 -0
  10. data/app/views/administer/entities/new.haml +9 -0
  11. data/app/views/administer/fields/_belongs_to.html.haml +2 -0
  12. data/app/views/administer/fields/_date_select.html.haml +2 -0
  13. data/app/views/administer/fields/_has_many.html.haml +4 -0
  14. data/app/views/administer/fields/_has_one.html.haml +2 -0
  15. data/app/views/administer/fields/_text_area.html.haml +2 -0
  16. data/app/views/administer/fields/_text_field.html.haml +2 -0
  17. data/app/views/administer/shared/_errors.html.haml +6 -0
  18. data/app/views/layouts/administer.html.haml +21 -0
  19. data/config/routes.rb +4 -4
  20. data/lib/administer.rb +1 -0
  21. data/lib/administer/active_record.rb +22 -0
  22. data/lib/administer/config.rb +37 -0
  23. data/lib/administer/config/controller_config.rb +24 -0
  24. data/lib/administer/config/model_config.rb +23 -0
  25. data/lib/administer/engine.rb +5 -0
  26. data/lib/administer/fields.rb +34 -0
  27. data/lib/administer/fields/association.rb +21 -0
  28. data/lib/administer/fields/base.rb +15 -0
  29. data/lib/administer/fields/belongs_to.rb +12 -0
  30. data/lib/administer/fields/date_select.rb +6 -0
  31. data/lib/administer/fields/field_builder.rb +25 -0
  32. data/lib/administer/fields/has_many.rb +22 -0
  33. data/lib/administer/fields/has_one.rb +24 -0
  34. data/lib/administer/fields/text_area.rb +6 -0
  35. data/lib/administer/fields/text_field.rb +6 -0
  36. data/lib/administer/model.rb +40 -13
  37. data/spec/controllers/administer/entities_controller_spec.rb +23 -0
  38. data/spec/{rails_root/spec/controllers → controllers}/posts_controller_spec.rb +1 -1
  39. data/spec/factories/categories.rb +3 -0
  40. data/spec/factories/comments.rb +3 -0
  41. data/spec/{rails_root/spec/factories → factories}/posts.rb +0 -0
  42. data/spec/lib/config/model_config_spec.rb +35 -0
  43. data/spec/lib/config_spec.rb +29 -0
  44. data/spec/lib/fields/field_builder_spec.rb +10 -0
  45. data/spec/{rails_root/spec/models/administer → lib}/model_spec.rb +5 -4
  46. data/spec/models/comment_spec.rb +5 -0
  47. data/spec/rails_root/Gemfile +2 -0
  48. data/spec/rails_root/Gemfile.lock +150 -0
  49. data/spec/rails_root/README +256 -0
  50. data/spec/rails_root/Rakefile +7 -0
  51. data/spec/rails_root/app/controllers/application_controller.rb +4 -0
  52. data/spec/rails_root/app/models/attachment.rb +3 -0
  53. data/spec/rails_root/app/models/category.rb +1 -0
  54. data/spec/rails_root/app/models/comment.rb +3 -0
  55. data/spec/rails_root/app/models/post.rb +8 -0
  56. data/spec/rails_root/app/views/layouts/application.html.erb +14 -0
  57. data/spec/rails_root/app/views/posts/_form.html.haml +19 -0
  58. data/spec/rails_root/app/views/posts/edit.html.haml +5 -0
  59. data/spec/rails_root/app/views/posts/index.html.haml +10 -0
  60. data/spec/rails_root/app/views/posts/new.html.haml +3 -0
  61. data/spec/rails_root/app/views/posts/show.html.haml +10 -0
  62. data/spec/rails_root/config.ru +4 -0
  63. data/spec/rails_root/config/cucumber.yml +8 -0
  64. data/spec/rails_root/config/database.yml +25 -0
  65. data/spec/rails_root/config/initializers/administer.rb +23 -0
  66. data/spec/rails_root/config/locales/en.yml +5 -0
  67. data/spec/rails_root/db/development.sqlite3 +0 -0
  68. data/spec/rails_root/db/migrate/20110104100347_add_publish_on_to_post.rb +9 -0
  69. data/spec/rails_root/db/migrate/20110214190645_add_category_to_post.rb +9 -0
  70. data/spec/rails_root/db/migrate/20110609184125_create_comments.rb +13 -0
  71. data/spec/rails_root/db/migrate/20110628215407_create_attachments.rb +13 -0
  72. data/spec/rails_root/db/schema.rb +44 -0
  73. data/spec/rails_root/db/test.sqlite3 +0 -0
  74. data/spec/rails_root/features/administer/dashboard.feature +15 -0
  75. data/spec/rails_root/features/administer/posts.feature +72 -0
  76. data/spec/rails_root/features/listing_posts.feature +15 -0
  77. data/spec/rails_root/features/managing_posts.feature +70 -0
  78. data/spec/rails_root/features/step_definitions/categories_steps.rb +6 -0
  79. data/spec/rails_root/features/step_definitions/comments_steps.rb +6 -0
  80. data/spec/rails_root/features/step_definitions/post_steps.rb +21 -0
  81. data/spec/rails_root/features/step_definitions/web_steps.rb +5 -2
  82. data/spec/rails_root/features/support/env.rb +32 -46
  83. data/spec/rails_root/features/support/factory_girl.rb +2 -0
  84. data/spec/rails_root/features/support/matchers.rb +55 -0
  85. data/spec/rails_root/features/support/paths.rb +2 -0
  86. data/spec/rails_root/features/support/selectors.rb +39 -0
  87. data/spec/rails_root/lib/tasks/cucumber.rake +65 -0
  88. data/spec/rails_root/log/development.log +19507 -0
  89. data/spec/rails_root/log/test.log +45042 -0
  90. data/spec/rails_root/public/404.html +26 -0
  91. data/spec/rails_root/public/422.html +26 -0
  92. data/spec/rails_root/public/500.html +26 -0
  93. data/spec/rails_root/public/favicon.ico +0 -0
  94. data/spec/rails_root/public/images/rails.png +0 -0
  95. data/spec/rails_root/public/javascripts/application.js +2 -0
  96. data/spec/rails_root/public/javascripts/controls.js +965 -0
  97. data/spec/rails_root/public/javascripts/dragdrop.js +974 -0
  98. data/spec/rails_root/public/javascripts/effects.js +1123 -0
  99. data/spec/rails_root/public/javascripts/prototype.js +6001 -0
  100. data/spec/rails_root/public/javascripts/rails.js +175 -0
  101. data/spec/rails_root/public/robots.txt +5 -0
  102. data/spec/rails_root/public/stylesheets/scaffold.css +60 -0
  103. data/spec/rails_root/script/cucumber +10 -0
  104. data/spec/rails_root/script/rails +6 -0
  105. data/spec/rails_root/spec/models/attachment_spec.rb +5 -0
  106. data/spec/rails_root/tmp/capybara/capybara-20101221001337.html +43 -0
  107. data/spec/rails_root/tmp/capybara/capybara-20101221001509.html +47 -0
  108. data/spec/rails_root/tmp/capybara/capybara-20110104162405.html +110 -0
  109. data/spec/rails_root/tmp/capybara/capybara-20110214224604.html +51 -0
  110. data/spec/rails_root/tmp/capybara/capybara-20110214225336.html +51 -0
  111. data/spec/rails_root/tmp/capybara/capybara-20110214225545.html +51 -0
  112. data/spec/{rails_root/spec/routing → routing}/posts_routing_spec.rb +1 -1
  113. data/spec/{rails_root/spec/spec_helper.rb → spec_helper.rb} +6 -4
  114. data/spec/{rails_root/spec/views → views}/posts/edit.html.haml_spec.rb +1 -1
  115. data/spec/{rails_root/spec/views → views}/posts/new.html.haml_spec.rb +1 -1
  116. data/spec/{rails_root/spec/views → views}/posts/show.html.haml_spec.rb +1 -1
  117. metadata +306 -46
  118. data/app/controllers/administer/models_controller.rb +0 -16
  119. data/app/views/administer/models/index.html.haml +0 -14
  120. data/spec/rails_root/spec/controllers/administer/models_controller_spec.rb +0 -19
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Administer</title>
5
+ <link href="/Users/piotrj/Projects/administer/spec/rails_root/public/stylesheets/scaffold.css?1291658540" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/prototype.js?1291658540" type="text/javascript"></script>
7
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/effects.js?1291658540" type="text/javascript"></script>
8
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/dragdrop.js?1291658540" type="text/javascript"></script>
9
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/controls.js?1291658540" type="text/javascript"></script>
10
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/rails.js?1291658540" type="text/javascript"></script>
11
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/application.js?1291658540" type="text/javascript"></script>
12
+
13
+ </head>
14
+ <body>
15
+ <div class='header'>
16
+ <ul class='navigation'>
17
+ <li>
18
+ <a href="/Users/piotrj/Projects/administer/spec/rails_root/public/">Go to application</a>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ <ul class='actions'>
23
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/dashboard">back</a></li>
24
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities/new?model_name=Post">New Post</a></li>
25
+ </ul>
26
+ <h1>Posts</h1>
27
+ <table class='items_list'>
28
+ <thead>
29
+ <tr></tr>
30
+ <th>id</th>
31
+ <th>title</th>
32
+ <th>body</th>
33
+ <th>created_at</th>
34
+ <th>updated_at</th>
35
+ <th>publish_on</th>
36
+ <th>category_id</th>
37
+ </thead>
38
+ <tbody>
39
+ <tr class='odd'></tr>
40
+ <td>3</td>
41
+ <td> How to raise your kid</td>
42
+ <td>You should be good parent.</td>
43
+ <td>2011-02-14 21:46:04 UTC</td>
44
+ <td>2011-02-14 21:46:04 UTC</td>
45
+ <td>2011-02-14</td>
46
+ <td>1</td>
47
+ </tbody>
48
+ </table>
49
+
50
+ </body>
51
+ </html>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Administer</title>
5
+ <link href="/Users/piotrj/Projects/administer/spec/rails_root/public/stylesheets/scaffold.css?1291658540" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/prototype.js?1291658540" type="text/javascript"></script>
7
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/effects.js?1291658540" type="text/javascript"></script>
8
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/dragdrop.js?1291658540" type="text/javascript"></script>
9
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/controls.js?1291658540" type="text/javascript"></script>
10
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/rails.js?1291658540" type="text/javascript"></script>
11
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/application.js?1291658540" type="text/javascript"></script>
12
+
13
+ </head>
14
+ <body>
15
+ <div class='header'>
16
+ <ul class='navigation'>
17
+ <li>
18
+ <a href="/Users/piotrj/Projects/administer/spec/rails_root/public/">Go to application</a>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ <ul class='actions'>
23
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/dashboard">back</a></li>
24
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities/new?model_name=Post">New Post</a></li>
25
+ </ul>
26
+ <h1>Posts</h1>
27
+ <table class='items_list'>
28
+ <thead>
29
+ <tr></tr>
30
+ <th>id</th>
31
+ <th>title</th>
32
+ <th>body</th>
33
+ <th>created_at</th>
34
+ <th>updated_at</th>
35
+ <th>publish_on</th>
36
+ <th>category_id</th>
37
+ </thead>
38
+ <tbody>
39
+ <tr class='odd'></tr>
40
+ <td>3</td>
41
+ <td> How to raise your kid</td>
42
+ <td>You should be good parent.</td>
43
+ <td>2011-02-14 21:53:36 UTC</td>
44
+ <td>2011-02-14 21:53:36 UTC</td>
45
+ <td>2011-02-14</td>
46
+ <td>1</td>
47
+ </tbody>
48
+ </table>
49
+
50
+ </body>
51
+ </html>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Administer</title>
5
+ <link href="/Users/piotrj/Projects/administer/spec/rails_root/public/stylesheets/scaffold.css?1291658540" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/prototype.js?1291658540" type="text/javascript"></script>
7
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/effects.js?1291658540" type="text/javascript"></script>
8
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/dragdrop.js?1291658540" type="text/javascript"></script>
9
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/controls.js?1291658540" type="text/javascript"></script>
10
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/rails.js?1291658540" type="text/javascript"></script>
11
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/application.js?1291658540" type="text/javascript"></script>
12
+
13
+ </head>
14
+ <body>
15
+ <div class='header'>
16
+ <ul class='navigation'>
17
+ <li>
18
+ <a href="/Users/piotrj/Projects/administer/spec/rails_root/public/">Go to application</a>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ <ul class='actions'>
23
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/dashboard">back</a></li>
24
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities/new?model_name=Post">New Post</a></li>
25
+ </ul>
26
+ <h1>Posts</h1>
27
+ <table class='items_list'>
28
+ <thead>
29
+ <tr></tr>
30
+ <th>id</th>
31
+ <th>title</th>
32
+ <th>body</th>
33
+ <th>created_at</th>
34
+ <th>updated_at</th>
35
+ <th>publish_on</th>
36
+ <th>category_id</th>
37
+ </thead>
38
+ <tbody>
39
+ <tr class='odd'></tr>
40
+ <td>3</td>
41
+ <td> How to raise your kid</td>
42
+ <td>You should be good parent.</td>
43
+ <td>2011-02-14 21:55:45 UTC</td>
44
+ <td>2011-02-14 21:55:45 UTC</td>
45
+ <td>2011-02-14</td>
46
+ <td>1</td>
47
+ </tbody>
48
+ </table>
49
+
50
+ </body>
51
+ </html>
@@ -1,4 +1,4 @@
1
- require "spec_helper"
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
2
 
3
3
  describe PostsController do
4
4
  describe "routing" do
@@ -1,6 +1,8 @@
1
+ # TODO: Move specs one level up to make it more like gem specs and less app specs ?
1
2
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
3
  ENV["RAILS_ENV"] ||= 'test'
3
- require File.expand_path("../../config/environment", __FILE__)
4
+
5
+ require File.expand_path("../rails_root/config/environment", __FILE__)
4
6
  require 'rspec/rails'
5
7
 
6
8
  # Requires supporting ruby files with custom matchers and macros, etc,
@@ -17,11 +19,11 @@ RSpec.configure do |config|
17
19
  # config.mock_with :rr
18
20
  config.mock_with :rspec
19
21
 
20
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
21
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
22
-
23
22
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
24
23
  # examples within a transaction, remove the following line or assign false
25
24
  # instead of true.
26
25
  config.use_transactional_fixtures = true
26
+ config.before do
27
+ Administer::Config.class_variable_set(:@@config, nil)
28
+ end
27
29
  end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe "posts/edit.html.haml" do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe "posts/new.html.haml" do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
3
  describe "posts/show.html.haml" do
4
4
  before(:each) do
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administer
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 2
9
- version: 0.2.2
4
+ prerelease:
5
+ version: 0.3.0
10
6
  platform: ruby
11
7
  authors:
12
8
  - Piotr Jakubowski
@@ -15,37 +11,151 @@ autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2010-12-06 00:00:00 +01:00
19
- default_executable:
14
+ date: 2010-12-06 00:00:00 Z
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
22
- name: jeweler
17
+ name: rails
18
+ prerelease: false
23
19
  requirement: &id001 !ruby/object:Gem::Requirement
24
20
  none: false
25
21
  requirements:
26
- - - ">="
22
+ - - ~>
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
24
+ version: 3.0.3
31
25
  type: :runtime
32
- prerelease: false
33
26
  version_requirements: *id001
34
27
  - !ruby/object:Gem::Dependency
35
28
  name: haml
29
+ prerelease: false
36
30
  requirement: &id002 !ruby/object:Gem::Requirement
37
31
  none: false
38
32
  requirements:
39
33
  - - ">="
40
34
  - !ruby/object:Gem::Version
41
- segments:
42
- - 3
43
- - 0
44
- - 18
45
35
  version: 3.0.18
46
36
  type: :runtime
47
- prerelease: false
48
37
  version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: superclass_hash
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: autotest
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :development
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: factory_girl
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec-rails
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 2.1.0
80
+ type: :development
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: cucumber
84
+ prerelease: false
85
+ requirement: &id007 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 0.10.6
91
+ type: :development
92
+ version_requirements: *id007
93
+ - !ruby/object:Gem::Dependency
94
+ name: cucumber-rails
95
+ prerelease: false
96
+ requirement: &id008 !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: 0.5.2
102
+ type: :development
103
+ version_requirements: *id008
104
+ - !ruby/object:Gem::Dependency
105
+ name: nokogiri
106
+ prerelease: false
107
+ requirement: &id009 !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
113
+ type: :development
114
+ version_requirements: *id009
115
+ - !ruby/object:Gem::Dependency
116
+ name: capybara
117
+ prerelease: false
118
+ requirement: &id010 !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 0.4.1
124
+ type: :development
125
+ version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
127
+ name: launchy
128
+ prerelease: false
129
+ requirement: &id011 !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: "0"
135
+ type: :development
136
+ version_requirements: *id011
137
+ - !ruby/object:Gem::Dependency
138
+ name: database_cleaner
139
+ prerelease: false
140
+ requirement: &id012 !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "0"
146
+ type: :development
147
+ version_requirements: *id012
148
+ - !ruby/object:Gem::Dependency
149
+ name: sqlite3
150
+ prerelease: false
151
+ requirement: &id013 !ruby/object:Gem::Requirement
152
+ none: false
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: "0"
157
+ type: :development
158
+ version_requirements: *id013
49
159
  description: ""
50
160
  email:
51
161
  - piotrj@gmail.com
@@ -57,55 +167,145 @@ extensions: []
57
167
  extra_rdoc_files:
58
168
  - README.rdoc
59
169
  files:
170
+ - app/controllers/administer/application_controller.rb
60
171
  - app/controllers/administer/dashboard_controller.rb
61
- - app/controllers/administer/models_controller.rb
172
+ - app/controllers/administer/entities_controller.rb
62
173
  - app/helpers/administer/dashboard_helper.rb
174
+ - app/helpers/administer/entities_helper.rb
63
175
  - app/views/administer/dashboard/index.html.haml
64
- - app/views/administer/models/index.html.haml
176
+ - app/views/administer/entities/_form.haml
177
+ - app/views/administer/entities/edit.html.haml
178
+ - app/views/administer/entities/index.html.haml
179
+ - app/views/administer/entities/new.haml
180
+ - app/views/administer/fields/_belongs_to.html.haml
181
+ - app/views/administer/fields/_date_select.html.haml
182
+ - app/views/administer/fields/_has_many.html.haml
183
+ - app/views/administer/fields/_has_one.html.haml
184
+ - app/views/administer/fields/_text_area.html.haml
185
+ - app/views/administer/fields/_text_field.html.haml
186
+ - app/views/administer/shared/_errors.html.haml
187
+ - app/views/layouts/administer.html.haml
65
188
  - config/routes.rb
66
- - lib/administer.rb
189
+ - lib/administer/active_record.rb
190
+ - lib/administer/config/controller_config.rb
191
+ - lib/administer/config/model_config.rb
192
+ - lib/administer/config.rb
67
193
  - lib/administer/engine.rb
194
+ - lib/administer/fields/association.rb
195
+ - lib/administer/fields/base.rb
196
+ - lib/administer/fields/belongs_to.rb
197
+ - lib/administer/fields/date_select.rb
198
+ - lib/administer/fields/field_builder.rb
199
+ - lib/administer/fields/has_many.rb
200
+ - lib/administer/fields/has_one.rb
201
+ - lib/administer/fields/text_area.rb
202
+ - lib/administer/fields/text_field.rb
203
+ - lib/administer/fields.rb
68
204
  - lib/administer/model.rb
205
+ - lib/administer.rb
69
206
  - README.rdoc
207
+ - spec/controllers/administer/entities_controller_spec.rb
208
+ - spec/controllers/posts_controller_spec.rb
209
+ - spec/factories/categories.rb
210
+ - spec/factories/comments.rb
211
+ - spec/factories/posts.rb
212
+ - spec/lib/config/model_config_spec.rb
213
+ - spec/lib/config_spec.rb
214
+ - spec/lib/fields/field_builder_spec.rb
215
+ - spec/lib/model_spec.rb
216
+ - spec/models/comment_spec.rb
70
217
  - spec/rails_root/app/controllers/application_controller.rb
71
218
  - spec/rails_root/app/controllers/posts_controller.rb
72
219
  - spec/rails_root/app/helpers/application_helper.rb
73
220
  - spec/rails_root/app/helpers/posts_helper.rb
221
+ - spec/rails_root/app/models/attachment.rb
74
222
  - spec/rails_root/app/models/category.rb
223
+ - spec/rails_root/app/models/comment.rb
75
224
  - spec/rails_root/app/models/post.rb
225
+ - spec/rails_root/app/views/layouts/application.html.erb
226
+ - spec/rails_root/app/views/posts/_form.html.haml
227
+ - spec/rails_root/app/views/posts/edit.html.haml
228
+ - spec/rails_root/app/views/posts/index.html.haml
229
+ - spec/rails_root/app/views/posts/new.html.haml
230
+ - spec/rails_root/app/views/posts/show.html.haml
76
231
  - spec/rails_root/autotest/discover.rb
77
232
  - spec/rails_root/config/application.rb
78
233
  - spec/rails_root/config/boot.rb
234
+ - spec/rails_root/config/cucumber.yml
235
+ - spec/rails_root/config/database.yml
79
236
  - spec/rails_root/config/environment.rb
80
237
  - spec/rails_root/config/environments/development.rb
81
238
  - spec/rails_root/config/environments/production.rb
82
239
  - spec/rails_root/config/environments/test.rb
240
+ - spec/rails_root/config/initializers/administer.rb
83
241
  - spec/rails_root/config/initializers/backtrace_silencers.rb
84
242
  - spec/rails_root/config/initializers/inflections.rb
85
243
  - spec/rails_root/config/initializers/mime_types.rb
86
244
  - spec/rails_root/config/initializers/secret_token.rb
87
245
  - spec/rails_root/config/initializers/session_store.rb
246
+ - spec/rails_root/config/locales/en.yml
88
247
  - spec/rails_root/config/routes.rb
248
+ - spec/rails_root/config.ru
249
+ - spec/rails_root/db/development.sqlite3
89
250
  - spec/rails_root/db/migrate/20101113123123_create_posts.rb
90
251
  - spec/rails_root/db/migrate/20101206203354_create_categories.rb
252
+ - spec/rails_root/db/migrate/20110104100347_add_publish_on_to_post.rb
253
+ - spec/rails_root/db/migrate/20110214190645_add_category_to_post.rb
254
+ - spec/rails_root/db/migrate/20110609184125_create_comments.rb
255
+ - spec/rails_root/db/migrate/20110628215407_create_attachments.rb
256
+ - spec/rails_root/db/schema.rb
91
257
  - spec/rails_root/db/seeds.rb
258
+ - spec/rails_root/db/test.sqlite3
259
+ - spec/rails_root/features/administer/dashboard.feature
260
+ - spec/rails_root/features/administer/posts.feature
261
+ - spec/rails_root/features/listing_posts.feature
262
+ - spec/rails_root/features/managing_posts.feature
263
+ - spec/rails_root/features/step_definitions/categories_steps.rb
264
+ - spec/rails_root/features/step_definitions/comments_steps.rb
92
265
  - spec/rails_root/features/step_definitions/post_steps.rb
93
266
  - spec/rails_root/features/step_definitions/web_steps.rb
94
267
  - spec/rails_root/features/support/env.rb
268
+ - spec/rails_root/features/support/factory_girl.rb
269
+ - spec/rails_root/features/support/matchers.rb
95
270
  - spec/rails_root/features/support/paths.rb
96
- - spec/rails_root/spec/controllers/administer/models_controller_spec.rb
97
- - spec/rails_root/spec/controllers/posts_controller_spec.rb
98
- - spec/rails_root/spec/factories/posts.rb
99
- - spec/rails_root/spec/models/administer/model_spec.rb
100
- - spec/rails_root/spec/routing/posts_routing_spec.rb
101
- - spec/rails_root/spec/spec_helper.rb
102
- - spec/rails_root/spec/views/posts/edit.html.haml_spec.rb
103
- - spec/rails_root/spec/views/posts/new.html.haml_spec.rb
104
- - spec/rails_root/spec/views/posts/show.html.haml_spec.rb
271
+ - spec/rails_root/features/support/selectors.rb
272
+ - spec/rails_root/Gemfile
273
+ - spec/rails_root/Gemfile.lock
274
+ - spec/rails_root/lib/tasks/cucumber.rake
275
+ - spec/rails_root/log/development.log
276
+ - spec/rails_root/log/test.log
277
+ - spec/rails_root/public/404.html
278
+ - spec/rails_root/public/422.html
279
+ - spec/rails_root/public/500.html
280
+ - spec/rails_root/public/favicon.ico
281
+ - spec/rails_root/public/images/rails.png
282
+ - spec/rails_root/public/javascripts/application.js
283
+ - spec/rails_root/public/javascripts/controls.js
284
+ - spec/rails_root/public/javascripts/dragdrop.js
285
+ - spec/rails_root/public/javascripts/effects.js
286
+ - spec/rails_root/public/javascripts/prototype.js
287
+ - spec/rails_root/public/javascripts/rails.js
288
+ - spec/rails_root/public/robots.txt
289
+ - spec/rails_root/public/stylesheets/scaffold.css
290
+ - spec/rails_root/Rakefile
291
+ - spec/rails_root/README
292
+ - spec/rails_root/script/cucumber
293
+ - spec/rails_root/script/rails
294
+ - spec/rails_root/spec/models/attachment_spec.rb
105
295
  - spec/rails_root/test/integration/post_test.rb
106
296
  - spec/rails_root/test/performance/browsing_test.rb
107
297
  - spec/rails_root/test/test_helper.rb
108
- has_rdoc: true
298
+ - spec/rails_root/tmp/capybara/capybara-20101221001337.html
299
+ - spec/rails_root/tmp/capybara/capybara-20101221001509.html
300
+ - spec/rails_root/tmp/capybara/capybara-20110104162405.html
301
+ - spec/rails_root/tmp/capybara/capybara-20110214224604.html
302
+ - spec/rails_root/tmp/capybara/capybara-20110214225336.html
303
+ - spec/rails_root/tmp/capybara/capybara-20110214225545.html
304
+ - spec/routing/posts_routing_spec.rb
305
+ - spec/spec_helper.rb
306
+ - spec/views/posts/edit.html.haml_spec.rb
307
+ - spec/views/posts/new.html.haml_spec.rb
308
+ - spec/views/posts/show.html.haml_spec.rb
109
309
  homepage: http://github.com/piotrj/administer
110
310
  licenses: []
111
311
 
@@ -119,60 +319,120 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
319
  requirements:
120
320
  - - ">="
121
321
  - !ruby/object:Gem::Version
122
- segments:
123
- - 0
124
322
  version: "0"
125
323
  required_rubygems_version: !ruby/object:Gem::Requirement
126
324
  none: false
127
325
  requirements:
128
326
  - - ">="
129
327
  - !ruby/object:Gem::Version
130
- segments:
131
- - 0
132
328
  version: "0"
133
329
  requirements: []
134
330
 
135
331
  rubyforge_project:
136
- rubygems_version: 1.3.7
332
+ rubygems_version: 1.8.5
137
333
  signing_key:
138
334
  specification_version: 3
139
335
  summary: Automatic admin interface generation
140
336
  test_files:
337
+ - spec/controllers/administer/entities_controller_spec.rb
338
+ - spec/controllers/posts_controller_spec.rb
339
+ - spec/factories/categories.rb
340
+ - spec/factories/comments.rb
341
+ - spec/factories/posts.rb
342
+ - spec/lib/config/model_config_spec.rb
343
+ - spec/lib/config_spec.rb
344
+ - spec/lib/fields/field_builder_spec.rb
345
+ - spec/lib/model_spec.rb
346
+ - spec/models/comment_spec.rb
141
347
  - spec/rails_root/app/controllers/application_controller.rb
142
348
  - spec/rails_root/app/controllers/posts_controller.rb
143
349
  - spec/rails_root/app/helpers/application_helper.rb
144
350
  - spec/rails_root/app/helpers/posts_helper.rb
351
+ - spec/rails_root/app/models/attachment.rb
145
352
  - spec/rails_root/app/models/category.rb
353
+ - spec/rails_root/app/models/comment.rb
146
354
  - spec/rails_root/app/models/post.rb
355
+ - spec/rails_root/app/views/layouts/application.html.erb
356
+ - spec/rails_root/app/views/posts/_form.html.haml
357
+ - spec/rails_root/app/views/posts/edit.html.haml
358
+ - spec/rails_root/app/views/posts/index.html.haml
359
+ - spec/rails_root/app/views/posts/new.html.haml
360
+ - spec/rails_root/app/views/posts/show.html.haml
147
361
  - spec/rails_root/autotest/discover.rb
148
362
  - spec/rails_root/config/application.rb
149
363
  - spec/rails_root/config/boot.rb
364
+ - spec/rails_root/config/cucumber.yml
365
+ - spec/rails_root/config/database.yml
150
366
  - spec/rails_root/config/environment.rb
151
367
  - spec/rails_root/config/environments/development.rb
152
368
  - spec/rails_root/config/environments/production.rb
153
369
  - spec/rails_root/config/environments/test.rb
370
+ - spec/rails_root/config/initializers/administer.rb
154
371
  - spec/rails_root/config/initializers/backtrace_silencers.rb
155
372
  - spec/rails_root/config/initializers/inflections.rb
156
373
  - spec/rails_root/config/initializers/mime_types.rb
157
374
  - spec/rails_root/config/initializers/secret_token.rb
158
375
  - spec/rails_root/config/initializers/session_store.rb
376
+ - spec/rails_root/config/locales/en.yml
159
377
  - spec/rails_root/config/routes.rb
378
+ - spec/rails_root/config.ru
379
+ - spec/rails_root/db/development.sqlite3
160
380
  - spec/rails_root/db/migrate/20101113123123_create_posts.rb
161
381
  - spec/rails_root/db/migrate/20101206203354_create_categories.rb
382
+ - spec/rails_root/db/migrate/20110104100347_add_publish_on_to_post.rb
383
+ - spec/rails_root/db/migrate/20110214190645_add_category_to_post.rb
384
+ - spec/rails_root/db/migrate/20110609184125_create_comments.rb
385
+ - spec/rails_root/db/migrate/20110628215407_create_attachments.rb
386
+ - spec/rails_root/db/schema.rb
162
387
  - spec/rails_root/db/seeds.rb
388
+ - spec/rails_root/db/test.sqlite3
389
+ - spec/rails_root/features/administer/dashboard.feature
390
+ - spec/rails_root/features/administer/posts.feature
391
+ - spec/rails_root/features/listing_posts.feature
392
+ - spec/rails_root/features/managing_posts.feature
393
+ - spec/rails_root/features/step_definitions/categories_steps.rb
394
+ - spec/rails_root/features/step_definitions/comments_steps.rb
163
395
  - spec/rails_root/features/step_definitions/post_steps.rb
164
396
  - spec/rails_root/features/step_definitions/web_steps.rb
165
397
  - spec/rails_root/features/support/env.rb
398
+ - spec/rails_root/features/support/factory_girl.rb
399
+ - spec/rails_root/features/support/matchers.rb
166
400
  - spec/rails_root/features/support/paths.rb
167
- - spec/rails_root/spec/controllers/administer/models_controller_spec.rb
168
- - spec/rails_root/spec/controllers/posts_controller_spec.rb
169
- - spec/rails_root/spec/factories/posts.rb
170
- - spec/rails_root/spec/models/administer/model_spec.rb
171
- - spec/rails_root/spec/routing/posts_routing_spec.rb
172
- - spec/rails_root/spec/spec_helper.rb
173
- - spec/rails_root/spec/views/posts/edit.html.haml_spec.rb
174
- - spec/rails_root/spec/views/posts/new.html.haml_spec.rb
175
- - spec/rails_root/spec/views/posts/show.html.haml_spec.rb
401
+ - spec/rails_root/features/support/selectors.rb
402
+ - spec/rails_root/Gemfile
403
+ - spec/rails_root/Gemfile.lock
404
+ - spec/rails_root/lib/tasks/cucumber.rake
405
+ - spec/rails_root/log/development.log
406
+ - spec/rails_root/log/test.log
407
+ - spec/rails_root/public/404.html
408
+ - spec/rails_root/public/422.html
409
+ - spec/rails_root/public/500.html
410
+ - spec/rails_root/public/favicon.ico
411
+ - spec/rails_root/public/images/rails.png
412
+ - spec/rails_root/public/javascripts/application.js
413
+ - spec/rails_root/public/javascripts/controls.js
414
+ - spec/rails_root/public/javascripts/dragdrop.js
415
+ - spec/rails_root/public/javascripts/effects.js
416
+ - spec/rails_root/public/javascripts/prototype.js
417
+ - spec/rails_root/public/javascripts/rails.js
418
+ - spec/rails_root/public/robots.txt
419
+ - spec/rails_root/public/stylesheets/scaffold.css
420
+ - spec/rails_root/Rakefile
421
+ - spec/rails_root/README
422
+ - spec/rails_root/script/cucumber
423
+ - spec/rails_root/script/rails
424
+ - spec/rails_root/spec/models/attachment_spec.rb
176
425
  - spec/rails_root/test/integration/post_test.rb
177
426
  - spec/rails_root/test/performance/browsing_test.rb
178
427
  - spec/rails_root/test/test_helper.rb
428
+ - spec/rails_root/tmp/capybara/capybara-20101221001337.html
429
+ - spec/rails_root/tmp/capybara/capybara-20101221001509.html
430
+ - spec/rails_root/tmp/capybara/capybara-20110104162405.html
431
+ - spec/rails_root/tmp/capybara/capybara-20110214224604.html
432
+ - spec/rails_root/tmp/capybara/capybara-20110214225336.html
433
+ - spec/rails_root/tmp/capybara/capybara-20110214225545.html
434
+ - spec/routing/posts_routing_spec.rb
435
+ - spec/spec_helper.rb
436
+ - spec/views/posts/edit.html.haml_spec.rb
437
+ - spec/views/posts/new.html.haml_spec.rb
438
+ - spec/views/posts/show.html.haml_spec.rb