vbsmin 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vbsmin/version.rb +1 -1
  3. data/lib/vbsmin.rb +3 -3
  4. metadata +8 -117
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f20bc497c7112197f64f96e3c8c3da2011532550cc2b7394bda862f9f1202390
4
- data.tar.gz: 6d15264fe085ef8ab8312aa50052a137b2b756a559064ee7defae8a32c51956d
3
+ metadata.gz: 35838cbe4dc519732e96f12fb3b7606446e9742521ddce394772ad13f062239b
4
+ data.tar.gz: 9d5f1b1824c35fd527ec4cabcd353cb78eda641f4957cda974baba099b616b13
5
5
  SHA512:
6
- metadata.gz: 04d51468991b87872b94e50a7941cd9836a4dda21f5354460359fed834362996a8be448e53db896951f7ac99008765b4ea622eadb5368916eba98c34e5fde863
7
- data.tar.gz: 79666d44546ff04c6f6b8064d2cb779a61a4b044043d9b4396c96f49b70c7324a479f6f9e8eef55554cc7b1dcd199be1cb46b3a6126e3e78df4337f0dfc4dbea
6
+ metadata.gz: 3383bab95d24eec4596bd5614dc106536d35dfa77c6725b38761651ceb8e271209ce76a993dd1a00c46aa2b213d46cf3e4bd62937ac4afc1f811c3316a300292
7
+ data.tar.gz: ad961008a5d5555f35540b668e4cd7999c4c2ba4cc1957a22537b19a52f5d39e3cdf5a95a62adc587ff7662b7d2b2b700c2831ac6464b0f6c60134e9d28ca210
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Version
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
data/lib/vbsmin.rb CHANGED
@@ -40,7 +40,7 @@ class VBSMin
40
40
  def minify(filepath)
41
41
  @original_filepath = filepath
42
42
  # Count number of line of input
43
- input_lines = IO.readlines(filepath).length
43
+ input_lines = File.readlines(filepath).length
44
44
  # File streaming
45
45
  File.open(min_ext, 'w') do |output|
46
46
  File.foreach(filepath).with_index(1) do |line, i|
@@ -51,7 +51,7 @@ class VBSMin
51
51
  # vertical tab, form feed, carriage return, space
52
52
  line.strip!
53
53
  # Remove comments except inline ones (must be after whitespace striping)
54
- line = '' if line[0] == "'" || line[0..2].upcase == 'REM'
54
+ line = '' if /^(?:'|REM\b)/i =~ line
55
55
  # Remove space when several spaces between two keywords
56
56
  line = internal_space(line)
57
57
  # Remove line splitting
@@ -73,7 +73,7 @@ class VBSMin
73
73
  def min_ext
74
74
  extension = File.extname(@original_filepath).downcase
75
75
  abort 'Not a .vbs file' unless extension == '.vbs'
76
- min_filepath = @original_filepath.chomp(extension) + '.min.vbs'
76
+ min_filepath = "#{@original_filepath.chomp(extension)}.min.vbs"
77
77
  @min_filepath = min_filepath
78
78
  return min_filepath
79
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vbsmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-08 00:00:00.000000000 Z
11
+ date: 2021-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -38,118 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.2'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.1'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.1'
55
- - !ruby/object:Gem::Dependency
56
- name: commonmarker
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.21'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0.21'
69
- - !ruby/object:Gem::Dependency
70
- name: github-markup
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: minitest
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '5.12'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.12'
97
- - !ruby/object:Gem::Dependency
98
- name: rake
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '13.0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '13.0'
111
- - !ruby/object:Gem::Dependency
112
- name: redcarpet
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3.5'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '3.5'
125
- - !ruby/object:Gem::Dependency
126
- name: rubocop
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '0.80'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '0.80'
139
- - !ruby/object:Gem::Dependency
140
- name: yard
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.9'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.9'
153
41
  description: VBScript minifier CLI tool and library
154
42
  email: alexandre.zanni@engineer.com
155
43
  executables:
@@ -177,16 +65,19 @@ require_paths:
177
65
  - lib
178
66
  required_ruby_version: !ruby/object:Gem::Requirement
179
67
  requirements:
180
- - - "~>"
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 2.7.0
71
+ - - "<"
181
72
  - !ruby/object:Gem::Version
182
- version: '2.7'
73
+ version: '3.1'
183
74
  required_rubygems_version: !ruby/object:Gem::Requirement
184
75
  requirements:
185
76
  - - ">="
186
77
  - !ruby/object:Gem::Version
187
78
  version: '0'
188
79
  requirements: []
189
- rubygems_version: 3.1.2
80
+ rubygems_version: 3.2.15
190
81
  signing_key:
191
82
  specification_version: 4
192
83
  summary: VBScript minifier