ruco 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/lib/ruco/syntax_parser.rb +4 -5
- data/ruco.gemspec +4 -4
- metadata +6 -5
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -20,7 +20,7 @@ GEM
|
|
20
20
|
rspec-expectations (2.6.0)
|
21
21
|
diff-lcs (~> 1.1.2)
|
22
22
|
rspec-mocks (2.6.0)
|
23
|
-
textpow1x (1.
|
23
|
+
textpow1x (1.2.0)
|
24
24
|
plist (>= 3.0.1)
|
25
25
|
|
26
26
|
PLATFORMS
|
@@ -34,4 +34,4 @@ DEPENDENCIES
|
|
34
34
|
oniguruma
|
35
35
|
rake
|
36
36
|
rspec (~> 2)
|
37
|
-
textpow1x (>= 1)
|
37
|
+
textpow1x (>= 1.2)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/ruco/syntax_parser.rb
CHANGED
@@ -2,9 +2,9 @@ module Ruco
|
|
2
2
|
module SyntaxParser
|
3
3
|
# textpow only offers certain syntax
|
4
4
|
TEXTPOW_CONVERT = {
|
5
|
-
'scss' => 'sass',
|
6
|
-
'html+erb' => 'html',
|
7
|
-
'rhtml' => 'html',
|
5
|
+
'scss' => 'source.sass',
|
6
|
+
'html+erb' => 'text.html.ruby',
|
7
|
+
'rhtml' => 'text.html.ruby',
|
8
8
|
}
|
9
9
|
|
10
10
|
def self.syntax_for_line(line, languages)
|
@@ -26,8 +26,7 @@ module Ruco
|
|
26
26
|
fallbacks = languages.map{|l| TEXTPOW_CONVERT[l] }.compact
|
27
27
|
|
28
28
|
(languages + fallbacks).detect do |language|
|
29
|
-
|
30
|
-
found = Textpow::SyntaxNode.load(syntax) if File.exist?(syntax)
|
29
|
+
found = Textpow.syntax(language)
|
31
30
|
end
|
32
31
|
|
33
32
|
found
|
data/ruco.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruco}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
@@ -116,16 +116,16 @@ Gem::Specification.new do |s|
|
|
116
116
|
|
117
117
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
118
118
|
s.add_runtime_dependency(%q<clipboard>, [">= 0.9.8"])
|
119
|
-
s.add_runtime_dependency(%q<textpow1x>, [">= 1"])
|
119
|
+
s.add_runtime_dependency(%q<textpow1x>, [">= 1.2"])
|
120
120
|
s.add_runtime_dependency(%q<language_sniffer>, [">= 0"])
|
121
121
|
else
|
122
122
|
s.add_dependency(%q<clipboard>, [">= 0.9.8"])
|
123
|
-
s.add_dependency(%q<textpow1x>, [">= 1"])
|
123
|
+
s.add_dependency(%q<textpow1x>, [">= 1.2"])
|
124
124
|
s.add_dependency(%q<language_sniffer>, [">= 0"])
|
125
125
|
end
|
126
126
|
else
|
127
127
|
s.add_dependency(%q<clipboard>, [">= 0.9.8"])
|
128
|
-
s.add_dependency(%q<textpow1x>, [">= 1"])
|
128
|
+
s.add_dependency(%q<textpow1x>, [">= 1.2"])
|
129
129
|
s.add_dependency(%q<language_sniffer>, [">= 0"])
|
130
130
|
end
|
131
131
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 4
|
10
|
+
version: 0.2.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|
@@ -40,10 +40,11 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: 11
|
44
44
|
segments:
|
45
45
|
- 1
|
46
|
-
|
46
|
+
- 2
|
47
|
+
version: "1.2"
|
47
48
|
type: :runtime
|
48
49
|
name: textpow1x
|
49
50
|
version_requirements: *id002
|