inertia 0.1.9 → 0.1.10

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: 7cfbcab66286512607ccc8cbac8cf915d1d24cb0d090edf83158389271074a82
4
- data.tar.gz: 8a870f09bd8438711c31bde3f2a56ec993e509661800318f48004d9b612f3cf4
3
+ metadata.gz: d192b575d488950c5603f29a006840292c9e899becaf0257f811eb2c2e71ea7f
4
+ data.tar.gz: 13bd2c0329700b2f29650be8e1e3fdc6ee49d8e2f038f6aac265fe6cfaae80e6
5
5
  SHA512:
6
- metadata.gz: e1faae7e7c745b54c608c1bb24918e3179c5a1dab96b1e1a811bd96d807794888d1420dbcaf1822710c69c0bfdee050d8f481a164d41f1d3d56d248c9946924f
7
- data.tar.gz: 00db0f9f6367b55a7ac92010b887c8941653ecdb9ce4c5854a853b52ae6fdca303c9963d7dd5905fc3282e4d3b16774bc895fbff359cc1b80758804657813814
6
+ metadata.gz: a7c4fe89bca678aaa6922a8771afa797300c10bb5b5eaf5092884d0ac92339d141e2b539f06526e2f4699210ec92893d46c2a3a8f8b72dff4dd359f3f1bd5b7d
7
+ data.tar.gz: 48647379664d95aeed41f96ed4cd83e50db4ff927c612d216f2723b95891c4a9d0d61322df10b3923abe05023b188add3cf772cb34b317c777d085199591dfa7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- inertia (0.1.9)
4
+ inertia (0.1.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/History.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ 0.1.10 / 2018-10-21
3
+ ==================
4
+
5
+ * Handle unicode filenames
6
+ * Add more js related ignores
7
+ * Ignore yml
8
+ * Add ignore ruby spec
9
+
2
10
  0.1.9 / 2018-10-21
3
11
  ==================
4
12
 
data/exe/in CHANGED
@@ -5,9 +5,14 @@ require 'inertia'
5
5
  Inertia.configure do |config|
6
6
  config.ignore_scss = ARGV.include?('--ignore-scss')
7
7
  config.ignore_js = ARGV.include?('--ignore-js')
8
+ config.ignore_jsx = ARGV.include?('--ignore-jsx')
9
+ config.ignore_ts = ARGV.include?('--ignore-ts')
10
+ config.ignore_tsx = ARGV.include?('--ignore-tsx')
8
11
  config.ignore_haml = ARGV.include?('--ignore-haml')
9
12
  config.ignore_rabl = ARGV.include?('--ignore-rabl')
10
13
  config.ignore_erb = ARGV.include?('--ignore-erb')
14
+ config.ignore_ruby_spec = ARGV.include?('--ignore-ruby-spec')
15
+ config.ignore_yml = ARGV.include?('--ignore-yml')
11
16
  end
12
17
 
13
18
  Inertia::Resistance.display
data/lib/inertia/mass.rb CHANGED
@@ -19,6 +19,18 @@ module Inertia
19
19
  @js ||= extension == '.js'
20
20
  end
21
21
 
22
+ def jsx?
23
+ @jsx ||= extension == '.jsx'
24
+ end
25
+
26
+ def ts?
27
+ @ts ||= extension == '.ts'
28
+ end
29
+
30
+ def tsx?
31
+ @tsx ||= extension == '.tsx'
32
+ end
33
+
22
34
  def haml?
23
35
  @haml ||= extension == '.haml'
24
36
  end
@@ -31,6 +43,14 @@ module Inertia
31
43
  @erb ||= extension == '.erb'
32
44
  end
33
45
 
46
+ def ruby_spec?
47
+ @ruby_spec ||= path.include?('_spec.rb')
48
+ end
49
+
50
+ def yml?
51
+ @yml ||= extension == '.yml'
52
+ end
53
+
34
54
  def extension
35
55
  @extension ||= File.extname(path)
36
56
  end
@@ -57,9 +77,14 @@ module Inertia
57
77
  !text? ||
58
78
  scss? && Inertia.config.ignore_scss ||
59
79
  js? && Inertia.config.ignore_js ||
80
+ jsx? && Inertia.config.ignore_jsx ||
81
+ ts? && Inertia.config.ignore_ts ||
82
+ tsx? && Inertia.config.ignore_tsx ||
60
83
  haml? && Inertia.config.ignore_haml ||
61
84
  rabl? && Inertia.config.ignore_rabl ||
62
- erb? && Inertia.config.ignore_erb
85
+ erb? && Inertia.config.ignore_erb ||
86
+ ruby_spec? && Inertia.config.ignore_ruby_spec ||
87
+ yml? && Inertia.config.ignore_yml
63
88
  end
64
89
  end
65
90
  end
@@ -8,7 +8,7 @@ module Inertia
8
8
  end
9
9
 
10
10
  def self.tracked_files
11
- @tracked_files ||= `git ls-files`.split
11
+ @tracked_files ||= `git ls-files -z`.split("\u0000")
12
12
  end
13
13
 
14
14
  # Git will list all files, this groups the top level direc
@@ -1,3 +1,3 @@
1
1
  module Inertia
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
data/lib/inertia.rb CHANGED
@@ -4,6 +4,7 @@ require 'inertia/mass'
4
4
  require 'inertia/grouped_mass'
5
5
  require 'inertia/resistance'
6
6
 
7
+ # Be nimble, be organized.
7
8
  module Inertia
8
9
  class << self
9
10
  attr_accessor :config
@@ -14,7 +15,17 @@ module Inertia
14
15
  yield(config)
15
16
  end
16
17
 
18
+ # Hold the configuration for the command
17
19
  class Configuration
18
- attr_accessor :ignore_scss, :ignore_js, :ignore_haml, :ignore_rabl, :ignore_erb
20
+ attr_accessor :ignore_scss,
21
+ :ignore_js,
22
+ :ignore_jsx,
23
+ :ignore_ts,
24
+ :ignore_tsx,
25
+ :ignore_haml,
26
+ :ignore_rabl,
27
+ :ignore_erb,
28
+ :ignore_ruby_spec,
29
+ :ignore_yml
19
30
  end
20
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hood
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-21 00:00:00.000000000 Z
11
+ date: 2018-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler