middleman-core 3.0.0 → 3.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.cane +2 -0
- data/.cane-exclusions.yml +5 -0
- data/Rakefile +1 -1
- data/bin/middleman +9 -55
- data/features/cli_extension.feature +1 -0
- data/features/frontmatter_page_settings.feature +11 -1
- data/features/instance_vars.feature +9 -0
- data/features/step_definitions/page_layout_steps.rb +3 -3
- data/features/strip_url.feature +40 -0
- data/features/support/env.rb +1 -1
- data/fixtures/automatic-directory-matcher-app/config.rb +1 -1
- data/fixtures/basic-data-app/config.rb +1 -1
- data/fixtures/build-with-errors-app/config.rb +1 -1
- data/fixtures/clean-app/config-complications.rb +1 -1
- data/fixtures/clean-app/config.rb +1 -1
- data/fixtures/current-page-app/config.rb +1 -1
- data/fixtures/custom-layout-app/config.rb +1 -1
- data/fixtures/data-app/config.rb +1 -1
- data/fixtures/external-helpers/config.rb +1 -1
- data/fixtures/external-helpers/helpers/derp.rb +1 -1
- data/fixtures/external-helpers/helpers/four_helpers.rb +1 -1
- data/fixtures/external-helpers/helpers/one_helper.rb +1 -1
- data/fixtures/external-helpers/helpers/yet_another_thingy.rb +1 -1
- data/fixtures/external-helpers/lib/hello_helper.rb +1 -1
- data/fixtures/feature-params-app/config.rb +1 -1
- data/fixtures/frontmatter-settings-app/config.rb +3 -1
- data/fixtures/frontmatter-settings-app/source/layouts/override.erb +2 -0
- data/fixtures/frontmatter-settings-app/source/override_layout.html.erb +4 -0
- data/fixtures/frontmatter-settings-app/source/page_mentioned.html.erb +4 -0
- data/fixtures/generator-test/config.rb +10 -10
- data/fixtures/glob-app/config.rb +1 -1
- data/fixtures/instance-vars-app/config.rb +7 -0
- data/fixtures/instance-vars-app/source/content.html.erb +2 -0
- data/fixtures/instance-vars-app/source/layout.erb +1 -0
- data/fixtures/large-build-app/config.rb +1 -1
- data/fixtures/large-build-app/source/images/Child folder/regular_file(example).txt +1 -1
- data/fixtures/large-build-app/source/images/Read me (example).txt +1 -1
- data/fixtures/manual-layout-missing/config.rb +1 -1
- data/fixtures/manual-layout-override/config.rb +1 -1
- data/fixtures/manual-layout/config.rb +1 -1
- data/fixtures/page-helper-layout-block-app/config.rb +1 -1
- data/fixtures/sinatra-app/config.rb +1 -1
- data/fixtures/strip-url-app/config.rb +0 -0
- data/fixtures/strip-url-app/source/index.html.erb +1 -0
- data/fixtures/strip-url-app/source/other.html.erb +1 -0
- data/fixtures/strip-url-app/source/subdir/index.html.erb +1 -0
- data/fixtures/traversal-app/config.rb +1 -1
- data/fixtures/wildcard-app/config.rb +1 -1
- data/lib/middleman-core.rb +3 -3
- data/lib/middleman-core/application.rb +12 -11
- data/lib/middleman-core/cli.rb +23 -10
- data/lib/middleman-core/cli/build.rb +65 -54
- data/lib/middleman-core/cli/bundler.rb +7 -7
- data/lib/middleman-core/cli/extension.rb +25 -12
- data/lib/middleman-core/cli/init.rb +19 -19
- data/lib/middleman-core/cli/server.rb +25 -16
- data/lib/middleman-core/core_extensions/builder.rb +3 -3
- data/lib/middleman-core/core_extensions/data.rb +28 -28
- data/lib/middleman-core/core_extensions/extensions.rb +24 -25
- data/lib/middleman-core/core_extensions/external_helpers.rb +7 -7
- data/lib/middleman-core/core_extensions/file_watcher.rb +41 -38
- data/lib/middleman-core/core_extensions/front_matter.rb +36 -33
- data/lib/middleman-core/core_extensions/rendering.rb +49 -46
- data/lib/middleman-core/core_extensions/request.rb +34 -33
- data/lib/middleman-core/core_extensions/routing.rb +17 -17
- data/lib/middleman-core/core_extensions/ruby_encoding.rb +1 -1
- data/lib/middleman-core/core_extensions/show_exceptions.rb +5 -5
- data/lib/middleman-core/extensions.rb +4 -4
- data/lib/middleman-core/load_paths.rb +56 -0
- data/lib/middleman-core/logger.rb +29 -0
- data/lib/middleman-core/preview_server.rb +35 -34
- data/lib/middleman-core/profiling.rb +58 -0
- data/lib/middleman-core/renderers/coffee_script.rb +8 -6
- data/lib/middleman-core/renderers/erb.rb +5 -5
- data/lib/middleman-core/renderers/haml.rb +5 -5
- data/lib/middleman-core/renderers/less.rb +14 -10
- data/lib/middleman-core/renderers/liquid.rb +7 -7
- data/lib/middleman-core/renderers/markdown.rb +13 -14
- data/lib/middleman-core/renderers/redcarpet.rb +31 -11
- data/lib/middleman-core/renderers/sass.rb +38 -22
- data/lib/middleman-core/renderers/slim.rb +15 -7
- data/lib/middleman-core/sitemap.rb +25 -28
- data/lib/middleman-core/sitemap/extensions/ignores.rb +13 -13
- data/lib/middleman-core/sitemap/extensions/on_disk.rb +12 -12
- data/lib/middleman-core/sitemap/extensions/proxies.rb +26 -20
- data/lib/middleman-core/sitemap/extensions/traversal.rb +10 -10
- data/lib/middleman-core/sitemap/resource.rb +47 -50
- data/lib/middleman-core/sitemap/store.rb +38 -36
- data/lib/middleman-core/step_definitions.rb +1 -1
- data/lib/middleman-core/step_definitions/builder_steps.rb +1 -1
- data/lib/middleman-core/step_definitions/middleman_steps.rb +3 -3
- data/lib/middleman-core/step_definitions/server_steps.rb +5 -5
- data/lib/middleman-core/templates.rb +12 -12
- data/lib/middleman-core/templates/default.rb +11 -11
- data/lib/middleman-core/templates/extension/Gemfile +14 -1
- data/lib/middleman-core/templates/extension/Rakefile +3 -1
- data/lib/middleman-core/templates/extension/features/support/env.rb +1 -1
- data/lib/middleman-core/templates/extension/gitignore +2 -0
- data/lib/middleman-core/templates/extension/lib/lib.rb +11 -11
- data/lib/middleman-core/templates/extension/lib/middleman_extension.rb +1 -1
- data/lib/middleman-core/templates/html5.rb +10 -10
- data/lib/middleman-core/templates/html5/source/humans.txt +0 -0
- data/lib/middleman-core/templates/html5/source/robots.txt +0 -0
- data/lib/middleman-core/templates/local.rb +4 -4
- data/lib/middleman-core/templates/mobile.rb +3 -3
- data/lib/middleman-core/templates/mobile/source/humans.txt +0 -0
- data/lib/middleman-core/templates/mobile/source/robots.txt +0 -0
- data/lib/middleman-core/templates/shared/config.ru +1 -1
- data/lib/middleman-core/templates/shared/config.tt +10 -10
- data/lib/middleman-core/util.rb +30 -6
- data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks.rb +19 -19
- data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb +2 -2
- data/lib/middleman-core/vendor/hooks-0.2.0/test/hooks_test.rb +29 -29
- data/lib/middleman-core/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb +11 -11
- data/lib/middleman-core/version.rb +1 -1
- data/lib/middleman/rack.rb +4 -0
- data/middleman-core-x86-mingw32.gemspec +38 -0
- data/middleman-core.gemspec +3 -2
- metadata +72 -11
@@ -4,12 +4,12 @@ require "thor/group"
|
|
4
4
|
|
5
5
|
# Templates namespace
|
6
6
|
module Middleman::Templates
|
7
|
-
|
7
|
+
|
8
8
|
# Static methods
|
9
9
|
class << self
|
10
|
-
|
10
|
+
|
11
11
|
# Get list of registered templates and add new ones
|
12
|
-
#
|
12
|
+
#
|
13
13
|
# Middleman::Templates.register(:ext_name, klass)
|
14
14
|
#
|
15
15
|
# @param [Symbol] name The name of the template
|
@@ -20,15 +20,15 @@ module Middleman::Templates
|
|
20
20
|
@_template_mappings[name] = klass if name && klass
|
21
21
|
@_template_mappings
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
# Middleman::Templates.register(name, klass)
|
25
25
|
alias :registered :register
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
# Base Template class. Handles basic options and paths.
|
29
29
|
class Base < ::Thor::Group
|
30
30
|
include Thor::Actions
|
31
|
-
|
31
|
+
|
32
32
|
def initialize(names, options)
|
33
33
|
super
|
34
34
|
source_paths << File.join(File.dirname(__FILE__), 'templates')
|
@@ -36,25 +36,25 @@ module Middleman::Templates
|
|
36
36
|
|
37
37
|
# Required path for the new project to be generated
|
38
38
|
argument :location, :type => :string
|
39
|
-
|
39
|
+
|
40
40
|
# Name of the template being used to generate the project.
|
41
41
|
class_option :template, :default => "default"
|
42
|
-
|
42
|
+
|
43
43
|
# Output a config.ru file for Rack if --rack is passed
|
44
44
|
class_option :rack, :type => :boolean, :default => false
|
45
|
-
|
45
|
+
|
46
46
|
# Write a Rack config.ru file for project
|
47
47
|
# @return [void]
|
48
48
|
def generate_rack!
|
49
49
|
return unless options[:rack]
|
50
50
|
template "shared/config.ru", File.join(location, "config.ru")
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
# Write a Bundler Gemfile file for project
|
54
54
|
# @return [void]
|
55
55
|
def generate_bundler!
|
56
56
|
template "shared/Gemfile.tt", File.join(location, "Gemfile")
|
57
|
-
|
57
|
+
|
58
58
|
inside(location) do
|
59
59
|
::Middleman::Cli::Bundle.new.invoke(:bundle)
|
60
60
|
end unless ENV["TEST"]
|
@@ -62,7 +62,7 @@ module Middleman::Templates
|
|
62
62
|
|
63
63
|
# Output a .gitignore file
|
64
64
|
class_option :git, :type => :boolean, :default => true
|
65
|
-
|
65
|
+
|
66
66
|
# Write a .gitignore file for project
|
67
67
|
# @return [void]
|
68
68
|
def generate_gitignore!
|
@@ -1,22 +1,22 @@
|
|
1
1
|
# Default Middleman template
|
2
2
|
class Middleman::Templates::Default < Middleman::Templates::Base
|
3
|
-
|
4
|
-
class_option "css_dir",
|
5
|
-
:default => "stylesheets",
|
3
|
+
|
4
|
+
class_option "css_dir",
|
5
|
+
:default => "stylesheets",
|
6
6
|
:desc => 'The path to the css files'
|
7
|
-
class_option "js_dir",
|
8
|
-
:default => "javascripts",
|
7
|
+
class_option "js_dir",
|
8
|
+
:default => "javascripts",
|
9
9
|
:desc => 'The path to the javascript files'
|
10
|
-
class_option "images_dir",
|
11
|
-
:default => "images",
|
10
|
+
class_option "images_dir",
|
11
|
+
:default => "images",
|
12
12
|
:desc => 'The path to the image files'
|
13
|
-
|
13
|
+
|
14
14
|
# Template files are relative to this file
|
15
15
|
# @return [String]
|
16
16
|
def self.source_root
|
17
17
|
File.dirname(__FILE__)
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
# Actually output the files
|
21
21
|
# @return [void]
|
22
22
|
def build_scaffold!
|
@@ -31,8 +31,8 @@ class Middleman::Templates::Default < Middleman::Templates::Base
|
|
31
31
|
empty_directory File.join(location, "source", options[:images_dir])
|
32
32
|
copy_file "default/source/images/background.png", File.join(location, "source", options[:images_dir], "background.png")
|
33
33
|
copy_file "default/source/images/middleman.png", File.join(location, "source", options[:images_dir], "middleman.png")
|
34
|
-
end
|
34
|
+
end
|
35
35
|
end
|
36
36
|
|
37
37
|
# Register this template
|
38
|
-
Middleman::Templates.register(:default, Middleman::Templates::Default)
|
38
|
+
Middleman::Templates.register(:default, Middleman::Templates::Default)
|
@@ -1,4 +1,17 @@
|
|
1
1
|
source :rubygems
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in <%= name %>.gemspec
|
4
|
-
gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :development do
|
7
|
+
gem "rake", "~> 0.9.2"
|
8
|
+
gem "rdoc", "~> 3.9"
|
9
|
+
gem "yard", "~> 0.8.0"
|
10
|
+
end
|
11
|
+
|
12
|
+
group :test do
|
13
|
+
gem "cucumber", "~> 1.2.0"
|
14
|
+
gem "fivemat"
|
15
|
+
gem "aruba", "~> 0.4.11"
|
16
|
+
gem "rspec", "~> 2.7"
|
17
|
+
end
|
@@ -4,22 +4,22 @@ require "middleman-core"
|
|
4
4
|
# Extension namespace
|
5
5
|
module MyExtension
|
6
6
|
class << self
|
7
|
-
|
7
|
+
|
8
8
|
# Called when user `activate`s your extension
|
9
9
|
def registered(app, options={})
|
10
10
|
# Setup extension-specific config
|
11
11
|
app.set :config_variable, false
|
12
|
-
|
12
|
+
|
13
13
|
# Include class methods
|
14
14
|
# app.extend ClassMethods
|
15
|
-
|
15
|
+
|
16
16
|
# Include instance methods
|
17
17
|
# app.send :include, InstanceMethods
|
18
|
-
|
18
|
+
|
19
19
|
app.after_configuration do
|
20
20
|
# Do something
|
21
|
-
|
22
|
-
# config_variable is now either the default or the user's
|
21
|
+
|
22
|
+
# config_variable is now either the default or the user's
|
23
23
|
# setting from config.rb
|
24
24
|
end
|
25
25
|
end
|
@@ -30,20 +30,20 @@ module MyExtension
|
|
30
30
|
# def a_class_method
|
31
31
|
# end
|
32
32
|
# end
|
33
|
-
|
33
|
+
|
34
34
|
# module InstanceMethods
|
35
35
|
# def an_instance_method
|
36
36
|
# end
|
37
37
|
# end
|
38
|
-
|
38
|
+
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
42
|
# Register extensions which can be activated
|
43
43
|
# Make sure we have the version of Middleman we expect
|
44
44
|
# ::Middleman::Extensions.register(:extension_name) do
|
45
|
-
#
|
45
|
+
#
|
46
46
|
# # Return the extension module
|
47
47
|
# ::MyExtension
|
48
|
-
#
|
49
|
-
# end
|
48
|
+
#
|
49
|
+
# end
|
@@ -1 +1 @@
|
|
1
|
-
require "<%= name %>"
|
1
|
+
require "<%= name %>"
|
@@ -1,22 +1,22 @@
|
|
1
1
|
# HTML5 Boilerplate template
|
2
2
|
class Middleman::Templates::Html5 < Middleman::Templates::Base
|
3
|
-
|
4
|
-
class_option "css_dir",
|
5
|
-
:default => "css",
|
3
|
+
|
4
|
+
class_option "css_dir",
|
5
|
+
:default => "css",
|
6
6
|
:desc => 'The path to the css files'
|
7
|
-
class_option "js_dir",
|
8
|
-
:default => "js",
|
7
|
+
class_option "js_dir",
|
8
|
+
:default => "js",
|
9
9
|
:desc => 'The path to the javascript files'
|
10
|
-
class_option "images_dir",
|
11
|
-
:default => "img",
|
10
|
+
class_option "images_dir",
|
11
|
+
:default => "img",
|
12
12
|
:desc => 'The path to the image files'
|
13
|
-
|
13
|
+
|
14
14
|
# Templates are relative to this file
|
15
15
|
# @return [String]
|
16
16
|
def self.source_root
|
17
17
|
File.dirname(__FILE__)
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
# Output the files
|
21
21
|
# @return [void]
|
22
22
|
def build_scaffold!
|
@@ -27,4 +27,4 @@ class Middleman::Templates::Html5 < Middleman::Templates::Base
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# Register the template
|
30
|
-
Middleman::Templates.register(:html5, Middleman::Templates::Html5)
|
30
|
+
Middleman::Templates.register(:html5, Middleman::Templates::Html5)
|
File without changes
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Local templates
|
2
2
|
class Middleman::Templates::Local < Middleman::Templates::Base
|
3
|
-
|
3
|
+
|
4
4
|
# Look for templates in ~/.middleman
|
5
5
|
# @return [String]
|
6
6
|
def self.source_root
|
@@ -11,15 +11,15 @@ class Middleman::Templates::Local < Middleman::Templates::Base
|
|
11
11
|
# @return [void]
|
12
12
|
def build_scaffold!
|
13
13
|
directory options[:template].to_s, location
|
14
|
-
end
|
14
|
+
end
|
15
15
|
end
|
16
16
|
|
17
17
|
# Iterate over the directories in the templates path and register each one.
|
18
18
|
Dir[File.join(Middleman::Templates::Local.source_root, "*")].each do |dir|
|
19
19
|
next unless File.directory?(dir)
|
20
|
-
|
20
|
+
|
21
21
|
template_file = File.join(dir, "template.rb")
|
22
|
-
|
22
|
+
|
23
23
|
if File.exists?(template_file)
|
24
24
|
require template_file
|
25
25
|
else
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Mobile HTML5 Boilerplate
|
2
2
|
class Middleman::Templates::Mobile < Middleman::Templates::Base
|
3
|
-
|
3
|
+
|
4
4
|
# Slightly different paths
|
5
5
|
class_option :css_dir, :default => "css"
|
6
6
|
class_option :js_dir, :default => "js"
|
@@ -11,7 +11,7 @@ class Middleman::Templates::Mobile < Middleman::Templates::Base
|
|
11
11
|
def self.source_root
|
12
12
|
File.dirname(__FILE__)
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
# Output the files
|
16
16
|
# @return [void]
|
17
17
|
def build_scaffold!
|
@@ -22,4 +22,4 @@ class Middleman::Templates::Mobile < Middleman::Templates::Base
|
|
22
22
|
end
|
23
23
|
|
24
24
|
# Register the template
|
25
|
-
Middleman::Templates.register(:mobile, Middleman::Templates::Mobile)
|
25
|
+
Middleman::Templates.register(:mobile, Middleman::Templates::Mobile)
|
File without changes
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
###
|
1
|
+
###
|
2
2
|
# Compass
|
3
3
|
###
|
4
4
|
|
5
5
|
# Susy grids in Compass
|
6
|
-
# First: gem install
|
6
|
+
# First: gem install susy --pre
|
7
7
|
# require 'susy'
|
8
8
|
|
9
9
|
# Change Compass configuration
|
@@ -16,13 +16,13 @@
|
|
16
16
|
###
|
17
17
|
|
18
18
|
# Per-page layout changes:
|
19
|
-
#
|
19
|
+
#
|
20
20
|
# With no layout
|
21
21
|
# page "/path/to/file.html", :layout => false
|
22
|
-
#
|
22
|
+
#
|
23
23
|
# With alternative layout
|
24
24
|
# page "/path/to/file.html", :layout => :otherlayout
|
25
|
-
#
|
25
|
+
#
|
26
26
|
# A path which all have the same layout
|
27
27
|
# with_layout :admin do
|
28
28
|
# page "/admin/*"
|
@@ -72,21 +72,21 @@ set :images_dir, '<%= options[:images_dir] -%>'
|
|
72
72
|
configure :build do
|
73
73
|
# For example, change the Compass output style for deployment
|
74
74
|
# activate :minify_css
|
75
|
-
|
75
|
+
|
76
76
|
# Minify Javascript on build
|
77
77
|
# activate :minify_javascript
|
78
|
-
|
78
|
+
|
79
79
|
# Enable cache buster
|
80
80
|
# activate :cache_buster
|
81
|
-
|
81
|
+
|
82
82
|
# Use relative URLs
|
83
83
|
# activate :relative_assets
|
84
|
-
|
84
|
+
|
85
85
|
# Compress PNGs after build
|
86
86
|
# First: gem install middleman-smusher
|
87
87
|
# require "middleman-smusher"
|
88
88
|
# activate :smusher
|
89
|
-
|
89
|
+
|
90
90
|
# Or use a different image path
|
91
91
|
# set :http_path, "/Content/images/"
|
92
92
|
end
|
data/lib/middleman-core/util.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# Our custom logger
|
2
|
+
require "middleman-core/logger"
|
3
|
+
|
4
|
+
# For instrumenting
|
5
|
+
require "active_support/notifications"
|
6
|
+
|
1
7
|
# Using Thor's indifferent hash access
|
2
8
|
require "thor"
|
3
9
|
|
@@ -5,8 +11,26 @@ require "thor"
|
|
5
11
|
require "pathname"
|
6
12
|
|
7
13
|
module Middleman
|
14
|
+
|
8
15
|
module Util
|
9
|
-
|
16
|
+
|
17
|
+
# The logger
|
18
|
+
#
|
19
|
+
# @return [Middleman::Logger] The logger
|
20
|
+
def self.logger(*args)
|
21
|
+
if !@_logger || args.length > 0
|
22
|
+
@_logger = ::Middleman::Logger.new(*args)
|
23
|
+
end
|
24
|
+
|
25
|
+
@_logger
|
26
|
+
end
|
27
|
+
|
28
|
+
# Facade for ActiveSupport/Notification
|
29
|
+
def self.instrument(name, payload={}, &block)
|
30
|
+
name << ".middleman" unless name =~ /\.middleman$/
|
31
|
+
::ActiveSupport::Notifications.instrument(name, payload, &block)
|
32
|
+
end
|
33
|
+
|
10
34
|
# Recursively convert a normal Hash into a HashWithIndifferentAccess
|
11
35
|
#
|
12
36
|
# @private
|
@@ -28,13 +52,13 @@ module Middleman
|
|
28
52
|
data
|
29
53
|
end
|
30
54
|
end
|
31
|
-
|
55
|
+
|
32
56
|
# Normalize a path to not include a leading slash
|
33
57
|
# @param [String] path
|
34
58
|
# @return [String]
|
35
59
|
def self.normalize_path(path)
|
36
60
|
# The tr call works around a bug in Ruby's Unicode handling
|
37
|
-
path.sub(/^\//, "").tr('','')
|
61
|
+
path.sub(/^\//, "").tr('','')
|
38
62
|
end
|
39
63
|
|
40
64
|
# Extract the text of a Rack response as a string.
|
@@ -55,7 +79,7 @@ module Middleman
|
|
55
79
|
response.to_s
|
56
80
|
end
|
57
81
|
end
|
58
|
-
|
82
|
+
|
59
83
|
# Takes a matcher, which can be a literal string
|
60
84
|
# or a string containing glob expressions, or a
|
61
85
|
# regexp, or a proc, or anything else that responds
|
@@ -74,7 +98,7 @@ module Middleman
|
|
74
98
|
File.fnmatch(matcher.to_s, path)
|
75
99
|
end
|
76
100
|
end
|
77
|
-
|
101
|
+
|
78
102
|
# Get a recusive list of files inside a set of paths.
|
79
103
|
# Works with symlinks.
|
80
104
|
#
|
@@ -105,7 +129,7 @@ module Middleman
|
|
105
129
|
end
|
106
130
|
|
107
131
|
# Whether the key is in the cache
|
108
|
-
#
|
132
|
+
#
|
109
133
|
# @param key Anything Hash can use as a key
|
110
134
|
# @return [Boolean]
|
111
135
|
def has_key?(key)
|