diff --git a/UPGRADING.md b/UPGRADING.md index dcab46401..d103cc920 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -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: diff --git a/guides/extending_sprockets.md b/guides/extending_sprockets.md index 7e852bbc9..b5a5331d7 100644 --- a/guides/extending_sprockets.md +++ b/guides/extending_sprockets.md @@ -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. @@ -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. diff --git a/lib/sprockets/bower.rb b/lib/sprockets/bower.rb index 526658ef3..e99220052 100644 --- a/lib/sprockets/bower.rb +++ b/lib/sprockets/bower.rb @@ -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 diff --git a/lib/sprockets/bundle.rb b/lib/sprockets/bundle.rb index 5c2c1ae82..cef079602 100644 --- a/lib/sprockets/bundle.rb +++ b/lib/sprockets/bundle.rb @@ -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 diff --git a/lib/sprockets/cache.rb b/lib/sprockets/cache.rb index 2b31b334d..f59b58f5a 100644 --- a/lib/sprockets/cache.rb +++ b/lib/sprockets/cache.rb @@ -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) diff --git a/lib/sprockets/cached_environment.rb b/lib/sprockets/cached_environment.rb index 03a58a5fd..7d44386d0 100644 --- a/lib/sprockets/cached_environment.rb +++ b/lib/sprockets/cached_environment.rb @@ -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. diff --git a/lib/sprockets/coffee_script_processor.rb b/lib/sprockets/coffee_script_processor.rb index 264242e4b..b660a9867 100644 --- a/lib/sprockets/coffee_script_processor.rb +++ b/lib/sprockets/coffee_script_processor.rb @@ -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 # diff --git a/lib/sprockets/dependencies.rb b/lib/sprockets/dependencies.rb index 6675d6443..ef1e75c05 100644 --- a/lib/sprockets/dependencies.rb +++ b/lib/sprockets/dependencies.rb @@ -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 # diff --git a/lib/sprockets/eco_processor.rb b/lib/sprockets/eco_processor.rb index af06214b3..c2bfe05bf 100644 --- a/lib/sprockets/eco_processor.rb +++ b/lib/sprockets/eco_processor.rb @@ -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 diff --git a/lib/sprockets/ejs_processor.rb b/lib/sprockets/ejs_processor.rb index 84125da23..15cd541ca 100644 --- a/lib/sprockets/ejs_processor.rb +++ b/lib/sprockets/ejs_processor.rb @@ -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 # diff --git a/lib/sprockets/exporters/base.rb b/lib/sprockets/exporters/base.rb index d0d4de122..3844acd30 100644 --- a/lib/sprockets/exporters/base.rb +++ b/lib/sprockets/exporters/base.rb @@ -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 diff --git a/lib/sprockets/manifest.rb b/lib/sprockets/manifest.rb index 17026968a..901331bfc 100644 --- a/lib/sprockets/manifest.rb +++ b/lib/sprockets/manifest.rb @@ -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 @@ -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) diff --git a/lib/sprockets/npm.rb b/lib/sprockets/npm.rb index 3f01e85b2..639123461 100644 --- a/lib/sprockets/npm.rb +++ b/lib/sprockets/npm.rb @@ -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 diff --git a/lib/sprockets/processing.rb b/lib/sprockets/processing.rb index b7b093442..c211b8ec7 100644 --- a/lib/sprockets/processing.rb +++ b/lib/sprockets/processing.rb @@ -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. diff --git a/lib/sprockets/processor_utils.rb b/lib/sprockets/processor_utils.rb index d019667e4..cece190ac 100644 --- a/lib/sprockets/processor_utils.rb +++ b/lib/sprockets/processor_utils.rb @@ -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. diff --git a/lib/sprockets/sass_processor.rb b/lib/sprockets/sass_processor.rb index 0f80173df..ebdc1943d 100644 --- a/lib/sprockets/sass_processor.rb +++ b/lib/sprockets/sass_processor.rb @@ -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 diff --git a/lib/sprockets/sassc_processor.rb b/lib/sprockets/sassc_processor.rb index 2a221f51e..b7bbd4235 100644 --- a/lib/sprockets/sassc_processor.rb +++ b/lib/sprockets/sassc_processor.rb @@ -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 diff --git a/lib/sprockets/source_map_processor.rb b/lib/sprockets/source_map_processor.rb index 02da882d4..f222076c0 100644 --- a/lib/sprockets/source_map_processor.rb +++ b/lib/sprockets/source_map_processor.rb @@ -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. # diff --git a/lib/sprockets/source_map_utils.rb b/lib/sprockets/source_map_utils.rb index b686bbb50..b2ae018be 100644 --- a/lib/sprockets/source_map_utils.rb +++ b/lib/sprockets/source_map_utils.rb @@ -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 @@ -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| diff --git a/lib/sprockets/utils.rb b/lib/sprockets/utils.rb index 72e74b267..c3c750e26 100644 --- a/lib/sprockets/utils.rb +++ b/lib/sprockets/utils.rb @@ -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 diff --git a/test/test_caching.rb b/test/test_caching.rb index 261b0df1b..bc0818a18 100644 --- a/test/test_caching.rb +++ b/test/test_caching.rb @@ -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") diff --git a/test/test_environment.rb b/test/test_environment.rb index 0ae8611c0..08d5205ad 100644 --- a/test/test_environment.rb +++ b/test/test_environment.rb @@ -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 diff --git a/test/test_manifest.rb b/test/test_manifest.rb index 914f6fb65..c8f554292 100644 --- a/test/test_manifest.rb +++ b/test/test_manifest.rb @@ -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') @@ -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')