code_tools 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ender.rb +1 -1
  3. data/lib/spacer.rb +2 -4
  4. data/lib/vamper.rb +11 -10
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da904aa42c144ba90f9479facf968c63f6c9502f
4
- data.tar.gz: 090ca4a1c671a2fc91c8259801af3b6c128c21e6
3
+ metadata.gz: e20610983e43a55542c261cab1b4701dec817000
4
+ data.tar.gz: 1f2709824d0b1955b320fb4c05223f66b56d5f19
5
5
  SHA512:
6
- metadata.gz: 16ad5be70ccf2e1b792f5f8745cd6c88d39c5520366ba3d4ced52104e59262478c73675b281600b5adf29a09cfe08cfaecc24107828aaa5aaad7dfe09720886b
7
- data.tar.gz: 40d615576784fd90c4c3580e52e96d91c55913ca650622c3610db08802443b72f0bd988820e64a14a7854b71127d89366528c9e483a2b26c84d5724928578ac8
6
+ metadata.gz: c031e74bc4be6a93f758adf5e9db907fbe1ddc73569b6af4b7d024116cde0aef4dcd5b802ac80c2830d26f8a3fb12544da8f28472360e441eb022dd8a78509eb
7
+ data.tar.gz: 85fc95c0d970d0d9ffa9f64e4e487620d4e42bb1809cf943f868b5fa18802a85f8cf5ae3f9e169b8b781e1fec77295312da4637f2235efeb8339f20eb9a68791
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
  require 'optparse'
3
3
  require 'colorize'
4
4
 
5
- $VERSION='4.2.0-20151225.0'
5
+ $VERSION='4.2.1-20151227.0'
6
6
 
7
7
  class Ender
8
8
 
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
  require 'optparse'
3
3
  require 'colorize'
4
4
 
5
- $VERSION='4.2.0-20151225.0'
5
+ $VERSION='4.2.1-20151227.0'
6
6
 
7
7
  class Spacer
8
8
 
@@ -42,9 +42,7 @@ spaces that are not a whole number multiple of the tabstop size. In that case u
42
42
  options.convert_mode = mode
43
43
  end
44
44
 
45
- opts.on("-t", "--tabsize SIZE", Integer, "Tab size. Default is 4 spaces.",
46
- "Default is to just display the files current state.",
47
- "Updates will only be done when this argument is given.") do |size|
45
+ opts.on("-t", "--tabsize SIZE", Integer, "Tab size in spaces to assume. Default is 4 spaces.") do |size|
48
46
  options.tabsize = size
49
47
  end
50
48
 
@@ -7,7 +7,7 @@ require_relative './vamper/version_file.rb'
7
7
  require_relative './vamper/version_config_file.rb'
8
8
  require_relative './core_ext.rb'
9
9
 
10
- $VERSION='4.2.0-20151225.0'
10
+ $VERSION='4.2.1-20151227.0'
11
11
 
12
12
  class Vamper
13
13
 
@@ -73,7 +73,10 @@ Usage: #{File.basename(__FILE__)} [options]
73
73
  else
74
74
  version_file.revision += 1
75
75
  end
76
- when :FullDate
76
+ when :Incremental
77
+ version_file.build += 1
78
+ version_file.revision = 0
79
+ else # :FullDate
77
80
  build = get_full_date(now)
78
81
 
79
82
  if version_file.build != build
@@ -82,10 +85,8 @@ Usage: #{File.basename(__FILE__)} [options]
82
85
  else
83
86
  version_file.revision += 1
84
87
  end
85
- tags[:DashBuild] = build[0..3] + '-' + build[4..5] + '-' + build[6..7]
86
- when :Incremental
87
- version_file.build += 1
88
- version_file.revision = 0
88
+ build_str = build.to_s
89
+ tags[:DashBuild] = build_str[0..3] + '-' + build_str[4..5] + '-' + build_str[6..7]
89
90
  end
90
91
 
91
92
  puts 'Version data is:'
@@ -137,7 +138,7 @@ Usage: #{File.basename(__FILE__)} [options]
137
138
  end
138
139
  end
139
140
  else
140
- error "File #{path} does not exist to update"
141
+ error "file #{path} does not exist to update"
141
142
  exit(1)
142
143
  end
143
144
  end
@@ -146,7 +147,7 @@ Usage: #{File.basename(__FILE__)} [options]
146
147
  end
147
148
 
148
149
  unless match
149
- error "File '#{path}' has no matching file type in the .version.config"
150
+ error "file '#{path}' has no matching file type in the .version.config"
150
151
  exit(1)
151
152
  end
152
153
 
@@ -182,7 +183,7 @@ Usage: #{File.basename(__FILE__)} [options]
182
183
  end
183
184
 
184
185
  def get_full_date(now)
185
- (now.year * 10000 + now.month * 100 + now.mday).to_s
186
+ now.year * 10000 + now.month * 100 + now.mday
186
187
  end
187
188
 
188
189
  def get_jdate(now, start_year)
@@ -190,7 +191,7 @@ Usage: #{File.basename(__FILE__)} [options]
190
191
  end
191
192
 
192
193
  def error(msg)
193
- puts "error: #{msg}".colorize(:red)
194
+ STDERR.puts "error: #{msg}".red
194
195
  end
195
196
 
196
197
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lyon-smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-27 00:00:00.000000000 Z
11
+ date: 2015-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo