hljs 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzM3NGI0MDg0NjJmMzc2YmYxMzFmOWEzNzJkMWFiOWY5ZmI4NmU1OQ==
5
- data.tar.gz: !binary |-
6
- Zjc4NTYyNjE1ZmJlMjNhOWM3M2QzYTI0ZjQ0OWZiYWI4MzkzMjJhNw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YzIyZWM4NjI0YWI4ZGM0OWU5YzVlOWEzYzYwMDg5NWQwN2NhMzA5YjFmMDQ5
10
- NDFjYTRkYmZjMWZlODg4M2QzM2I5YTJlMWJmODIyNjUwN2M4MmUwYjRhYzc2
11
- ZjVmNTZkMWQxYWE0NTJjYzExYmM5NjY4ZDI5MzA5MWQ4NWQ0YjA=
12
- data.tar.gz: !binary |-
13
- MDY0MDIzMzQ1ZjkwMzViNDY4MTJlMmFkYzdmZDdlZGY2M2FkMDQxMmQ3OGVj
14
- MzVkMzg0YmFjOTRhYzgxOGFmNzQwYmFkYjEzMWZiZGRlMDYwZTFiMTFlYWM2
15
- NWRlMDMyYjgzOWEyMTU2MzgyYTU2MzAzZmRkNTJiYmQ5MzU4ZDQ=
2
+ SHA1:
3
+ metadata.gz: 4d7d166dd30612c71985080612febc80bcaba40b
4
+ data.tar.gz: f3c694beebfd9da1b1cb70151dcba81881e301c9
5
+ SHA512:
6
+ metadata.gz: 6a183c27de0b1fd1fe404bc0c55dec2e859246082bc1a5a709e3a02630ab65842b027f4ef4f761914c0271e0778cc5051b0f907c3a026eaa4e2c91b3048527cc
7
+ data.tar.gz: 7e515c53b6113b0b94021faaa59c28c485e101c84f366ca3ddf87c4bc5af0aa832af16d857d9e4032ddd46566b0a6a5fbb8a98f405697dd8ff5b2c3c17923f06
data/Gemfile CHANGED
@@ -3,5 +3,4 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'rake'
6
- gem 'json', '~> 1.8'
7
- gem 'rspec', '~> 2.14.0.rc1'
6
+ gem 'rspec', '~> 2.14'
data/README.md CHANGED
@@ -31,8 +31,8 @@ For now only two adapters are supported: [highlight.js](https://github.com/isaga
31
31
  and [SyntaxHighlighter](https://github.com/alexgorbatchev/SyntaxHighlighter).
32
32
 
33
33
  ```ruby
34
- HLJS.highlight source, language # => highlighted source
35
- HLJS.supported_syntaxes # => the list of all supported syntaxes
34
+ HLJS.highlight(source, language) # => highlighted source
35
+ HLJS.supported_syntaxes # => the list of all supported syntaxes
36
36
  ```
37
37
 
38
38
  Swithing adapters is quite straightforward:
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = ">= 1.9.2"
22
22
 
23
- spec.add_dependency "execjs", "~> 1.4"
23
+ spec.add_dependency "execjs"
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  end
@@ -14,10 +14,10 @@ module HLJS
14
14
 
15
15
  def adapter=(new_adapter)
16
16
  @adapter = case new_adapter.to_s
17
- when /highlight[\s_]?js/i
17
+ when /\Ahighlight[\s_]?js\z/i
18
18
  require "hljs/adapters/highlight_js"
19
19
  Adapters::HighlightJS.instance
20
- when /syntax[\s_]?highlighter/i
20
+ when /\Asyntax[\s_]?highlighter\z/i
21
21
  require "hljs/adapters/syntax_highlighter"
22
22
  Adapters::SyntaxHighlighter.instance
23
23
  else
@@ -1,3 +1,3 @@
1
1
  module HLJS
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hljs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-03 00:00:00.000000000 Z
11
+ date: 2013-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: execjs
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
- - - ~>
17
+ - - '>='
17
18
  - !ruby/object:Gem::Version
18
- version: '1.4'
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
19
22
  version_requirements: !ruby/object:Gem::Requirement
20
23
  requirements:
21
- - - ~>
24
+ - - '>='
22
25
  - !ruby/object:Gem::Version
23
- version: '1.4'
24
- type: :runtime
25
- prerelease: false
26
- name: execjs
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: bundler
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ~>
31
32
  - !ruby/object:Gem::Version
32
33
  version: '1.3'
34
+ type: :development
35
+ prerelease: false
33
36
  version_requirements: !ruby/object:Gem::Requirement
34
37
  requirements:
35
38
  - - ~>
36
39
  - !ruby/object:Gem::Version
37
40
  version: '1.3'
38
- type: :development
39
- prerelease: false
40
- name: bundler
41
41
  description: Ruby wrapper for javascript code highlighting libraries
42
42
  email:
43
43
  - pavel@pravosud.com
@@ -111,17 +111,17 @@ require_paths:
111
111
  - lib
112
112
  required_ruby_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ! '>='
114
+ - - '>='
115
115
  - !ruby/object:Gem::Version
116
116
  version: 1.9.2
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - ! '>='
119
+ - - '>='
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.0.3
124
+ rubygems_version: 2.0.7
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Allows to use javascript code highlighters from ruby