sourcemap 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/lib/source_map/map.rb +5 -1
- data/lib/source_map/version.rb +1 -1
- data/lib/source_map/vlq.rb +6 -4
- data/test/test_map.rb +2 -0
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 730d8f2b240d048ff6a139f9bfab076264278182
|
4
|
+
data.tar.gz: 618f0dc85e2620f711a70f1e39d8cbc521631f1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee88fadd0c430c4598b5c0b404827ab25ac91fa615225e8a692f7cee687031bfcf4f3910e844682fd9097f4a62c864459fd967ff7acaa96fbce535d8388d995c
|
7
|
+
data.tar.gz: d244e76f334c282b8e92aff1ea473f4770dccaad3286becc98ac5782636a3c235ae4a4a37b771109c1271816375cfe70adbb47a8975498738f01bbe2103003df
|
data/.travis.yml
CHANGED
data/lib/source_map/map.rb
CHANGED
@@ -158,7 +158,7 @@ module SourceMap
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
-
def as_json
|
161
|
+
def as_json(*)
|
162
162
|
{
|
163
163
|
"version" => 3,
|
164
164
|
"file" => filename,
|
@@ -168,6 +168,10 @@ module SourceMap
|
|
168
168
|
}
|
169
169
|
end
|
170
170
|
|
171
|
+
def to_json(*a)
|
172
|
+
as_json.to_json(*a)
|
173
|
+
end
|
174
|
+
|
171
175
|
# Public: Get a pretty inspect output for debugging purposes.
|
172
176
|
#
|
173
177
|
# Returns a String.
|
data/lib/source_map/version.rb
CHANGED
data/lib/source_map/vlq.rb
CHANGED
@@ -25,17 +25,19 @@ module SourceMap
|
|
25
25
|
#
|
26
26
|
# Returns a VLQ String.
|
27
27
|
def self.encode(ary)
|
28
|
-
result =
|
28
|
+
result = []
|
29
29
|
ary.each do |n|
|
30
30
|
vlq = n < 0 ? ((-n) << 1) + 1 : n << 1
|
31
|
-
|
31
|
+
loop do
|
32
32
|
digit = vlq & VLQ_BASE_MASK
|
33
33
|
vlq >>= VLQ_BASE_SHIFT
|
34
34
|
digit |= VLQ_CONTINUATION_BIT if vlq > 0
|
35
35
|
result << BASE64_DIGITS[digit]
|
36
|
-
|
36
|
+
|
37
|
+
break unless vlq > 0
|
38
|
+
end
|
37
39
|
end
|
38
|
-
result
|
40
|
+
result.join
|
39
41
|
end
|
40
42
|
|
41
43
|
# Public: Decode a VLQ string.
|
data/test/test_map.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sourcemap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Peek
|
@@ -9,48 +9,48 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.3'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.3'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: minitest
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
description: Ruby source maps
|
@@ -60,8 +60,8 @@ executables: []
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
- .gitignore
|
64
|
-
- .travis.yml
|
63
|
+
- ".gitignore"
|
64
|
+
- ".travis.yml"
|
65
65
|
- Gemfile
|
66
66
|
- LICENSE
|
67
67
|
- README.md
|
@@ -99,17 +99,17 @@ require_paths:
|
|
99
99
|
- lib
|
100
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.2.2
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Ruby source maps
|