hobo 1.3.3 → 1.4.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. data/{CHANGES.txt → CHANGES-1.3.txt} +0 -0
  2. data/CHANGES-1.4.txt +678 -0
  3. data/Rakefile +13 -3
  4. data/TODO-1.4.txt +69 -0
  5. data/VERSION +1 -1
  6. data/app/helpers/hobo_debug_helper.rb +16 -0
  7. data/app/helpers/hobo_deprecated_helper.rb +45 -0
  8. data/app/helpers/hobo_helper_base.rb +8 -0
  9. data/app/helpers/hobo_permissions_helper.rb +136 -0
  10. data/app/helpers/hobo_route_helper.rb +196 -0
  11. data/{lib/hobo/helper/translations.rb → app/helpers/hobo_translations_helper.rb} +4 -7
  12. data/{lib/hobo/helper/translations/normalizer.rb → app/helpers/hobo_translations_normalizer_helper.rb} +3 -10
  13. data/app/helpers/hobo_type_helper.rb +24 -0
  14. data/app/helpers/hobo_view_hint_helper.rb +13 -0
  15. data/hobo.gemspec +3 -3
  16. data/lib/generators/hobo/admin_subsite/admin_subsite_generator.rb +0 -9
  17. data/lib/generators/hobo/admin_subsite/templates/application.dryml +2 -0
  18. data/lib/generators/hobo/admin_subsite/templates/gitkeep +0 -0
  19. data/lib/generators/hobo/admin_subsite/templates/site.css.erb +9 -0
  20. data/lib/generators/hobo/admin_subsite/templates/site.js.erb +10 -0
  21. data/lib/generators/hobo/assets/assets_generator.rb +16 -2
  22. data/lib/generators/hobo/assets/templates/application.css +9 -0
  23. data/lib/generators/hobo/assets/templates/application.dryml.erb +0 -5
  24. data/lib/generators/hobo/assets/templates/application.js +11 -0
  25. data/lib/generators/hobo/assets/templates/front.css +10 -0
  26. data/lib/generators/hobo/assets/templates/front.js +11 -0
  27. data/lib/generators/hobo/assets/templates/front_site.dryml.erb +6 -0
  28. data/lib/generators/hobo/assets/templates/gitkeep +0 -0
  29. data/lib/generators/hobo/dev_tweaks/dev_tweaks_generator.rb +31 -0
  30. data/lib/generators/hobo/i18n/templates/hobo.en.yml +1 -1
  31. data/lib/generators/hobo/install_plugin/USAGE +3 -0
  32. data/lib/generators/hobo/install_plugin/install_plugin_generator.rb +36 -0
  33. data/lib/generators/hobo/plugin.rb +112 -0
  34. data/lib/generators/hobo/setup_wizard/setup_wizard_generator.rb +31 -14
  35. data/lib/generators/hobo/subsite.rb +16 -2
  36. data/lib/generators/hobo/subsite/templates/gitkeep +0 -0
  37. data/lib/generators/hobo/subsite/templates/site.css.erb +9 -0
  38. data/lib/generators/hobo/subsite/templates/site.js.erb +10 -0
  39. data/lib/generators/hobo/subsite_taglib/templates/taglib.dryml.erb +0 -17
  40. data/lib/generators/hobo/test_framework/test_framework_generator.rb +1 -1
  41. data/lib/hobo.rb +3 -2
  42. data/lib/hobo/controller.rb +43 -24
  43. data/lib/hobo/controller/model.rb +63 -42
  44. data/lib/hobo/controller/user_base.rb +1 -3
  45. data/lib/hobo/engine.rb +1 -1
  46. data/lib/hobo/extensions/active_record/associations/association.rb +36 -0
  47. data/lib/hobo/extensions/active_record/associations/collection.rb +10 -19
  48. data/lib/hobo/extensions/active_record/associations/proxy.rb +3 -15
  49. data/lib/hobo/extensions/active_record/associations/scope.rb +2 -2
  50. data/lib/hobo/extensions/active_record/permissions.rb +32 -38
  51. data/lib/hobo/extensions/active_record/relation_with_origin.rb +5 -5
  52. data/lib/hobo/model.rb +12 -7
  53. data/lib/hobo/model/accessible_associations.rb +8 -15
  54. data/lib/hobo/model/lifecycles/creator.rb +1 -1
  55. data/lib/hobo/model/lifecycles/transition.rb +1 -1
  56. data/lib/hobo/model/permissions.rb +4 -4
  57. data/lib/hobo/model/scopes.rb +4 -17
  58. data/lib/hobo/model/scopes/automatic_scopes.rb +5 -13
  59. data/lib/hobo/rapid/helper.rb +1 -161
  60. data/lib/hobo/rapid/taglibs/rapid.dryml +3 -17
  61. data/test/doctest/hobo/hobo_helper.rdoctest +8 -44
  62. data/{doctests → test/doctest}/hobo/lifecycles.rdoctest +0 -0
  63. data/{doctests → test/doctest}/hobo/model.rdoctest +2 -4
  64. data/{doctests → test/doctest}/hobo/multi_model_forms.rdoctest +3 -24
  65. data/{doctests → test/doctest}/hobo/scopes.rdoctest +3 -53
  66. data/test/doctest/prepare_testapp.rb +11 -0
  67. data/test/irt/generators/admin_subsite.irt +1 -19
  68. data/test/irt/generators/assets.irt +4 -9
  69. data/test/irt/generators/controller.irt +0 -3
  70. data/test/irt/generators/front_controller.irt +0 -5
  71. data/test/irt/generators/{helper.rb → irt_helper.rb} +2 -2
  72. data/test/irt/generators/model.irt +1 -12
  73. data/test/irt/generators/partials/_account_user_model_tests.rb +0 -8
  74. data/test/irt/generators/partials/_accounts_users_controller_tests.rb +0 -2
  75. data/test/irt/generators/partials/_default_user_model_tests.rb +0 -8
  76. data/test/irt/generators/partials/_default_users_controller_tests.rb +0 -2
  77. data/test/irt/generators/partials/_house_controller_tests.rb +0 -2
  78. data/test/irt/generators/partials/_house_model_tests.rb +1 -9
  79. data/test/irt/generators/partials/_subsite_taglib_admin.rb +5 -2
  80. data/test/irt/generators/partials/_subsite_taglib_admin_invite_only.rb +1 -1
  81. data/test/irt/generators/partials/_subsite_taglib_noopt.rb +2 -2
  82. data/test/irt/generators/partials/_subsite_taglib_variables.rb +0 -15
  83. data/test/irt/generators/partials/_user_mailer_tests.rb +1 -3
  84. data/test/irt/generators/resource.irt +0 -3
  85. data/test/irt/generators/subsite.irt +6 -22
  86. data/test/irt/generators/subsite_taglib.irt +0 -18
  87. data/test/irt/generators/test_framework.irt +2 -5
  88. data/test/irt/generators/user_controller.irt +0 -3
  89. data/test/irt/generators/user_mailer.irt +0 -3
  90. data/test/irt/generators/user_model.irt +0 -3
  91. data/test/irt/generators/user_resource.irt +0 -3
  92. data/test/irt/readme.txt +6 -3
  93. metadata +116 -159
  94. data/app/controllers/dev_controller.rb +0 -25
  95. data/app/views/dev/summary.dryml +0 -102
  96. data/doctests/prepare_testapp.rb +0 -8
  97. data/lib/generators/hobo/admin_subsite/templates/admin.css +0 -20
  98. data/lib/generators/hobo/rapid/USAGE +0 -3
  99. data/lib/generators/hobo/rapid/rapid_generator.rb +0 -24
  100. data/lib/generators/hobo/rapid/templates/IE7.js +0 -2
  101. data/lib/generators/hobo/rapid/templates/blank.gif +0 -0
  102. data/lib/generators/hobo/rapid/templates/hobo-rapid.css +0 -94
  103. data/lib/generators/hobo/rapid/templates/hobo-rapid.js +0 -1015
  104. data/lib/generators/hobo/rapid/templates/ie7-recalc.js +0 -166
  105. data/lib/generators/hobo/rapid/templates/lowpro.js +0 -339
  106. data/lib/generators/hobo/rapid/templates/reset.css +0 -95
  107. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/101-3B5F87-ACD3E6.png +0 -0
  108. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/30-3E547A-242E42.png +0 -0
  109. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/30-DBE1E5-FCFEF5.png +0 -0
  110. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/300-ACD3E6-fff.png +0 -0
  111. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/50-ACD3E6-fff.png +0 -0
  112. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/fieldbg.gif +0 -0
  113. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/pencil.png +0 -0
  114. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/small_close.png +0 -0
  115. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/spinner.gif +0 -0
  116. data/lib/generators/hobo/rapid/templates/themes/clean/public/stylesheets/clean.css +0 -327
  117. data/lib/generators/hobo/rapid/templates/themes/clean/public/stylesheets/rapid-ui.css +0 -102
  118. data/lib/generators/hobo/rapid/templates/themes/clean/views/clean.dryml +0 -10
  119. data/lib/hobo/helper.rb +0 -460
  120. data/lib/hobo/rapid/taglibs/rapid_core.dryml +0 -808
  121. data/lib/hobo/rapid/taglibs/rapid_document_tags.dryml +0 -56
  122. data/lib/hobo/rapid/taglibs/rapid_editing.dryml +0 -287
  123. data/lib/hobo/rapid/taglibs/rapid_forms.dryml +0 -1156
  124. data/lib/hobo/rapid/taglibs/rapid_generics.dryml +0 -48
  125. data/lib/hobo/rapid/taglibs/rapid_i18n.dryml +0 -173
  126. data/lib/hobo/rapid/taglibs/rapid_lifecycles.dryml +0 -96
  127. data/lib/hobo/rapid/taglibs/rapid_navigation.dryml +0 -108
  128. data/lib/hobo/rapid/taglibs/rapid_pages.dryml +0 -259
  129. data/lib/hobo/rapid/taglibs/rapid_plus.dryml +0 -247
  130. data/lib/hobo/rapid/taglibs/rapid_summary.dryml +0 -283
  131. data/lib/hobo/rapid/taglibs/rapid_support.dryml +0 -102
  132. data/lib/hobo/rapid/taglibs/rapid_user_pages.dryml +0 -182
  133. data/test/irt/generators/rapid.irt +0 -29
