trusty-cms 2.0.2 → 2.0.3.pre.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. checksums.yaml +13 -5
  2. data/.gitignore +0 -2
  3. data/CONTRIBUTORS.md +1 -3
  4. data/Gemfile +1 -6
  5. data/Gemfile.lock +80 -100
  6. data/INSTALL.md +6 -7
  7. data/README.md +1 -3
  8. data/Rakefile +4 -24
  9. data/app/assets/javascripts/admin/jquery-ui.js +2339 -3787
  10. data/app/assets/javascripts/admin/page-edit.js +3 -3
  11. data/app/assets/javascripts/admin/tabcontrol.js.erb +16 -16
  12. data/app/assets/javascripts/admin/treetable.js +2 -4
  13. data/app/assets/stylesheets/admin/_base.scss +4 -4
  14. data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
  15. data/app/assets/stylesheets/admin/partials/_content.scss +2 -9
  16. data/app/assets/stylesheets/admin/partials/_forms.scss +29 -97
  17. data/app/assets/stylesheets/admin/partials/_header.scss +3 -2
  18. data/app/assets/stylesheets/admin/partials/_index.scss +6 -9
  19. data/app/assets/stylesheets/admin/partials/_layout.scss +2 -1
  20. data/app/assets/stylesheets/admin/partials/_popup.scss +11 -0
  21. data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +4 -4
  22. data/app/assets/stylesheets/admin/partials/_typography.scss +0 -4
  23. data/app/controllers/admin/pages_controller.rb +1 -9
  24. data/app/controllers/admin/references_controller.rb +1 -8
  25. data/app/controllers/admin/users_controller.rb +1 -1
  26. data/app/controllers/admin/welcome_controller.rb +3 -3
  27. data/app/controllers/application_controller.rb.rails2 +113 -0
  28. data/app/controllers/site_controller.rb +1 -1
  29. data/app/helpers/admin/node_helper.rb +4 -4
  30. data/app/helpers/application_helper.rb.rails2 +242 -0
  31. data/app/models/trusty_cms/config.rb +1 -2
  32. data/app/views/admin/configuration/edit.html.haml +2 -2
  33. data/app/views/admin/configuration/show.html.haml +1 -1
  34. data/app/views/admin/layouts/_form.html.haml +1 -1
  35. data/app/views/admin/layouts/remove.html.haml +1 -1
  36. data/app/views/admin/pages/_fields.html.haml +1 -1
  37. data/app/views/admin/pages/_node.html.haml +2 -2
  38. data/app/views/admin/pages/edit.html.haml +1 -1
  39. data/app/views/admin/pages/remove.html.haml +2 -2
  40. data/app/views/admin/preferences/edit.html.haml +36 -36
  41. data/app/views/admin/users/_form.html.haml +1 -1
  42. data/app/views/admin/users/_password_fields.html.haml +1 -1
  43. data/app/views/admin/users/remove.html.haml +1 -1
  44. data/app/views/admin/welcome/login.html.haml +1 -1
  45. data/app/views/layouts/application.html.haml +16 -18
  46. data/config/application.rb +1 -2
  47. data/config/boot.rb +1 -0
  48. data/config/database.mysql.yml +3 -3
  49. data/{spec/dummy/config/database.yml → config/database.yml.rails2} +4 -4
  50. data/config/environment.rb.rails2 +89 -0
  51. data/config/environments/development.rb +0 -1
  52. data/config/environments/development.rb.rails2 +17 -0
  53. data/config/environments/production.rb.rails2 +24 -0
  54. data/config/environments/test.rb +4 -2
  55. data/config/initializers/trusty_cms_config.rb +0 -1
  56. data/config/routes.rb +0 -1
  57. data/config/routes.rb.rails2 +41 -0
  58. data/db/migrate/001_create_radiant_tables.rb +0 -1
  59. data/db/migrate/003_rename_behavior_column.rb +9 -0
  60. data/db/migrate/019_add_salt_to_users.rb +11 -0
  61. data/db/migrate/20100805155020_convert_page_metas.rb +13 -0
  62. data/db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb +4 -0
  63. data/db/migrate/20120209231801_change_pages_allowed_children_cache_to_text.rb +1 -0
  64. data/lib/generators/instance/templates/databases/mysql.yml +3 -3
  65. data/lib/generators/instance/templates/instance_gemfile +2 -2
  66. data/lib/generators/trusty_cms/templates/database.yml.erb +4 -4
  67. data/lib/generators/trusty_cms/templates/routes.rb.erb +1 -0
  68. data/lib/login_system.rb +1 -1
  69. data/lib/tasks/database.rake +3 -1
  70. data/lib/tasks/framework.rake +1 -1
  71. data/lib/trusty_cms/admin_ui.rb +0 -2
  72. data/lib/trusty_cms/extension_migrator.rb +2 -1
  73. data/lib/trusty_cms/initializer.rb +1 -1
  74. data/lib/trusty_cms/setup.rb +1 -1
  75. data/lib/trusty_cms.rb +1 -1
  76. data/public/stylesheets/admin/main.css +1 -0
  77. data/{spec/dummy/config/routes.rb → public/stylesheets/admin/overrides.css} +0 -0
  78. data/spec/ci/database.mysql.yml +1 -1
  79. data/spec/features/pages_spec.rb +2 -2
  80. data/spec/helpers/regions_helper_spec.rb +16 -0
  81. data/spec/rails_helper.rb +4 -3
  82. data/spec/spec_helper.rb +77 -13
  83. data/spec/support/custom_actions.rb +0 -1
  84. data/test/test_helper.rb.rails2 +64 -0
  85. data/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  86. data/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
  87. data/tmp/cache_files_test/a.txt +1 -0
  88. data/tmp/cache_files_test/all.txt +3 -0
  89. data/tmp/cache_files_test/b.txt +1 -0
  90. data/tmp/config/radiant_config.yml +27 -0
  91. data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_boxes.sassc +0 -0
  92. data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_gradients.sassc +0 -0
  93. data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_links.sassc +0 -0
  94. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_appearance.scssc +0 -0
  95. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-clip.scssc +0 -0
  96. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-origin.scssc +0 -0
  97. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-size.scssc +0 -0
  98. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_border-radius.scssc +0 -0
  99. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box-shadow.scssc +0 -0
  100. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box-sizing.scssc +0 -0
  101. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box.scssc +0 -0
  102. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_columns.scssc +0 -0
  103. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_filter.scssc +0 -0
  104. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_font-face.scssc +0 -0
  105. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_hyphenation.scssc +0 -0
  106. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_images.scssc +0 -0
  107. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_inline-block.scssc +0 -0
  108. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_opacity.scssc +0 -0
  109. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_regions.scssc +0 -0
  110. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_shared.scssc +0 -0
  111. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_text-shadow.scssc +0 -0
  112. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_transform.scssc +0 -0
  113. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_transition.scssc +0 -0
  114. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_user-interface.scssc +0 -0
  115. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_actions.sassc +0 -0
  116. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_avatars.sassc +0 -0
  117. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_content.sassc +0 -0
  118. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_dateinput.sassc +0 -0
  119. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_deprecated.sassc +0 -0
  120. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_dropdown.sassc +0 -0
  121. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_footer.sassc +0 -0
  122. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_forms.sassc +0 -0
  123. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_header.sassc +0 -0
  124. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_index.sassc +0 -0
  125. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_layout.sassc +0 -0
  126. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_messages.sassc +0 -0
  127. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_popup.sassc +0 -0
  128. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_tabcontrol.sassc +0 -0
  129. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_toolbar.sassc +0 -0
  130. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_typography.sassc +0 -0
  131. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_validations.sassc +0 -0
  132. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_color.scssc +0 -0
  133. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_general.scssc +0 -0
  134. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_sprites.scssc +0 -0
  135. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_tables.scssc +0 -0
  136. data/tmp/sass-cache/5683573556a6b271b3ffade55f4ff32a60e7c0f0/_base.scssc +0 -0
  137. data/tmp/sass-cache/5683573556a6b271b3ffade55f4ff32a60e7c0f0/_sprite-img.scssc +0 -0
  138. data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_alternating-rows-and-columns.scssc +0 -0
  139. data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_borders.scssc +0 -0
  140. data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_scaffolding.scssc +0 -0
  141. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_links.scssc +0 -0
  142. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_lists.scssc +0 -0
  143. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_text.scssc +0 -0
  144. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_vertical_rhythm.scssc +0 -0
  145. data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_hover-link.scssc +0 -0
  146. data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_link-colors.scssc +0 -0
  147. data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_unstyled-link.scssc +0 -0
  148. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_css3.scssc +0 -0
  149. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_support.scssc +0 -0
  150. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_typography.scssc +0 -0
  151. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_utilities.scssc +0 -0
  152. data/tmp/sass-cache/92844cd19a320f87ef960171cea4f33d1a07339c/_contrast.scssc +0 -0
  153. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_ellipsis.scssc +0 -0
  154. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_force-wrap.scssc +0 -0
  155. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_nowrap.scssc +0 -0
  156. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_replacement.scssc +0 -0
  157. data/tmp/sass-cache/b3d80baefd48593d8c08815ba2d83e209f5dad6f/_grid-background.scssc +0 -0
  158. data/tmp/sass-cache/b92bfc773efa04d930ffa0b3331244a1f378caa7/_compass.scssc +0 -0
  159. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_clearfix.scssc +0 -0
  160. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_float.scssc +0 -0
  161. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_hacks.scssc +0 -0
  162. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_min.scssc +0 -0
  163. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_reset.scssc +0 -0
  164. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_tag-cloud.scssc +0 -0
  165. data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/_base.sassc +0 -0
  166. data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/main.sassc +0 -0
  167. data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/overrides.sassc +0 -0
  168. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_bullets.scssc +0 -0
  169. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_horizontal-list.scssc +0 -0
  170. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_inline-block-list.scssc +0 -0
  171. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_inline-list.scssc +0 -0
  172. data/tmp/sass-cache/dc9647e96d50c02214aff50e88308a74bf56d1d7/_utilities.scssc +0 -0
  173. data/trusty_cms.gemspec +2 -4
  174. metadata +180 -171
  175. data/spec/dummy/README.rdoc +0 -28
  176. data/spec/dummy/Rakefile +0 -5
  177. data/spec/dummy/bin/bundle +0 -3
  178. data/spec/dummy/bin/rails +0 -4
  179. data/spec/dummy/bin/rake +0 -4
  180. data/spec/dummy/bin/setup +0 -29
  181. data/spec/dummy/config/application.rb +0 -152
  182. data/spec/dummy/config/boot.rb +0 -6
  183. data/spec/dummy/config/environment.rb +0 -5
  184. data/spec/dummy/config/environments/development.rb +0 -49
  185. data/spec/dummy/config/environments/production.rb +0 -79
  186. data/spec/dummy/config/environments/test.rb +0 -42
  187. data/spec/dummy/config/initializers/assets.rb +0 -11
  188. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  189. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
  190. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  191. data/spec/dummy/config/initializers/inflections.rb +0 -16
  192. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  193. data/spec/dummy/config/initializers/session_store.rb +0 -3
  194. data/spec/dummy/config/initializers/trusty_cms_config.rb +0 -20
  195. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  196. data/spec/dummy/config/locales/en.yml +0 -23
  197. data/spec/dummy/config/secrets.yml +0 -22
  198. data/spec/dummy/config.ru +0 -4
  199. data/spec/dummy/db/schema.rb +0 -122
  200. data/spec/dummy/log/test.log +0 -25081
  201. data/spec/dummy/public/404.html +0 -67
  202. data/spec/dummy/public/422.html +0 -67
  203. data/spec/dummy/public/500.html +0 -66
  204. data/spec/dummy/public/favicon.ico +0 -0
  205. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  206. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
  207. data/spec/dummy/tmp/radiant_config_cache.txt +0 -0
@@ -31,11 +31,11 @@ describe 'Pages' do
31
31
  Page.create!(title: 'Voyager Home', breadcrumb: 'Home', slug: '/')
32
32
  visit '/admin/pages'
33
33
  end
34
-
35
-
34
+
36
35
  it 'lets you edit the homepage' do
37
36
  click_link 'Voyager Home'
38
37
 
38
+ expect(page).to have_content 'Edit Page'
39
39
  expect(page).to have_field 'Page Title', with: 'Voyager Home'
40
40
  expect(page).to have_button 'Save Changes'
41
41
  expect(page).to have_content 'Last Updated by Kathryn Janeway'
@@ -0,0 +1,16 @@
1
+ require 'rails_helper'
2
+
3
+ describe Admin::RegionsHelper do
4
+
5
+ describe "#render_region" do
6
+
7
+ before :each do
8
+ allow(controller).to receive(:controller_name).and_return("page")
9
+ allow(controller).to receive(:template_name).and_return("index")
10
+ end
11
+
12
+ it "outputs html_safe string" do
13
+ expect(helper.render_region :foo).to be_html_safe
14
+ end
15
+ end
16
+ end
data/spec/rails_helper.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
2
  ENV["RAILS_ENV"] ||= 'test'
3
3
  require 'spec_helper'
4
+ require File.expand_path("../../config/environment", __FILE__)
4
5
  require 'rspec/rails'
5
- require 'capybara/rails'
6
+
6
7
  require 'capybara/poltergeist'
7
8
  Capybara.javascript_driver = :poltergeist
8
9
 
@@ -24,7 +25,7 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
24
25
 
25
26
  RSpec.configure do |config|
26
27
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
27
- config.fixture_path = "#{::TRUSTY_CMS_ROOT}/spec/fixtures"
28
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
28
29
 
29
30
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
30
31
  # examples within a transaction, remove the following line or assign false
@@ -61,7 +62,7 @@ RSpec.configure do |config|
61
62
  ['default_locale', 'en'],
62
63
  ]
63
64
  configs.each do |key, value|
64
- c = TrustyCms::Config.find_or_initialize_by(key: key)
65
+ c = TrustyCms::Config.find_or_initialize_by_key(key)
65
66
  c.value = value
66
67
  c.save
67
68
  end
data/spec/spec_helper.rb CHANGED
@@ -1,14 +1,78 @@
1
- ENV['RAILS_ENV'] ||= 'test'
2
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
3
- require 'rspec/rails'
4
- require 'rspec/autorun'
5
- require 'factory_girl_rails'
6
- Rails.backtrace_cleaner.remove_silencers!
7
- # Load support files
8
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
9
17
  RSpec.configure do |config|
