sewing_kit 0.30.0 → 0.31.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: 6d49a1c122dc45e1d1dd845253c81b9e70ff2dbea842da8f0f02cc9fcda2818b
4
- data.tar.gz: 5c2f538d499f9d74f70b475e80ae99adcb1fa9ac6ab4170a5b36ab0505c1337f
3
+ metadata.gz: 21441a0459fdd78c584adb2504b32f2ba964017be52285f807039dcd13597b98
4
+ data.tar.gz: dccb4fa02846478b4034794ca7a3f5510ce75a1e57064a561ce589f205b8a828
5
5
  SHA512:
6
- metadata.gz: 2ceebe52384ab58f86c83904978bd4bf87ee8646150fa313bda61db1f8729ddf82aaa10c91f0c8f30b89ef853f788e681eb4c9ebc25e9b4dc33b1cff85470d5f
7
- data.tar.gz: 97ec1f7290f43f7d5d8b540f33b822453bf074585b268a2617af54a685d4c2fc78b18d52d4588ddf3b1065021f93270243020dd8a71ec5cd4f6c7d752cd7ae97
6
+ metadata.gz: afff024270869a6daa67dfda3d35f1568ff24427cfc0b388478266b5a1ec096c1412f399285da0ee2bdeb9a9998b493959eb7db4137c9d196ce71c729a1102e1
7
+ data.tar.gz: a2e18ad68fd40637eb8fcf94700df6806dde7b9bfc55aa6f531bae32f0b0bd6bbe54828de4b6fb583ea819f5983d0e4fe4b5888cce8f70233cb82512ec9c5f5f
@@ -3,4 +3,5 @@ module SewingKit
3
3
  end
4
4
 
5
5
  require "sewing_kit/version"
6
+ require "sewing_kit/configuration"
6
7
  require "sewing_kit/rails"
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
  module SewingKit
3
3
  class Configuration
4
- attr_accessor :build_options
4
+ attr_accessor :build_options, :dev_server_sewing_kit_bin
5
5
 
6
6
  def initialize
7
7
  @build_options = nil
8
+ @dev_server_sewing_kit_bin = 'node_modules/.bin/sewing-kit'
8
9
  end
9
10
  end
10
11
 
@@ -16,19 +16,19 @@ require 'sewing_kit/webpack/dev'
16
16
 
17
17
  module SewingKit
18
18
  class Railtie < ::Rails::Railtie
19
- initializer "sewing_kit.initialize_webpack" do
19
+ # rubocop:disable Metrics/BlockLength
20
+ config.after_initialize do
20
21
  is_development = Rails.env.development? && ENV['SK_SIMULATE_PRODUCTION'] != '1'
21
22
  if is_development && (Rails.const_defined?(:Server) || ENV['SK_FORCE_DEV_SERVER'])
22
23
  webpack_dev = SewingKit::Webpack::Dev.new
23
24
  webpack_dev.start
24
25
  end
25
- end
26
26
 
27
- config.after_initialize do
28
27
  ActiveSupport.on_load(:action_view) do
29
28
  include SewingKit::Webpack::Helper
30
29
  end
31
30
  end
31
+ # rubocop:enable Metrics/BlockLength
32
32
 
33
33
  rake_tasks do
34
34
  load "tasks/sewing_kit.rake"
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SewingKit
3
- VERSION = "0.30.0"
3
+ VERSION = "0.31.0"
4
4
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  require 'sewing_kit/webpack/webpack'
3
- require 'sewing_kit/configuration'
4
3
 
5
4
  module SewingKit
6
5
  module Webpack
@@ -25,7 +25,7 @@ module SewingKit
25
25
  private
26
26
 
27
27
  def spawn
28
- sewing_kit_bin = 'node_modules/.bin/sewing-kit'
28
+ sewing_kit_bin = SewingKit.configuration.dev_server_sewing_kit_bin
29
29
  raise NodeSewingKitNotInstalled unless File.exist?(sewing_kit_bin)
30
30
 
31
31
  Kernel.spawn(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sewing_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Sauve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties