merb-slices 1.0 → 1.0.1

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.
@@ -1,3 +1,5 @@
1
- Merb::Router.prepare do
2
- default_routes
3
- end
1
+ # This file is here so slice can be testing as a stand alone application.
2
+
3
+ #Merb::Router.prepare do
4
+ # ...
5
+ #end
@@ -7,6 +7,9 @@ require 'spec'
7
7
  Merb::Plugins.config[:merb_slices][:auto_register] = true
8
8
  Merb::Plugins.config[:merb_slices][:search_path] = File.join(File.dirname(__FILE__), '..', 'lib', '<%= base_name %>.rb')
9
9
 
10
+ # Require <%= base_name %>.rb explicitly so any dependencies are loaded
11
+ require Merb::Plugins.config[:merb_slices][:search_path]
12
+
10
13
  # Using Merb.root below makes sure that the correct root is set for
11
14
  # - testing standalone, without being installed as a gem and no host application
12
15
  # - testing from within the host application; its root will be used
@@ -442,6 +442,8 @@ module Merb
442
442
  # Whether to add app-level paths using Merb.push_path; defaults to true.
443
443
  def collect_load_paths(modify_load_path = true, push_merb_path = true)
444
444
  self.collected_slice_paths.clear; self.collected_app_paths.clear
445
+ Merb.push_path(:"#{self.name.snake_case}_file", File.dirname(self.file), File.basename(self.file))
446
+ self.collected_app_paths << self.file
445
447
  self.slice_paths.each do |component, path|
446
448
  if File.directory?(component_path = path.first)
447
449
  $LOAD_PATH.unshift(component_path) if modify_load_path && component.in?(:model, :controller, :lib) && !$LOAD_PATH.include?(component_path)
@@ -22,22 +22,22 @@
22
22
  #
23
23
 
24
24
  Merb::Config.use do |c|
25
-
26
- # Sets up a custom session id key which is used for the session persistence
27
- # cookie name. If not specified, defaults to '_session_id'.
28
- # c[:session_id_key] = '_session_id'
29
25
 
30
26
  # The session_secret_key is only required for the cookie session store.
31
- c[:session_secret_key] = '780af855b5f47a1033726be3fabad8113a3d34a4'
27
+ c[:session_secret_key] = '<%= SHA1.new(rand(100000000000).to_s).to_s %>'
32
28
 
33
29
  # There are various options here, by default Merb comes with 'cookie',
34
30
  # 'memory', 'memcache' or 'container'.
35
31
  # You can of course use your favorite ORM instead:
36
32
  # 'datamapper', 'sequel' or 'activerecord'.
37
33
  c[:session_store] = 'cookie'
34
+ c[:session_id_key] = '_<%= base_name %>_session_id'
38
35
 
39
36
  # When running a slice standalone, you're usually developing it,
40
- # so enable template reloading by default.
37
+ # so enable template/class reloading by default.
41
38
  c[:reload_templates] = true
39
+ c[:exception_details] = true
40
+ c[:reload_classes] = true
41
+ c[:reload_time] = 0.5
42
42
 
43
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-slices
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.0"
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabien Franzen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-08 00:00:00 -05:00
12
+ date: 2008-11-18 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "1.0"
23
+ version: 1.0.1
24
24
  version:
25
25
  description: Merb-Slices is a Merb plugin for using and creating application 'slices' which help you modularize your application.
26
26
  email: info@fabien.be