10
- config.mock_with :rspec
11
- config.use_transactional_fixtures = true
12
- config.infer_base_class_for_anonymous_controllers = false
13
- config.order = "random"
14
- end
18
+ # The settings below are suggested to provide a good initial experience
19
+ # with RSpec, but feel free to customize to your heart's content.
20
+ =begin
21
+ # These two settings work together to allow you to limit a spec run
22
+ # to individual examples or groups you care about by tagging them with
23
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
+ # get run.
25
+ config.filter_run :focus
26
+ config.run_all_when_everything_filtered = true
27
+
28
+ # Many RSpec users commonly either run the entire suite or an individual
29
+ # file, and it's useful to allow more verbose output when running an
30
+ # individual spec file.
31
+ if config.files_to_run.one?
32
+ # Use the documentation formatter for detailed output,
33
+ # unless a formatter has already been configured
34
+ # (e.g. via a command-line flag).
35
+ config.default_formatter = 'doc'
36
+ end
37
+
38
+ # Print the 10 slowest examples and example groups at the
39
+ # end of the spec run, to help surface which specs are running
40
+ # particularly slow.
41
+ config.profile_examples = 10
42
+
43
+ # Run specs in random order to surface order dependencies. If you find an
44
+ # order dependency and want to debug it, you can fix the order by providing
45
+ # the seed, which is printed after each run.
46
+ # --seed 1234
47
+ config.order = :random
48
+
49
+ # Seed global randomization in this process using the `--seed` CLI option.
50
+ # Setting this allows you to use `--seed` to deterministically reproduce
51
+ # test failures related to randomization by passing the same `--seed` value
52
+ # as the one that triggered the failure.
53
+ Kernel.srand config.seed
54
+
55
+ # rspec-expectations config goes here. You can use an alternate
56
+ # assertion/expectation library such as wrong or the stdlib/minitest
57
+ # assertions if you prefer.
58
+ config.expect_with :rspec do |expectations|
59
+ # Enable only the newer, non-monkey-patching expect syntax.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ expectations.syntax = :expect
63
+ end
64
+
65
+ # rspec-mocks config goes here. You can use an alternate test double
66
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
67
+ config.mock_with :rspec do |mocks|
68
+ # Enable only the newer, non-monkey-patching expect syntax.
69
+ # For more details, see:
70
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
+ mocks.syntax = :expect
72
+
73
+ # Prevents you from mocking or stubbing a method that does not exist on
74
+ # a real object. This is generally recommended.
75
+ mocks.verify_partial_doubles = true
76
+ end
77
+ =end
78
+ end
@@ -7,4 +7,3 @@ def log_in_as(login, plaintext_password = 'password')
7
7
  fill_in 'password', with: plaintext_password
8
8
  click_on 'Login'
9
9
  end
10
-
@@ -0,0 +1,64 @@
1
+ unless defined? TEST_ROOT
2
+ ENV["Rails.env"] = "test"
3
+
4
+ require 'test/unit'
5
+
6
+ TEST_ROOT = File.expand_path(File.dirname(__FILE__))
7
+
8
+ unless defined? TRUSTY_CMS_ROOT
9
+ if env_file = ENV["RADIANT_ENV_FILE"]
10
+ require env_file
11
+ else
12
+ require File.expand_path(TEST_ROOT + "/../config/environment")
13
+ end
14
+ end
15
+ require 'test_help'
16
+
17
+ class ActiveSupport::TestCase
18
+ # Transactional fixtures accelerate your tests by wrapping each test method
19
+ # in a transaction that's rolled back on completion. This ensures that the
20
+ # test database remains unchanged so your fixtures don't have to be reloaded
21
+ # between every test method. Fewer database queries means faster tests.
22
+ #
23
+ # Read Mike Clark's excellent walkthrough at
24
+ # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
25
+ #
26
+ # Every Active Record database supports transactions except MyISAM tables
27
+ # in MySQL. Turn off transactional fixtures in this case; however, if you
28
+ # don't care one way or the other, switching from MyISAM to InnoDB tables
29
+ # is recommended.
30
+ self.use_transactional_fixtures = true
31
+
32
+ # Instantiated fixtures are slow, but give you @david where otherwise you
33
+ # would need people(:david). If you don't want to migrate your existing
34
+ # test cases which use the @david style and don't mind the speed hit (each
35
+ # instantiated fixtures translates to a database query per test method),
36
+ # then set this back to true.
37
+ self.use_instantiated_fixtures = false
38
+
39
+ # Make sure instance installs know where fixtures are
40
+ self.fixture_path = ["#{TEST_ROOT}/fixtures"]
41
+
42
+ class << self
43
+ # Class method for test helpers
44
+ def test_helper(*names)
45
+ names.each do |name|
46
+ name = name.to_s
47
+ name = $1 if name =~ /^(.*?)_test_helper$/i
48
+ name = name.singularize
49
+ first_time = true
50
+ begin
51
+ constant = (name.camelize + 'TestHelper').constantize
52
+ self.class_eval { include constant }
53
+ rescue NameError
54
+ filename = File.expand_path(TEST_ROOT + '/helpers/' + name + '_test_helper.rb')
55
+ require filename if first_time
56
+ first_time = false
57
+ retry
58
+ end
59
+ end
60
+ end
61
+ alias :test_helpers :test_helper
62
+ end
63
+ end
64
+ end
@@ -0,0 +1 @@
1
+ Contents of 'a.txt'
@@ -0,0 +1,3 @@
1
+ Contents of 'a.txt'
2
+
3
+ Contents of 'b.txt'
@@ -0,0 +1 @@
1
+ Contents of 'b.txt'
@@ -0,0 +1,27 @@
1
+ --- |
2
+ ---
3
+ admin.title: TrustyCms CMS
4
+ defaults.page.parts: Body,Extended
5
+ defaults.page.status: Draft
6
+ pagination.param_name: page
7
+ pagination.per_page_param_name: per_page
8
+ admin.pagination.per_page: "50"
9
+ site.title: Your site title
10
+ site.host: www.example.com
11
+ user.allow_password_reset?: true
12
+ paperclip.url: /system/:attachment/:id/:style/:basename:no_original_style.:extension
13
+ paperclip.path: ":rails_root/public/system/:attachment/:id/:style/:basename:no_original_style.:extension"
14
+ paperclip.skip_filetype_validation: true
15
+ paperclip.storage: filesystem
16
+ paperclip.fog.public?: true
17
+ assets.create_image_thumbnails?: true
18
+ assets.create_video_thumbnails?: true
19
+ assets.create_pdf_thumbnails?: true
20
+ assets.thumbnails.image: normal:size=640x640>|small:size=320x320>
21
+ assets.thumbnails.video: normal:size=640x640>,format=jpg|small:size=320x320>,format=jpg
22
+ assets.thumbnails.pdf: normal:size=640x640>,format=jpg|small:size=320x320>,format=jpg
23
+ assets.max_asset_size: "5"
24
+ assets.display_size: normal
25
+ assets.insertion_size: normal
26
+ test_data: test string
27
+
data/trusty_cms.gemspec CHANGED
@@ -17,12 +17,11 @@ a general purpose content managment system--not merely a blogging engine.}
17
17
  ignores = File.read('.gitignore').split("\n").inject([]) {|a,p| a + Dir[p] }
