sprockets-sass_embedded 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f6b62daf25c2209dc30a139a96936334c2dd0716f9f167900a6437e1cf73f99
4
- data.tar.gz: 88ac1cffbca937c8cd4b718601c341e18d075e1387efc818367e4c35997ecda9
3
+ metadata.gz: fedecfe781d173f68d8e916df25b599498ac00edcbbf846937109b698dc1fb34
4
+ data.tar.gz: 4b95d0d63134034d2faa6059f5c6484c1cca7577496b6ef11fb4c366d46c7808
5
5
  SHA512:
6
- metadata.gz: b64eb2a10cd6632ed8dad9951da98913480e8cb590809a4dcbd382935caa74b3aa76dbc1e14f1fc2cd39a0b1222362367d068de3cddbf3ef000a57e4ad403b6a
7
- data.tar.gz: 6b7bcd2e47436fd26a9c46a04242e7dc70b12727489e3748d357545fe7d430c198cc3f18e86034d3d39f9e50acdff0fbb1afcd506be474fd1c3b8f2e3e901205
6
+ metadata.gz: 1ecc6b55b4331115fb13df78ef4350c44eef7f76dfbf6b89db46ae574498279d7d8b076c2e2f8036bdc86108c1c4c137746eae9c172b3921c91bb8177433352e
7
+ data.tar.gz: 868e6c741a8205009bfa0720f06b9af9a6303cc650dd292af9eda4b7a3fb2710ce32a8da89c88f2464247c01ea144bf8feacb8c41896936c49ee2083508d26c1
data/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 / 2023-12-08
4
+
5
+ - a233f04 - Remove upper bound on `required_ruby_version`
6
+ - d05edc6 - RuboCop: Style/Send
7
+ - 3c40da7 - RuboCop: Layout/MultilineAssignmentLayout
8
+ - b7cde6e - RuboCop: Style/RedundantHeredocDelimiterQuotes
9
+ - 0c887f8 - Add publish workflow
10
+ - bb9d4df - Update `spec/spec_helper.rb`
11
+ - f5c25ea - RuboCop: Style/StringLiterals
12
+ - 85a8d6e - Update RuboCop configuration
13
+ - 2663fd4 - Simplify `.rspec` config file
14
+ - e9b3808 - Add ignored revs file
15
+ - f4213a8 - Remove unnecessary gems
16
+ - 6d4aa6a - Update `.gitignore`
17
+ - e20077a - Update Ruby version to 2.7.8
18
+ - bd19756 - Simplify EditorConfig
19
+ - 17d38a8 - Update CI workflow
20
+ - 0f81747 - Remove Bundler ecosystem
21
+
22
+ ## 0.1.0 / 2022-09-16
23
+
24
+ - 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]
@@ -22,7 +22,7 @@ module Sprockets
22
22
  .parameters
23
23
  .filter_map { |parameter| "$#{parameter.last}" if parameter.first == :req }
24
24
 
25
- obj["#{symbol}(#{parameters.join(', ')})"] = ->(args) { instance.send(symbol, *args) }
25
+ obj["#{symbol}(#{parameters.join(', ')})"] = ->(args) { instance.public_send(symbol, *args) }
26
26
  end
27
27
  end
28
28
 
@@ -37,7 +37,7 @@ module Sprockets
37
37
 
38
38
  private_constant :DartSassFunctionsHash
39
39
 
40
- VERSION = '1'
40
+ VERSION = "1"
41
41
 
42
42
  private_constant :VERSION
43
43
 
@@ -70,11 +70,12 @@ module Sprockets
70
70
  @cache_version = cache_version
71
71
  @sass_config = sass_config
72
72
 
73
- @functions = Module.new do
74
- include Functions
75
- include functions if functions
76
- class_eval(&block) if block_given?
77
- end
73
+ @functions =
74
+ Module.new do
75
+ include Functions
76
+ include functions if functions
77
+ class_eval(&block) if block_given?
78
+ end
78
79
  end
79
80
 
80
81
  # @return [String]
@@ -85,7 +86,7 @@ module Sprockets
85
86
  VERSION,
86
87
  Autoload::SassEmbedded::Embedded::VERSION,
87
88
  @cache_version
88
- ].join(':')
89
+ ].join(":")
89
90
  end
90
91
 
91
92
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
@@ -121,7 +122,7 @@ module Sprockets
121
122
  result.loaded_urls.each do |url|
122
123
  scheme, _host, path, _query = URIUtils.split_file_uri(url)
123
124
 
124
- next unless scheme == 'file'
125
+ next unless scheme == "file"
125
126
 
126
127
  sass_dependencies << path
127
128
  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.0"
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.0
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-08 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.0/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.