trusty-cms 3.8.2 → 3.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Gemfile.lock +1 -1
  4. data/app/helpers/scoped_helper.rb +1 -1
  5. data/app/models/trusty_cms/config.rb +2 -5
  6. data/config/application.rb +4 -4
  7. data/config/initializers/devise.rb +1 -1
  8. data/db/migrate/{001_create_radiant_tables.rb → 001_create_trusty_tables.rb} +1 -1
  9. data/db/migrate/20111016150725_extend_page_part_content_limit.rb +0 -2
  10. data/lib/configuration_extensions/configuration_extensions.rb +9 -9
  11. data/lib/tasks/extensions.rake +4 -4
  12. data/lib/tasks/framework.rake +28 -28
  13. data/lib/tasks/radiant_config.rake +4 -4
  14. data/lib/trusty_cms.rb +1 -1
  15. data/lib/trusty_cms/config/definition.rb +1 -1
  16. data/lib/trusty_cms/extension_loader.rb +1 -1
  17. data/lib/trusty_cms/extension_path.rb +1 -1
  18. data/lib/trusty_cms/initializer.rb +14 -14
  19. data/lib/trusty_cms/taggable.rb +1 -1
  20. data/lib/trusty_cms/task_support.rb +2 -2
  21. data/spec/dummy/config/application.rb +8 -8
  22. data/vendor/extensions/clipped-extension/lib/tasks/clipped_extension_tasks.rake +2 -2
  23. data/vendor/extensions/multi-site-extension/lib/tasks/scoped_admin_extension_tasks.rake +2 -2
  24. metadata +3 -103
  25. data/CONTRIBUTORS.md +0 -279
  26. data/Vagrantfile +0 -122
  27. data/app/mailers/password_mailer.rb +0 -10
  28. data/bin/ci/before_script +0 -10
  29. data/bin/trusty_test +0 -3
  30. data/lib/generators/extension/USAGE +0 -30
  31. data/lib/generators/extension/extension_generator.rb +0 -97
  32. data/lib/generators/extension/templates/README.md +0 -6
  33. data/lib/generators/extension/templates/RSpecRakefile +0 -109
  34. data/lib/generators/extension/templates/Rakefile +0 -25
  35. data/lib/generators/extension/templates/cucumber.yml +0 -1
  36. data/lib/generators/extension/templates/cucumber_env.rb +0 -11
  37. data/lib/generators/extension/templates/cucumber_paths.rb +0 -22
  38. data/lib/generators/extension/templates/en.yml +0 -3
  39. data/lib/generators/extension/templates/extension.rb +0 -21
  40. data/lib/generators/extension/templates/functional_test.rb +0 -15
  41. data/lib/generators/extension/templates/gemspec.rb +0 -29
  42. data/lib/generators/extension/templates/lib.rb +0 -8
  43. data/lib/generators/extension/templates/migration.rb +0 -9
  44. data/lib/generators/extension/templates/radiant_config.rb +0 -3
  45. data/lib/generators/extension/templates/routes.rb +0 -5
  46. data/lib/generators/extension/templates/spec.opts +0 -6
  47. data/lib/generators/extension/templates/spec_helper.rb +0 -42
  48. data/lib/generators/extension/templates/tasks.rake +0 -47
  49. data/lib/generators/extension/templates/test_helper.rb +0 -26
  50. data/lib/generators/extension_controller/USAGE +0 -36
  51. data/lib/generators/extension_controller/extension_controller_generator.rb +0 -84
  52. data/lib/generators/extension_controller/templates/controller.rb +0 -10
  53. data/lib/generators/extension_controller/templates/controller_spec.rb +0 -23
  54. data/lib/generators/extension_controller/templates/functional_test.rb +0 -11
  55. data/lib/generators/extension_controller/templates/helper.rb +0 -2
  56. data/lib/generators/extension_controller/templates/helper_spec.rb +0 -11
  57. data/lib/generators/extension_controller/templates/helper_test.rb +0 -4
  58. data/lib/generators/extension_controller/templates/view.html.erb +0 -2
  59. data/lib/generators/extension_controller/templates/view_spec.rb +0 -12
  60. data/lib/generators/extension_mailer/USAGE +0 -17
  61. data/lib/generators/extension_mailer/extension_mailer_generator.rb +0 -68
  62. data/lib/generators/extension_mailer/templates/fixture.erb +0 -3
  63. data/lib/generators/extension_mailer/templates/mailer.rb +0 -15
  64. data/lib/generators/extension_mailer/templates/unit_test.rb +0 -21
  65. data/lib/generators/extension_mailer/templates/view.erb +0 -3
  66. data/lib/generators/extension_migration/USAGE +0 -34
  67. data/lib/generators/extension_migration/extension_migration_generator.rb +0 -25
  68. data/lib/generators/extension_migration/templates/migration.rb +0 -11
  69. data/lib/generators/extension_model/USAGE +0 -35
  70. data/lib/generators/extension_model/extension_model_generator.rb +0 -68
  71. data/lib/generators/extension_model/templates/fixtures.yml +0 -19
  72. data/lib/generators/extension_model/templates/migration.rb +0 -16
  73. data/lib/generators/extension_model/templates/model.rb +0 -2
  74. data/lib/generators/extension_model/templates/model_spec.rb +0 -11
  75. data/lib/generators/extension_model/templates/unit_test.rb +0 -8
  76. data/lib/generators/generator_base_extension.rb +0 -18
  77. data/lib/generators/instance/instance_generator.rb +0 -148
  78. data/lib/generators/instance/templates/databases/db2.yml +0 -40
  79. data/lib/generators/instance/templates/databases/mysql.yml +0 -47
  80. data/lib/generators/instance/templates/databases/postgresql.yml +0 -44
  81. data/lib/generators/instance/templates/databases/sqlite3.yml +0 -16
  82. data/lib/generators/instance/templates/databases/sqlserver.yml +0 -21
  83. data/lib/generators/instance/templates/instance_boot.rb +0 -122
  84. data/lib/generators/instance/templates/instance_config.ru +0 -2
  85. data/lib/generators/instance/templates/instance_environment.rb +0 -93
  86. data/lib/generators/instance/templates/instance_gemfile +0 -78
  87. data/lib/generators/instance/templates/instance_generate +0 -6
  88. data/lib/generators/instance/templates/instance_radiant_config.rb +0 -16
  89. data/lib/generators/instance/templates/instance_rakefile +0 -3
  90. data/lib/generators/instance/templates/instance_routes.rb +0 -1
  91. data/lib/generators/language_extension/USAGE +0 -27
  92. data/lib/generators/language_extension/language_extension_generator.rb +0 -71
  93. data/lib/generators/language_extension/templates/README +0 -3
  94. data/lib/generators/language_extension/templates/RSpecRakefile +0 -123
  95. data/lib/generators/language_extension/templates/Rakefile +0 -25
  96. data/lib/generators/language_extension/templates/available_tags.yml +0 -553
  97. data/lib/generators/language_extension/templates/cucumber.yml +0 -1
  98. data/lib/generators/language_extension/templates/cucumber_env.rb +0 -16
  99. data/lib/generators/language_extension/templates/cucumber_paths.rb +0 -14
  100. data/lib/generators/language_extension/templates/extension.rb +0 -12
  101. data/lib/generators/language_extension/templates/functional_test.rb +0 -15
  102. data/lib/generators/language_extension/templates/gemspec.rb +0 -24
  103. data/lib/generators/language_extension/templates/lang.yml +0 -181
  104. data/lib/generators/language_extension/templates/lib.rb +0 -8
  105. data/lib/generators/language_extension/templates/spec.opts +0 -6
  106. data/lib/generators/language_extension/templates/spec_helper.rb +0 -36
  107. data/lib/generators/language_extension/templates/tasks.rake +0 -28
  108. data/lib/generators/language_extension/templates/test_helper.rb +0 -26
  109. data/lib/generators/trusty_cms/USAGE +0 -8
  110. data/lib/generators/trusty_cms/templates/Rakefile.erb +0 -7
  111. data/lib/generators/trusty_cms/templates/application.rb.erb +0 -149
  112. data/lib/generators/trusty_cms/templates/boot.rb.erb +0 -9
  113. data/lib/generators/trusty_cms/templates/config.ru.erb +0 -4
  114. data/lib/generators/trusty_cms/templates/database.yml.erb +0 -28
  115. data/lib/generators/trusty_cms/templates/environment.rb.erb +0 -5
  116. data/lib/generators/trusty_cms/templates/environments/development.rb.erb +0 -24
  117. data/lib/generators/trusty_cms/templates/environments/production.rb.erb +0 -26
  118. data/lib/generators/trusty_cms/templates/environments/test.rb.erb +0 -35
  119. data/lib/generators/trusty_cms/templates/initializers/secret_token.rb.erb +0 -13
  120. data/lib/generators/trusty_cms/templates/initializers/session_store.rb.erb +0 -8
  121. data/lib/generators/trusty_cms/templates/initializers/trusty_cms_config.rb.erb +0 -16
  122. data/lib/generators/trusty_cms/templates/preinitializer.rb.erb +0 -18
  123. data/lib/generators/trusty_cms/templates/routes.rb.erb +0 -0
  124. data/lib/generators/trusty_cms/trusty_cms_generator.rb +0 -32
