fit_js 0.94.13 → 0.94.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/Gemfile +4 -1
- data/Rakefile +1 -6
- data/bin/setup +1 -2
- data/fit_js.gemspec +6 -8
- data/lib/fitjs/.DS_Store +0 -0
- data/lib/fitjs/version.rb +1 -1
- data/lib/fitjs.rb +1 -43
- data/{assets → vendor/assets}/.DS_Store +0 -0
- data/{assets → vendor/assets}/javascripts/.DS_Store +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/accumulator.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/bit-stream.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/crc-calculator.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/decoder.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/fit.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/index.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/profile.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/stream.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/utils-hr-mesg.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/utils-internal.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs/utils.js +0 -0
- data/{assets → vendor/assets}/javascripts/fitjs.js +0 -0
- metadata +25 -95
- data/bower.json +0 -24
- data/lib/fitjs/engine.rb +0 -11
- data/sig/fitjs.rbs +0 -4
- data/tasks/.DS_Store +0 -0
- data/tasks/bower.rake +0 -25
- data/tasks/converter/js_conversion.rb +0 -34
- data/tasks/converter.rb +0 -48
- data/templates/project/manifest.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7650cc5ef28eae15680f5c56a8d061c773aef80812d7b140bfdec9fdba22274e
|
4
|
+
data.tar.gz: 3d0f2ba7dd388f330d5a2277964e67adba884c0fc8b591b76b411022758d2565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e9de0d2b323c36f3745435e1e2435f3eb141f36080791fc388814fe9a4bf746e28aa903d6b91aacb75134037c2262074ae55fb57d7c7bd8a4ffa2caa8f16612
|
7
|
+
data.tar.gz: 90cec6ad266fc7c798f1dbca2681ab1ed4b0b050ceca5a9aed6ad40537a4808c7d4c965ab123e288af2883221cb07686f99fb2a0935574e7b7bb596906df85ae
|
data/.DS_Store
CHANGED
Binary file
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/setup
CHANGED
data/fit_js.gemspec
CHANGED
@@ -13,13 +13,11 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.license = "MIT"
|
14
14
|
|
15
15
|
|
16
|
-
|
17
|
-
s.
|
18
|
-
s.
|
19
|
-
s.
|
20
|
-
s.add_development_dependency 'slim-rails'
|
21
|
-
s.add_development_dependency 'uglifier'
|
16
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
s.bindir = "exe"
|
18
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
22
20
|
|
23
|
-
s.
|
24
|
-
s.
|
21
|
+
s.add_development_dependency "bundler", "~> 1.8"
|
22
|
+
s.add_development_dependency "rake", "~> 10.0"
|
25
23
|
end
|
data/lib/fitjs/.DS_Store
CHANGED
Binary file
|
data/lib/fitjs/version.rb
CHANGED
data/lib/fitjs.rb
CHANGED
@@ -1,47 +1,5 @@
|
|
1
1
|
require "fitjs/rails/version"
|
2
2
|
|
3
3
|
module Fitjs
|
4
|
-
class
|
5
|
-
# Inspired by Bootstrap
|
6
|
-
def load!
|
7
|
-
if rails?
|
8
|
-
register_rails_engine
|
9
|
-
elsif sprockets?
|
10
|
-
register_sprockets
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
# Paths
|
15
|
-
def gem_path
|
16
|
-
@gem_path ||= File.expand_path '..', File.dirname(__FILE__)
|
17
|
-
end
|
18
|
-
|
19
|
-
def javascripts_path
|
20
|
-
File.join assets_path, 'javascripts'
|
21
|
-
end
|
22
|
-
|
23
|
-
def assets_path
|
24
|
-
@assets_path ||= File.join gem_path, 'assets'
|
25
|
-
end
|
26
|
-
|
27
|
-
# Environment detection helpers
|
28
|
-
def sprockets?
|
29
|
-
defined?(::Sprockets)
|
30
|
-
end
|
31
|
-
|
32
|
-
def rails?
|
33
|
-
defined?(::Rails)
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
def register_rails_engine
|
39
|
-
require 'fitjs/engine'
|
40
|
-
end
|
41
|
-
|
42
|
-
def register_sprockets
|
43
|
-
Sprockets.append_path(javascripts_path)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
Fitjs.load!
|
4
|
+
class Engine < ::Rails::Engine; end
|
47
5
|
end
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,105 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fit_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.94.
|
4
|
+
version: 0.94.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Dunn
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.5
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.5
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: activesupport
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 4.1.5
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 4.1.5
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: json
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.8.1
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.8.1
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: slim-rails
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: uglifier
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
17
|
+
- - "~>"
|
74
18
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
19
|
+
version: '1.8'
|
76
20
|
type: :development
|
77
21
|
prerelease: false
|
78
22
|
version_requirements: !ruby/object:Gem::Requirement
|
79
23
|
requirements:
|
80
|
-
- - "
|
24
|
+
- - "~>"
|
81
25
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
26
|
+
version: '1.8'
|
83
27
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
28
|
+
name: rake
|
85
29
|
requirement: !ruby/object:Gem::Requirement
|
86
30
|
requirements:
|
87
31
|
- - "~>"
|
88
32
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 9.1.0
|
93
|
-
type: :runtime
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
94
35
|
prerelease: false
|
95
36
|
version_requirements: !ruby/object:Gem::Requirement
|
96
37
|
requirements:
|
97
38
|
- - "~>"
|
98
39
|
- !ruby/object:Gem::Version
|
99
|
-
version: '
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 9.1.0
|
40
|
+
version: '10.0'
|
103
41
|
description: The javascript library for the Garmin FIT file format
|
104
42
|
email: axeouse@gmail.com
|
105
43
|
executables: []
|
@@ -114,35 +52,27 @@ files:
|
|
114
52
|
- LICENSE.txt
|
115
53
|
- README.md
|
116
54
|
- Rakefile
|
117
|
-
- assets/.DS_Store
|
118
|
-
- assets/javascripts/.DS_Store
|
119
|
-
- assets/javascripts/fitjs.js
|
120
|
-
- assets/javascripts/fitjs/accumulator.js
|
121
|
-
- assets/javascripts/fitjs/bit-stream.js
|
122
|
-
- assets/javascripts/fitjs/crc-calculator.js
|
123
|
-
- assets/javascripts/fitjs/decoder.js
|
124
|
-
- assets/javascripts/fitjs/fit.js
|
125
|
-
- assets/javascripts/fitjs/index.js
|
126
|
-
- assets/javascripts/fitjs/profile.js
|
127
|
-
- assets/javascripts/fitjs/stream.js
|
128
|
-
- assets/javascripts/fitjs/utils-hr-mesg.js
|
129
|
-
- assets/javascripts/fitjs/utils-internal.js
|
130
|
-
- assets/javascripts/fitjs/utils.js
|
131
55
|
- bin/console
|
132
56
|
- bin/setup
|
133
|
-
- bower.json
|
134
57
|
- fit_js.gemspec
|
135
58
|
- lib/.DS_Store
|
136
59
|
- lib/fitjs.rb
|
137
60
|
- lib/fitjs/.DS_Store
|
138
|
-
- lib/fitjs/engine.rb
|
139
61
|
- lib/fitjs/version.rb
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
62
|
+
- vendor/assets/.DS_Store
|
63
|
+
- vendor/assets/javascripts/.DS_Store
|
64
|
+
- vendor/assets/javascripts/fitjs.js
|
65
|
+
- vendor/assets/javascripts/fitjs/accumulator.js
|
66
|
+
- vendor/assets/javascripts/fitjs/bit-stream.js
|
67
|
+
- vendor/assets/javascripts/fitjs/crc-calculator.js
|
68
|
+
- vendor/assets/javascripts/fitjs/decoder.js
|
69
|
+
- vendor/assets/javascripts/fitjs/fit.js
|
70
|
+
- vendor/assets/javascripts/fitjs/index.js
|
71
|
+
- vendor/assets/javascripts/fitjs/profile.js
|
72
|
+
- vendor/assets/javascripts/fitjs/stream.js
|
73
|
+
- vendor/assets/javascripts/fitjs/utils-hr-mesg.js
|
74
|
+
- vendor/assets/javascripts/fitjs/utils-internal.js
|
75
|
+
- vendor/assets/javascripts/fitjs/utils.js
|
146
76
|
homepage: https://github.com/justindunn/fit_js
|
147
77
|
licenses:
|
148
78
|
- MIT
|
data/bower.json
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "fitjs",
|
3
|
-
"homepage": "https://github.com/justindunn/fit_js",
|
4
|
-
"authors": [
|
5
|
-
"Justin Dunn"
|
6
|
-
],
|
7
|
-
"description": "Fitjs rails fit file js library.",
|
8
|
-
"moduleType": "globals",
|
9
|
-
"main": [
|
10
|
-
"assets/javascripts/bootstrap.js"
|
11
|
-
],
|
12
|
-
"keywords": [
|
13
|
-
"fitjs"
|
14
|
-
],
|
15
|
-
"license": "MIT",
|
16
|
-
"ignore": [
|
17
|
-
"**/.*",
|
18
|
-
"lib",
|
19
|
-
"tasks",
|
20
|
-
"*.gemspec",
|
21
|
-
"Rakefile",
|
22
|
-
"Gemfile"
|
23
|
-
]
|
24
|
-
}
|
data/lib/fitjs/engine.rb
DELETED
data/sig/fitjs.rbs
DELETED
data/tasks/.DS_Store
DELETED
Binary file
|
data/tasks/bower.rake
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'find'
|
2
|
-
require 'json'
|
3
|
-
require 'pathname'
|
4
|
-
|
5
|
-
namespace :bower do
|
6
|
-
|
7
|
-
find_files = ->(path) {
|
8
|
-
Find.find(Pathname.new(path).relative_path_from(Pathname.new Dir.pwd).to_s).map do |path|
|
9
|
-
path if File.file?(path)
|
10
|
-
end.compact
|
11
|
-
}
|
12
|
-
|
13
|
-
desc 'update main and version in bower.json'
|
14
|
-
task :generate do
|
15
|
-
Dir.chdir Fitjs.gem_path do
|
16
|
-
spec = JSON.parse(File.read 'bower.json')
|
17
|
-
spec['main'] = %w(assets/javascripts/fitjs.js)
|
18
|
-
spec['version'] = Fitjs::VERSION
|
19
|
-
|
20
|
-
File.open('bower.json', 'w') do |f|
|
21
|
-
f.puts JSON.pretty_generate(spec)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
class Converter
|
2
|
-
module JsConversion
|
3
|
-
def process_javascript_assets
|
4
|
-
log_status 'Processing javascripts...'
|
5
|
-
save_to = @save_to[:js]
|
6
|
-
contents = {}
|
7
|
-
read_files('js', js_files).each do |name, file|
|
8
|
-
contents[name] = file
|
9
|
-
save_file("#{save_to}/#{name}", file)
|
10
|
-
end
|
11
|
-
log_processed "#{js_files * ' '}"
|
12
|
-
|
13
|
-
log_status 'Updating javascript manifest'
|
14
|
-
manifest = ''
|
15
|
-
js_files.each do |name|
|
16
|
-
name = name.gsub(/\.js$/, '')
|
17
|
-
manifest << "//= require ./fitjs/#{name}\n"
|
18
|
-
end
|
19
|
-
dist_js = read_files('/', %w(fitjs.js))
|
20
|
-
{
|
21
|
-
'assets/javascripts/fit-compiled.js' => manifest,
|
22
|
-
'assets/javascripts/fitjs.js' => dist_js['fitjs.js']
|
23
|
-
}.each do |path, content|
|
24
|
-
save_file path, content
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def js_files
|
29
|
-
@js_files ||= begin
|
30
|
-
files = get_paths_by_type('js', /\.js$/).reject { |path| path =~ %r(^tests/) }
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
data/tasks/converter.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
# Based on convert script from vwall/compass-twitter-bootstrap gem.
|
3
|
-
# https://github.com/vwall/compass-twitter-bootstrap/blob/master/build/convert.rb
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this work except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License in the LICENSE file, or at:
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
require 'open-uri'
|
18
|
-
require 'json'
|
19
|
-
require 'fileutils'
|
20
|
-
|
21
|
-
require_relative 'converter/js_conversion'
|
22
|
-
|
23
|
-
class Converter
|
24
|
-
include JsConversion
|
25
|
-
|
26
|
-
def initialize(save_to: {}, cache_path: 'tmp/converter-cache-fitjs')
|
27
|
-
@cache_path = cache_path
|
28
|
-
@save_to = {
|
29
|
-
js: 'assets/javascripts/fitjs'}.merge(save_to)
|
30
|
-
end
|
31
|
-
|
32
|
-
def process_bootstrap
|
33
|
-
puts " save to: #{@save_to.to_json}"
|
34
|
-
puts " twbs cache: #{@cache_path}"
|
35
|
-
puts '-' * 60
|
36
|
-
|
37
|
-
@save_to.each { |_, v| FileUtils.mkdir_p(v) }
|
38
|
-
|
39
|
-
process_javascript_assets
|
40
|
-
end
|
41
|
-
|
42
|
-
def save_file(path, content, mode='w')
|
43
|
-
dir = File.dirname(path)
|
44
|
-
FileUtils.mkdir_p(dir) unless File.directory?(dir)
|
45
|
-
File.open(path, mode) { |file| file.write(content) }
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
description 'FIT FILE JS LIBRARY'
|
2
|
-
|
3
|
-
manifest = Pathname.new(File.dirname(__FILE__))
|
4
|
-
assets = File.expand_path('../../assets', manifest)
|
5
|
-
{
|
6
|
-
:javascript => 'javascripts'
|
7
|
-
}.each do |method, dir|
|
8
|
-
root = Pathname.new(assets).join(dir)
|
9
|
-
Dir.glob root.join('**', '*.*') do |path|
|
10
|
-
path = Pathname.new(path)
|
11
|
-
send method, path.relative_path_from(manifest).to_s, :to => path.relative_path_from(root).to_s
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|