bento 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/README.rdoc +62 -42
  2. data/lib/bento/controllers/account_scopable.rb +31 -2
  3. data/lib/bento/controllers/helpers.rb +13 -9
  4. data/lib/bento/models/account.rb +18 -37
  5. data/lib/bento/models/modules/trial.rb +15 -0
  6. data/lib/bento/models/modules/user_accessors.rb +26 -0
  7. data/lib/bento/models/modules/user_association.rb +13 -0
  8. data/lib/bento/models/modules/validations.rb +14 -0
  9. data/lib/bento/rails/routes.rb +24 -0
  10. data/lib/bento/rails.rb +2 -0
  11. data/lib/bento/version.rb +1 -1
  12. data/lib/generators/active_record/bento_generator.rb +1 -1
  13. data/lib/generators/active_record/templates/add_migration.rb +2 -2
  14. data/lib/generators/active_record/templates/create_migration.rb +4 -5
  15. data/lib/generators/bento/bento_generator.rb +4 -0
  16. data/lib/generators/bento/orm_helpers.rb +1 -1
  17. data/spec/bento/controllers/helpers_spec.rb +24 -0
  18. data/spec/bento/models/account_spec.rb +5 -95
  19. data/spec/bento/models/modules/trial_spec.rb +22 -0
  20. data/spec/bento/models/modules/user_accessors_spec.rb +48 -0
  21. data/spec/bento/models/modules/user_association_spec.rb +16 -0
  22. data/spec/bento/models/modules/validations_spec.rb +27 -0
  23. data/spec/bento/rails/routes_spec.rb +27 -0
  24. data/spec/bento_spec.rb +4 -0
  25. data/spec/controllers/bento_for_routes_spec.rb +55 -0
  26. data/spec/rails_app/app/controllers/custom_accounts_controller.rb +7 -1
  27. data/spec/rails_app/app/models/account.rb +1 -1
  28. data/spec/rails_app/app/models/site.rb +8 -0
  29. data/spec/rails_app/app/models/user.rb +1 -0
  30. data/spec/rails_app/app/views/custom_accounts/index.html.erb +14 -0
  31. data/spec/rails_app/app/views/custom_accounts/new.html.erb +11 -7
  32. data/spec/rails_app/app/views/custom_accounts/show.html.erb +12 -0
  33. data/spec/rails_app/app/views/layouts/application.html.erb +3 -2
  34. data/spec/rails_app/app/views/projects/_all_projects.html.erb +1 -0
  35. data/spec/rails_app/app/views/projects/show.html.erb +1 -0
  36. data/spec/rails_app/config/routes.rb +6 -1
  37. data/spec/rails_app/db/development.sqlite3 +0 -0
  38. data/spec/rails_app/db/migrate/20101029122256_bento_create_sites.rb +14 -0
  39. data/spec/rails_app/db/migrate/20101029122257_bento_add_site_id_to_sites.rb +9 -0
  40. data/spec/rails_app/db/schema.rb +10 -1
  41. data/spec/rails_app/db/test.sqlite3 +0 -0
  42. data/spec/rails_app/log/development.log +50 -1220
  43. data/spec/rails_app/{db/production.sqlite3 → log/production.log} +0 -0
  44. data/spec/rails_app/log/server.log +0 -0
  45. data/spec/rails_app/log/test.log +32539 -21983
  46. data/spec/spec_helper.rb +1 -1
  47. data/spec/support/blueprints.rb +4 -0
  48. metadata +24 -6
  49. data/spec/rails_app/tmp/pids/server.pid +0 -1