data/Vagrantfile DELETED
@@ -1,122 +0,0 @@
1
- # -*- mode: ruby -*-
2
- # vi: set ft=ruby :
3
-
4
- # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
- VAGRANTFILE_API_VERSION = "2"
6
-
7
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8
- # All Vagrant configuration is done here. The most common configuration
9
- # options are documented and commented below. For a complete reference,
10
- # please see the online documentation at vagrantup.com.
11
-
12
- # Every Vagrant virtual environment requires a box to build off of.
13
- config.vm.box = "trusty-cms.box"
14
-
15
- # Disable automatic box update checking. If you disable this, then
16
- # boxes will only be checked for updates when the user runs
17
- # `vagrant box outdated`. This is not recommended.
18
- # config.vm.box_check_update = false
19
-
20
- # Create a forwarded port mapping which allows access to a specific port
21
- # within the machine from a port on the host machine. In the example below,
22
- # accessing "localhost:8080" will access port 80 on the guest machine.
23
- config.vm.network "forwarded_port", guest: 3000, host: 3000
24
-
25
- # Create a private network, which allows host-only access to the machine
26
- # using a specific IP.
27
- # config.vm.network "private_network", ip: "192.168.33.10"
28
-
29
- # Create a public network, which generally matched to bridged network.
30
- # Bridged networks make the machine appear as another physical device on
31
- # your network.
32
- # config.vm.network "public_network"
33
-
34
- # If true, then any SSH connections made will enable agent forwarding.
35
- # Default value: false
36
- # config.ssh.forward_agent = true
37
-
38
- # Share an additional folder to the guest VM. The first argument is
39
- # the path on the host to the actual folder. The second argument is
40
- # the path on the guest to mount the folder. And the optional third
41
- # argument is a set of non-required options.
42
- # config.vm.synced_folder "../data", "/vagrant_data"
43
-
44
- # Provider-specific configuration so you can fine-tune various
45
- # backing providers for Vagrant. These expose provider-specific options.
46
- # Example for VirtualBox:
47
- #
48
- # config.vm.provider "virtualbox" do |vb|
49
- # # Don't boot with headless mode
50
- # vb.gui = true
51
- #
52
- # # Use VBoxManage to customize the VM. For example to change memory:
53
- # vb.customize ["modifyvm", :id, "--memory", "1024"]
54
- # end
55
- #
56
- # View the documentation for the provider you're using for more
57
- # information on available options.
58
-
59
- # Enable provisioning with CFEngine. CFEngine Community packages are
60
- # automatically installed. For example, configure the host as a
61
- # policy server and optionally a policy file to run:
62
- #
63
- # config.vm.provision "cfengine" do |cf|
64
- # cf.am_policy_hub = true
65
- # # cf.run_file = "motd.cf"
66
- # end
67
- #
68
- # You can also configure and bootstrap a client to an existing
69
- # policy server:
70
- #
71
- # config.vm.provision "cfengine" do |cf|
72
- # cf.policy_server_address = "10.0.2.15"
73
- # end
74
-
75
- # Enable provisioning with Puppet stand alone. Puppet manifests
76
- # are contained in a directory path relative to this Vagrantfile.
77
- # You will need to create the manifests directory and a manifest in
78
- # the file default.pp in the manifests_path directory.
79
- #
80
- # config.vm.provision "puppet" do |puppet|
81
- # puppet.manifests_path = "manifests"
82
- # puppet.manifest_file = "site.pp"
83
- # end
84
-
85
- # Enable provisioning with chef solo, specifying a cookbooks path, roles
86
- # path, and data_bags path (all relative to this Vagrantfile), and adding
87
- # some recipes and/or roles.
88
- #
89
- # config.vm.provision "chef_solo" do |chef|
90
- # chef.cookbooks_path = "../my-recipes/cookbooks"
91
- # chef.roles_path = "../my-recipes/roles"
92
- # chef.data_bags_path = "../my-recipes/data_bags"
93
- # chef.add_recipe "mysql"
94
- # chef.add_role "web"
95
- #
96
- # # You may also specify custom JSON attributes:
97
- # chef.json = { mysql_password: "foo" }
98
- # end
99
-
100
- # Enable provisioning with chef server, specifying the chef server URL,
101
- # and the path to the validation key (relative to this Vagrantfile).
102
- #
103
- # The Opscode Platform uses HTTPS. Substitute your organization for
104
- # ORGNAME in the URL and validation key.
105
- #
106
- # If you have your own Chef Server, use the appropriate URL, which may be
107
- # HTTP instead of HTTPS depending on your configuration. Also change the
108
- # validation key to validation.pem.
109
- #
110
- # config.vm.provision "chef_client" do |chef|
111
- # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
112
- # chef.validation_key_path = "ORGNAME-validator.pem"
113
- # end
114
- #
115
- # If you're using the Opscode platform, your validator client is
116
- # ORGNAME-validator, replacing ORGNAME with your organization name.
117
- #
118
- # If you have your own Chef Server, the default validation client name is
119
- # chef-validator, unless you changed the configuration.
120
- #
121
- # chef.validation_client_name = "ORGNAME-validator"
122
- end
@@ -1,10 +0,0 @@
1
- class PasswordMailer < ApplicationMailer
2
-
3
- default :from => ENV['ORG_FROM_EMAIL'] ||= "admin@trustycms.com"
4
-
5
- def password_reset(user)
6
- @user = user
7
- mail :to => user.email, :subject => "Password Reset for TrustyCMS"
8
- end
9
-
10
- end
data/bin/ci/before_script DELETED
@@ -1,10 +0,0 @@
1
- #!/bin/sh
2
-
3
- case $DB in
4
- "mysql" )
5
- mysql -e 'create database radiant_test;'
6
- cp spec/ci/database.mysql.yml config/database.yml;;
7
- esac
8
-
9
- bundle exec rake db:migrate
10
- bundle exec rake db:migrate:extensions
data/bin/trusty_test DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts "face"
@@ -1,30 +0,0 @@
1
- Description:
2
- The extension generator creates stubs for a new TrustyCms extension.
3
-
4
- The generator takes an extension name as its argument. The extension name may be
5
- given in CamelCase or under_score and should not be suffixed with 'Extension'.
6
-
7
- The generator creates an extension directory in vendor/extensions that includes
8
- <extension_name>_extension.rb, README and Rakefile files as well as db, lib, task,
9
- and test directories.
10
-
11
- Example:
12
- ./script/generate extension AssetManagement
13
-
14
- This will create:
15
- vendor/extensions/asset_management/app/controllers
16
- vendor/extensions/asset_management/app/helpers
17
- vendor/extensions/asset_management/app/models
18
- vendor/extensions/asset_management/app/views
19
- vendor/extensions/asset_management/db/migrate
20
- vendor/extensions/asset_management/lib/tasks
21
- vendor/extensions/asset_management/README
22
- vendor/extensions/asset_management/asset_management_extension.rb
23
- vendor/extensions/asset_management/lib/tasks/asset_management_extension_tasks.rake
24
- vendor/extensions/asset_management/spec/controllers
25
- vendor/extensions/asset_management/spec/models
26
- vendor/extensions/asset_management/spec/views
27
- vendor/extensions/asset_management/spec/helpers
28
- vendor/extensions/asset_management/Rakefile
29
- vendor/extensions/asset_management/spec/spec_helper.rb
30
- vendor/extensions/asset_management/spec/spec.opts
@@ -1,97 +0,0 @@
1
- begin
2
- require 'git'
3
- rescue LoadError
4
- end
5
-
6
- class ExtensionGenerator < Rails::Generator::NamedBase
7
- default_options :with_test_unit => false
8
-
9
- attr_reader :extension_path, :extension_file_name
10
-
11
- def initialize(runtime_args, runtime_options = {})
12
- super
13
- @extension_file_name = "#{file_name}_extension"
14
- @extension_path = "vendor/extensions/#{file_name}"
15
- end
16
-
17
- def manifest
18
- record do |m|
19
- m.directory "#{extension_path}/app/controllers"
20
- m.directory "#{extension_path}/app/helpers"
21
- m.directory "#{extension_path}/app/models"
22
- m.directory "#{extension_path}/app/views"
23
- m.directory "#{extension_path}/config/locales"
24
- m.directory "#{extension_path}/config/initializers"
25
- m.directory "#{extension_path}/db/migrate"
26
- m.directory "#{extension_path}/lib/tasks"
27
-
28
- m.template 'README.md', "#{extension_path}/README.md"
29
- m.template 'extension.rb', "#{extension_path}/#{extension_file_name}.rb"
30
- m.template 'tasks.rake', "#{extension_path}/lib/tasks/#{extension_file_name}_tasks.rake"
31
- m.template 'en.yml', "#{extension_path}/config/locales/en.yml"
32
- m.template 'routes.rb', "#{extension_path}/config/routes.rb"
33
- m.template 'radiant_config.rb', "#{extension_path}/config/initializers/radiant_config.rb"
34
- m.template 'lib.rb', "#{extension_path}/lib/radiant-#{file_name}-extension.rb"
35
- m.template 'gemspec.rb', "#{extension_path}/radiant-#{file_name}-extension.gemspec"
36
-
37
- if options[:with_test_unit]
38
- m.directory "#{extension_path}/test/fixtures"
39
- m.directory "#{extension_path}/test/functional"
40
- m.directory "#{extension_path}/test/unit"
41
-
42
- m.template 'Rakefile', "#{extension_path}/Rakefile"
43
- m.template 'test_helper.rb', "#{extension_path}/test/test_helper.rb"
44
- m.template 'functional_test.rb', "#{extension_path}/test/functional/#{extension_file_name}_test.rb"
45
- else
46
- m.directory "#{extension_path}/spec/controllers"
47
- m.directory "#{extension_path}/spec/models"
48
- m.directory "#{extension_path}/spec/views"
49
- m.directory "#{extension_path}/spec/helpers"
50
- m.directory "#{extension_path}/features/support"
51
- m.directory "#{extension_path}/features/step_definitions/admin"
52
-
53
- m.template 'RSpecRakefile', "#{extension_path}/Rakefile"
54
- m.template 'spec_helper.rb', "#{extension_path}/spec/spec_helper.rb"
55
- m.file 'spec.opts', "#{extension_path}/spec/spec.opts"
56
- m.file 'cucumber.yml', "#{extension_path}/cucumber.yml"
57
- m.template 'cucumber_env.rb', "#{extension_path}/features/support/env.rb"
58
- m.template 'cucumber_paths.rb', "#{extension_path}/features/support/paths.rb"
59
- end
60
- end
61
- end
62
-
63
- def class_name
64
- super.to_name.gsub(' ', '') + 'Extension'
65
- end
66
-
67
- def extension_name
68
- class_name.to_name('Extension')
69
- end
70
-
71
- def author_info
72
- @author_info ||= begin
73
- Git.global_config
74
- rescue NameError
75
- {}
76
- end
77
- end
78
-
79
- def homepage
80
- author_info['github.user'] ? "http://github.com/#{author_info['github.user']}/radiant-#{file_name}-extension" : "http://example.com/#{file_name}"
81
- end
82
-
83
- def author_email
84
- author_info['user.email'] || 'your email'
85
- end
86
-
87
- def author_name
88
- author_info['user.name'] || 'Your Name'
89
- end
90
-
91
- def add_options!(opt)
92
- opt.separator ''
93
- opt.separator 'Options:'
94
- opt.on("--with-test-unit",
95
- "Use Test::Unit for this extension instead of RSpec") { |v| options[:with_test_unit] = v }
96
- end
97
- end
@@ -1,6 +0,0 @@
1
- # <%= extension_name %>
2
-
3
- TrustyCms is _so_ freaking awesome, but I made it better through this extension.
4
-
5
- Created by <%= author_name %>. <%- if author_email.include?('@') -%>If I don't update this content with real details,
6
- please contact me at <%= author_email %> with annoying messages telling me to do it.<%- end -%>
@@ -1,109 +0,0 @@
1
- # Determine where the RSpec plugin is by loading the boot
2
- unless defined? TRUSTY_CMS_ROOT
3
- ENV["Rails.env"] = "test"
4
- case
5
- when ENV["RADIANT_ENV_FILE"]
6
- require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
7
- when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
8
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
9
- else
10
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
11
- end
12
- end
13
-
14
- require 'rake'
15
- require 'rdoc/task'
16
- require 'rake/testtask'
17
-
18
- rspec_base = File.expand_path(TRUSTY_CMS_ROOT + '/vendor/plugins/rspec/lib')
19
- $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
20
- require 'spec/rake/spectask'
21
- require 'cucumber'
22
- require 'cucumber/rake/task'
23
-
24
- # Cleanup the TRUSTY_CMS_ROOT constant so specs will load the environment
25
- Object.send(:remove_const, :TRUSTY_CMS_ROOT)
26
-
27
- extension_root = File.expand_path(File.dirname(__FILE__))
28
-
29
- task :default => [:spec, :features]
30
- task :stats => "spec:statsetup"
31
-
32
- desc "Run all specs in spec directory"
33
- Spec::Rake::SpecTask.new(:spec) do |t|
34
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
35
- t.spec_files = FileList['spec/**/*_spec.rb']
36
- end
37
-
38
- task :features => 'spec:integration'
39
-
40
- namespace :spec do
41
- desc "Run all specs in spec directory with RCov"
42
- Spec::Rake::SpecTask.new(:rcov) do |t|
43
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
44
- t.spec_files = FileList['spec/**/*_spec.rb']
45
- t.rcov = true
46
- t.rcov_opts = ['--exclude', 'spec', '--rails']
47
- end
48
-
49
- desc "Print Specdoc for all specs"
50
- Spec::Rake::SpecTask.new(:doc) do |t|
51
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
52
- t.spec_files = FileList['spec/**/*_spec.rb']
53
- end
54
-
55
- [:models, :controllers, :views, :helpers].each do |sub|
56
- desc "Run the specs under spec/#{sub}"
57
- Spec::Rake::SpecTask.new(sub) do |t|
58
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
59
- t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
60
- end
61
- end
62
-
63
- desc "Run the Cucumber features"
64
- Cucumber::Rake::Task.new(:integration) do |t|
65
- t.fork = true
66
- t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
67
- # t.feature_pattern = "#{extension_root}/features/**/*.feature"
68
- t.profile = "default"
69
- end
70
-
71
- # Setup specs for stats
72
- task :statsetup do
73
- require 'code_statistics'
74
- ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
75
- ::STATS_DIRECTORIES << %w(View\ specs spec/views)
76
- ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
77
- ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
78
- ::CodeStatistics::TEST_TYPES << "Model specs"
79
- ::CodeStatistics::TEST_TYPES << "View specs"
80
- ::CodeStatistics::TEST_TYPES << "Controller specs"
81
- ::CodeStatistics::TEST_TYPES << "Helper specs"
82
- ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
83
- end
84
-
85
- namespace :db do
86
- namespace :fixtures do
87
- desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
88
- task :load => :environment do
89
- require 'active_record/fixtures'
90
- ActiveRecord::Base.establish_connection(Rails.env.to_sym)
91
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(Rails.root, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
92
- Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
93
- end
94
- end
95
- end
96
- end
97
- end
98
-
99
- desc 'Generate documentation for the <%= file_name %> extension.'
100
- RDoc::Task.new(:rdoc) do |rdoc|
101
- rdoc.rdoc_dir = 'rdoc'
102
- rdoc.title = '<%= class_name %>'
103
- rdoc.options << '--line-numbers' << '--inline-source'
104
- rdoc.rdoc_files.include('README')
105
- rdoc.rdoc_files.include('lib/**/*.rb')
106
- end
107
-
108
- # Load any custom rakefiles for extension
109
- Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
@@ -1,25 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rdoc/task'
4
-
5
- desc 'Default: run unit tests.'
6
- task :default => :test
7
-
8
- desc 'Test the <%= file_name %> extension.'
9
- Rake::TestTask.new(:test) do |t|
10
- t.libs << 'lib'
11
- t.pattern = 'test/**/*_test.rb'
12
- t.verbose = true
13
- end
14
-
15
- desc 'Generate documentation for the <%= file_name %> extension.'
16
- RDoc::Task.new(:rdoc) do |rdoc|
17
- rdoc.rdoc_dir = 'rdoc'
18
- rdoc.title = '<%= class_name %>'
19
- rdoc.options << '--line-numbers' << '--inline-source'
20
- rdoc.rdoc_files.include('README')
21
- rdoc.rdoc_files.include('lib/**/*.rb')
22
- end
23
-
24
- # Load any custom rakefiles for extension
25
- Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
@@ -1 +0,0 @@
1
- default: --format progress features --tags ~@proposed,~@in_progress
@@ -1,11 +0,0 @@
1
- # Sets up the Rails environment for Cucumber
2
- ENV["Rails.env"] = "test"
3
- # Extension root
4
- extension_env = File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment')
5
- require extension_env+'.rb'
6
-
7
- Dir.glob(File.join(TRUSTY_CMS_ROOT, "features", "**", "*.rb")).each {|step| require step unless step =~ /datasets_loader\.rb$/}
8
-
9
- Cucumber::Rails::World.class_eval do
10
- dataset :<%= file_name %>
11
- end
@@ -1,22 +0,0 @@
1
- module NavigationHelpers
2
-
3
- # Extend the standard PathMatchers with your own paths
4
- # to be used in your features.
5
- #
6
- # The keys and values here may be used in your standard web steps
7
- # Using:
8
- #
9
- # When I go to the "<%= file_name %>" admin page
10
- #
11
- # would direct the request to the path you provide in the value:
12
- #
13
- # admin_<%= file_name %>_path
14
- #
15
- PathMatchers = {} unless defined?(PathMatchers)
16
- PathMatchers.merge!({
17
- # /<%= file_name %>/i => 'admin_<%= file_name %>_path'
18
- })
19
-
20
- end
21
-
22
- World(NavigationHelpers)