breadcrumbs 0.1.6 → 0.1.7

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 (63) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +39 -44
  4. data/breadcrumbs.gemspec +2 -1
  5. data/examples/myapp/.gitignore +12 -0
  6. data/examples/myapp/Gemfile +12 -0
  7. data/examples/myapp/Gemfile.lock +124 -0
  8. data/examples/myapp/README.rdoc +28 -0
  9. data/examples/myapp/Rakefile +6 -0
  10. data/examples/myapp/app/assets/images/.keep +0 -0
  11. data/examples/myapp/app/assets/stylesheets/application.css +49 -0
  12. data/examples/myapp/app/controllers/application_controller.rb +13 -0
  13. data/examples/myapp/app/controllers/concerns/.keep +0 -0
  14. data/examples/myapp/app/controllers/site_controller.rb +9 -0
  15. data/examples/myapp/app/helpers/application_helper.rb +2 -0
  16. data/examples/myapp/app/mailers/.keep +0 -0
  17. data/examples/myapp/app/models/.keep +0 -0
  18. data/examples/myapp/app/models/concerns/.keep +0 -0
  19. data/examples/myapp/app/views/layouts/application.html.erb +15 -0
  20. data/examples/myapp/app/views/site/contact.html.erb +1 -0
  21. data/examples/myapp/app/views/site/home.html.erb +1 -0
  22. data/examples/myapp/bin/bundle +3 -0
  23. data/examples/myapp/bin/rails +4 -0
  24. data/examples/myapp/bin/rake +4 -0
  25. data/examples/myapp/bin/setup +29 -0
  26. data/examples/myapp/config.ru +4 -0
  27. data/examples/myapp/config/application.rb +30 -0
  28. data/examples/myapp/config/boot.rb +3 -0
  29. data/examples/myapp/config/environment.rb +5 -0
  30. data/examples/myapp/config/environments/development.rb +38 -0
  31. data/examples/myapp/config/environments/production.rb +73 -0
  32. data/examples/myapp/config/environments/test.rb +39 -0
  33. data/examples/myapp/config/initializers/assets.rb +11 -0
  34. data/examples/myapp/config/initializers/backtrace_silencers.rb +7 -0
  35. data/examples/myapp/config/initializers/cookies_serializer.rb +3 -0
  36. data/examples/myapp/config/initializers/filter_parameter_logging.rb +4 -0
  37. data/examples/myapp/config/initializers/inflections.rb +16 -0
  38. data/examples/myapp/config/initializers/mime_types.rb +4 -0
  39. data/examples/myapp/config/initializers/session_store.rb +3 -0
  40. data/examples/myapp/config/initializers/wrap_parameters.rb +9 -0
  41. data/examples/myapp/config/locales/en.yml +28 -0
  42. data/examples/myapp/config/routes.rb +5 -0
  43. data/examples/myapp/config/secrets.yml +22 -0
  44. data/examples/myapp/db/seeds.rb +7 -0
  45. data/examples/myapp/lib/assets/.keep +0 -0
  46. data/examples/myapp/lib/tasks/.keep +0 -0
  47. data/examples/myapp/log/.keep +0 -0
  48. data/examples/myapp/public/404.html +67 -0
  49. data/examples/myapp/public/422.html +67 -0
  50. data/examples/myapp/public/500.html +66 -0
  51. data/examples/myapp/public/favicon.ico +0 -0
  52. data/examples/myapp/public/robots.txt +5 -0
  53. data/examples/myapp/vendor/assets/stylesheets/.keep +0 -0
  54. data/lib/breadcrumbs.rb +14 -14
  55. data/lib/breadcrumbs/render.rb +4 -4
  56. data/lib/breadcrumbs/render/base.rb +2 -2
  57. data/lib/breadcrumbs/render/inline.rb +5 -2
  58. data/lib/breadcrumbs/render/list.rb +3 -5
  59. data/lib/breadcrumbs/version.rb +1 -1
  60. data/test/breadcrumbs_test.rb +20 -20
  61. data/test/{resources/pt.yml → support/pt-BR.yml} +2 -2
  62. data/test/test_helper.rb +4 -3
  63. metadata +145 -76
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8bdbdf372fa1a15d2268090d73f6fe86895d6040
4
+ data.tar.gz: 5e8930edb2dd75fcfa6b2cb4a97b58f7d23b26ab
5
+ SHA512:
6
+ metadata.gz: 048a538d414631e8a81af252f2dbabfd918de128d9ea0c110543a44d65357483e71efc43a75915c0d89c9c3a517e5729d7d80cf7075b7beb69e17b4c293f14a6
7
+ data.tar.gz: 8079caa6ef44eed3924bfa3db4791e7e2f1f6db33f2e30e210ef3eb1ae9a81cb2ff48213b2bd7017b31b136b3979d5345155141de132e10bfcaf2c84e0144b8e
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
  gemspec