data/spec/spec_helper.rb CHANGED
@@ -14,7 +14,7 @@ Dir["#{File.expand_path(File.dirname(__FILE__))}/support/*.rb"].each {|f| requir
14
14
  Capybara.app = RailsApp::Application
15
15
 
16
16
  Rspec.configure do |config|
17
- config.mock_with :mocha
17
+ config.mock_with :rspec
18
18
  config.include Capybara
19
19
  config.use_transactional_fixtures = true
20
20
  config.before { Account.delete_all }
@@ -25,6 +25,10 @@ Account.blueprint do
25
25
  plan { Sham.plan }
26
26
  end
27
27
 
28
+ Site.blueprint do
29
+ name { Sham.company_name }
30
+ end
31
+
28
32
  User.blueprint do
29
33
  account
30
34
  email { Sham.email }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bento
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Nicklas Ramh\xC3\xB6j"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-16 00:00:00 +02:00
19
+ date: 2010-11-12 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -296,6 +296,11 @@ files:
296
296
  - lib/bento/controllers/account_scopable.rb
297
297
  - lib/bento/controllers/helpers.rb
298
298
  - lib/bento/models/account.rb
299
+ - lib/bento/models/modules/trial.rb
300
+ - lib/bento/models/modules/user_accessors.rb
301
+ - lib/bento/models/modules/user_association.rb
302
+ - lib/bento/models/modules/validations.rb
303
+ - lib/bento/rails/routes.rb
299
304
  - lib/bento/rails.rb
300
305
  - lib/bento/version.rb
301
306
  - lib/bento.rb
@@ -307,6 +312,13 @@ files:
307
312
  - lib/generators/bento/views_generator.rb
308
313
  - spec/bento/controllers/helpers_spec.rb
309
314
  - spec/bento/models/account_spec.rb
315
+ - spec/bento/models/modules/trial_spec.rb
316
+ - spec/bento/models/modules/user_accessors_spec.rb
317
+ - spec/bento/models/modules/user_association_spec.rb
318
+ - spec/bento/models/modules/validations_spec.rb
319
+ - spec/bento/rails/routes_spec.rb
320
+ - spec/bento_spec.rb
321
+ - spec/controllers/bento_for_routes_spec.rb
310
322
  - spec/proof_of_concepts_spec.rb
311
323
  - spec/rails_app/app/controllers/all_projects_controller.rb
312
324
  - spec/rails_app/app/controllers/application_controller.rb
@@ -315,8 +327,11 @@ files:
315
327
  - spec/rails_app/app/controllers/projects_controller.rb
316
328
  - spec/rails_app/app/models/account.rb
317
329
  - spec/rails_app/app/models/project.rb
330
+ - spec/rails_app/app/models/site.rb
318
331
  - spec/rails_app/app/models/user.rb
332
+ - spec/rails_app/app/views/custom_accounts/index.html.erb
319
333
  - spec/rails_app/app/views/custom_accounts/new.html.erb
334
+ - spec/rails_app/app/views/custom_accounts/show.html.erb
320
335
  - spec/rails_app/app/views/home/index.html.erb
321
336
  - spec/rails_app/app/views/layouts/application.html.erb
322
337
  - spec/rails_app/app/views/projects/_all_projects.html.erb
@@ -325,6 +340,7 @@ files:
325
340
  - spec/rails_app/app/views/projects/edit.html.erb
326
341
  - spec/rails_app/app/views/projects/index.html.erb
327
342
  - spec/rails_app/app/views/projects/new.html.erb
343
+ - spec/rails_app/app/views/projects/show.html.erb
328
344
  - spec/rails_app/config/application.rb
329
345
  - spec/rails_app/config/boot.rb
330
346
  - spec/rails_app/config/database.yml
@@ -348,10 +364,13 @@ files:
348
364
  - spec/rails_app/db/migrate/20101015094514_bento_create_accounts.rb
349
365
  - spec/rails_app/db/migrate/20101015094515_bento_add_account_id_to_accounts.rb
350
366
  - spec/rails_app/db/migrate/20101015143011_create_projects.rb
351
- - spec/rails_app/db/production.sqlite3
367
+ - spec/rails_app/db/migrate/20101029122256_bento_create_sites.rb
368
+ - spec/rails_app/db/migrate/20101029122257_bento_add_site_id_to_sites.rb
352
369
  - spec/rails_app/db/schema.rb
353
370
  - spec/rails_app/db/test.sqlite3
354
371
  - spec/rails_app/log/development.log
372
+ - spec/rails_app/log/production.log
373
+ - spec/rails_app/log/server.log
355
374
  - spec/rails_app/log/test.log
356
375
  - spec/rails_app/public/404.html
357
376
  - spec/rails_app/public/422.html
@@ -359,7 +378,6 @@ files:
359
378
  - spec/rails_app/public/favicon.ico
360
379
  - spec/rails_app/Rakefile
361
380
  - spec/rails_app/script/rails
362
- - spec/rails_app/tmp/pids/server.pid
363
381
  - spec/spec_helper.rb
364
382
  - spec/support/bento_spec_helper.rb
365
383
  - spec/support/blueprints.rb
@@ -1 +0,0 @@
1
- 72809