Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling in Ruby and Markdown files #699

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ How do you know if source maps are working correctly? Try adding a syntax error

When compiling assets with Sprockets, Sprockets needs to decide which top-level targets to compile, usually `application.css`, `application.js`, and images.

If you are using sprockets prior to 4.0, Rails will compile `application.css`, `application.js`; and *any* files found in your assets directory(ies) that are _not_ recognized as JS or CSS, but do have a filename extension. That latter was meant to apply to all your images usually in `./app/assets/images/`, but could have targetted other files as well.
If you are using sprockets prior to 4.0, Rails will compile `application.css`, `application.js`; and *any* files found in your assets directory(ies) that are _not_ recognized as JS or CSS, but do have a filename extension. That latter was meant to apply to all your images usually in `./app/assets/images/`, but could have targeted other files as well.

If you wanted to specify additional assets to deliver that were not included by this logic, for instance for a marketing page with its own CSS, you might add something like this:

Expand Down
4 changes: 2 additions & 2 deletions guides/extending_sprockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Your exporter gets initialized once for each asset to be exported by sprockets w
- environment (Instance of Sprockets::Environment)
- directory (Instance of String)

A `setup` method is called right after the exporter is initalized. Your exporter is expected implement a `skip?` method. If this method returns true then sprockets will skip your exporter and move to the next one. An instance of `Sprockets::Logger` is passed into this method that can be used to indicate to the user what is happening. This method is called synchronously.
A `setup` method is called right after the exporter is initialized. Your exporter is expected implement a `skip?` method. If this method returns true then sprockets will skip your exporter and move to the next one. An instance of `Sprockets::Logger` is passed into this method that can be used to indicate to the user what is happening. This method is called synchronously.

The work of writing the new asset to disk is performed in the `call` method. This method is potentially called in a new thread and should not mutate any global state. A `write` method is provided that takes a `filename` to be written to (full path) and yields an IO object.

Expand Down Expand Up @@ -411,7 +411,7 @@ module MySprocketsExtension
end
```

If your application is making serious modifications to the source file (an example could be a coffee script file generating JS will be signifigantly different) then you'll want to calculate and return an appropriate `map` key in the `metadata` hash. See the "metadata" section for more info on doing this.
If your application is making serious modifications to the source file (an example could be a coffee script file generating JS will be significantly different) then you'll want to calculate and return an appropriate `map` key in the `metadata` hash. See the "metadata" section for more info on doing this.

Once you've written your processor to run on all 3 versions of Sprockets you will need to register it. This is covered next.

Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/bower.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Bower
# load_path - String environment path
# logical_path - String path relative to base
#
# Returns candiate filenames.
# Returns candidate filenames.
def resolve_alternates(load_path, logical_path)
candidates, deps = super

Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Sprockets
# Uses pipeline metadata:
#
# :required - Ordered Set of asset URIs to prepend
# :stubbed - Set of asset URIs to substract from the required set.
# :stubbed - Set of asset URIs to subtract from the required set.
#
# Also see DirectiveProcessor.
class Bundle
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def self.default_logger
# Internal: Wrap a backend cache store.
#
# Always assign a backend cache store instance to Environment#cache= and
# use Environment#cache to retreive a wrapped interface.
# use Environment#cache to retrieve a wrapped interface.
#
# cache - A compatible backend cache store instance.
def initialize(cache = nil, logger = self.class.default_logger)
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/cached_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Sprockets
# `CachedEnvironment` is a special cached version of `Environment`.
#
# The expection is that all of its file system methods are cached
# The exception is that all of its file system methods are cached
# for the instances lifetime. This makes `CachedEnvironment` much faster. This
# behavior is ideal in production environments where the file system
# is immutable.
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/coffee_script_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Sprockets
# Processor engine class for the CoffeeScript compiler.
# Depends on the `coffee-script` and `coffee-script-source` gems.
#
# For more infomation see:
# For more information see:
#
# https://github.com/rails/ruby-coffee-script
#
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def register_dependency_resolver(scheme, &block)
end
end

# Public: Add environmental dependency inheirted by all assets.
# Public: Add environmental dependency inherited by all assets.
#
# uri - String dependency URI
#
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/eco_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Sprockets
# Processor engine class for the Eco compiler. Depends on the `eco` gem.
#
# For more infomation see:
# For more information see:
#
# https://github.com/sstephenson/ruby-eco
# https://github.com/sstephenson/eco
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/ejs_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Sprockets
# Processor engine class for the EJS compiler. Depends on the `ejs` gem.
#
# For more infomation see:
# For more information see:
#
# https://github.com/sstephenson/ruby-ejs
#
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/exporters/base.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Sprockets
module Exporters
# Convienence class for all exporters to inherit from
# Convenience class for all exporters to inherit from
#
# An exporter is responsible for exporting a Sprockets::Asset
# to a file system. For example the Exporters::File class
Expand Down
4 changes: 2 additions & 2 deletions lib/sprockets/manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Sprockets
# The JSON is part of the public API and should be considered stable. This
# should make it easy to read from other programming languages and processes
# that don't have sprockets loaded. See `#assets` and `#files` for more
# infomation about the structure.
# information about the structure.
class Manifest
include ManifestUtils

