nanoc-webpack.rb 0.10.4 → 0.10.5

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: 8eb938c849a2f86ad3fd820199a9c8b6274b53230de2e78801d293d0d7874c51
4
- data.tar.gz: 6a3f8cbe8ff109874eecdbc51a861c04cc49fa2b77bb488ddefc3359ad051acd
3
+ metadata.gz: 2fdc00807eb072da16f117215c66052074d76b7dc40a76899298d0fa755b9376
4
+ data.tar.gz: b0430e14cf0c766dde324210a320e1c6f2a2e6d7c3f99232d280b8ab367491fb
5
5
  SHA512:
6
- metadata.gz: 03c0bd553f99927965c1675103c5f1a863329af84df2169f76ed2a55b0c8abc30832174c10727d543e33cbc420dc7ed32da5032eceeed05a0091d6eb76bb9b97
7
- data.tar.gz: 30590fa0b5641c309883b180e818c960491551fc8279f125586ce7422a9cd4b4ec3725899e7dcd35be4cdf86a3b1780a0bec0ec8852e06ac9b8ab5a18c92845c
6
+ metadata.gz: 68416b498b3dd31793efa9997c07436ee03637514a1cc1f6626916cf7f1e2c1414da09c8622cd62e9fa371c831937ce0e71c2f70871bd61881176614c19bcea5
7
+ data.tar.gz: 3cf699b79de05f3760f4e98c4056d3ca93832b33957546b067c2a5f4caaac2611b23d310621884cdb1f72c33679d7b19c117d52c5d596e27d94e76b8a11d7483
@@ -12,7 +12,7 @@ jobs:
12
12
  fail-fast: false
13
13
  matrix:
14
14
  os: [ubuntu-latest]
15
- ruby: [3.1, 3.2]
15
+ ruby: [3.1, 3.2, 3.3]
16
16
  runs-on: ${{ matrix.os }}
17
17
  steps:
18
18
  - uses: actions/checkout@v2
@@ -20,4 +20,4 @@ jobs:
20
20
  with:
21
21
  ruby-version: ${{ matrix.ruby }}
22
22
  - run: bundle install
23
- - run: bundle exec rspec spec/
23
+ - run: rake ci
data/.rubocop.yml CHANGED
@@ -20,11 +20,11 @@ AllCops:
20
20
  # Enabled
21
21
  Style/FrozenStringLiteralComment:
22
22
  Enabled: true
23
- Layout/ArrayAlignment:
24
- Enabled: false
25
23
 
26
24
  ##
27
25
  # Disabled
26
+
27
+ # RSpec
28
28
  RSpec/FilePath:
29
29
  Enabled: false
30
30
  RSpec/NestedGroups:
@@ -49,9 +49,25 @@ RSpec/MessageSpies:
49
49
  Enabled: false
50
50
  RSpec/MultipleMemoizedHelpers:
51
51
  Enabled: false
52
+ RSpec/ExampleLength:
53
+ Enabled: false
54
+ RSpec/StubbedMock:
55
+ Enabled: false
56
+
57
+ # Style
52
58
  Style/LambdaCall:
53
59
  Enabled: false
60
+ Style/SafeNavigation:
61
+ Enabled: false
62
+ Layout/ArrayAlignment:
63
+ Enabled: false
64
+
65
+ # Layout
54
66
  Layout/MultilineMethodCallIndentation:
55
67
  Enabled: false
56
68
  Layout/ArgumentAlignment:
57
69
  Enabled: false
