mata 0.7.0 → 0.8.0

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: 959629ea5fdd32e3175367b7ddf0ceed61679a9652349f2cd130b4ee4eb70ff4
4
- data.tar.gz: 7113f529003ecc704a8f66056a32c036da85a6e05d47c9622ac4eb9545f737c3
3
+ metadata.gz: 22c5e26cd983f1031f3d717496815e4250e3d7fa3e4ee66551ca23e0adef9146
4
+ data.tar.gz: f0ec9cdf014a771c112b853cc745d593e6dae01b728321ff92722cb35d4d5c68
5
5
  SHA512:
6
- metadata.gz: 0eb68cc7feb9071eecdc8d528be0713a680caeae621dd5bf1d45d766efc16222f42d7c71c6e4eb3b21b50d0034c6812b71a46be9ad83d4f0a971ecb8d743280d
7
- data.tar.gz: f15cf5f31841fecc076ed8cbd36d3d6e3775e6e7d74232475eb96947237650a0530af18bcab5abde6c4236ddef54b75110752dab561872f3a116128787cc9d95
6
+ metadata.gz: 45a5624b8f699c5751cb38798e8856ee4a120c591060efdcda5e4e36e9a4027213d883df09f3cc343fd114d46ed095d46a0afdb73da44ba503eba7b6759d408c
7
+ data.tar.gz: 0e32957741e3094c2b41bfb35e5ae58df6799bf5b95a48ff8b333dfaace1e4739c35e7cb674f8de5b6b4b843ad08075df27c453bc6a3f59975bdc33641c2ac1f
data/README.md CHANGED
@@ -24,13 +24,14 @@ bundle add mata --group=development
24
24
 
25
25
  ### Rails
26
26
 
27
- Mata automatically sets up middleware in development with sensible defaults. You can optionally configure:
28
27
  ```ruby
29
- # config/initializers/mata.rb
30
- Mata::Railtie.configure do |config|
31
- config.watch_paths = %w[app]
32
- config.skip_paths = %w[app/assets/builds app/assets/cache]
33
- end
28
+ # config/environments/development.rb
29
+ config.middleware.insert_before(
30
+ ActionDispatch::Static,
31
+ Mata,
32
+ watch: %w[app/views app/assets],
33
+ skip: %w[app/assets/build]
34
+ )
34
35
  ```
35
36
 
36
37
 
data/lib/mata/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Mata
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
data/lib/mata.rb CHANGED
@@ -6,12 +6,13 @@ require "json"
6
6
  require "mata/agent"
7
7
  require "mata/broadcaster"
8
8
  require "mata/watch_tower"
9
- require "mata/railtie" if defined?(Rails::Railtie)
10
9
 
11
10
  class Mata
12
11
  def initialize(app, options = {})
13
12
  @app = app
14
13
 
14
+ return if ENV["MATA_DISABLED"] == "true"
15
+
15
16
  @watch_tower = WatchTower.new(options)
16
17
  @broadcaster = Broadcaster.new
17
18
  @agent = Agent.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails Designer
@@ -50,7 +50,6 @@ files:
50
50
  - lib/mata/broadcaster.rb
51
51
  - lib/mata/client.js
52
52
  - lib/mata/idiomorph.min.js
53
- - lib/mata/railtie.rb
54
53
  - lib/mata/version.rb
55
54
  - lib/mata/watch_tower.rb
56
55
  homepage: https://railsdesigner.com/mata/
data/lib/mata/railtie.rb DELETED
@@ -1,27 +0,0 @@
1
- require "rails/railtie"
2
-
3
- class Mata
4
- class Railtie < Rails::Railtie
5
- class << self
6
- attr_accessor :watch_paths, :skip_paths
7
-
8
- def configure
9
- yield(self)
10
- end
11
- end
12
-
13
- self.watch_paths = %w[app/views app/assets]
14
- self.skip_paths = %w[tmp log node_modules]
15
-
16
- config.before_configuration do |app|
17
- if Rails.env.development?
18
- app.config.middleware.insert_before(
19
- ActionDispatch::Static,
20
- Mata,
21
- watch: watch_paths,
22
- skip: skip_paths
23
- )
24
- end
25
- end
26
- end
27
- end