Expand Down Expand Up @@ -273,7 +273,7 @@ def clobber
nil
end

# Persist manfiest back to FS
# Persist manifest back to FS
def save
data = json_encode(@data)
FileUtils.mkdir_p File.dirname(@filename)
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/npm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Npm
# load_path - String environment path
# logical_path - String path relative to base
#
# Returns candiate filenames.
# Returns candidate filenames.
def resolve_alternates(load_path, logical_path)
candidates, deps = super

Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def unregister_bundle_processor(*args)
#
# mime_type - String MIME Type. Use '*/*' applies to all types.
# key - Symbol metadata key
# initial - Initial memo to pass to the reduce funciton (default: nil)
# initial - Initial memo to pass to the reduce function (default: nil)
# block - Proc accepting the memo accumulator and current value
#
# Returns nothing.
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/processor_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Sprockets
#
# A Processor is a general function that may modify or transform an asset as
# part of the pipeline. CoffeeScript to JavaScript conversion, Minification
# or Concatenation are all implemented as seperate Processor steps.
# or Concatenation are all implemented as separate Processor steps.
#
# Processors maybe any object that responds to call. So procs or a class that
# defines a self.call method.
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/sass_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module Sprockets
# Processor engine class for the SASS/SCSS compiler. Depends on the `sass` gem.
#
# For more infomation see:
# For more information see:
#
# https://github.com/sass/sass
# https://github.com/rails/sass-rails
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/sassc_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module Sprockets
# Processor engine class for the SASS/SCSS compiler. Depends on the `sassc` gem.
#
# For more infomation see:
# For more information see:
#
# https://github.com/sass/sassc-ruby
# https://github.com/sass/sassc-rails
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/source_map_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Sprockets
# When a file is passed in it will have a `application/js-sourcemap+json`
# or `application/css-sourcemap+json` mime type. The filename will be
# match the original asset. The original asset is loaded. As it
# gets processed by Sprockets it will aquire all information
# gets processed by Sprockets it will acquire all information
# needed to build a source map file in the `asset.to_hash[:metadata][:map]`
# key.
#
Expand Down
4 changes: 2 additions & 2 deletions lib/sprockets/source_map_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def make_index_map(map)
}
end

# Public: Combine two seperate source map transformations into a single
# Public: Combine two separate source map transformations into a single
# mapping.
#
# Source transformations may happen in discrete steps producing separate
Expand Down Expand Up @@ -453,7 +453,7 @@ def vlq_decode(str)
#
# ary - Two dimensional Array of Integers.
#
# Returns a VLQ encoded String seperated by , and ;.
# Returns a VLQ encoded String separated by , and ;.
def vlq_encode_mappings(ary)
ary.map { |group|
group.map { |segment|
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def duplicable?(obj)

# Internal: Duplicate and store key/value on new frozen hash.
#
# Seperated for recursive calls, always use hash_reassoc(hash, *keys).
# Separated for recursive calls, always use hash_reassoc(hash, *keys).
#
# hash - Hash
# key - Object key
Expand Down
2 changes: 1 addition & 1 deletion test/test_caching.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def call(input)
end
end

test "seperate cache for dependencies under a different load path" do
test "separate cache for dependencies under a different load path" do
env1 = Sprockets::Environment.new(fixture_path('default')) do |env|
env.append_path("app")
env.append_path("vendor/gems/jquery-1-9")
Expand Down
2 changes: 1 addition & 1 deletion test/test_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def setup
end
end

test "seperate contexts classes for each instance" do
test "separate contexts classes for each instance" do
e1 = new_environment
e2 = new_environment

Expand Down
4 changes: 2 additions & 2 deletions test/test_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def teardown
assert_equal path, manifest.filename
end

test "specify manifest directory and seperate location" do
test "specify manifest directory and separate location" do
root = File.join(Dir::tmpdir, 'public')
dir = File.join(root, 'assets')
path = File.join(root, 'manifest-123.json')
Expand Down Expand Up @@ -172,7 +172,7 @@ def teardown
assert_equal dep_digest_path, data['assets']['coffee.js']
end

test "compile to directory and seperate location" do
test "compile to directory and separate location" do
manifest = Sprockets::Manifest.new(@env, File.join(@dir, 'manifest.json'))

root = File.join(Dir::tmpdir, 'public')
Expand Down