@@ -1,3 +1,6 @@
1
+ doctest: prepare testapp environment
2
+ doctest_require: '../prepare_testapp'
3
+
1
4
  Hobo Scopes
2
5
  {: .document-title}
3
6
 
@@ -31,55 +34,6 @@ that you skip down to the [fixture definitions](#fixture_definition).
31
34
  Nobody but the computer needs to read the rest of this section.
32
35
  {.hidden}
33
36
 
34
- To test Hobo scopes, we're going to need a connection to the database
35
- and some sample data. This takes a few lines of code to set up when
36
- starting from a blank irb session.
37
- {.hidden}
38
-
39
- First off we need to configure ActiveSupport for auto-loading
40
- {.hidden}
41
-
42
- >> require 'rubygems'
43
- >> require 'active_support'
44
- >> require 'active_record'
45
- >> require 'action_pack'
46
- >> require 'action_view'
47
- >> require 'action_controller'
48
- {.hidden}
49
-
50
- We also need to get ActiveRecord set up with a database connection
51
- {.hidden}
52
-
53
- >> mysql_adapter = defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql'
54
- >> mysql_user = 'root'; mysql_password = ''
55
- >> mysql_login = "-u #{mysql_user} --password='#{mysql_password}'"
56
- >> mysql_database = "hobo_fields_doctest"
57
- >> system "mysqladmin #{mysql_login} --force drop #{mysql_database} 2> /dev/null"
58
- >> system("mysqladmin #{mysql_login} create #{mysql_database}") or raise "could not create database"
59
- >> ActiveRecord::Base.establish_connection(:adapter => mysql_adapter,
60
- :database => mysql_database,
61
- :host => "localhost",
62
- :username => mysql_user,
63
- :password => mysql_password)
64
- >> ActiveRecord::Base.logger = ActiveSupport::BufferedLogger::new(StringIO.new(''))
65
- {.hidden}
66
-
67
- Some load path manipulation:
68
- {.hidden}
69
-
70
- >> $:.unshift File.expand_path('../../../../hobo_support/lib', __FILE__)
71
- >> $:.unshift File.expand_path('../../../../hobo_fields/lib', __FILE__)
72
- >> $:.unshift File.expand_path('../../../../dryml/lib', __FILE__)
73
- >> $:.unshift File.expand_path('../../../lib', __FILE__)
74
- {.hidden}
75
-
76
- And we'll require hobo:
77
- {.hidden}
78
-
79
- >> require 'will_paginate'
80
- >> require 'hobo'
81
- {.hidden}
82
-
83
37
  Let's set up a few models for our testing:
84
38
 
85
39
  >>
@@ -397,8 +351,4 @@ Like named scopes, Hobo scopes can be chained:
397
351
  >> Bryan.inactive_friends.inactive.*.name
398
352
  => ["Bethany"]
399
353
 
400
- Clean up our test database:
401
- {.hidden}
402
-
403
- >> system "mysqladmin --force drop #{mysql_database} 2> /dev/null"
404
354
  {.hidden}
@@ -0,0 +1,11 @@
1
+ require 'fileutils'
2
+ require 'tmpdir'
3
+
4
+ TESTAPP_PATH = ENV['TESTAPP_PATH'] || File.join(Dir.tmpdir, 'hobo_testapp')
5
+ system %(rake test:prepare_testapp TESTAPP_PATH=#{TESTAPP_PATH})
6
+ system %(echo "gem 'mocha'" >> #{TESTAPP_PATH}/Gemfile)
7
+ FileUtils.chdir TESTAPP_PATH
8
+ require "#{TESTAPP_PATH}/config/environment"
9
+ require 'rails/generators'
10
+ Rails::Generators.configure!
11
+
@@ -1,27 +1,9 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  invoke 'hobo:assets', %w[ -q ]
5
- invoke 'hobo:admin_subsite', %w[ -q ]
2
+ invoke 'hobo:admin_subsite', %w[ -q --make-front-site=false ]
6
3
  desc "Admin Subsite files exist"
7
4
  files_exist? %w[ app/controllers/admin/admin_site_controller.rb
8
- test/functional/admin_site_controller_test.rb
9
- public/stylesheets/admin.css
10
5
  app/controllers/admin/users_controller.rb
11
6
  app/helpers/admin/users_helper.rb
12
- test/unit/helpers/admin/users_helper_test.rb
13
7
  app/views/taglibs/admin_site.dryml
14
8
  ]
15
9
  test_value_eql? true
16
-
17
- desc "application.dryml injection matches"
18
- file_include? "app/views/taglibs/application.dryml",
19
- %(<extend tag="page">
20
- <old-page merge>
21
- <footer:>
22
- <a href="&admin_users_url" if="&current_user.administrator?">Admin</a>
23
- </footer:>
24
- </old-page>
25
- </extend>
26
- )
27
- test_value_eql? true
@@ -1,16 +1,11 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  desc "hobo:assets invoke"
5
2
  invoke 'hobo:assets', %w(-q)
6
3
 
7
4
  files_exist? %w[ app/views/taglibs/application.dryml
8
- public/stylesheets/application.css
9
- public/javascripts/dryml-support.js
5
+ app/assets/stylesheets/application.css
6
+ app/assets/stylesheets/front.css
7
+ app/assets/javascripts/application.js
8
+ app/assets/javascripts/front.js
10
9
  app/models/guest.rb
11
10
  ]
12
11
  test_value_eql? true
13
-
14
- desc "Application.dryml content matches"
15
- file_include? 'app/views/taglibs/application.dryml', '<set-theme name="clean"/>'
16
- test_value_eql? true
@@ -1,6 +1,3 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  invoke 'hobo:controller' , %w(houses -q)
5
2
 
6
3
  eval_file '../partials/_house_controller_tests.rb'
@@ -1,12 +1,7 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  invoke 'hobo:front_controller', %w[ -q ]
5
2
  desc "All files exist"
6
3
  files_exist? %w[ app/controllers/front_controller.rb
7
4
  app/helpers/front_helper.rb
8
- test/unit/helpers/front_helper_test.rb
9
- test/functional/front_controller_test.rb
10
5
  app/views/front/index.dryml ]
11
6
  test_value_eql? true
12
7
 
@@ -1,4 +1,4 @@
1
- irt_at_exit{git_reset_app}
1
+ IRT::Directives.irt_at_exit {git_reset_app}
2
2
 
3
3
  def invoke(*args)
4
4
  Rails::Generators.invoke *args
@@ -20,7 +20,7 @@ end
20
20
  def file_content(path, action, *strings)
21
21
  f = File.read(path)
22
22
  wrong = strings.send(action) do |s|
23
- re = s.is_a?(Regexp) ? s : /#{Regexp.escape(s)}/
23
+ re = s.is_a?(Regexp) ? s : /#{Regexp.escape(s)}/m
24
24
  !(f =~ re)
25
25
  end
26
26
  wrong.empty? || wrong
@@ -1,6 +1,3 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  invoke 'hobo:model', %w(house alpha:string -q)
5
2
 
6
3
  eval_file '../partials/_house_model_tests.rb'
@@ -9,10 +6,7 @@ invoke 'hobo:model', %w(nest/ed alpha:string -q)
9
6
 
10
7
  desc "Nested files exist"
11
8
  files_exist? %w[ app/models/nest/ed.rb
12
- app/models/nest.rb
13
- test/unit/nest/ed_test.rb
14
- test/fixtures/nest/eds.yml
15
- app/viewhints/nest/ed_hints.rb ]
9
+ app/models/nest.rb ]
16
10
  test_value_eql? true
17
11
 
18
12
  desc "Nested injection matches"
@@ -21,8 +15,3 @@ file_include? 'app/models/nest/ed.rb',
21
15
  'fields do',
22
16
  /alpha\s+\:string/
23
17
  test_value_eql? true
24
-
25
- desc "Nested hint content matches"
26
- file_include? 'app/viewhints/nest/ed_hints.rb',
27
- 'class Nest::EdHints'
28
- test_value_eql? true
@@ -1,9 +1,6 @@
1
1
  desc "Account Model files exist"
2
2
  files_exist? %w[ app/models/account.rb
3
3
  app/models/account.rb
4
- test/unit/account_test.rb
5
- test/fixtures/accounts.yml
6
- app/viewhints/account_hints.rb
7
4
  ]
8
5
  test_value_eql? true
9
6
 
@@ -14,8 +11,3 @@ file_include? 'app/models/account.rb',
14
11
  /name\s+\:string/ ,
15
12
  /email_address\s+\:email_address/
16
13
  test_value_eql? true
17
-
18
- desc "Nested hint content matches"
19
- file_include? 'app/viewhints/account_hints.rb',
20
- 'class AccountHints'
21
- test_value_eql? true
@@ -1,8 +1,6 @@
1
1
  desc "All controller files exists"
2
2
  files_exist? %w[ app/controllers/accounts_controller.rb
3
3
  app/helpers/accounts_helper.rb
4
- test/unit/helpers/accounts_helper_test.rb
5
- test/functional/accounts_controller_test.rb
6
4
  ]
7
5
  test_value_eql? true
8
6
 
@@ -1,9 +1,6 @@
1
1
  desc "All files exists"
2
2
  files_exist? %w[ app/models/user.rb
3
3
  app/models/user.rb
4
- test/unit/user_test.rb
5
- test/fixtures/users.yml
6
- app/viewhints/user_hints.rb
7
4
  ]
8
5
  test_value_eql? true
9
6
 
@@ -14,8 +11,3 @@ file_include? 'app/models/user.rb',
14
11
  /name\s+:string/,
15
12
  /email_address\s+:email_address/
16
13
  test_value_eql? true
17
-
18
- desc "Hint content matches"
19
- file_include? 'app/viewhints/user_hints.rb',
20
- 'class UserHints'
21
- test_value_eql? true
@@ -1,8 +1,6 @@
1
1
  desc "All user controller files exists"
2
2
  files_exist? %w[ app/controllers/users_controller.rb
3
3
  app/helpers/users_helper.rb
4
- test/unit/helpers/users_helper_test.rb
5
- test/functional/users_controller_test.rb
6
4
  ]
7
5
  test_value_eql? true
8
6
 
@@ -1,8 +1,6 @@
1
1
  desc "All controller files exists"
2
2
  files_exist? %w[ app/controllers/houses_controller.rb
3
3
  app/helpers/houses_helper.rb
4
- test/unit/helpers/houses_helper_test.rb
5
- test/functional/houses_controller_test.rb
6
4
  ]
7
5
 
8
6
  test_value_eql? true
@@ -1,8 +1,5 @@
1
1
  desc "All Model files exists"
2
- files_exist? %w[ app/models/house.rb
3
- test/unit/house_test.rb
4
- test/fixtures/houses.yml
5
- app/viewhints/house_hints.rb ]
2
+ files_exist? %w[ app/models/house.rb ]
6
3
  test_value_eql? true
7
4
 
8
5
  desc "Model injection matches"
@@ -11,8 +8,3 @@ file_include? 'app/models/house.rb',
11
8
  'fields do',
12
9
  /alpha\s+\:string/
13
10
  test_value_eql? true
14
-
15
- desc "Hint content matches"
16
- file_include? 'app/viewhints/house_hints.rb',
17
- 'class HouseHints'
18
- test_value_eql? true
@@ -1,4 +1,7 @@
1
- desc "Taglib admin file matches"
2
- file_include?( "app/views/taglibs/subs_site.dryml", tags, admin_tag ) &&
1
+ desc "Taglib admin file matches inclusions"
2
+ file_include?( "app/views/taglibs/subs_site.dryml", tags )
3
+ test_value_eql? true
4
+
5
+ desc "Taglib admin file matches exclusions"
3
6
  file_exclude?("app/views/taglibs/subs_site.dryml", invite_only)
4
7
  test_value_eql? true
@@ -1,3 +1,3 @@
1
1
  desc "Taglib admin invite-only file matches with #{user_resource_name}"
2
- file_include?("app/views/taglibs/subs_site.dryml", tags, admin_tag, invite_only)
2
+ file_include?("app/views/taglibs/subs_site.dryml", tags, invite_only)
3
3
  test_value_eql? true
@@ -1,4 +1,4 @@
1
1
  desc "Taglib file matches"
2
- file_include?("app/views/taglibs/subs_site.dryml", tags) &&
3
- file_exclude?("app/views/taglibs/subs_site.dryml", admin_tag, invite_only)
2
+ file_include?("app/views/taglibs/subs_site.dryml", tags) === true &&
3
+ file_exclude?("app/views/taglibs/subs_site.dryml", invite_only)
4
4
  test_value_eql? true
@@ -1,25 +1,10 @@
1
1
  tags = %(<!-- Tag definitions for the subs subsite -->
2
2
 
3
- <include src="rapid" gem="hobo"/>
4
-
5
3
  <include src="taglibs/auto/subs/rapid/cards"/>
6
4
  <include src="taglibs/auto/subs/rapid/pages"/>
7
5
  <include src="taglibs/auto/subs/rapid/forms"/>
8
-
9
- <set-theme name="clean"/>
10
6
  )
11
7
 
12
- admin_tag = '<extend tag="page">
13
- <old-page merge>
14
- <append-stylesheets:>
15
- <stylesheet name="subs"/>
16
- </append-stylesheets:>
17
- <footer:>
18
- <a href="#{base_url}/">View Site</a> |
19
- </footer:>
20
- </old-page>
21
- </extend>'
22
-
23
8
  invite_only = %(<extend tag="card" for="#{user_resource_name}">
24
9
  <old-card merge>
25
10
  <append-header:><%= h this.state.titleize %></append-header:>
@@ -2,14 +2,12 @@
2
2
  desc "User Mailer files exist"
3
3
  files_exist? %w[ app/mailers/user_mailer.rb
4
4
  app/views/user_mailer/forgot_password.erb
5
- test/functional/user_mailer_test.rb
6
5
  ]
7
6
  test_value_eql? true
8
7
 
9
8
  desc "user_mailer.rb file content"
10
9
  file_include? 'app/mailers/user_mailer.rb',
11
- 'class UserMailer',
12
- 'def set_variables'
10
+ 'class UserMailer'
13
11
  test_value_eql? true
14
12
 
15
13
  desc "forgot_password.erb file content"
@@ -1,6 +1,3 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  invoke 'hobo:resource' , %w(house alpha:string -q)
5
2
 
6
3
  eval_file '../partials/_house_controller_tests.rb'
@@ -1,10 +1,6 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
- invoke 'hobo:subsite', %w[ subs -q]
1
+ invoke 'hobo:subsite', %w[ subs --make-front-site=false -q]
5
2
  desc "Subsite files exist"
6
3
  files_exist? %w[ app/controllers/subs/subs_site_controller.rb
7
- test/functional/subs_site_controller_test.rb
8
4
  app/views/taglibs/subs_site.dryml ]
9
5
  test_value_eql? true
10
6
 
@@ -22,31 +18,19 @@ eval_file '../partials/_subsite_taglib_noopt.rb'
22
18
  git_reset_app
23
19
 
24
20
  invoke 'hobo:assets', %w[ -q ]
25
- invoke 'hobo:subsite', %w[ subs -q --make-front-site]
26
- desc "Subsite with make-front-site files exist"
27
- files_exist? %w[ app/views/taglibs/front_site.dryml
28
- app/views/taglibs/application.dryml
29
- app/controllers/subs/subs_site_controller.rb
30
- test/functional/subs_site_controller_test.rb
31
- app/views/taglibs/subs_site.dryml ]
32
- test_value_eql? true
33
-
34
-
35
- git_reset_app
36
- invoke 'hobo:subsite', %w[ subs -q --admin]
21
+ invoke 'hobo:admin_subsite', %w[ subs -q --make-front-site=false]
37
22
  eval_file '../partials/_subsite_taglib_admin.rb'
38
23
 
39
24
  git_reset_app
40
- invoke 'hobo:subsite', %w[ subs -q --admin --invite-only]
25
+ invoke 'hobo:assets', %w[ -q ]
26
+ invoke 'hobo:admin_subsite', %w[ subs --make-front-site=false -q --invite-only]
41
27
  eval_file '../partials/_subsite_taglib_admin_invite_only.rb'
42
28
 
43
29
  git_reset_app
44
- invoke 'hobo:subsite', %w[ subs --user-resource-name=account -q --admin --invite-only]
30
+ invoke 'hobo:assets', %w[ -q ]
31
+ invoke 'hobo:admin_subsite', %w[ subs --make-front-site=false --user-resource-name=account -q --invite-only]
45
32
  user_resource_name = 'Account'
46
33
  eval_file '../partials/_subsite_taglib_variables.rb'
47
34
  eval_file '../partials/_subsite_taglib_admin_invite_only.rb'
48
35
 
49
36
 
50
-
51
-
52
-
@@ -1,23 +1,5 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  user_resource_name = 'User'
5
2
  eval_file '../partials/_subsite_taglib_variables.rb'
6
3
 
7
4
  invoke 'hobo:subsite_taglib', %w[ subs -q]
8
5
  eval_file '../partials/_subsite_taglib_noopt.rb'
9
-
10
- git_reset_app
11
- invoke 'hobo:subsite_taglib', %w[ subs -q --admin]
12
- eval_file '../partials/_subsite_taglib_admin.rb'
13
-
14
- git_reset_app
15
- invoke 'hobo:subsite_taglib', %w[ subs -q --admin --invite-only]
16
- eval_file '../partials/_subsite_taglib_admin_invite_only.rb'
17
-
18
- git_reset_app
19
- invoke 'hobo:subsite_taglib', %w[ subs --user-resource-name=account -q --admin --invite-only]
20
- user_resource_name = 'Account'
21
- eval_file '../partials/_subsite_taglib_variables.rb'
22
- eval_file '../partials/_subsite_taglib_admin_invite_only.rb'
23
-
@@ -1,6 +1,3 @@
1
- require File.expand_path('../helper.rb', __FILE__)
2
-
3
-
4
1
  desc "test_unit: default no-changes'"
5
2
  invoke 'hobo:test_framework', %w(test_unit)
6
3
  file_exclude? 'config/application.rb',
@@ -41,7 +38,7 @@ file_include? 'config/application.rb',
41
38
  test_value_eql? true
42
39
 
43
40
  desc "rspec Gemfile injection"
44
- file_include? 'Gemfile', %(gem "rspec-rails", ">= 2.0.0.beta.10", :group => :test)
41
+ file_include? 'Gemfile', %(gem "rspec-rails", ">= 2.5.0", :group => [:test, :development])
45
42
  test_value_eql? true
46
43
 
47
44
  git_reset_app
@@ -55,7 +52,7 @@ file_include? 'config/application.rb',
55
52
  test_value_eql? true
56
53
 
57
54
  desc "rspec_with_shoulda Gemfile injection"
58
- file_include? 'Gemfile', %(gem "rspec-rails", ">= 2.0.0.beta.10", :group => :test),
55
+ file_include? 'Gemfile', %(gem "rspec-rails", ">= 2.5.0", :group => [:test, :development]),
59
56
  %(gem "shoulda", :group => :test)
60
57
  test_value_eql? true
61
58