schedular 0.1.10 → 0.1.11

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.10
1
+ 0.1.11
data/lib/schedular.rb CHANGED
@@ -7,11 +7,11 @@ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
7
7
  require "schedular/time"
8
8
  require "schedular/event"
9
9
  require "schedular/events_controller"
10
+ require "schedular/routes"
10
11
 
11
12
  # Load locale files
12
13
  I18n.load_path += Dir.glob "#{ File.dirname(__FILE__) }/schedular/locale/*.yml"
13
14
 
14
-
15
15
  # Load class openings
16
16
  Dir.glob(Rails.root.join('engines', 'schedular', '**', '*.rb')).each { |f| require f }
17
17
 
@@ -0,0 +1,9 @@
1
+ module Schedular
2
+ module Routes
3
+ def self.draw map
4
+ map.daily_schedule "/events/:year/:month/:day.:format", :controller => 'schedular/events', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/}
5
+ map.monthly_schedule "/events/:year/:month.:format", :controller => 'schedular/events', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/}
6
+ map.resources :events, :controller => 'schedular/events', :name_prefix => 'schedular_'
7
+ end
8
+ end
9
+ end
@@ -1,43 +1,3 @@
1
1
  ActionController::Routing::Routes.draw do |map|
2
- # The priority is based upon order of creation: first created -> highest priority.
3
-
4
- # Sample of regular route:
5
- # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6
- # Keep in mind you can assign values other than :controller and :action
7
-
8
- # Sample of named route:
9
- # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
10
- # This route can be invoked with purchase_url(:id => product.id)
11
-
12
- # Sample resource route (maps HTTP verbs to controller actions automatically):
13
- # map.resources :products
14
-
15
- # Sample resource route with options:
16
- # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
17
-
18
- # Sample resource route with sub-resources:
19
- # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
20
-
21
- # Sample resource route with more complex sub-resources
22
- # map.resources :products do |products|
23
- # products.resources :comments
24
- # products.resources :sales, :collection => { :recent => :get }
25
- # end
26
-
27
- # Sample resource route within a namespace:
28
- # map.namespace :admin do |admin|
29
- # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
30
- # admin.resources :products
31
- # end
32
-
33
- # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
34
- # map.root :controller => "welcome"
35
-
36
- # See how all your routes lay out with "rake routes"
37
-
38
- # Install the default routes as the lowest priority.
39
- # Note: These default routes make all actions in every controller accessible via GET requests. You should
40
- # consider removing or commenting them out if you're using named routes and resources.
41
- map.connect ':controller/:action/:id'
42
- map.connect ':controller/:action/:id.:format'
2
+ Schedular::Routes.draw map
43
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schedular
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 10
10
- version: 0.1.10
9
+ - 11
10
+ version: 0.1.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Macario Ortega
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-01 00:00:00 -05:00
18
+ date: 2010-10-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -102,7 +102,6 @@ files:
102
102
  - app/views/schedular/events/index.html.erb
103
103
  - app/views/schedular/events/new.html.erb
104
104
  - app/views/schedular/events/show.html.erb
105
- - config/routes.rb
106
105
  - generators/schedular_migrations/schedular_migrations_generator.rb
107
106
  - generators/schedular_migrations/templates/schedular_migrations.rb
108
107
  - generators/schedular_views/schedular_views_generator.rb
@@ -110,6 +109,7 @@ files:
110
109
  - lib/schedular/event.rb
111
110
  - lib/schedular/events_controller.rb
112
111
  - lib/schedular/locale/schedular.es.yml
112
+ - lib/schedular/routes.rb
113
113
  - lib/schedular/time.rb
114
114
  - rails/init.rb
115
115
  - test/helper.rb
data/config/routes.rb DELETED
@@ -1,5 +0,0 @@
1
- ActionController::Routing::Routes.draw do |map|
2
- map.daily_schedule "/events/:year/:month/:day.:format", :controller => 'schedular/events', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/}
3
- map.monthly_schedule "/events/:year/:month.:format", :controller => 'schedular/events', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/}
4
- map.resources :events, :controller => 'schedular/events', :name_prefix => 'schedular_'
5
- end