duffy 0.3.6 → 1.0.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
- SHA1:
3
- metadata.gz: 3da2d7475ba7af126e259d9cdf3725966d6401ad
4
- data.tar.gz: b64e2d6e331b41b49b8ee55dfad71b0bd41c685d
2
+ SHA256:
3
+ metadata.gz: bfd9a4c939fe109c02bc69dc81dc75df844298b6fc0b37eb2cd170861892ac34
4
+ data.tar.gz: '08af4375c00007f03e276286fad316cf5c29a6974699312bd4881ccbc7e84485'
5
5
  SHA512:
6
- metadata.gz: 193bbe5c3042074a42bb0ad36004cc3c57b213fd0a12df06d8742c8f6e032219c51a7a367eac8004ea00dce7e9581d673ecdb423b148019ccf0cd9140dec8b7c
7
- data.tar.gz: 2dafe1054257352e6a031a3913709301e8f94ea45c323351257d0d2a7a0ada2b1bd5a70289083c104fe2d7929fc781fdf806e4fce79b3534d03628fd82b59a14
6
+ metadata.gz: 941b1352de144391d63b632f3c658509c695c2b6be2036142e40eaf06f7b5ef741f074de10dd560c1fa4c4e438123dd90f7cf84be197518b45cb9c2ccf090855
7
+ data.tar.gz: '0483e089f818fb5c10f8ff6ffbf22e691b72e7095c247081637327e5e81c67e59ae65ad67b34d0e1edd75eab5a1df3d2445334fb9c1f2bbd31df364b42d72edc'
data/lib/duffy/system.rb CHANGED
@@ -73,8 +73,8 @@ module Duffy
73
73
  # Looks at current working directory
74
74
  def freespace
75
75
  case RUBY_PLATFORM
76
- when /darwin/ then `df -m #{Dir.pwd}`.lines[1].split[3].to_i
77
- when /linux/ then `df -m #{Dir.pwd}`.lines[1].split[3].to_i
76
+ when /darwin/ then `df -m #{Shellwords.shellescape(Dir.pwd)}`.lines[1].split[3].to_i
77
+ when /linux/ then `df -m #{Shellwords.shellescape(Dir.pwd)}`.lines[1].split[3].to_i
78
78
  else 0
79
79
  end
80
80
  end
data/lib/duffy/version.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  module Duffy
2
- VERSION = '0.3.6'
2
+ VERSION = '1.0.0'
3
3
  end
4
4
 
5
5
  # History
6
+ # 1.0.0 - Using Shellwords to escape directory listing in System.freespace.
6
7
  # 0.3.6 - Added disk freespace method. Looks at working directory.
7
8
  # 0.3.5 - Fixed linux cores detection for very high core count CPUs. Added virtualization detection on linux.
8
9
  # 0.3.4 - pretty_phone now adds the dash for 7 digit phone numbers.
data/lib/duffy.rb CHANGED
@@ -3,6 +3,7 @@ require 'active_support'
3
3
  require 'active_support/core_ext/object/blank'
4
4
  require 'date'
5
5
  require 'digest'
6
+ require 'shellwords'
6
7
 
7
8
  # Rails Only Requirements
8
9
  if defined?(Rails)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Duffy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-04 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.6.14
138
+ rubygems_version: 2.7.7
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Library of things