left_side 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -77,7 +77,7 @@ rails g left_side:stylesheet
77
77
 
78
78
  ## TODO
79
79
 
80
- - use url_helper in yml file
80
+ - add support for url_helper with arguments
81
81
 
82
82
  - add section_hint command to valid the section config
83
83
 
@@ -17,7 +17,13 @@ module LeftSide
17
17
  private
18
18
 
19
19
  def process_url_helper
20
- @@sections.process_each_value{|url| instance.respond_to?(url) ? instance.send(url) : url}
20
+ @@sections.process_each_value do |url|
21
+ if url =~ /(.*_path)[\((.*)\)]?/ && instance.respond_to?($1)
22
+ instance.send($1, $2 ? eval("{" + $2 + "}") : {})
23
+ else
24
+ url
25
+ end
26
+ end
21
27
  end
22
28
 
23
29
  def create_section_method(name)
@@ -1,3 +1,3 @@
1
1
  module LeftSide
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -4,3 +4,4 @@ todo:
4
4
  index: ["/todos", "/todos/new"]
5
5
  tasks:
6
6
  index: tasks_path
7
+ index2: tasks_path(:p => 1)
@@ -3351,3 +3351,4 @@ Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 0.0ms)
3351
3351
 
3352
3352
  Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-02-06 15:46:44 +0800
3353
3353
  Served asset /application.js - 304 Not Modified (0ms)
3354
+ Connecting to database specified by database.yml
@@ -3088,3 +3088,124 @@ Processing by TodosController#index as HTML
3088
3088
  Rendered todos/index.html.erb within layouts/application (0.0ms)
3089
3089
  Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.1ms)
3090
3090
  Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms)
3091
+ Connecting to database specified by database.yml
3092
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3093
+ Processing by TodosController#index as HTML
3094
+ Rendered todos/index.html.erb within layouts/application (0.7ms)
3095
+ Completed 500 Internal Server Error in 11ms
3096
+ Started GET "/tasks" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3097
+ Processing by TasksController#index as HTML
3098
+ Rendered tasks/index.html.erb within layouts/application (0.3ms)
3099
+ Completed 500 Internal Server Error in 5ms
3100
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3101
+ Processing by TodosController#index as HTML
3102
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3103
+ Completed 500 Internal Server Error in 4ms
3104
+ Started GET "/tasks/new" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3105
+ Processing by TasksController#new as HTML
3106
+ Rendered tasks/new.html.erb within layouts/application (0.2ms)
3107
+ Completed 500 Internal Server Error in 4ms
3108
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3109
+ Processing by TodosController#index as HTML
3110
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3111
+ Completed 500 Internal Server Error in 3ms
3112
+ Started GET "/todos/new" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3113
+ Processing by TodosController#new as HTML
3114
+ Rendered todos/new.html.erb within layouts/application (0.3ms)
3115
+ Completed 500 Internal Server Error in 4ms
3116
+ Started GET "/todos?extract=Hi" for 127.0.0.1 at 2013-02-06 16:47:52 +0800
3117
+ Processing by TodosController#index as HTML
3118
+ Parameters: {"extract"=>"Hi"}
3119
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3120
+ Completed 500 Internal Server Error in 4ms
3121
+ Connecting to database specified by database.yml
3122
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3123
+ Processing by TodosController#index as HTML
3124
+ Rendered todos/index.html.erb within layouts/application (0.6ms)
3125
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (3.3ms)
3126
+ Completed 500 Internal Server Error in 15ms
3127
+ Started GET "/tasks" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3128
+ Processing by TasksController#index as HTML
3129
+ Rendered tasks/index.html.erb within layouts/application (0.2ms)
3130
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.6ms)
3131
+ Completed 500 Internal Server Error in 8ms
3132
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3133
+ Processing by TodosController#index as HTML
3134
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3135
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3136
+ Completed 500 Internal Server Error in 6ms
3137
+ Started GET "/tasks/new" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3138
+ Processing by TasksController#new as HTML
3139
+ Rendered tasks/new.html.erb within layouts/application (0.2ms)
3140
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (2.1ms)
3141
+ Completed 500 Internal Server Error in 8ms
3142
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3143
+ Processing by TodosController#index as HTML
3144
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3145
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3146
+ Completed 500 Internal Server Error in 24ms
3147
+ Started GET "/todos/new" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3148
+ Processing by TodosController#new as HTML
3149
+ Rendered todos/new.html.erb within layouts/application (0.2ms)
3150
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.7ms)
3151
+ Completed 500 Internal Server Error in 8ms
3152
+ Started GET "/todos?extract=Hi" for 127.0.0.1 at 2013-02-06 17:00:13 +0800
3153
+ Processing by TodosController#index as HTML
3154
+ Parameters: {"extract"=>"Hi"}
3155
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3156
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3157
+ Completed 500 Internal Server Error in 6ms
3158
+ Connecting to database specified by database.yml
3159
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:00:35 +0800
3160
+ Processing by TodosController#index as HTML
3161
+ Rendered todos/index.html.erb within layouts/application (0.7ms)
3162
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (3.3ms)
3163
+ Completed 500 Internal Server Error in 15ms
3164
+ Connecting to database specified by database.yml
3165
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:01:08 +0800
3166
+ Processing by TodosController#index as HTML
3167
+ Rendered todos/index.html.erb within layouts/application (0.7ms)
3168
+ Completed 500 Internal Server Error in 8ms
3169
+ Connecting to database specified by database.yml
3170
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:02:03 +0800
3171
+ Processing by TodosController#index as HTML
3172
+ Rendered todos/index.html.erb within layouts/application (0.7ms)
3173
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.3ms)
3174
+ Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 0.0ms)
3175
+ Connecting to database specified by database.yml
3176
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3177
+ Processing by TodosController#index as HTML
3178
+ Rendered todos/index.html.erb within layouts/application (0.6ms)
3179
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.2ms)
3180
+ Completed 200 OK in 13ms (Views: 12.5ms | ActiveRecord: 0.0ms)
3181
+ Started GET "/tasks" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3182
+ Processing by TasksController#index as HTML
3183
+ Rendered tasks/index.html.erb within layouts/application (0.2ms)
3184
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3185
+ Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.0ms)
3186
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3187
+ Processing by TodosController#index as HTML
3188
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3189
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3190
+ Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms)
3191
+ Started GET "/tasks/new" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3192
+ Processing by TasksController#new as HTML
3193
+ Rendered tasks/new.html.erb within layouts/application (0.2ms)
3194
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3195
+ Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)
3196
+ Started GET "/todos" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3197
+ Processing by TodosController#index as HTML
3198
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3199
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.3ms)
3200
+ Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)
3201
+ Started GET "/todos/new" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3202
+ Processing by TodosController#new as HTML
3203
+ Rendered todos/new.html.erb within layouts/application (0.2ms)
3204
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.5ms)
3205
+ Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms)
3206
+ Started GET "/todos?extract=Hi" for 127.0.0.1 at 2013-02-06 17:02:06 +0800
3207
+ Processing by TodosController#index as HTML
3208
+ Parameters: {"extract"=>"Hi"}
3209
+ Rendered todos/index.html.erb within layouts/application (0.0ms)
3210
+ Rendered /mnt/soffolk/home/soffolk/work/mine/left_side/lib/left_side/cells/left_side/base.html.erb (1.4ms)
3211
+ Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: left_side
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - soffolk