tlm 0.4.1 → 0.4.2

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: af9e276af7c74c59de0ac25ac1f652efd94e428cb1d42c51bffb2a0ec2c8eec0
4
- data.tar.gz: c6b6474b9ac98adf3f5c6d2359cbb8752934d12ff030e8f13b02252216d83931
3
+ metadata.gz: 1c951e4503baca576920c861f613771265366319fc473190fc07f9e36ab46517
4
+ data.tar.gz: ce3b7c8dfca28d6557f6c5469cba66d9105d8fe586931209e634ac24ddd63ec8
5
5
  SHA512:
6
- metadata.gz: b2e5245af2db570be4e74c38acbef4a02a7636b5ed25784171f5c0df0d84d83ce48bce6b09c9f8d0180149a65d0bda200ce6d7690ca17f1ddf32a207523d01cd
7
- data.tar.gz: 78babf806bdf6714cb61a5857020c00b0edd3b4edf483dff1f9c13449b2a9038ca8004a97ff9e1e28ce59ccca79a3fedcd462bb5001ef56e1483f892fe354c61
6
+ metadata.gz: 2b2e7f38edb54735cd5715c2fccf3f52a77e615c9b997f3691d7aeda0b29fc2fb6b68bd7895926c666e1b403d3ae95fec13e6853285766b6f2a46752db8763fd
7
+ data.tar.gz: ecfaf1d8287328905fdf9fc5d893ee57bc1eb06c37ccce29f61d2554cb9be0222fb069ab72acfefd150586f73300ca3644afa165450dda827e391554bcc22820
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2
4
+
5
+ - `tlm:install` recognizes a start of the browser SDK in another module
6
+ even when its lines are the very ones it writes itself: 0.4.1 missed
7
+ it there, wrote `app/javascript/tlm.js` with a second start, and then
8
+ called both `identical`. Only `application.js` is where 0.3.0's start
9
+ is moved from.
10
+
3
11
  ## 0.4.1
4
12
 
5
13
  - `tlm:install` keeps a start of the browser SDK the app already has in
data/lib/tlm/install.rb CHANGED
@@ -130,7 +130,13 @@ module Tlm
130
130
  def other_starts
131
131
  @other_starts ||= Dir.glob(File.join(@root, JAVASCRIPT)).sort.map { |path| relative(path) }
132
132
  .reject { |path| path == BOOTSTRAP_JS }
133
- .select { |path| starts_sdk?(read(path).sub(INLINE_BOOTSTRAP, '')) }
133
+ .select { |path| starts_sdk?(code_besides_0_3_0_start(path)) }
134
+ end
135
+
136
+ # 0.3.0 wrote its start at the top of application.js, and moving it is
137
+ # this installer's job; anywhere else, the same lines are the app's own.
138
+ def code_besides_0_3_0_start(path)
139
+ path == APPLICATION_JS ? read(path).sub(INLINE_BOOTSTRAP, '') : read(path)
134
140
  end
135
141
 
136
142
  def starts_sdk?(code) = code.match?(/from\s+(["'])@hullop\/tlm\1/) && code.match?(/\binit\s*\(/)
data/lib/tlm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tlm
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tlm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hullop