runby_pace 0.2.41 → 0.2.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/Rakefile +29 -1
- data/lib/runby_pace/run_types/all_run_types.template +12 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmFiZDFkMjBkYWI1MDIyOTIyNGU3MmM0MWRjZDdiZWFkNjM2M2ZhNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTI2OTU5Y2I2MzJkNDI5MjFlODRlNzA5NmM0YThjZGM4MDk4OTE5OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWY4OWIxNTJiNDJiMGJjM2ViMmViNGI1YWI5NTgyMGI0NWM0NmI0MjE4OWVh
|
10
|
+
ZjE3NTk0ZDkzNzkxMTRkNTkxYmNhZmEyNjE0MDMxNWEwODNmYWI2NWJhYTkw
|
11
|
+
ZTRjZjBmYjY5NDMyMGU0YTNkOGM5Y2MyODM1NTI4NTVkZDc5ODY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTQwY2FhMTFiNWJmZGUyMDljZTAwZDhhZmU2ZDllMTc4MDczYzNmOTIwNWZh
|
14
|
+
ZjJkYjQyZWVlNGMyZjk5M2I0NTFiODY3ZTdjMWI0NTZkMTViZGM0MGYyZjZl
|
15
|
+
OTA2ZGViYzMzYzNiOGYxZWFhNmQxYzJjMWMxYzdiNGYxNDNjY2I=
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -3,4 +3,32 @@ require 'rspec/core/rake_task'
|
|
3
3
|
|
4
4
|
RSpec::Core::RakeTask.new(:spec)
|
5
5
|
|
6
|
-
task :default => :
|
6
|
+
task :default => :build
|
7
|
+
|
8
|
+
task :build => [:gen_all_run_types,:spec]
|
9
|
+
|
10
|
+
desc 'Generate the all_run_types.g.rb file'
|
11
|
+
task :gen_all_run_types do
|
12
|
+
puts "\e[32m__TEXT__\e[0m".gsub('__TEXT__', 'Generate all_run_types.g.rb')
|
13
|
+
run_types_path = './lib/runby_pace/run_types'
|
14
|
+
|
15
|
+
# Parse *_run.rb file names to generate array of the run type class names
|
16
|
+
run_type_files = Dir.entries(run_types_path).select { |file| /.*_run\.rb/ =~ file }
|
17
|
+
|
18
|
+
all_run_types = run_type_files.map do |filename|
|
19
|
+
filename_sans_extension = filename[0, filename.length - 3]
|
20
|
+
parts = filename_sans_extension.to_s.downcase.split(/_|\./)
|
21
|
+
run_type = ''
|
22
|
+
parts.each { |part|
|
23
|
+
run_type += part[0].upcase + part[-(part.length - 1), part.length - 1]
|
24
|
+
}
|
25
|
+
run_type
|
26
|
+
end
|
27
|
+
puts all_run_types.join(' ')
|
28
|
+
|
29
|
+
# Write run types to the generated file, all_run_types.g.rb
|
30
|
+
template = File.read(File.join(run_types_path, 'all_run_types.template'))
|
31
|
+
template.gsub!('__RUN_TYPES__', all_run_types.join(' '))
|
32
|
+
File.write(File.join(run_types_path, 'all_run_types.g.rb'), template)
|
33
|
+
puts "\e[32mDone\e[0m\n\n"
|
34
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runby_pace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.43
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ty Walls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/runby_pace/pace_range.rb
|
77
77
|
- lib/runby_pace/pace_time.rb
|
78
78
|
- lib/runby_pace/run_type.rb
|
79
|
+
- lib/runby_pace/run_types/all_run_types.template
|
79
80
|
- lib/runby_pace/run_types/easy_run.rb
|
80
81
|
- lib/runby_pace/run_types/find_divisor.rb
|
81
82
|
- lib/runby_pace/run_types/long_run.rb
|
@@ -86,7 +87,7 @@ homepage: https://github.com/tygerbytes/runby-pace
|
|
86
87
|
licenses:
|
87
88
|
- MIT
|
88
89
|
metadata:
|
89
|
-
commit-hash:
|
90
|
+
commit-hash: 611c67daf9db8bbd6e4fc230ee76593c9371459e
|
90
91
|
post_install_message:
|
91
92
|
rdoc_options: []
|
92
93
|
require_paths:
|