runby_pace 0.2.41 → 0.2.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDkyYzgyZDBiZDlhOTEyMDhjMTVjMGU2ZGY2MzNiNzJkODA0OGRlNA==
4
+ YmFiZDFkMjBkYWI1MDIyOTIyNGU3MmM0MWRjZDdiZWFkNjM2M2ZhNw==
5
5
  data.tar.gz: !binary |-
6
- ODFmZjkzYzNlYTM0YmNmMWZiYzk3ZmFhY2FjY2UzNThhYWE3YThkNw==
6
+ ZTI2OTU5Y2I2MzJkNDI5MjFlODRlNzA5NmM0YThjZGM4MDk4OTE5OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTM0ZGI5N2FjNDg1YjIwZWVmOTMxMzdjNDgwMzJkNjE0ODc2ZWJlZGVlNmM0
10
- MDNlYjFhMWVkYWUwNTVkZjI4ZjNkMDM2MjRlZDYxYjA4ZjMwZDk5M2Q3NDM1
11
- Y2JmODdjYmJkNWExNDk1OWYwZDg1OTkyZDdiZTlhZjVmZTRkMzI=
9
+ OWY4OWIxNTJiNDJiMGJjM2ViMmViNGI1YWI5NTgyMGI0NWM0NmI0MjE4OWVh
10
+ ZjE3NTk0ZDkzNzkxMTRkNTkxYmNhZmEyNjE0MDMxNWEwODNmYWI2NWJhYTkw
11
+ ZTRjZjBmYjY5NDMyMGU0YTNkOGM5Y2MyODM1NTI4NTVkZDc5ODY=
12
12
  data.tar.gz: !binary |-
13
- MTlmMmE4NGJhYzY2ODZhZjE1Yzk1MzlmZTY5ODhhZDYzYTUyOTkzM2Y1ZmQz
14
- NDQ3OTg1ODY4ZTVhNzg4NGIzNDFiNWViOTAwMjM0ODZmMWM2MWE1OWE1OWE0
15
- NjAzMDM4ZmI5YzgyOGY2NzVmZmE4MWRhZjMwNGY4M2MwYWMyYzQ=
13
+ YTQwY2FhMTFiNWJmZGUyMDljZTAwZDhhZmU2ZDllMTc4MDczYzNmOTIwNWZh
14
+ ZjJkYjQyZWVlNGMyZjk5M2I0NTFiODY3ZTdjMWI0NTZkMTViZGM0MGYyZjZl
15
+ OTA2ZGViYzMzYzNiOGYxZWFhNmQxYzJjMWMxYzdiNGYxNDNjY2I=
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .idea/
11
+ *.g.rb
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 => :spec
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
@@ -0,0 +1,12 @@
1
+ # This file is automatically generated by a rake task
2
+
3
+ module RunbyPace
4
+
5
+ module RunTypes
6
+
7
+ def self.all
8
+ %w(__RUN_TYPES__)
9
+ end
10
+
11
+ end
12
+ 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.41
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-02 00:00:00.000000000 Z
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: be8919999328ab8387b850db07c03ec50c41e04d
90
+ commit-hash: 611c67daf9db8bbd6e4fc230ee76593c9371459e
90
91
  post_install_message:
91
92
  rdoc_options: []
92
93
  require_paths: