fix-command 0.3.0 → 0.4.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
2
  SHA1:
3
- metadata.gz: 511ce87b9eee241bc7535bcb5d2ebb90983aea20
4
- data.tar.gz: 08be1bd3e8345164d0bf5c41a15172b2d0d696e7
3
+ metadata.gz: 5c6c5c5575c6dfec515ac9016b879d47f9dd4abc
4
+ data.tar.gz: b0027bad8769a6aa488b79004ce6bf09c074221f
5
5
  SHA512:
6
- metadata.gz: 0d52a0b60819453d5f0744e5276d8119960862a477cdc995cf44460d49c2fd08975465165746a65124176fd2938440c1c2b531eaf36ab1161202fc978e933864
7
- data.tar.gz: 79df3831fbfb0f187458ec636b0de58fd5d0d28fd26b10c84e5c873035da831316e940cbd9ff01b952bf73cb68c7417028a1783350a152ef16acad9767be8c99
6
+ metadata.gz: 4c62ca9e24b1668f1a3dd2b89e2e4a924db33dabd70be920b21bd184756d9b52a0bb8618c95df95da316882b730438659a8d9a0b59186ea2411d50c1c181e800
7
+ data.tar.gz: 3ba8e1d943b52d9f28c9d2e712343a970f9c7efa201f2b724354daa62b46c97c6d8e177eb5a7a8bad1ab5a732c1d59c13a43ebb54a3834648475f2d03c02bdbb
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1 @@
1
- C*��ф�,�����b]B�
2
- XD mo����vp�m�\���R�)���q��� �G�i#+w���H}l��$���R�elg5����Z]�d1�;�>�'��ŸG9AB�ԝpx��h)�Z?YRA������ ��!?�s�]�Ug����H!��\8���j"/�?IS��[^T�7�K�����>�]~�B�
3
- A�ڝ)�Ϋ���I�Ӏ�D�V�,��YO�9�4�QR��R�8g�;�,�
1
+ $���M����Ą?��<�e@M�{x[��v�Q�{9\���'N��# }�}v��T�oi<a������(}��k�v��b�pqMS"��i���u���n�v:���t�'O@�����vV�A�+�C�����ЦxR��(�O��a��Y��5�����������;4�M��9x������ǜn=؏������E)h��㕃3yI�GA���� J��<o=%b5�eq ެ�[���wW?j�R��'�C@^k
data/README.md CHANGED
@@ -52,6 +52,7 @@ First, let's see the API:
52
52
  Specific options:
53
53
  --debug Enable ruby debug
54
54
  --warnings Enable ruby warnings
55
+ --random=[SEED] Predictable randomization
55
56
  --prefix=[PREFIX] Prefix of the spec files
56
57
  --suffix=[SUFFIX] Suffix of the spec files
57
58
 
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -0,0 +1 @@
1
+ 5f6c061dff557ef02771b4fc5c02f1cfe1399e5608abaaa8d2692409a75b2db44b964c34a41585ddfb49e4ae910291b00dffcf6a1401c8c388152ebfb1d84f7a
data/lib/fix/command.rb CHANGED
@@ -44,16 +44,18 @@ module Fix
44
44
  file_paths = fetch_file_paths(
45
45
  config.fetch(:prefix),
46
46
  config.fetch(:suffix), *args
47
- )
47
+ ).to_a.shuffle(random: Random.new(config.fetch(:random)))
48
48
 
49
49
  str = "\e[37m"
50
- str += '> fix'
50
+ str += '> fix '
51
+ str += file_paths.join(' ')
51
52
  str += ' --debug' if $DEBUG
52
53
  str += ' --warnings' if $VERBOSE
54
+ str += ' --random' if config.fetch(:random)
53
55
  str += ' --prefix' if config.fetch(:prefix)
54
56
  str += ' --suffix' if config.fetch(:suffix)
55
57
 
56
- puts file_paths.to_a.join(' ') + ' ' + str + "\e[22m"
58
+ puts "#{str} \e[22m"
57
59
 
58
60
  status = true
59
61
 
@@ -75,6 +77,7 @@ module Fix
75
77
  options = {
76
78
  debug: false,
77
79
  warnings: false,
80
+ random: Random.new_seed,
78
81
  prefix: '',
79
82
  suffix: '_fix'
80
83
  }
@@ -93,6 +96,10 @@ module Fix
93
96
  options[:warnings] = $VERBOSE = true
94
97
  end
95
98
 
99
+ opts.on('--random=[SEED]', Integer, 'Predictable randomization') do |i|
100
+ options[:random] = i
101
+ end
102
+
96
103
  opts.on('--prefix=[PREFIX]', String, 'Prefix of the spec files') do |s|
97
104
  options[:prefix] = s
98
105
  end
@@ -130,6 +137,8 @@ module Fix
130
137
  end
131
138
 
132
139
  # @private
140
+ #
141
+ # @return [Set] A list of absolute paths.
133
142
  def self.fetch_file_paths(file_prefix, file_suffix, *args)
134
143
  absolute_paths = Set.new
135
144
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
@@ -30,7 +30,7 @@ cert_chain:
30
30
  dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
31
31
  0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
32
32
  -----END CERTIFICATE-----
33
- date: 2015-12-29 00:00:00.000000000 Z
33
+ date: 2015-12-30 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: fix
@@ -157,6 +157,7 @@ files:
157
157
  - checksum/fix-command-0.1.2.gem.sha512
158
158
  - checksum/fix-command-0.1.3.gem.sha512
159
159
  - checksum/fix-command-0.2.0.gem.sha512
160
+ - checksum/fix-command-0.3.0.gem.sha512
160
161
  - fix-command.gemspec
161
162
  - lib/fix/command.rb
162
163
  - pkg_checksum
@@ -180,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
181
  version: '0'
181
182
  requirements: []
182
183
  rubyforge_project:
183
- rubygems_version: 2.4.5.1
184
+ rubygems_version: 2.5.1
184
185
  signing_key:
185
186
  specification_version: 4
186
187
  summary: Fix extension gem for the fix command.
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- +��(�]����p����󧾧�F{~-.f{�{>��0>�gP��7���w�
2
- �@P{��K�Q:vW6��� � xܐ��~�9�8�m�#��?P�R�ŹZ��1�W*��
1
+ DY T�z�����Ӆ�5@��"��75�pqMg]��J����A���&V��_gZ������ZuT&z���PP�ʋ