dobro 0.1.0alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +7 -0
  2. data/Gemfile +3 -0
  3. data/HISTORY +2 -0
  4. data/LICENCE +20 -0
  5. data/README.textile +70 -0
  6. data/Rakefile +11 -0
  7. data/app/assets/images/icons/pencil.png +0 -0
  8. data/app/assets/images/icons/plus.png +0 -0
  9. data/app/assets/images/icons/x.png +0 -0
  10. data/app/assets/images/input-shade-focus.gif +0 -0
  11. data/app/assets/images/input-shade.gif +0 -0
  12. data/app/assets/images/ridge-border.gif +0 -0
  13. data/app/assets/stylesheets/dobro.css.scss.erb +421 -0
  14. data/app/assets/stylesheets/dobro/_colours.css.scss +3 -0
  15. data/app/assets/stylesheets/dobro/_fonts.css.scss +4 -0
  16. data/app/assets/stylesheets/dobro/_reset.css.scss +22 -0
  17. data/app/controllers/dobro/application_controller.rb +51 -0
  18. data/app/views/dobro/application/_form.html.erb +14 -0
  19. data/app/views/dobro/application/_show.html.erb +6 -0
  20. data/app/views/dobro/application/delete.html.erb +5 -0
  21. data/app/views/dobro/application/edit.html.erb +1 -0
  22. data/app/views/dobro/application/index.html.erb +0 -0
  23. data/app/views/dobro/application/new.html.erb +1 -0
  24. data/app/views/dobro/application/show.html.erb +16 -0
  25. data/app/views/layouts/dobro.html.erb +59 -0
  26. data/config.ru +7 -0
  27. data/dobro.gemspec +31 -0
  28. data/lib/dobro.rb +24 -0
  29. data/lib/dobro/engine.rb +7 -0
  30. data/lib/dobro/file_system_resolver.rb +14 -0
  31. data/lib/dobro/routes.rb +23 -0
  32. data/lib/dobro/version.rb +3 -0
  33. data/spec/acceptance/custom_actions_spec.rb +18 -0
  34. data/spec/acceptance/custom_views_spec.rb +33 -0
  35. data/spec/acceptance/standard_namespace_spec.rb +51 -0
  36. data/spec/internal/app/controllers/tasks_controller.rb +6 -0
  37. data/spec/internal/app/models/page.rb +5 -0
  38. data/spec/internal/app/models/task.rb +5 -0
  39. data/spec/internal/app/models/widget.rb +5 -0
  40. data/spec/internal/app/views/dobro/widgets/_form.html.erb +12 -0
  41. data/spec/internal/app/views/dobro/widgets/show.html.erb +16 -0
  42. data/spec/internal/app/views/tasks/_show.html.erb +8 -0
  43. data/spec/internal/app/views/tasks/approving.html.erb +5 -0
  44. data/spec/internal/config/database.yml +3 -0
  45. data/spec/internal/config/routes.rb +11 -0
  46. data/spec/internal/db/schema.rb +17 -0
  47. data/spec/internal/log/.gitignore +1 -0
  48. data/spec/internal/public/favicon.ico +0 -0
  49. data/spec/spec_helper.rb +20 -0
  50. metadata +194 -0