70
+ Layout/FirstArrayElementIndentation:
71
+ Enabled: false
72
+ Layout/FirstArgumentIndentation:
73
+ Enabled: false
data/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  nanoc-webpack.rb is a
4
4
  [nanoc](https://nanoc.app)
5
- filter that integrates
5
+ filter that adds
6
6
  [webpack](https://webpack.js.org/)
7
- into nanoc. <br>
8
- The filter acts as a bridge that connects nanoc,
9
- and the JavaScript, TypeScript, and nodejs ecosystems.
7
+ support to nanoc. <br>
8
+ The filter connects nanoc to the the JavaScript, TypeScript,
9
+ and nodejs ecosystems.
10
10
 
11
11
  ## Examples
12
12
 
@@ -74,9 +74,7 @@ end
74
74
 
75
75
  ## Install
76
76
 
77
- **Rubygems.org**
78
-
79
- nanoc-webpack.rb can be installed via rubygems.org
77
+ nanoc-webpack.rb can be installed via rubygems.org:
80
78
 
81
79
  gem install nanoc-webpack.rb
82
80
 
@@ -92,6 +90,6 @@ nanoc-webpack.rb can be installed via rubygems.org
92
90
 
93
91
  ## License
94
92
 
95
- [BSD Zero Clause](https://choosealicense.com/licenses/0bsd/).
93
+ [BSD Zero Clause](https://choosealicense.com/licenses/0bsd/)
96
94
  <br>
97
- See [LICENSE](./LICENSE).
95
+ See [LICENSE](./LICENSE)
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ desc "Run CI tasks"
2
+ task :ci do
3
+ sh "bundle exec rubocop"
4
+ sh "bundle exec rspec"
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :test do
9
+ sh "bundle exec rspec"
10
+ end
11
+ task default: :test
@@ -61,7 +61,7 @@ module Nanoc::Webpack
61
61
  tmpdir = File.join(Dir.getwd, "tmp", "webpack")
62
62
  name = item.identifier.to_s
63
63
  file = Tempfile.new(
64
- [ File.basename(name), File.extname(name).sub(/\A\.(ts|tsx|jsx)\z/, '.js') ],
64
+ [File.basename(name), File.extname(name).sub(/\A\.(ts|tsx|jsx)\z/, ".js")],
65
65
  mkdir_p(tmpdir).last
66
66
  )
67
67
  file.write(content)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nanoc::Webpack
2
4
  module Spawn
3
5
  require "test-cmd"
@@ -23,8 +25,8 @@ module Nanoc::Webpack
23
25
  "#{File.basename(exe)} exited unsuccessfully\n" \
24
26
  "(item: #{item.identifier})\n" \
25
27
  "(exit code: #{r.exit_status})\n" \
26
- "(stdout: #{r.stdout.gsub(Dir.getwd, '')[1..]&.chomp})\n" \
27
- "(stderr: #{r.stderr.gsub(Dir.getwd, '')[1..]&.chomp})\n",
28
+ "(stdout: #{r.stdout.gsub(Dir.getwd, "")[1..]&.chomp})\n" \
29
+ "(stderr: #{r.stderr.gsub(Dir.getwd, "")[1..]&.chomp})\n",
28
30
  []
29
31
  end
30
32
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Webpack
5
- VERSION = "0.10.4"
5
+ VERSION = "0.10.5"
6
6
  end
7
7
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.summary = "nanoc-webpack.rb = nanoc + webpack"
14
14
  gem.description = gem.summary
15
15
  gem.add_runtime_dependency "ryo.rb", "~> 0.5"
16
- gem.add_runtime_dependency "test-cmd.rb", "~> 0.12.3"
16
+ gem.add_runtime_dependency "test-cmd.rb", "~> 0.12.4"
17
17
  gem.add_development_dependency "yard", "~> 0.9"
18
18
  gem.add_development_dependency "redcarpet", "~> 3.5"
19
19
  gem.add_development_dependency "rspec", "~> 3.10"
data/spec/filter_spec.rb CHANGED
@@ -136,8 +136,8 @@ RSpec.describe Nanoc::Webpack::Filter do
136
136
  expect(filter).to receive(:cmd).with(
137
137
  "node",
138
138
  "./node_modules/webpack/bin/webpack.js",
139
- *cmdline,
140
- ).and_return(Ryo('success?' => true))
139
+ *cmdline
140
+ ).and_return(Ryo("success?" => true))
141
141
  filter.run(item)
142
142
  end
143
143
  end
@@ -148,8 +148,8 @@ RSpec.describe Nanoc::Webpack::Filter do
148
148
  "node",
149
149
  "./node_modules/webpack/bin/webpack.js",
150
150
  "--no-cache",
151
- *cmdline,
152
- ).and_return(Ryo('success?' => true))
151
+ *cmdline
152
+ ).and_return(Ryo("success?" => true))
153
153
  filter.run(item, argv: ["--no-cache"])
154
154
  end
155
155
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-webpack.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-15 00:00:00.000000000 Z
11
+ date: 2024-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ryo.rb
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.12.3
33
+ version: 0.12.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.12.3
40
+ version: 0.12.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: yard
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -124,6 +124,7 @@ files:
124
124
  - Gemfile
125
125
  - LICENSE
126
126
  - README.md
127
+ - Rakefile
127
128
  - lib/nanoc-webpack.rb
128
129
  - lib/nanoc/webpack.rb
129
130
  - lib/nanoc/webpack/filter.rb