loaf 0.6.2 → 0.10.0

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 (87) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +67 -12
  3. data/LICENSE.txt +1 -1
  4. data/README.md +82 -39
  5. data/lib/loaf.rb +1 -0
  6. data/lib/loaf/configuration.rb +0 -12
  7. data/lib/loaf/controller_extensions.rb +9 -1
  8. data/lib/loaf/errors.rb +1 -1
  9. data/lib/loaf/translation.rb +12 -4
  10. data/lib/loaf/version.rb +3 -1
  11. data/lib/loaf/view_extensions.rb +16 -8
  12. metadata +19 -161
  13. data/.document +0 -5
  14. data/.gitignore +0 -23
  15. data/.rspec +0 -2
  16. data/.travis.yml +0 -48
  17. data/Appraisals +0 -36
  18. data/Gemfile +0 -19
  19. data/Gemfile.lock +0 -185
  20. data/Rakefile +0 -10
  21. data/assets/loaf_logo.png +0 -0
  22. data/bin/appraisal +0 -16
  23. data/bin/rake +0 -16
  24. data/bin/setup +0 -7
  25. data/gemfiles/rails3.2.gemfile +0 -24
  26. data/gemfiles/rails4.0.gemfile +0 -24
  27. data/gemfiles/rails4.1.gemfile +0 -23
  28. data/gemfiles/rails4.2.gemfile +0 -23
  29. data/gemfiles/rails5.0.gemfile +0 -22
  30. data/gemfiles/rails5.1.gemfile +0 -22
  31. data/lib/loaf/crumb_formatter.rb +0 -24
  32. data/loaf.gemspec +0 -28
  33. data/spec/integration/breadcrumb_trail_spec.rb +0 -60
  34. data/spec/integration/configuration_spec.rb +0 -12
  35. data/spec/rails_app/Rakefile +0 -8
  36. data/spec/rails_app/app/controllers/application_controller.rb +0 -5
  37. data/spec/rails_app/app/controllers/comments_controller.rb +0 -17
  38. data/spec/rails_app/app/controllers/home_controller.rb +0 -4
  39. data/spec/rails_app/app/controllers/posts_controller.rb +0 -20
  40. data/spec/rails_app/app/views/comments/index.html.erb +0 -1
  41. data/spec/rails_app/app/views/home/index.html.erb +0 -1
  42. data/spec/rails_app/app/views/layouts/_breadcrumbs.html.erb +0 -12
  43. data/spec/rails_app/app/views/layouts/application.html.erb +0 -14
  44. data/spec/rails_app/app/views/posts/index.html.erb +0 -1
  45. data/spec/rails_app/app/views/posts/new.html.erb +0 -4
  46. data/spec/rails_app/app/views/posts/show.html.erb +0 -1
  47. data/spec/rails_app/config.ru +0 -4
  48. data/spec/rails_app/config/application.rb +0 -48
  49. data/spec/rails_app/config/boot.rb +0 -10
  50. data/spec/rails_app/config/database.yml +0 -25
  51. data/spec/rails_app/config/environment.rb +0 -5
  52. data/spec/rails_app/config/environments/development.rb +0 -32
  53. data/spec/rails_app/config/environments/production.rb +0 -62
  54. data/spec/rails_app/config/environments/test.rb +0 -41
  55. data/spec/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  56. data/spec/rails_app/config/initializers/inflections.rb +0 -10
  57. data/spec/rails_app/config/initializers/mime_types.rb +0 -5
  58. data/spec/rails_app/config/initializers/secret_token.rb +0 -7
  59. data/spec/rails_app/config/initializers/session_store.rb +0 -8
  60. data/spec/rails_app/config/initializers/wrap_parameters.rb +0 -14
  61. data/spec/rails_app/config/locales/en.yml +0 -5
  62. data/spec/rails_app/config/locales/loaf.en.yml +0 -6
  63. data/spec/rails_app/config/routes.rb +0 -7
  64. data/spec/rails_app/config/secrets.yml +0 -22
  65. data/spec/rails_app/public/404.html +0 -26
  66. data/spec/rails_app/public/422.html +0 -26
  67. data/spec/rails_app/public/500.html +0 -26
  68. data/spec/rails_app/public/favicon.ico +0 -0
  69. data/spec/rails_app/public/robots.txt +0 -5
  70. data/spec/spec_helper.rb +0 -52
  71. data/spec/support/capybara.rb +0 -8
  72. data/spec/support/dummy_controller.rb +0 -9
  73. data/spec/support/dummy_view.rb +0 -47
  74. data/spec/support/load_routes.rb +0 -4
  75. data/spec/unit/configuration_spec.rb +0 -39
  76. data/spec/unit/controller_extensions_spec.rb +0 -54
  77. data/spec/unit/crumb_formatter_spec.rb +0 -36
  78. data/spec/unit/crumb_spec.rb +0 -15
  79. data/spec/unit/generators/install_generator_spec.rb +0 -17
  80. data/spec/unit/options_validator_spec.rb +0 -15
  81. data/spec/unit/translation_spec.rb +0 -22
  82. data/spec/unit/view_extensions/breadcrumb_spec.rb +0 -22
  83. data/spec/unit/view_extensions/breadcrumb_trail_spec.rb +0 -232
  84. data/spec/unit/view_extensions/has_breadcrumbs_spec.rb +0 -10
  85. data/tasks/console.rake +0 -10
  86. data/tasks/coverage.rake +0 -11
  87. data/tasks/spec.rake +0 -29
data/Gemfile DELETED
@@ -1,19 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'ammeter', '~> 1.1.4'
6
- gem 'appraisal', '~> 2.2.0'
7
- gem 'yard', '~> 0.9.12'
8
- gem 'capybara', '~> 2.16.1'
9
- gem 'rspec-rails', '~> 3.7.2'
10
- gem 'nokogiri', '~> 1.8.1'
11
- gem 'public_suffix', '~> 2.0.5'
12
- gem 'sqlite3' , '~> 1.3.13', platforms: :ruby
13
- gem 'activerecord-jdbcsqlite3-adapter', '~> 1.3.23', platforms: :jruby
14
-
15
- group :metrics do
16
- gem 'coveralls', '0.8.17'
17
- gem 'simplecov', '~> 0.12.0'
18
- gem 'yardstick', '~> 0.9.9'
19
- end
@@ -1,185 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- loaf (0.6.2)
5
- rails (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionmailer (4.2.9)
11
- actionpack (= 4.2.9)
12
- actionview (= 4.2.9)
13
- activejob (= 4.2.9)
14
- mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.9)
17
- actionview (= 4.2.9)
18
- activesupport (= 4.2.9)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.9)
24
- activesupport (= 4.2.9)
25
- builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
29
- activejob (4.2.9)
30
- activesupport (= 4.2.9)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.9)
33
- activesupport (= 4.2.9)
34
- builder (~> 3.1)
35
- activerecord (4.2.9)
36
- activemodel (= 4.2.9)
37
- activesupport (= 4.2.9)
38
- arel (~> 6.0)
39
- activesupport (4.2.9)
40
- i18n (~> 0.7)
41
- minitest (~> 5.1)
42
- thread_safe (~> 0.3, >= 0.3.4)
43
- tzinfo (~> 1.1)
44
- addressable (2.5.2)
45
- public_suffix (>= 2.0.2, < 4.0)
46
- ammeter (1.1.4)
47
- activesupport (>= 3.0)
48
- railties (>= 3.0)
49
- rspec-rails (>= 2.2)
50
- appraisal (2.2.0)
51
- bundler
52
- rake
53
- thor (>= 0.14.0)
54
- arel (6.0.4)
55
- builder (3.2.3)
56
- capybara (2.16.1)
57
- addressable
58
- mini_mime (>= 0.1.3)
59
- nokogiri (>= 1.3.3)
60
- rack (>= 1.0.0)
61
- rack-test (>= 0.5.4)
62
- xpath (~> 2.0)
63
- concurrent-ruby (1.0.5)
64
- coveralls (0.8.17)
65
- json (>= 1.8, < 3)
66
- simplecov (~> 0.12.0)
67
- term-ansicolor (~> 1.3)
68
- thor (~> 0.19.1)
69
- tins (~> 1.6)
70
- crass (1.0.3)
71
- diff-lcs (1.3)
72
- docile (1.1.5)
73
- erubis (2.7.0)
74
- globalid (0.4.0)
75
- activesupport (>= 4.2.0)
76
- i18n (0.9.1)
77
- concurrent-ruby (~> 1.0)
78
- json (2.1.0)
79
- loofah (2.1.1)
80
- crass (~> 1.0.2)
81
- nokogiri (>= 1.5.9)
82
- mail (2.6.6)
83
- mime-types (>= 1.16, < 4)
84
- mime-types (3.1)
85
- mime-types-data (~> 3.2015)
86
- mime-types-data (3.2016.0521)
87
- mini_mime (1.0.0)
88
- mini_portile2 (2.3.0)
89
- minitest (5.10.3)
90
- nokogiri (1.8.1)
91
- mini_portile2 (~> 2.3.0)
92
- public_suffix (2.0.5)
93
- rack (1.6.8)
94
- rack-test (0.6.3)
95
- rack (>= 1.0)
96
- rails (4.2.9)
97
- actionmailer (= 4.2.9)
98
- actionpack (= 4.2.9)
99
- actionview (= 4.2.9)
100
- activejob (= 4.2.9)
101
- activemodel (= 4.2.9)
102
- activerecord (= 4.2.9)
103
- activesupport (= 4.2.9)
104
- bundler (>= 1.3.0, < 2.0)
105
- railties (= 4.2.9)
106
- sprockets-rails
107
- rails-deprecated_sanitizer (1.0.3)
108
- activesupport (>= 4.2.0.alpha)
109
- rails-dom-testing (1.0.9)
110
- activesupport (>= 4.2.0, < 5.0)
111
- nokogiri (~> 1.6)
112
- rails-deprecated_sanitizer (>= 1.0.1)
113
- rails-html-sanitizer (1.0.3)
114
- loofah (~> 2.0)
115
- railties (4.2.9)
116
- actionpack (= 4.2.9)
117
- activesupport (= 4.2.9)
118
- rake (>= 0.8.7)
119
- thor (>= 0.18.1, < 2.0)
120
- rake (12.3.0)
121
- rspec-core (3.7.0)
122
- rspec-support (~> 3.7.0)
123
- rspec-expectations (3.7.0)
124
- diff-lcs (>= 1.2.0, < 2.0)
125
- rspec-support (~> 3.7.0)
126
- rspec-mocks (3.7.0)
127
- diff-lcs (>= 1.2.0, < 2.0)
128
- rspec-support (~> 3.7.0)
129
- rspec-rails (3.7.2)
130
- actionpack (>= 3.0)
131
- activesupport (>= 3.0)
132
- railties (>= 3.0)
133
- rspec-core (~> 3.7.0)
134
- rspec-expectations (~> 3.7.0)
135
- rspec-mocks (~> 3.7.0)
136
- rspec-support (~> 3.7.0)
137
- rspec-support (3.7.0)
138
- simplecov (0.12.0)
139
- docile (~> 1.1.0)
140
- json (>= 1.8, < 3)
141
- simplecov-html (~> 0.10.0)
142
- simplecov-html (0.10.2)
143
- sprockets (3.7.1)
144
- concurrent-ruby (~> 1.0)
145
- rack (> 1, < 3)
146
- sprockets-rails (3.2.1)
147
- actionpack (>= 4.0)
148
- activesupport (>= 4.0)
149
- sprockets (>= 3.0.0)
150
- sqlite3 (1.3.13)
151
- term-ansicolor (1.6.0)
152
- tins (~> 1.0)
153
- thor (0.19.4)
154
- thread_safe (0.3.6)
155
- tins (1.15.0)
156
- tzinfo (1.2.4)
157
- thread_safe (~> 0.1)
158
- xpath (2.1.0)
159
- nokogiri (~> 1.3)
160
- yard (0.9.12)
161
- yardstick (0.9.9)
162
- yard (~> 0.8, >= 0.8.7.2)
163
-
164
- PLATFORMS
165
- ruby
166
-
167
- DEPENDENCIES
168
- activerecord-jdbcsqlite3-adapter (~> 1.3.23)
169
- ammeter (~> 1.1.4)
170
- appraisal (~> 2.2.0)
171
- bundler (~> 1.5)
172
- capybara (~> 2.16.1)
173
- coveralls (= 0.8.17)
174
- loaf!
175
- nokogiri (~> 1.8.1)
176
- public_suffix (~> 2.0.5)
177
- rake
178
- rspec-rails (~> 3.7.2)
179
- simplecov (~> 0.12.0)
180
- sqlite3 (~> 1.3.13)
181
- yard (~> 0.9.12)
182
- yardstick (~> 0.9.9)
183
-
184
- BUNDLED WITH
185
- 1.16.1
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler/setup'
5
- require 'bundler/gem_tasks'
6
-
7
- FileList['tasks/**/*.rake'].each(&method(:import))
8
-
9
- desc 'Run all specs'
10
- task ci: %w[ spec ]
Binary file
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'appraisal' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("appraisal", "appraisal")
data/bin/rake DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rake' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("rake", "rake")
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/sh
2
-
3
- set -e
4
-
5
- # Install gems required by Appraisal
6
- bundle install
7
- bundle exec appraisal install
@@ -1,24 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "ammeter", "~> 1.1.4"
6
- gem "appraisal", "~> 2.2.0"
7
- gem "yard", "~> 0.9.12"
8
- gem "capybara", "~> 2.16.1"
9
- gem "rspec-rails", "~> 3.7.2"
10
- gem "nokogiri", "~> 1.8.1"
11
- gem "public_suffix", "~> 2.0.5"
12
- gem "sqlite3", "~> 1.3.13", platforms: :ruby
13
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", platforms: :jruby
14
- gem "rails", "~> 3.2.22.5"
15
- gem "test-unit"
16
- gem "mime-types", "~> 2.99"
17
-
18
- group :metrics do
19
- gem "coveralls", "0.8.17"
20
- gem "simplecov", "~> 0.12.0"
21
- gem "yardstick", "~> 0.9.9"
22
- end
23
-
24
- gemspec path: "../"
@@ -1,24 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "ammeter", "~> 1.1.4"
6
- gem "appraisal", "~> 2.2.0"
7
- gem "yard", "~> 0.9.12"
8
- gem "capybara", "~> 2.16.1"
9
- gem "rspec-rails", "~> 3.7.2"
10
- gem "nokogiri", "~> 1.8.1"
11
- gem "public_suffix", "~> 2.0.5"
12
- gem "sqlite3", "~> 1.3.13", platforms: :ruby
13
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", platforms: :jruby
14
- gem "rails", "~> 4.0.13"
15
- gem "test-unit"
16
- gem "mime-types", "~> 2.99"
17
-
18
- group :metrics do
19
- gem "coveralls", "0.8.17"
20
- gem "simplecov", "~> 0.12.0"
21
- gem "yardstick", "~> 0.9.9"
22
- end
23
-
24
- gemspec path: "../"
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "ammeter", "~> 1.1.4"
6
- gem "appraisal", "~> 2.2.0"
7
- gem "yard", "~> 0.9.12"
8
- gem "capybara", "~> 2.16.1"
9
- gem "rspec-rails", "~> 3.7.2"
10
- gem "nokogiri", "~> 1.8.1"
11
- gem "public_suffix", "~> 2.0.5"
12
- gem "sqlite3", "~> 1.3.13", platforms: :ruby
13
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", platforms: :jruby
14
- gem "rails", "~> 4.1.16"
15
- gem "mime-types", "~> 2.99"
16
-
17
- group :metrics do
18
- gem "coveralls", "0.8.17"
19
- gem "simplecov", "~> 0.12.0"
20
- gem "yardstick", "~> 0.9.9"
21
- end
22
-
23
- gemspec path: "../"
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "ammeter", "~> 1.1.4"
6
- gem "appraisal", "~> 2.2.0"
7
- gem "yard", "~> 0.9.12"
8
- gem "capybara", "~> 2.16.1"
9
- gem "rspec-rails", "~> 3.7.2"
10
- gem "nokogiri", "~> 1.8.1"
11
- gem "public_suffix", "~> 2.0.5"
12
- gem "sqlite3", "~> 1.3.13", platforms: :ruby
13
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", platforms: :jruby
14
- gem "rails", "~> 4.2.9"
15
- gem "mime-types", "~> 2.99"
16
-
17
- group :metrics do
18
- gem "coveralls", "0.8.17"
19
- gem "simplecov", "~> 0.12.0"
20
- gem "yardstick", "~> 0.9.9"
21
- end
22
-
23
- gemspec path: "../"
@@ -1,22 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "ammeter", "~> 1.1.4"
6
- gem "appraisal", "~> 2.2.0"
7
- gem "yard", "~> 0.9.12"
8
- gem "capybara", "~> 2.16.1"
9
- gem "rspec-rails", "~> 3.6.1"
10
- gem "nokogiri", "~> 1.8.1"
11
- gem "public_suffix", "~> 2.0.5"
12
- gem "sqlite3", "~> 1.3.13", platforms: :ruby
13
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", platforms: :jruby
14
- gem "rails", "~> 5.0.6"
15
-
16
- group :metrics do
17
- gem "coveralls", "0.8.17"
18
- gem "simplecov", "~> 0.12.0"
19
- gem "yardstick", "~> 0.9.9"
20
- end
21
-
22
- gemspec path: "../"
@@ -1,22 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "ammeter", "~> 1.1.4"
6
- gem "appraisal", "~> 2.2.0"
7
- gem "yard", "~> 0.9.12"
8
- gem "capybara", "~> 2.16.1"
9
- gem "rspec-rails", "~> 3.6.1"
10
- gem "nokogiri", "~> 1.8.1"
11
- gem "public_suffix", "~> 2.0.5"
12
- gem "sqlite3", "~> 1.3.13", platforms: :ruby
13
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", platforms: :jruby
14
- gem "rails", "~> 5.1.4"
15
-
16
- group :metrics do
17
- gem "coveralls", "0.8.17"
18
- gem "simplecov", "~> 0.12.0"
19
- gem "yardstick", "~> 0.9.9"
20
- end
21
-
22
- gemspec path: "../"
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'translation'
4
-
5
- module Loaf
6
- # A mixin for formatting crumb name
7
- module CrumbFormatter
8
- # @param [String] name
9
- # the name to format
10
- #
11
- # @api public
12
- def format_name(name, options = {})
13
- return name if name.nil? || name.empty?
14
-
15
- formatted = name.to_s.dup
16
- formatted = Loaf::Translation.find_title(formatted)
17
- formatted = formatted.capitalize if options[:capitalize]
18
- if options[:crumb_length]
19
- formatted = truncate(formatted, length: options[:crumb_length])
20
- end
21
- formatted
22
- end
23
- end # CrumbFormatter
24
- end # Loaf
@@ -1,28 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'loaf/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'loaf'
8
- spec.version = Loaf::VERSION.dup
9
- spec.authors = ['Piotr Murach']
10
- spec.email = [""]
11
- spec.homepage = 'https://github.com/piotrmurach/loaf'
12
- spec.summary = %q{Loaf manages and displays breadcrumb trails in your Rails application.}
13
- spec.description = %q{Loaf manages and displays breadcrumb trails in your Rails app. It aims to handle breadcrumb data through easy dsl and expose it through view helpers without any assumptions about markup.}
14
-
15
- spec.files = `git ls-files`.split("\n")
16
- spec.test_files = `git ls-files -- {spec,features}/*`.split("\n")
17
- spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
- spec.require_paths = ["lib"]
19
-
20
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
- spec.metadata['source_code_uri'] = 'https://github.com/piotrmurach/loaf'
22
- spec.metadata['changelog_uri'] = 'https://github.com/piotrmurach/loaf/blob/master/CHANGELOG.md'
23
-
24
- spec.add_dependency 'rails', '>= 3.2'
25
-
26
- spec.add_development_dependency 'bundler', '~> 1.5'
27
- spec.add_development_dependency 'rake'
28
- end