inertia 0.1.8 → 0.1.9

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: 3a04f1fdb4dcea173b53a4a068922ea06995426962d3dd0a041f385b6861e886
4
- data.tar.gz: fbfb8d7be55afff396b06b706689099b9dbaa8e364ed83be257abbdc8eb0c506
3
+ metadata.gz: 7cfbcab66286512607ccc8cbac8cf915d1d24cb0d090edf83158389271074a82
4
+ data.tar.gz: 8a870f09bd8438711c31bde3f2a56ec993e509661800318f48004d9b612f3cf4
5
5
  SHA512:
6
- metadata.gz: '099d2a8e7209af51406619e84efe811f72cd810767d8d9299bcc1fc5a142376a067040d04201260f3a697b1956bb125489fd4f233e0b008718ccd8f781865ddc'
7
- data.tar.gz: 5f0b3d16df3746c0c719592350a5ba4b0f1b592d1c11d74d69a2379808521f87ada0fac2d50f24492f1721f97509534c84b603058cb1c1958a138cb6c71dba25
6
+ metadata.gz: e1faae7e7c745b54c608c1bb24918e3179c5a1dab96b1e1a811bd96d807794888d1420dbcaf1822710c69c0bfdee050d8f481a164d41f1d3d56d248c9946924f
7
+ data.tar.gz: 00db0f9f6367b55a7ac92010b887c8941653ecdb9ce4c5854a853b52ae6fdca303c9963d7dd5905fc3282e4d3b16774bc895fbff359cc1b80758804657813814
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- inertia (0.1.8)
4
+ inertia (0.1.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 0.1.9 / 2018-10-21
3
+ ==================
4
+
5
+ * Add version in output
6
+ * Don't use Kernel#`
7
+
2
8
  0.1.8 / 2018-10-21
3
9
  ==================
4
10
 
data/lib/inertia/mass.rb CHANGED
@@ -8,7 +8,7 @@ module Inertia
8
8
  attr_reader :path
9
9
 
10
10
  def text?
11
- @text ||= `file -b --mime #{path}`.match?('text')
11
+ @text ||= File.open(path) { |file| file.read.ascii_only? }
12
12
  end
13
13
 
14
14
  def scss?
@@ -38,7 +38,7 @@ module Inertia
38
38
  def lines
39
39
  return 0 if ignored?
40
40
 
41
- @lines ||= `wc -l "#{path}" | awk '{print $1}'`.chomp.to_i
41
+ @lines ||= File.open(path) { |file| file.each_line.count }
42
42
  end
43
43
 
44
44
  def percent_overall_lines
@@ -3,7 +3,7 @@ module Inertia
3
3
  # resistance.
4
4
  class Resistance
5
5
  def self.display
6
- puts "#{total_lines} lines\n\n"
6
+ puts "#{total_lines} lines\tInertia v#{Inertia::VERSION}\n\n"
7
7
  puts grouped_masses.sort.reverse
8
8
  end
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Inertia
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hood