almodovar-server 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 042adda5c5a864f06ab2fc981ff6edf4dcca6e50
4
- data.tar.gz: 37f2b4006bd09723713318a1038818267a7f2532
3
+ metadata.gz: 0172fee8f82b58a8f86c3dfa0eecee75b20258f4
4
+ data.tar.gz: ab3b8a057b1abca2dd33b1e8a137ff2c564aca05
5
5
  SHA512:
6
- metadata.gz: fa3861f56194e80b8305e5b9a01025d1cab8e7a2ed7fec1a8b03bb145879b2cb6a0f81bd0520b0bb2074bbd94cfb89cb0bfb148ec5ea9e1f27f5d4db91a774e2
7
- data.tar.gz: fe49bd306bee95c790921053144d8e8bb9ff88742e5704e5f7fe9db48ca40b50447eb925f94e62d68685a1e9a821ebdecc21ba17ee1de02ab5c3950f6dac41f4
6
+ metadata.gz: a3d31672940fc4a6315866282e5eb2d89a3b63399ac8b38b3c92d86e3876a1c79b521f092a9c5db54068c46d124705bf154a2c9370da5c282649e4e8238058e4
7
+ data.tar.gz: e5c28891bb9a0a8a2831e048b099393aed86e81bbc7d17789cbeeb3b4c9044102af378f1dc94a2e3c83f3f5e8ecb277c580a66a0bdc8d02decf51d91ceaecf51
@@ -1,4 +1,4 @@
1
- %w(pygments.rb github-markdown).each do |lib|
1
+ %w(rouge github-markdown).each do |lib|
2
2
  begin
3
3
  require lib.gsub('-', '/')
4
4
  rescue LoadError => ex
@@ -21,9 +21,11 @@ module Almodovar
21
21
  resource.resource_class.metadata
22
22
  end
23
23
 
24
- def beautify(representation, format)
25
- body = Pygments.highlight(representation, :lexer => format)
26
- body = body.gsub(/&quot;(http\S+)&quot;/) { url = $1; "&quot;<a href=\"#{url}\">#{url}</a>&quot;" }
24
+ def beautify(representation)
25
+ formatter = Rouge::Formatters::HTML.new
26
+ lexer = Rouge::Lexers::XML.new
27
+ body = formatter.format(lexer.lex(representation))
28
+ body = body.gsub(/\"(http\S+)\"/) { url = $1; "\"<a href=\"#{url}\">#{url}</a>\"" }
27
29
  body.html_safe
28
30
  end
29
31
 
@@ -38,7 +40,6 @@ module Almodovar
38
40
  text = GitHub::Markdown.render text
39
41
  text.html_safe
40
42
  end
41
-
42
43
  end
43
44
  end
44
45
  end
@@ -82,7 +82,11 @@
82
82
 
83
83
  <div class="tab-content">
84
84
  <div class="tab-pane" id="xml">
85
- <%= beautify resource.to_xml(options), :xml %>
85
+ <div class="highlight">
86
+ <pre>
87
+ <%= beautify resource.to_xml(options) %>
88
+ </pre>
89
+ </div>
86
90
  </div>
87
91
  <div class="tab-pane" id="help">
88
92
  <h2><%= metadata[:name] %></h2>
@@ -1,3 +1,3 @@
1
1
  module Almodovar
2
- SERVER_VERSION = '0.1.0'
2
+ SERVER_VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: almodovar-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BeBanjo S.L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-11 00:00:00.000000000 Z
11
+ date: 2016-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: i18n
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description:
@@ -88,6 +88,8 @@ extra_rdoc_files:
88
88
  - README.rdoc
89
89
  files:
90
90
  - README.rdoc
91
+ - lib/almodovar-server.rb
92
+ - lib/almodovar-server/resource_presenter.rb
91
93
  - lib/almodovar-server/resource_presenter/collection.rb
92
94
  - lib/almodovar-server/resource_presenter/html_serializer.rb
93
95
  - lib/almodovar-server/resource_presenter/json_serializer.rb
@@ -96,31 +98,29 @@ files:
96
98
  - lib/almodovar-server/resource_presenter/serializer.rb
97
99
  - lib/almodovar-server/resource_presenter/template.html.erb
98
100
  - lib/almodovar-server/resource_presenter/xml_serializer.rb
99
- - lib/almodovar-server/resource_presenter.rb
100
101
  - lib/almodovar-server/version.rb
101
- - lib/almodovar-server.rb
102
102
  homepage: http://github.com/bebanjo/almodovar-server/
103
103
  licenses: []
104
104
  metadata: {}
105
105
  post_install_message:
106
106
  rdoc_options:
107
- - --main
107
+ - "--main"
108
108
  - README.rdoc
109
109
  require_paths:
110
110
  - lib
111
111
  required_ruby_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - '>='
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - '>='
118
+ - - ">="
119
119
  - !ruby/object:Gem::Version
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.0.6
123
+ rubygems_version: 2.2.2
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: BeBanjo API server components