18
18
  s.files = Dir['**/*','.gitignore', 'public/.htaccess', 'log/.keep', 'vendor/extensions/.keep'] - ignores
19
19
  s.homepage = %q{https://github.com/pgharts/trusty-cms}
20
- s.rdoc_options = ["--title", "TrustyCms -- Content Management You Can Trust", "--line-numbers", "--main", "README", "--exclude", "app", "--exclude", "bin", "--exclude", "config", "--exclude", "db", "--exclude", "features", "--exclude", "lib", "--exclude", "log", "--exclude", "pkg", "--exclude", "public", "--exclude", "script", "--exclude", "spec", "--exclude", "test", "--exclude", "tmp", "--exclude", "vendor"]
20
+ s.rdoc_options = ["--title", "TrustyCms -- Publishing for Small Teams", "--line-numbers", "--main", "README", "--exclude", "app", "--exclude", "bin", "--exclude", "config", "--exclude", "db", "--exclude", "features", "--exclude", "lib", "--exclude", "log", "--exclude", "pkg", "--exclude", "public", "--exclude", "script", "--exclude", "spec", "--exclude", "test", "--exclude", "tmp", "--exclude", "vendor"]
21
21
  s.require_paths = ["lib"]
22
22
  s.rubygems_version = %q{1.3.7}
23
23
  s.summary = %q{A no-fluff content management system designed for small teams.}
24
24
  s.license = %q{MIT}
25
- s.test_files = Dir["spec/**/*"]
26
25
 
27
26
  s.add_dependency "tzinfo", "~> 1.2"
28
27
  s.add_dependency "rails", "~> 4.2"
@@ -36,7 +35,7 @@ a general purpose content managment system--not merely a blogging engine.}
36
35
  s.add_dependency "haml", "~> 4.0"
37
36
  s.add_dependency "haml-rails", "~> 0.5" # 0.5 is rails 4+ only
38
37
  s.add_dependency "highline", "~> 1.6"
39
- s.add_dependency "mysql2", "~> 0.4.2"
38
+ s.add_dependency "mysql", "~> 2.9"
40
39
  s.add_dependency "rack", "~> 1.4"
41
40
  s.add_dependency "rack-cache", "~> 1.2"
42
41
  s.add_dependency "radius", "~> 0.7"
@@ -47,5 +46,4 @@ a general purpose content managment system--not merely a blogging engine.}
47
46
  s.add_dependency 'execjs', '~> 2.2'
48
47
  s.add_dependency 'therubyracer', '~> 0.12'
49
48
  s.add_dependency "ckeditor", "~> 4.1"
50
- s.add_dependency "rake", "< 11.0"
51
49
  end