fit4ruby 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/COPYING +280 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +21 -0
- data/README.md +16 -0
- data/Rakefile +19 -0
- data/fit4ruby.gemspec +30 -0
- data/lib/fit4ruby.rb +26 -0
- data/lib/fit4ruby/Activity.rb +119 -0
- data/lib/fit4ruby/Converters.rb +58 -0
- data/lib/fit4ruby/FitDataRecord.rb +79 -0
- data/lib/fit4ruby/FitDefinition.rb +54 -0
- data/lib/fit4ruby/FitDefinitionField.rb +137 -0
- data/lib/fit4ruby/FitFile.rb +154 -0
- data/lib/fit4ruby/FitFileId.rb +31 -0
- data/lib/fit4ruby/FitFilter.rb +26 -0
- data/lib/fit4ruby/FitHeader.rb +55 -0
- data/lib/fit4ruby/FitMessageIdMapper.rb +53 -0
- data/lib/fit4ruby/FitMessageRecord.rb +77 -0
- data/lib/fit4ruby/FitRecord.rb +80 -0
- data/lib/fit4ruby/FitRecordHeader.rb +39 -0
- data/lib/fit4ruby/GlobalFitDictList.rb +68 -0
- data/lib/fit4ruby/GlobalFitDictionaries.rb +302 -0
- data/lib/fit4ruby/GlobalFitMessage.rb +189 -0
- data/lib/fit4ruby/GlobalFitMessages.rb +235 -0
- data/lib/fit4ruby/Lap.rb +44 -0
- data/lib/fit4ruby/Log.rb +45 -0
- data/lib/fit4ruby/Record.rb +56 -0
- data/lib/fit4ruby/Session.rb +110 -0
- data/lib/fit4ruby/version.rb +3 -0
- data/tasks/changelog.rake +169 -0
- data/tasks/gem.rake +52 -0
- data/tasks/rdoc.rake +14 -0
- data/tasks/test.rake +7 -0
- data/test/FitFile_spec.rb +31 -0
- metadata +137 -0
data/tasks/test.rake
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = FitFile_spec.rb -- Fit4Ruby - FIT file processing library for Ruby
|
5
|
+
#
|
6
|
+
# Copyright (c) 2014 by Chris Schlaeger <cs@taskjuggler.org>
|
7
|
+
#
|
8
|
+
# This program is free software; you can redistribute it and/or modify
|
9
|
+
# it under the terms of version 2 of the GNU General Public License as
|
10
|
+
# published by the Free Software Foundation.
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'fit4ruby'
|
14
|
+
|
15
|
+
describe Fit4Ruby do
|
16
|
+
|
17
|
+
it 'should write a simple .fit file' do
|
18
|
+
fit_file = 'test.fit'
|
19
|
+
|
20
|
+
a = Fit4Ruby::Activity.new
|
21
|
+
a.start_time = Time.parse('2014-07-14-21:00')
|
22
|
+
a.duration = 30 * 60
|
23
|
+
Fit4Ruby.write(fit_file, a)
|
24
|
+
b = Fit4Ruby.read(fit_file)
|
25
|
+
a.start_time.should == b.start_time
|
26
|
+
a.duration.should == b.duration
|
27
|
+
File.delete(fit_file)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fit4ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Schlaeger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bindata
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: yard
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.4
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.4
|
69
|
+
description: |
|
70
|
+
This library can read and write FIT files and convert them into a Ruby data
|
71
|
+
structure for easy processing. This library was written for the Garmin FR620.
|
72
|
+
Fit files from other devices may or may not work.
|
73
|
+
email: chris@linux.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- COPYING
|
79
|
+
- Gemfile
|
80
|
+
- Gemfile.lock
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- fit4ruby.gemspec
|
84
|
+
- lib/fit4ruby.rb
|
85
|
+
- lib/fit4ruby/Activity.rb
|
86
|
+
- lib/fit4ruby/Converters.rb
|
87
|
+
- lib/fit4ruby/FitDataRecord.rb
|
88
|
+
- lib/fit4ruby/FitDefinition.rb
|
89
|
+
- lib/fit4ruby/FitDefinitionField.rb
|
90
|
+
- lib/fit4ruby/FitFile.rb
|
91
|
+
- lib/fit4ruby/FitFileId.rb
|
92
|
+
- lib/fit4ruby/FitFilter.rb
|
93
|
+
- lib/fit4ruby/FitHeader.rb
|
94
|
+
- lib/fit4ruby/FitMessageIdMapper.rb
|
95
|
+
- lib/fit4ruby/FitMessageRecord.rb
|
96
|
+
- lib/fit4ruby/FitRecord.rb
|
97
|
+
- lib/fit4ruby/FitRecordHeader.rb
|
98
|
+
- lib/fit4ruby/GlobalFitDictList.rb
|
99
|
+
- lib/fit4ruby/GlobalFitDictionaries.rb
|
100
|
+
- lib/fit4ruby/GlobalFitMessage.rb
|
101
|
+
- lib/fit4ruby/GlobalFitMessages.rb
|
102
|
+
- lib/fit4ruby/Lap.rb
|
103
|
+
- lib/fit4ruby/Log.rb
|
104
|
+
- lib/fit4ruby/Record.rb
|
105
|
+
- lib/fit4ruby/Session.rb
|
106
|
+
- lib/fit4ruby/version.rb
|
107
|
+
- tasks/changelog.rake
|
108
|
+
- tasks/gem.rake
|
109
|
+
- tasks/rdoc.rake
|
110
|
+
- tasks/test.rake
|
111
|
+
- test/FitFile_spec.rb
|
112
|
+
homepage: https://github.com/scrapper/fit4ruby
|
113
|
+
licenses:
|
114
|
+
- GNU GPL version 2
|
115
|
+
metadata: {}
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 2.0.3
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: Library to read GARMIN FIT files.
|
136
|
+
test_files:
|
137
|
+
- test/FitFile_spec.rb
|