@@ -1,54 +1,48 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- breadcrumbs (0.1.6)
4
+ breadcrumbs (0.1.7)
5
5
  i18n
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
- abstract (1.0.0)
11
- actionpack (3.0.5)
12
- activemodel (= 3.0.5)
13
- activesupport (= 3.0.5)
14
- builder (~> 2.1.2)
15
- erubis (~> 2.6.6)
16
- i18n (~> 0.4)
17
- rack (~> 1.2.1)
18
- rack-mount (~> 0.6.13)
19
- rack-test (~> 0.5.7)
20
- tzinfo (~> 0.3.23)
21
- activemodel (3.0.5)
22
- activesupport (= 3.0.5)
23
- builder (~> 2.1.2)
24
- i18n (~> 0.4)
25
- activesupport (3.0.5)
26
- archive-tar-minitar (0.5.2)
27
- builder (2.1.2)
28
- columnize (0.3.2)
29
- erubis (2.6.6)
30
- abstract (>= 1.0.0)
31
- i18n (0.5.0)
32
- linecache19 (0.5.11)
33
- ruby_core_source (>= 0.1.4)
34
- mocha (0.9.12)
35
- nokogiri (1.4.4)
36
- rack (1.2.1)
37
- rack-mount (0.6.13)
38
- rack (>= 1.0.0)
39
- rack-test (0.5.7)
10
+ actionpack (4.1.6)
11
+ actionview (= 4.1.6)
12
+ activesupport (= 4.1.6)
13
+ rack (~> 1.5.2)
14
+ rack-test (~> 0.6.2)
15
+ actionview (4.1.6)
16
+ activesupport (= 4.1.6)
17
+ builder (~> 3.1)
18
+ erubis (~> 2.7.0)
19
+ activesupport (4.1.6)
20
+ i18n (~> 0.6, >= 0.6.9)
21
+ json (~> 1.7, >= 1.7.7)
22
+ minitest (~> 5.1)
23
+ thread_safe (~> 0.1)
24
+ tzinfo (~> 1.1)
25
+ builder (3.2.2)
26
+ erubis (2.7.0)
27
+ i18n (0.6.11)
28
+ json (1.8.1)
29
+ metaclass (0.0.4)
30
+ mini_portile (0.6.0)
31
+ minitest (5.4.2)
32
+ mocha (1.1.0)
33
+ metaclass (~> 0.0.1)
34
+ nokogiri (1.6.3.1)
35
+ mini_portile (= 0.6.0)
36
+ power_assert (0.1.4)
37
+ rack (1.5.2)
38
+ rack-test (0.6.2)
40
39
  rack (>= 1.0)
41
- ruby-debug-base19 (0.11.24)
42
- columnize (>= 0.3.1)
43
- linecache19 (>= 0.5.11)
44
- ruby_core_source (>= 0.1.4)
45
- ruby-debug19 (0.11.6)
46
- columnize (>= 0.3.1)
47
- linecache19 (>= 0.5.11)
48
- ruby-debug-base19 (>= 0.11.19)
49
- ruby_core_source (0.1.4)
50
- archive-tar-minitar (>= 0.5.2)
51
- tzinfo (0.3.24)
40
+ rake (10.3.2)
41
+ test-unit (3.0.1)
42
+ power_assert
43
+ thread_safe (0.3.4)
44
+ tzinfo (1.2.2)
45
+ thread_safe (~> 0.1)
52
46
 
53
47
  PLATFORMS
54
48
  ruby
@@ -58,4 +52,5 @@ DEPENDENCIES
58
52
  breadcrumbs!
59
53
  mocha
60
54
  nokogiri
61
- ruby-debug19
55
+ rake
56
+ test-unit
@@ -22,5 +22,6 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "nokogiri"
23
23
  s.add_development_dependency "actionpack"
24
24
  s.add_development_dependency "mocha"
25
- s.add_development_dependency "ruby-debug19" if RUBY_VERSION >= "1.9"
25
+ s.add_development_dependency "rake"
26
+ s.add_development_dependency "test-unit"
26
27
  end
@@ -0,0 +1,12 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore all logfiles and tempfiles.
11
+ /log/*.log
12
+ /tmp
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '4.2.0.beta1'
4
+ gem 'sass-rails', '~> 5.0.0.beta1'
5
+ gem 'uglifier', '>= 1.3.0'
6
+ gem 'rails-html-sanitizer', '~> 1.0'
7
+ gem 'breadcrumbs', path: '../..'
8
+
9
+ group :development, :test do
10
+ gem 'spring'
11
+ end
12
+
@@ -0,0 +1,124 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ breadcrumbs (0.1.6)
5
+ i18n
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionmailer (4.2.0.beta1)
11
+ actionpack (= 4.2.0.beta1)
12
+ actionview (= 4.2.0.beta1)
13
+ mail (~> 2.5, >= 2.5.4)
14
+ rails-dom-testing (~> 1.0, >= 1.0.2)
15
+ actionpack (4.2.0.beta1)
16
+ actionview (= 4.2.0.beta1)
17
+ activesupport (= 4.2.0.beta1)
18
+ rack (~> 1.6.0.beta)
19
+ rack-test (~> 0.6.2)
20
+ rails-deprecated_sanitizer (~> 1.0, >= 1.0.2)
21
+ rails-dom-testing (~> 1.0, >= 1.0.2)
22
+ actionview (4.2.0.beta1)
23
+ activesupport (= 4.2.0.beta1)
24
+ builder (~> 3.1)
25
+ erubis (~> 2.7.0)
26
+ rails-deprecated_sanitizer (~> 1.0, >= 1.0.2)
27
+ rails-dom-testing (~> 1.0, >= 1.0.2)
28
+ activejob (4.2.0.beta1)
29
+ globalid (>= 0.2.3)
30
+ activemodel (4.2.0.beta1)
31
+ activesupport (= 4.2.0.beta1)
32
+ builder (~> 3.1)
33
+ activerecord (4.2.0.beta1)
34
+ activemodel (= 4.2.0.beta1)
35
+ activesupport (= 4.2.0.beta1)
36
+ arel (>= 6.0.0.beta1, < 6.1)
37
+ activesupport (4.2.0.beta1)
38
+ i18n (>= 0.7.0.beta1, < 0.8)
39
+ json (~> 1.7, >= 1.7.7)
40
+ minitest (~> 5.1)
41
+ thread_safe (~> 0.1)
42
+ tzinfo (~> 1.1)
43
+ arel (6.0.0.beta1)
44
+ builder (3.2.2)
45
+ erubis (2.7.0)
46
+ execjs (2.2.1)
47
+ globalid (0.3.0)
48
+ activesupport (>= 4.1.0)
49
+ hike (1.2.3)
50
+ i18n (0.7.0.beta1)
51
+ json (1.8.1)
52
+ loofah (2.0.1)
53
+ nokogiri (>= 1.5.9)
54
+ mail (2.6.1)
55
+ mime-types (>= 1.16, < 3)
56
+ mime-types (2.3)
57
+ mini_portile (0.6.0)
58
+ minitest (5.4.2)
59
+ multi_json (1.10.1)
60
+ nokogiri (1.6.3.1)
61
+ mini_portile (= 0.6.0)
62
+ rack (1.6.0.beta)
63
+ rack-test (0.6.2)
64
+ rack (>= 1.0)
65
+ rails (4.2.0.beta1)
66
+ actionmailer (= 4.2.0.beta1)
67
+ actionpack (= 4.2.0.beta1)
68
+ actionview (= 4.2.0.beta1)
69
+ activejob (= 4.2.0.beta1)
70
+ activemodel (= 4.2.0.beta1)
71
+ activerecord (= 4.2.0.beta1)
72
+ activesupport (= 4.2.0.beta1)
73
+ bundler (>= 1.3.0, < 2.0)
74
+ railties (= 4.2.0.beta1)
75
+ sprockets-rails (~> 3.0.0.beta1)
76
+ rails-deprecated_sanitizer (1.0.3)
77
+ activesupport (>= 4.2.0.alpha)
78
+ rails-dom-testing (1.0.3)
79
+ activesupport
80
+ nokogiri (~> 1.6.0)
81
+ rails-deprecated_sanitizer (>= 1.0.1)
82
+ rails-html-sanitizer (1.0.1)
83
+ loofah (~> 2.0)
84
+ railties (4.2.0.beta1)
85
+ actionpack (= 4.2.0.beta1)
86
+ activesupport (= 4.2.0.beta1)
87
+ rake (>= 0.8.7)
88
+ thor (>= 0.18.1, < 2.0)
89
+ rake (10.3.2)
90
+ sass (3.4.5)
91
+ sass-rails (5.0.0.beta1)
92
+ railties (>= 4.0.0, < 5.0)
93
+ sass (~> 3.2)
94
+ sprockets (~> 2.12)
95
+ sprockets-rails (>= 2.0, < 4.0)
96
+ spring (1.1.3)
97
+ sprockets (2.12.2)
98
+ hike (~> 1.2)
99
+ multi_json (~> 1.0)
100
+ rack (~> 1.0)
101
+ tilt (~> 1.1, != 1.3.0)
102
+ sprockets-rails (3.0.0.beta1)
103
+ actionpack (>= 4.0)
104
+ activesupport (>= 4.0)
105
+ sprockets (~> 2.8)
106
+ thor (0.19.1)
107
+ thread_safe (0.3.4)
108
+ tilt (1.4.1)
109
+ tzinfo (1.2.2)
110
+ thread_safe (~> 0.1)
111
+ uglifier (2.5.3)
112
+ execjs (>= 0.3.0)
113
+ json (>= 1.8.0)
114
+
115
+ PLATFORMS
116
+ ruby
117
+
118
+ DEPENDENCIES
119
+ breadcrumbs!
120
+ rails (= 4.2.0.beta1)
121
+ rails-html-sanitizer (~> 1.0)
122
+ sass-rails (~> 5.0.0.beta1)
123
+ spring
124
+ uglifier (>= 1.3.0)
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
File without changes
@@ -0,0 +1,49 @@
1
+ /*
2
+ *= require_tree .
3
+ *= require_self
4
+ */
5
+
6
+ .breadcrumbs {
7
+ font-family: sans-serif;
8
+ font-size: 14px;
9
+ background: #f5f5f5;
10
+ list-style: none;
11
+ margin: 0;
12
+ padding: 10px;
13
+ overflow: hidden;
14
+ color: #777;
15
+ border-radius: 5px;
16
+ }
17
+
18
+ .breadcrumbs li {
19
+ float: left;
20
+ }
21
+
22
+ .breadcrumbs li + li:before {
23
+ content: '/';
24
+ color: #ccc;
25
+ margin: 0 10px;
26
+ }
27
+
28
+ .breadcrumbs a {
29
+ color: #428bca;
30
+ text-decoration: none;
31
+ }
32
+
33
+ .breadcrumbs a:hover {
34
+ text-decoration: underline;
35
+ }
36
+
37
+ .breadcrumbs .first {
38
+ position: relative;
39
+ padding-left: 18px;
40
+ }
41
+
42
+ .breadcrumbs .first:before {
43
+ content: '\2302';
44
+ font-size: 20px;
45
+ position: absolute;
46
+ left: 0;
47
+ top: -2px;
48
+ color: #ccc;
49
+ }
@@ -0,0 +1,13 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+
6
+ before_action :set_root_breadcrumb
7
+
8
+ private
9
+
10
+ def set_root_breadcrumb
11
+ breadcrumbs.add :home, root_path
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ class SiteController < ApplicationController
2
+ def home
3
+ end
4
+
5
+ def contact
6
+ breadcrumbs.add :pages
7
+ breadcrumbs.add :contact, contact_path
8
+ end
9
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Myapp</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all' %>
6
+ <%= csrf_meta_tags %>
7
+ </head>
8
+ <body>
9
+
10
+ <%= breadcrumbs.render(format: 'list') %>
11
+
12
+ <%= yield %>
13
+
14
+ </body>
15
+ </html>
@@ -0,0 +1 @@
1
+ <h1>Contact</h1>
@@ -0,0 +1 @@
1
+ <h1>Home page</h1>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end