@@ -0,0 +1,5 @@
1
+ class Page < ActiveRecord::Base
2
+ def identifier
3
+ name
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Task < ActiveRecord::Base
2
+ def identifier
3
+ description
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Widget < ActiveRecord::Base
2
+ def identifier
3
+ name
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ <%= form_for current_record do |f| %>
2
+ <fieldset>
3
+ <p>
4
+ <%= f.label :name %>
5
+ <%= f.text_field :name %>
6
+ </p>
7
+ </fieldset>
8
+
9
+ <fieldset>
10
+ <%= f.submit "Save This Widget" %>
11
+ </fieldset>
12
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <header class="h2">
2
+ <h2><%= current_record.identifier %></h2>
3
+
4
+ <nav>
5
+ <ul>
6
+ <li>
7
+ <%= link_to 'Edit', [:edit, current_record], :class => 'edit' %>
8
+ </li>
9
+ <li>
10
+ <%= link_to 'Delete', [:delete, current_record], :class => 'cancel' %>
11
+ </li>
12
+ </ul>
13
+ </nav>
14
+ </header>
15
+
16
+ <h3>Widget Name: <%= current_record.name %></h3>
@@ -0,0 +1,8 @@
1
+ <dl>
2
+ <% singular_class.column_names.each do |column| %>
3
+ <dt><%= column.titleize %></dt>
4
+ <dd><%= current_record.attributes[column] %></dd>
5
+ <% end %>
6
+ </dl>
7
+
8
+ <%= link_to 'Approve', [:approving, current_record] %>
@@ -0,0 +1,5 @@
1
+ <%= form_for [:approve, current_record] do |f| %>
2
+ <p>Are you sure you want to approve this task?</p>
3
+
4
+ <%= f.submit 'Confirm' %>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ test:
2
+ adapter: sqlite3
3
+ database: db/combustion_test.sqlite
@@ -0,0 +1,11 @@
1
+ Rails.application.routes.draw do
2
+ root :to => 'dobro/application#index'
3
+
4
+ dobro_for :pages, :widgets
5
+ dobro_for :tasks, :controller => 'tasks' do
6
+ member do
7
+ get :approving
8
+ put :approve
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ ActiveRecord::Schema.define do
2
+ create_table(:pages, :force => true) do |t|
3
+ t.string :name
4
+ t.text :content
5
+ t.timestamps
6
+ end
7
+
8
+ create_table(:tasks, :force => true) do |t|
9
+ t.string :description
10
+ t.boolean :approved
11
+ end
12
+
13
+ create_table(:widgets, :force => true) do |t|
14
+ t.string :name
15
+ t.timestamps
16
+ end
17
+ end
@@ -0,0 +1 @@
1
+ *.log
File without changes
@@ -0,0 +1,20 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.require :default, :development
5
+
6
+ Combustion.initialize!
7
+
8
+ require 'rspec/rails'
9
+ require 'capybara/rspec'
10
+
11
+ RSpec.configure do |config|
12
+ config.include Capybara
13
+ config.include Rails.application.routes.url_helpers
14
+ config.include Rails.application.routes.mounted_helpers
15
+
16
+ config.use_transactional_fixtures = true
17
+
18
+ # enable filtering for examples
19
+ config.filter_run :wip => nil
20
+ end
metadata ADDED
@@ -0,0 +1,194 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dobro
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0alpha3
5
+ prerelease: 5
6
+ platform: ruby
7
+ authors:
8
+ - Brian Flanagan
9
+ - Paul Campbell
10
+ - Pat Allan
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+ date: 2011-08-25 00:00:00.000000000Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rails
18
+ requirement: &70338764799960 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 3.1.0rc1
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: *70338764799960
27
+ - !ruby/object:Gem::Dependency
28
+ name: decent_exposure
29
+ requirement: &70338764799460 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '1.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: *70338764799460
38
+ - !ruby/object:Gem::Dependency
39
+ name: sass-rails
40
+ requirement: &70338764798960 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 3.1.0.rc
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: *70338764798960
49
+ - !ruby/object:Gem::Dependency
50
+ name: rspec-rails
51
+ requirement: &70338764798460 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ version: 2.6.1
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: *70338764798460
60
+ - !ruby/object:Gem::Dependency
61
+ name: capybara
62
+ requirement: &70338764797960 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: 1.0.0
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: *70338764797960
71
+ - !ruby/object:Gem::Dependency
72
+ name: combustion
73
+ requirement: &70338764797500 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ version: 0.1.1
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: *70338764797500
82
+ - !ruby/object:Gem::Dependency
83
+ name: sqlite3
84
+ requirement: &70338764797020 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 1.3.4
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: *70338764797020
93
+ description: A Rails Engine that provides a simple yet effective interface, perfect
94
+ for admin management.
95
+ email:
96
+ - pat@freelancing-gods.com
97
+ executables: []
98
+ extensions: []
99
+ extra_rdoc_files: []
100
+ files:
101
+ - .gitignore
102
+ - Gemfile
103
+ - HISTORY
104
+ - LICENCE
105
+ - README.textile
106
+ - Rakefile
107
+ - app/assets/images/icons/pencil.png
108
+ - app/assets/images/icons/plus.png
109
+ - app/assets/images/icons/x.png
110
+ - app/assets/images/input-shade-focus.gif
111
+ - app/assets/images/input-shade.gif
112
+ - app/assets/images/ridge-border.gif
113
+ - app/assets/stylesheets/dobro.css.scss.erb
114
+ - app/assets/stylesheets/dobro/_colours.css.scss
115
+ - app/assets/stylesheets/dobro/_fonts.css.scss
116
+ - app/assets/stylesheets/dobro/_reset.css.scss
117
+ - app/controllers/dobro/application_controller.rb
118
+ - app/views/dobro/application/_form.html.erb
119
+ - app/views/dobro/application/_show.html.erb
120
+ - app/views/dobro/application/delete.html.erb
121
+ - app/views/dobro/application/edit.html.erb
122
+ - app/views/dobro/application/index.html.erb
123
+ - app/views/dobro/application/new.html.erb
124
+ - app/views/dobro/application/show.html.erb
125
+ - app/views/layouts/dobro.html.erb
126
+ - config.ru
127
+ - dobro.gemspec
128
+ - lib/dobro.rb
129
+ - lib/dobro/engine.rb
130
+ - lib/dobro/file_system_resolver.rb
131
+ - lib/dobro/routes.rb
132
+ - lib/dobro/version.rb
133
+ - spec/acceptance/custom_actions_spec.rb
134
+ - spec/acceptance/custom_views_spec.rb
135
+ - spec/acceptance/standard_namespace_spec.rb
136
+ - spec/internal/app/controllers/tasks_controller.rb
137
+ - spec/internal/app/models/page.rb
138
+ - spec/internal/app/models/task.rb
139
+ - spec/internal/app/models/widget.rb
140
+ - spec/internal/app/views/dobro/widgets/_form.html.erb
141
+ - spec/internal/app/views/dobro/widgets/show.html.erb
142
+ - spec/internal/app/views/tasks/_show.html.erb
143
+ - spec/internal/app/views/tasks/approving.html.erb
144
+ - spec/internal/config/database.yml
145
+ - spec/internal/config/routes.rb
146
+ - spec/internal/db/schema.rb
147
+ - spec/internal/log/.gitignore
148
+ - spec/internal/public/favicon.ico
149
+ - spec/spec_helper.rb
150
+ homepage: http://github.com/hypertiny/dobro
151
+ licenses: []
152
+ post_install_message:
153
+ rdoc_options: []
154
+ require_paths:
155
+ - lib
156
+ required_ruby_version: !ruby/object:Gem::Requirement
157
+ none: false
158
+ requirements:
159
+ - - ! '>='
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ segments:
163
+ - 0
164
+ hash: 2005177753622462932
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
166
+ none: false
167
+ requirements:
168
+ - - ! '>'
169
+ - !ruby/object:Gem::Version
170
+ version: 1.3.1
171
+ requirements: []
172
+ rubyforge_project: dobro
173
+ rubygems_version: 1.8.6
174
+ signing_key:
175
+ specification_version: 3
176
+ summary: Simple, clean Rails admin interface
177
+ test_files:
178
+ - spec/acceptance/custom_actions_spec.rb
179
+ - spec/acceptance/custom_views_spec.rb
180
+ - spec/acceptance/standard_namespace_spec.rb
181
+ - spec/internal/app/controllers/tasks_controller.rb
182
+ - spec/internal/app/models/page.rb
183
+ - spec/internal/app/models/task.rb
184
+ - spec/internal/app/models/widget.rb
185
+ - spec/internal/app/views/dobro/widgets/_form.html.erb
186
+ - spec/internal/app/views/dobro/widgets/show.html.erb
187
+ - spec/internal/app/views/tasks/_show.html.erb
188
+ - spec/internal/app/views/tasks/approving.html.erb
189
+ - spec/internal/config/database.yml
190
+ - spec/internal/config/routes.rb
191
+ - spec/internal/db/schema.rb
192
+ - spec/internal/log/.gitignore
193
+ - spec/internal/public/favicon.ico
194
+ - spec/spec_helper.rb