sprockets-sass_embedded 0.1.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f6b62daf25c2209dc30a139a96936334c2dd0716f9f167900a6437e1cf73f99
4
- data.tar.gz: 88ac1cffbca937c8cd4b718601c341e18d075e1387efc818367e4c35997ecda9
3
+ metadata.gz: 18376a2cfa87a79aefd9d7d065d75a0a1d0b60b926925ade98e91b3176ea682b
4
+ data.tar.gz: 49ac2836992223cb02f39863900edd0d84753bbc28b40780c2f72acc5313fbe2
5
5
  SHA512:
6
- metadata.gz: b64eb2a10cd6632ed8dad9951da98913480e8cb590809a4dcbd382935caa74b3aa76dbc1e14f1fc2cd39a0b1222362367d068de3cddbf3ef000a57e4ad403b6a
7
- data.tar.gz: 6b7bcd2e47436fd26a9c46a04242e7dc70b12727489e3748d357545fe7d430c198cc3f18e86034d3d39f9e50acdff0fbb1afcd506be474fd1c3b8f2e3e901205
6
+ metadata.gz: 85642bd22b5ccec2ffad9356c4be0da3984c93095f58d5c5c619289393cfd3238f31b2c89ca8c96d889183a8e75aaefa844f1072a52a279d73529e3c710e6fa8
7
+ data.tar.gz: afd89326a3bd993a38483cb8227a6f60ac625100179a959f1982614a065e5f2d797cc38e34ade21e674e27d87fbed8b3023306eb160ba00d5c94f97b79a22a79
data/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ ## 0.2.1 / 2023-12-15
4
+
5
+ - 2827e74 - Configure RubyGems trusted publishing (#5)
6
+ - 8c20919 - Add scheduled event trigger (#4)
7
+ - 300091a - Configure IRBRC environment variable
8
+ - af176ef - RuboCop config-related updates (#3)
9
+
10
+ ## 0.2.0 / 2023-12-08
11
+
12
+ - a233f04 - Remove upper bound on `required_ruby_version`
13
+ - d05edc6 - RuboCop: Style/Send
14
+ - 3c40da7 - RuboCop: Layout/MultilineAssignmentLayout
15
+ - b7cde6e - RuboCop: Style/RedundantHeredocDelimiterQuotes
16
+ - 0c887f8 - Add publish workflow
17
+ - bb9d4df - Update `spec/spec_helper.rb`
18
+ - f5c25ea - RuboCop: Style/StringLiterals
19
+ - 85a8d6e - Update RuboCop configuration
20
+ - 2663fd4 - Simplify `.rspec` config file
21
+ - e9b3808 - Add ignored revs file
22
+ - f4213a8 - Remove unnecessary gems
23
+ - 6d4aa6a - Update `.gitignore`
24
+ - e20077a - Update Ruby version to 2.7.8
25
+ - bd19756 - Simplify EditorConfig
26
+ - 17d38a8 - Update CI workflow
27
+ - 0f81747 - Remove Bundler ecosystem
28
+
29
+ ## 0.1.0 / 2022-09-16
30
+
31
+ - Initial release!
data/README.md CHANGED
@@ -1,27 +1,25 @@
1
1
  # sprockets-sass_embedded
2
2
 
3
+ **A Ruby gem for processing and compressing [Sass](https://sass-lang.com) files using [Sprockets 4](https://github.com/rails/sprockets) and [Embedded Dart Sass](https://github.com/ntkme/sass-embedded-host-ruby).**
4
+
3
5
  [![Gem](https://img.shields.io/gem/v/sprockets-sass_embedded.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/sprockets-sass_embedded)
4
6
  [![Downloads](https://img.shields.io/gem/dt/sprockets-sass_embedded.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/sprockets-sass_embedded)
5
- [![Build](https://img.shields.io/github/workflow/status/jgarber623/sprockets-sass_embedded/CI?logo=github&style=for-the-badge)](https://github.com/jgarber623/sprockets-sass_embedded/actions/workflows/ci.yml)
6
- [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/sprockets-sass_embedded.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/sprockets-sass_embedded)
7
- [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/sprockets-sass_embedded.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/sprockets-sass_embedded/code)
7
+ [![Build](https://img.shields.io/github/actions/workflow/status/jgarber623/sprockets-sass_embedded/ci.yml?branch=main&logo=github&style=for-the-badge)](https://github.com/jgarber623/sprockets-sass_embedded/actions/workflows/ci.yml)
8
8
 
9
- **A Ruby gem for processing and compressing [Sass](https://sass-lang.com) files using [Sprockets 4](https://github.com/rails/sprockets) and [Embedded Dart Sass](https://github.com/ntkme/sass-embedded-host-ruby).**
9
+ ## Getting Started
10
10
 
11
- ## Installation
11
+ Before installing and using sprockets-sass_embedded, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (or newer) installed. Using a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm) is recommended.
12
12
 
13
- Before installing and using sprockets-sass_embedded, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (or newer) installed. If you're using [Bundler](https://bundler.io) to manage gem dependencies, add sprockets-sass_embedded to your project's Gemfile:
13
+ sprockets-sass_embedded is developed using Ruby 2.7.8 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/jgarber623/sprockets-sass_embedded/actions).
14
14
 
15
- ```ruby
16
- gem 'sprockets-sass_embedded'
17
- ```
15
+ ## Installation
18
16
 
19
- and run `bundle install` in your shell.
17
+ Add sprockets-sass_embedded to your project's `Gemfile` and run `bundle install`:
20
18
 
21
- To install the gem manually, run the following in your shell:
19
+ ```ruby
20
+ source "https://rubygems.org"
22
21
 
23
- ```sh
24
- gem install sprockets-sass_embedded
22
+ gem "sprockets-sass_embedded"
25
23
  ```
26
24
 
27
25
  ## Usage
@@ -46,8 +44,8 @@ class App < Sinatra::Base
46
44
 
47
45
  register Sinatra::AssetPipeline
48
46
 
49
- get '/' do
50
- 'Hello, world!'
47
+ get "/" do
48
+ "Hello, world!"
51
49
  end
52
50
  end
53
51
  ```
@@ -66,7 +64,7 @@ class App < Roda
66
64
  precompile: %w[application.css]
67
65
 
68
66
  route do |r|
69
- r.sprockets unless opts[:environment] == 'production'
67
+ r.sprockets unless opts[:environment] == "production"
70
68
 
71
69
  r.root do
72
70
  render :index
@@ -79,7 +77,7 @@ run App.freeze.app
79
77
 
80
78
  ## Asset Helpers
81
79
 
82
- sprockets-sass-embedded includes a number of familiar helpers (e.g. `image_path`, `image_url`, `font_path`, `font_url`) that generate asset paths for use in your application. See [the `Functions` module](https://github.com/jgarber623/sprockets-sass_embedded/blob/main/lib/sprockets/sass_embedded/sass_processor.rb#L144-L318) in `lib/sprockets/sass_embedded/sass_processor.rb` for the available helpers.
80
+ sprockets-sass_embedded includes a number of familiar helpers (e.g. `image_path`, `image_url`, `font_path`, `font_url`) that generate asset paths for use in your application. See [the `Functions` module](https://github.com/jgarber623/sprockets-sass_embedded/blob/main/lib/sprockets/sass_embedded/sass_processor.rb#L147-L321) in `lib/sprockets/sass_embedded/sass_processor.rb` for the available helpers.
83
81
 
84
82
  ```scss
85
83
  @font-face {
@@ -6,16 +6,16 @@ module Sprockets
6
6
  #
7
7
  # @example Using the default options.
8
8
  #
9
- # environment.register_bundle_processor 'text/css',
9
+ # environment.register_bundle_processor "text/css",
10
10
  # Sprockets::SassEmbedded::SassCompressor
11
11
  #
12
12
  # @example Passing options to the SassEmbedded compiler.
13
13
  #
14
- # environment.register_bundle_processor 'text/css',
14
+ # environment.register_bundle_processor "text/css",
15
15
  # Sprockets::SassEmbedded::SassCompressor.new({ ... })
16
16
  #
17
17
  class SassCompressor
18
- VERSION = '1'
18
+ VERSION = "1"
19
19
 
20
20
  private_constant :VERSION
21
21
 
@@ -52,7 +52,7 @@ module Sprockets
52
52
  Autoload::SassEmbedded::Embedded::VERSION,
53
53
  VERSION,
54
54
  DigestUtils.digest(@options)
55
- ].join(':')
55
+ ].join(":")
56
56
  end
57
57
 
58
58
  # @param input [Hash]
@@ -18,15 +18,16 @@ module Sprockets
18
18
  @functions
19
19
  .public_instance_methods
20
20
  .each_with_object({}) do |symbol, obj|
21
- parameters = instance.method(symbol)
22
- .parameters
23
- .filter_map { |parameter| "$#{parameter.last}" if parameter.first == :req }
21
+ parameters = instance
22
+ .method(symbol)
23
+ .parameters
24
+ .filter_map { |parameter| "$#{parameter.last}" if parameter.first == :req }
24
25
 
25
- obj["#{symbol}(#{parameters.join(', ')})"] = ->(args) { instance.send(symbol, *args) }
26
+ obj["#{symbol}(#{parameters.join(', ')})"] = ->(args) { instance.public_send(symbol, *args) }
26
27
  end
27
28
  end
28
29
 
29
- alias_method :to_h, :to_hash
30
+ alias to_h to_hash
30
31
 
31
32
  private
32
33
 
@@ -37,7 +38,7 @@ module Sprockets
37
38
 
38
39
  private_constant :DartSassFunctionsHash
39
40
 
40
- VERSION = '1'
41
+ VERSION = "1"
41
42
 
42
43
  private_constant :VERSION
43
44
 
@@ -70,11 +71,12 @@ module Sprockets
70
71
  @cache_version = cache_version
71
72
  @sass_config = sass_config
72
73
 
73
- @functions = Module.new do
74
- include Functions
75
- include functions if functions
76
- class_eval(&block) if block_given?
77
- end
74
+ @functions =
75
+ Module.new do
76
+ include Functions
77
+ include functions if functions
78
+ class_eval(&block) if block_given?
79
+ end
78
80
  end
79
81
 
80
82
  # @return [String]
@@ -85,7 +87,7 @@ module Sprockets
85
87
  VERSION,
86
88
  Autoload::SassEmbedded::Embedded::VERSION,
87
89
  @cache_version
88
- ].join(':')
90
+ ].join(":")
89
91
  end
90
92
 
91
93
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
@@ -121,7 +123,7 @@ module Sprockets
121
123
  result.loaded_urls.each do |url|
122
124
  scheme, _host, path, _query = URIUtils.split_file_uri(url)
123
125
 
124
- next unless scheme == 'file'
126
+ next unless scheme == "file"
125
127
 
126
128
  sass_dependencies << path
127
129
  context.metadata[:dependencies] << URIUtils.build_file_digest_uri(path)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sprockets
4
4
  module SassEmbedded
5
- VERSION = '0.1.0'
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -1,19 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'sass-embedded'
4
- require 'sprockets'
3
+ require "sass-embedded"
4
+ require "sprockets"
5
5
 
6
- require_relative 'sass_embedded/sass_compressor'
7
- require_relative 'sass_embedded/sass_processor'
8
- require_relative 'sass_embedded/scss_processor'
6
+ require_relative "sass_embedded/sass_compressor"
7
+ require_relative "sass_embedded/sass_processor"
8
+ require_relative "sass_embedded/scss_processor"
9
9
 
10
10
  module Sprockets
11
11
  module Autoload
12
12
  SassEmbedded = ::Sass
13
13
  end
14
14
 
15
- register_transformer 'text/sass', 'text/css', SassEmbedded::SassProcessor
16
- register_transformer 'text/scss', 'text/css', SassEmbedded::ScssProcessor
15
+ register_transformer "text/sass", "text/css", SassEmbedded::SassProcessor
16
+ register_transformer "text/scss", "text/css", SassEmbedded::ScssProcessor
17
17
 
18
- register_compressor 'text/css', :sass_embedded, SassEmbedded::SassCompressor
18
+ register_compressor "text/css", :sass_embedded, SassEmbedded::SassCompressor
19
19
  end
@@ -1,32 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'lib/sprockets/sass_embedded/version'
3
+ require_relative "lib/sprockets/sass_embedded/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = '>= 2.7', '< 4'
6
+ spec.required_ruby_version = ">= 2.7"
7
7
 
8
- spec.name = 'sprockets-sass_embedded'
8
+ spec.name = "sprockets-sass_embedded"
9
9
  spec.version = Sprockets::SassEmbedded::VERSION
10
- spec.authors = ['Jason Garber']
11
- spec.email = ['jason@sixtwothree.org']
10
+ spec.authors = ["Jason Garber"]
11
+ spec.email = ["jason@sixtwothree.org"]
12
12
 
13
- spec.summary = 'Process and compress Sass files using Sprockets 4 and Embedded Dart Sass.'
13
+ spec.summary = "Process and compress Sass files using Sprockets 4 and Embedded Dart Sass."
14
14
  spec.description = spec.summary
15
- spec.homepage = 'https://github.com/jgarber623/sprockets-sass_embedded'
16
- spec.license = 'MIT'
15
+ spec.homepage = "https://github.com/jgarber623/sprockets-sass_embedded"
16
+ spec.license = "MIT"
17
17
 
18
- spec.files = Dir['lib/**/*'].reject { |f| File.directory?(f) }
19
- spec.files += %w[LICENSE README.md]
18
+ spec.files = Dir["lib/**/*"].reject { |f| File.directory?(f) }
19
+ spec.files += %w[LICENSE CHANGELOG.md README.md]
20
20
  spec.files += %w[sprockets-sass_embedded.gemspec]
21
21
 
22
- spec.require_paths = ['lib']
22
+ spec.require_paths = ["lib"]
23
23
 
24
24
  spec.metadata = {
25
- 'bug_tracker_uri' => "#{spec.homepage}/issues",
26
- 'changelog_uri' => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
27
- 'rubygems_mfa_required' => 'true'
25
+ "bug_tracker_uri" => "#{spec.homepage}/issues",
26
+ "changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
27
+ "rubygems_mfa_required" => "true"
28
28
  }
29
29
 
30
- spec.add_runtime_dependency 'sass-embedded', '>= 1.54.6'
31
- spec.add_runtime_dependency 'sprockets', '~> 4.0'
30
+ spec.add_runtime_dependency "sass-embedded", ">= 1.54.6"
31
+ spec.add_runtime_dependency "sprockets", "~> 4.0"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-sass_embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-17 00:00:00.000000000 Z
11
+ date: 2023-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-embedded
@@ -45,6 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - CHANGELOG.md
48
49
  - LICENSE
49
50
  - README.md
50
51
  - lib/sprockets/sass_embedded.rb
@@ -58,7 +59,7 @@ licenses:
58
59
  - MIT
59
60
  metadata:
60
61
  bug_tracker_uri: https://github.com/jgarber623/sprockets-sass_embedded/issues
61
- changelog_uri: https://github.com/jgarber623/sprockets-sass_embedded/blob/v0.1.0/CHANGELOG.md
62
+ changelog_uri: https://github.com/jgarber623/sprockets-sass_embedded/blob/v0.2.1/CHANGELOG.md
62
63
  rubygems_mfa_required: 'true'
63
64
  post_install_message:
64
65
  rdoc_options: []
@@ -69,16 +70,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
70
  - - ">="
70
71
  - !ruby/object:Gem::Version
71
72
  version: '2.7'
72
- - - "<"
73
- - !ruby/object:Gem::Version
74
- version: '4'
75
73
  required_rubygems_version: !ruby/object:Gem::Requirement
76
74
  requirements:
77
75
  - - ">="
78
76
  - !ruby/object:Gem::Version
79
77
  version: '0'
80
78
  requirements: []
81
- rubygems_version: 3.3.16
79
+ rubygems_version: 3.1.6
82
80
  signing_key:
83
81
  specification_version: 4
84
82
  summary: Process and compress Sass files using Sprockets 4 and Embedded Dart Sass.