crumbs 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 081d368a0f3413cccc92fedb8eeec622b626ee1a
4
- data.tar.gz: b8f970e0e85570aab1f4cb493c050b0126625bd0
3
+ metadata.gz: 3c715baffe0b9150974ecaf21136eaafa4658fce
4
+ data.tar.gz: 3ffe476295357d0fc7340023bc8ad2de8090a538
5
5
  SHA512:
6
- metadata.gz: 3f195ea732621d1be2cb8761d978baa3b1227c3581d0ecf7e63a523e28c080750743538882055827355c1f9472d277f070ed3b8274c7b2493d0312281266acbd
7
- data.tar.gz: 3d91bb86d4a4a38f9d88ea4261c0dc65eecfd64780a741dd9091fb3b607adee49b9ac1b591a046a57c87e46f8d2bda2302dae812f9da549bb93433688677eb8d
6
+ metadata.gz: f57b8383972f6e81684f64ce2b52cc20484614f5b42395b3a8aae56bd4904f2e45d8f7d5367962f4ab49f92b62e247e7d0e98c7a7f204b2f246c6ae83951e551
7
+ data.tar.gz: 2b50d86d388bd2a28efc7a3d58a3638208ead254458c80208ea68b7de03eb70382cf47ae5bdde7545b591f531e341249c1ee8ffa8b8fb84cbc6ab52909d85630
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 Museways
1
+ Copyright 2015 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Gem Version](https://badge.fury.io/rb/crumbs.svg)](http://badge.fury.io/rb/crumbs) [![Code Climate](https://codeclimate.com/github/museways/crumbs/badges/gpa.svg)](https://codeclimate.com/github/museways/crumbs) [![Build Status](https://travis-ci.org/museways/crumbs.svg?branch=master)](https://travis-ci.org/museways/crumbs)
1
+ [![Gem Version](https://badge.fury.io/rb/crumbs.svg)](http://badge.fury.io/rb/crumbs) [![Code Climate](https://codeclimate.com/github/museways/crumbs/badges/gpa.svg)](https://codeclimate.com/github/museways/crumbs) [![Build Status](https://travis-ci.org/museways/crumbs.svg?branch=master)](https://travis-ci.org/museways/crumbs) [![Dependency Status](https://gemnasium.com/museways/crumbs.svg)](https://gemnasium.com/museways/crumbs)
2
2
 
3
3
  # Crumbs
4
4
 
@@ -4,12 +4,12 @@ module Crumbs
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- before_filter :define_crumbs
7
+ before_filter :set_crumbs
8
8
  end
9
9
 
10
10
  protected
11
11
 
12
- def define_crumbs
12
+ def set_crumbs
13
13
  paths = [request.path]
14
14
  paths.unshift File.dirname(paths.first) until paths.first == '/'
15
15
  referer = { base_url: request.base_url, path: request.path, fullpath: request.fullpath }
@@ -37,7 +37,9 @@ module Crumbs
37
37
 
38
38
  def find_referer_index(paths)
39
39
  paths = [paths] unless paths.is_a? Array
40
- session[:referers].rindex { |referer| paths.include? referer[:path] }
40
+ session[:referers].rindex do |referer|
41
+ paths.include? referer[:path]
42
+ end
41
43
  end
42
44
 
43
45
  module ClassMethods
@@ -17,7 +17,11 @@ module Crumbs
17
17
  def find(controller, action, params)
18
18
  if all.has_key? controller and all[controller].has_key? action
19
19
  name = all[controller][action]
20
- name.is_a?(Proc) ? name.call(params) : name
20
+ if name.is_a? Proc
21
+ name.call params
22
+ else
23
+ name
24
+ end
21
25
  end
22
26
  end
23
27
 
@@ -1,5 +1,5 @@
1
1
  module Crumbs
2
2
 
3
- VERSION = '1.2.0'
3
+ VERSION = '1.2.1'
4
4
 
5
5
  end
@@ -20,7 +20,11 @@ Dummy::Application.configure do
20
20
  # config.action_dispatch.rack_cache = true
21
21
 
22
22
  # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
23
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
24
+ config.serve_static_files = false
25
+ else
26
+ config.serve_static_assets = false
27
+ end
24
28
 
25
29
  # Compress JavaScripts and CSS.
26
30
  config.assets.js_compressor = :uglifier
@@ -13,7 +13,11 @@ Dummy::Application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
16
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
17
+ config.serve_static_files = false
18
+ else
19
+ config.serve_static_assets = false
20
+ end
17
21
  config.static_cache_control = "public, max-age=3600"
18
22
 
19
23
  # Show full error reports and disable caching.
@@ -33,4 +37,8 @@ Dummy::Application.configure do
33
37
 
34
38
  # Print deprecation notices to the stderr.
35
39
  config.active_support.deprecation = :stderr
40
+
41
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
42
+ config.active_support.test_order = :random
43
+ end
36
44
  end
@@ -5,3 +5,86 @@
5
5
   (3.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
6
   (0.2ms) SELECT version FROM "schema_migrations"
7
7
   (3.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
8
+
9
+
10
+ Started GET "/" for 127.0.0.1 at 2015-02-15 23:41:04 -0200
11
+
12
+ AbstractController::Helpers::MissingHelperError (Missing helper file helpers//users/matt/documents/herramientas/rails/crumbs/test/dummy/app/helpers/application_helper.rb_helper.rb):
13
+ app/controllers/application_controller.rb:1:in `<top (required)>'
14
+ app/controllers/pages_controller.rb:1:in `<top (required)>'
15
+
16
+
17
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (5.7ms)
18
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.5ms)
19
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (8.6ms)
20
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (83.2ms)
21
+
22
+
23
+ Started GET "/apple-touch-icon-precomposed.png" for 127.0.0.1 at 2015-02-15 23:41:04 -0200
24
+
25
+ ActionController::RoutingError (No route matches [GET] "/apple-touch-icon-precomposed.png"):
26
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
27
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
28
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
29
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
30
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
31
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
32
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
33
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
34
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
35
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
36
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
37
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
38
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
39
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
40
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
41
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
42
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
43
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
44
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
45
+ rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
46
+ /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
47
+ /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
48
+ /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
49
+
50
+
51
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.4ms)
52
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.2ms)
53
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (9.0ms)
54
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms)
55
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (88.3ms)
56
+
57
+
58
+ Started GET "/apple-touch-icon.png" for 127.0.0.1 at 2015-02-15 23:41:04 -0200
59
+
60
+ ActionController::RoutingError (No route matches [GET] "/apple-touch-icon.png"):
61
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
62
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
63
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
64
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
65
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
66
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
67
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
68
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
69
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
70
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
71
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
72
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
73
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
74
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
75
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
76
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
77
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
78
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
79
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
80
+ rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
81
+ /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
82
+ /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
83
+ /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
84
+
85
+
86
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.5ms)
87
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (2.4ms)
88
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms)
89
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms)
90
+ Rendered /Users/Matt/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (92.1ms)