gretel 4.0.1 → 4.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +6 -6
- data/.travis.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +9 -49
- data/Rakefile +3 -7
- data/gretel.gemspec +7 -10
- data/lib/gretel/renderer.rb +6 -2
- data/lib/gretel/version.rb +1 -1
- metadata +12 -114
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/assets/config/manifest.js +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -15
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/helpers/application_helper.rb +0 -5
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/issue.rb +0 -3
- data/test/dummy/app/models/project.rb +0 -3
- data/test/dummy/app/views/breadcrumbs/site.rb +0 -3
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -14
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/breadcrumbs.rb +0 -3
- data/test/dummy/config/breadcrumbs/test_crumbs.rb +0 -85
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -2
- data/test/dummy/config/environments/production.rb +0 -2
- data/test/dummy/config/environments/test.rb +0 -2
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -15
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -11
- data/test/dummy/db/migrate/20130122163007_create_projects.rb +0 -9
- data/test/dummy/db/migrate/20130122163051_create_issues.rb +0 -10
- data/test/dummy/db/schema.rb +0 -28
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/fixtures/issues.yml +0 -4
- data/test/fixtures/projects.yml +0 -3
- data/test/gretel_test.rb +0 -23
- data/test/helper_methods_test.rb +0 -555
- data/test/test_helper.rb +0 -23
File without changes
|
File without changes
|
data/test/dummy/config.ru
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require
|
6
|
-
require "gretel"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
config.secret_token = "secret token"
|
11
|
-
config.active_support.deprecation = :log
|
12
|
-
config.eager_load = false
|
13
|
-
end
|
14
|
-
end
|
data/test/dummy/config/boot.rb
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
crumb :basic do
|
2
|
-
link "About", about_path
|
3
|
-
end
|
4
|
-
|
5
|
-
crumb :with_root do
|
6
|
-
link "About", about_path
|
7
|
-
parent :root
|
8
|
-
end
|
9
|
-
|
10
|
-
crumb :with_parent do
|
11
|
-
link "Contact", contact_path
|
12
|
-
parent :basic
|
13
|
-
end
|
14
|
-
|
15
|
-
crumb :object do |project|
|
16
|
-
link project.name, project
|
17
|
-
end
|
18
|
-
|
19
|
-
crumb :with_autopath do |project|
|
20
|
-
link project.name, project
|
21
|
-
end
|
22
|
-
|
23
|
-
crumb :with_parent_object do |issue|
|
24
|
-
link issue.title, project_issue_path(issue.project, issue)
|
25
|
-
parent :object, issue.project
|
26
|
-
end
|
27
|
-
|
28
|
-
crumb :multiple_links do
|
29
|
-
link "Contact", contact_path
|
30
|
-
link "Contact form", contact_form_path
|
31
|
-
end
|
32
|
-
|
33
|
-
crumb :multiple_links_with_parent do
|
34
|
-
link "Contact", contact_path
|
35
|
-
link "Contact form", contact_form_path
|
36
|
-
parent :basic
|
37
|
-
end
|
38
|
-
|
39
|
-
crumb :with_proc do
|
40
|
-
link Proc.new { "Name from proc" }, Proc.new { "URL from proc" }
|
41
|
-
end
|
42
|
-
|
43
|
-
crumb :with_multiple_arguments do |a, b, c|
|
44
|
-
link "#{a} and #{b} and #{c}", contact_path
|
45
|
-
parent :parent_with_multiple_arguments, a * 2, b * 2, c * 2
|
46
|
-
end
|
47
|
-
|
48
|
-
crumb :parent_with_multiple_arguments do |d, e, f|
|
49
|
-
link "First #{d} then #{e} then #{f}", about_path
|
50
|
-
end
|
51
|
-
|
52
|
-
crumb :with_unsafe_html do
|
53
|
-
link "Test <strong>bold text</strong>", about_path
|
54
|
-
end
|
55
|
-
|
56
|
-
crumb :with_safe_html do
|
57
|
-
link "Test <strong>bold text</strong>".html_safe, about_path
|
58
|
-
end
|
59
|
-
|
60
|
-
crumb :without_link do
|
61
|
-
link "Without link"
|
62
|
-
parent :parent_without_link
|
63
|
-
end
|
64
|
-
|
65
|
-
crumb :parent_without_link do
|
66
|
-
link "Also without link"
|
67
|
-
end
|
68
|
-
|
69
|
-
crumb :using_view_helper do
|
70
|
-
link times_two("Test"), about_path
|
71
|
-
end
|
72
|
-
|
73
|
-
crumb :project do |project|
|
74
|
-
link project.name, project
|
75
|
-
end
|
76
|
-
|
77
|
-
crumb :with_link_options do
|
78
|
-
link "Test", about_path, title: "My Title", other: "Other Option"
|
79
|
-
link "Other Link", some_option: "Test"
|
80
|
-
end
|
81
|
-
|
82
|
-
crumb :with_inferred_parent do
|
83
|
-
link "Test", about_path
|
84
|
-
parent Project.first
|
85
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
development:
|
7
|
-
adapter: sqlite3
|
8
|
-
database: db/development.sqlite3
|
9
|
-
pool: 5
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
# Warning: The database defined as "test" will be erased and
|
13
|
-
# re-generated from your development database when you run "rake".
|
14
|
-
# Do not set this db to the same as development or production.
|
15
|
-
test:
|
16
|
-
adapter: sqlite3
|
17
|
-
database: db/test.sqlite3
|
18
|
-
pool: 5
|
19
|
-
timeout: 5000
|
20
|
-
|
21
|
-
production:
|
22
|
-
adapter: sqlite3
|
23
|
-
database: db/production.sqlite3
|
24
|
-
pool: 5
|
25
|
-
timeout: 5000
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
11
|
-
#
|
12
|
-
# These inflection rules are supported but not enabled by default:
|
13
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
-
# inflect.acronym 'RESTful'
|
15
|
-
# end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Dummy::Application.config.secret_token = '42da708db5725479ebd37530644412b9a6203a31f1db83d8799995365f1c026abb0c9fed978d81a80388b8bbfc9f9b9b33683330f4b657e6253d1a6df55860bb'
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
-
|
5
|
-
# Use the database for sessions instead of the cookie-based default,
|
6
|
-
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "rails generate session_migration")
|
8
|
-
# Dummy::Application.config.session_store :active_record_store
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
#
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
9
|
-
end
|
10
|
-
|
11
|
-
# Disable root element in JSON by default.
|
12
|
-
ActiveSupport.on_load(:active_record) do
|
13
|
-
self.include_root_in_json = false
|
14
|
-
end
|
data/test/dummy/config/routes.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Dummy::Application.routes.draw do
|
2
|
-
root to: "dummy#dummy"
|
3
|
-
|
4
|
-
get "about" => "dummy#dummy", as: :about
|
5
|
-
get "about/contact" => "dummy#dummy", as: :contact
|
6
|
-
get "about/contact/form" => "dummy#dummy", as: :contact_form
|
7
|
-
|
8
|
-
resources :projects do
|
9
|
-
resources :issues
|
10
|
-
end
|
11
|
-
end
|
data/test/dummy/db/schema.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
-
#
|
5
|
-
# This file is the source Rails uses to define your schema when running `rails
|
6
|
-
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
7
|
-
# be faster and is potentially less error prone than running all of your
|
8
|
-
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
-
# migrations use external dependencies or application code.
|
10
|
-
#
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
12
|
-
|
13
|
-
ActiveRecord::Schema.define(version: 2013_01_22_163051) do
|
14
|
-
|
15
|
-
create_table "issues", force: :cascade do |t|
|
16
|
-
t.string "title"
|
17
|
-
t.integer "project_id"
|
18
|
-
t.datetime "created_at"
|
19
|
-
t.datetime "updated_at"
|
20
|
-
end
|
21
|
-
|
22
|
-
create_table "projects", force: :cascade do |t|
|
23
|
-
t.string "name"
|
24
|
-
t.datetime "created_at"
|
25
|
-
t.datetime "updated_at"
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
File without changes
|
data/test/dummy/log/.gitkeep
DELETED
File without changes
|
data/test/dummy/public/404.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/404.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/422.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/422.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The change you wanted was rejected.</h1>
|
23
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/500.html
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/500.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>We're sorry, but something went wrong.</h1>
|
23
|
-
</div>
|
24
|
-
</body>
|
25
|
-
</html>
|
File without changes
|
data/test/dummy/script/rails
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|
data/test/fixtures/issues.yml
DELETED
data/test/fixtures/projects.yml
DELETED
data/test/gretel_test.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class GretelTest < ActiveSupport::TestCase
|
4
|
-
setup do
|
5
|
-
Gretel.reset!
|
6
|
-
end
|
7
|
-
|
8
|
-
test "defaults" do
|
9
|
-
assert_equal [Rails.root.join("config", "breadcrumbs.rb"),
|
10
|
-
Rails.root.join("config", "breadcrumbs", "**", "*.rb"),
|
11
|
-
Rails.root.join("app", "views", "breadcrumbs", "**", "*.rb")],
|
12
|
-
Gretel.breadcrumb_paths[-3..-1]
|
13
|
-
assert_equal ["development"], Gretel.reload_environments
|
14
|
-
end
|
15
|
-
|
16
|
-
test "configuration block" do
|
17
|
-
Gretel.configure do |config|
|
18
|
-
config.reload_environments << "staging"
|
19
|
-
end
|
20
|
-
|
21
|
-
assert_equal ["development", "staging"], Gretel.reload_environments
|
22
|
-
end
|
23
|
-
end
|