inverter 0.4.6 → 0.4.7

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: 12a7230b597dc15572b8618178eb9c352953b969
4
- data.tar.gz: aa2971ee76741ae4de514e00e5a22adc299342e9
3
+ metadata.gz: 59e191c717b9b0b28ff7af2c0195b6b4490ffc55
4
+ data.tar.gz: 158b658593ac1f703c4376cbe097b8928f6321fe
5
5
  SHA512:
6
- metadata.gz: a708e702055b46b28862aead41c79338d1a89a77005e354941047c2c0b2605ddc6903e2dd6a4bbcaa8e725f6d8d03715c43bf2461747864a48971b308d37c7e1
7
- data.tar.gz: 629283f63e4dc504224ce6190d905736cccdddea0209ec9ae347a0a0ebe3aa3cd39c80c65ef0c850e955daeed729d332af39286055971cb6efec77f2c9ea04bf
6
+ metadata.gz: cb82028e6cd7eb1350c7cef41e52f288ec35dc42e90a7f4207a5c8167d9ed1b0aedc5b9c8c956d761e957db9e0e0f679cd25beb7ee3c7f8b6dba678bd823fdfe
7
+ data.tar.gz: 696d30cae06b51ee25c4d476e0f92c70f5c301d4c76f4018c177b5b4e87afc56451e403625433b04ebb6ac813123cede3528d6a33069673447bab75e8c26d010
data/.gitignore CHANGED
@@ -1,7 +1,7 @@
1
1
  .DS_Store
2
2
 
3
3
  test/rails_app/tmp
4
- test/rails_app/log
4
+ test/rails_app/log/
5
5
  test/rails_app/app/views/pages
6
6
  log
7
7
  pkg/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- inverter (0.4.2)
4
+ inverter (0.4.6)
5
5
  ants (>= 0.1.4)
6
6
  awesome_print (>= 1.6.1)
7
7
  meta-tags (>= 2.0)
@@ -49,12 +49,14 @@ GEM
49
49
  thread_safe (~> 0.3, >= 0.3.4)
50
50
  tzinfo (~> 1.1)
51
51
  ansi (1.5.0)
52
- ants (0.1.4)
52
+ ants (0.3.5)
53
+ devise
53
54
  mongoid (>= 4.0)
54
55
  mongoid-slug (>= 4.0.0)
55
56
  arel (6.0.0)
56
57
  awesome_print (1.6.1)
57
- bson (3.1.2)
58
+ bcrypt (3.1.10)
59
+ bson (3.2.6)
58
60
  builder (3.2.2)
59
61
  capybara (2.4.4)
60
62
  mime-types (>= 1.16)
@@ -72,9 +74,15 @@ GEM
72
74
  coffee-script-source
73
75
  execjs
74
76
  coffee-script-source (1.9.1.1)
75
- connection_pool (2.2.0)
76
77
  database_cleaner (1.4.1)
77
- easy_diff (0.0.4)
78
+ devise (3.5.2)
79
+ bcrypt (~> 3.0)
80
+ orm_adapter (~> 0.1)
81
+ railties (>= 3.2.6, < 5)
82
+ responders
83
+ thread_safe (~> 0.1)
84
+ warden (~> 1.2.3)
85
+ easy_diff (0.0.6)
78
86
  erubis (2.7.0)
79
87
  execjs (2.5.2)
80
88
  factory_girl (4.5.0)
@@ -90,7 +98,7 @@ GEM
90
98
  nokogiri (>= 1.5.9)
91
99
  mail (2.6.3)
92
100
  mime-types (>= 1.16, < 3)
93
- meta-tags (2.0.0)
101
+ meta-tags (2.1.0)
94
102
  actionpack (>= 3.0.0)
95
103
  mime-types (2.6.1)
96
104
  mini_portile (0.6.2)
@@ -116,26 +124,29 @@ GEM
116
124
  builder
117
125
  minitest (>= 5.0)
118
126
  ruby-progressbar
119
- mongoid (4.0.2)
127
+ mongo (2.1.2)
128
+ bson (~> 3.0)
129
+ mongoid (5.0.1)
120
130
  activemodel (~> 4.0)
121
- moped (~> 2.0.0)
131
+ mongo (~> 2.1)
122
132
  origin (~> 2.1)
123
133
  tzinfo (>= 0.3.37)
124
- mongoid-history (0.4.7)
134
+ mongoid-compatibility (0.3.1)
135
+ activesupport
136
+ mongoid (>= 2.0)
137
+ mongoid-history (0.5.0)
125
138
  activesupport
126
139
  easy_diff
127
140
  mongoid (>= 3.0)
128
- mongoid-slug (4.0.0)
141
+ mongoid-compatibility
142
+ mongoid-slug (5.1.1)
129
143
  mongoid (>= 3.0)
144
+ mongoid-compatibility
130
145
  stringex (~> 2.0)
131
- moped (2.0.6)
132
- bson (~> 3.0)
133
- connection_pool (~> 2.0)
134
- optionable (~> 0.2.0)
135
146
  nokogiri (1.6.6.2)
136
147
  mini_portile (~> 0.6.0)
137
- optionable (0.2.0)
138
148
  origin (2.1.1)
149
+ orm_adapter (0.5.0)
139
150
  rack (1.6.1)
140
151
  rack-test (0.6.3)
141
152
  rack (>= 1.0)
@@ -164,9 +175,11 @@ GEM
164
175
  rake (>= 0.8.7)
165
176
  thor (>= 0.18.1, < 2.0)
166
177
  rake (10.4.2)
167
- redcarpet (3.3.2)
168
- render_anywhere (0.0.11)
178
+ redcarpet (3.3.3)
179
+ render_anywhere (0.0.12)
169
180
  rails (>= 3.0.7)
181
+ responders (2.1.0)
182
+ railties (>= 4.2.0, < 5)
170
183
  ruby-progressbar (1.7.5)
171
184
  sprockets (3.1.0)
172
185
  rack (~> 1.0)
@@ -179,6 +192,8 @@ GEM
179
192
  thread_safe (0.3.5)
180
193
  tzinfo (1.2.2)
181
194
  thread_safe (~> 0.1)
195
+ warden (1.2.3)
196
+ rack (>= 1.0)
182
197
  xpath (2.0.0)
183
198
  nokogiri (~> 1.3)
184
199
 
@@ -199,4 +214,4 @@ DEPENDENCIES
199
214
  rake (~> 10.0)
200
215
 
201
216
  BUNDLED WITH
202
- 1.10.4
217
+ 1.10.6
@@ -110,7 +110,11 @@ module Inverter
110
110
  private
111
111
 
112
112
  def file_content
113
- @file_content ||= File.open(Rails.root.join("app/views", @template_name), "rb").read
113
+ @file_content ||= template_file
114
+ end
115
+
116
+ def template_file
117
+ File.open(Rails.root.join("app/views", @template_name), "rb").read
114
118
  end
115
119
  end
116
120
  end
@@ -11,11 +11,15 @@ module Inverter
11
11
  return false
12
12
  end
13
13
 
14
- def self.render(html, blocks)
14
+ def self.markdown
15
15
  # markdown configuration
16
16
  # https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use
17
- markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true)
17
+ @markdown ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML,
18
+ autolink: true,
19
+ tables: true)
20
+ end
18
21
 
22
+ def self.render(html, blocks)
19
23
  offset = 0
20
24
  map = ::Inverter::Parser.map_blocks_for(html)
21
25
 
@@ -27,7 +31,7 @@ module Inverter
27
31
  block = markdown.render(block)
28
32
  end
29
33
 
30
- block = "\n#{ block }\n"
34
+ block = "#{ block }"
31
35
 
32
36
  html[offset+pos[0]..offset+pos[1]] = block
33
37
 
@@ -1,3 +1,3 @@
1
1
  module Inverter
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  test:
2
- sessions:
2
+ clients:
3
3
  default:
4
4
  database: inverter_test
5
5
  hosts:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inverter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-04 00:00:00.000000000 Z
11
+ date: 2015-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ants
@@ -296,7 +296,6 @@ files:
296
296
  - test/rails_app/lib/assets/.keep
297
297
  - test/rails_app/lib/tasks/.keep
298
298
  - test/rails_app/log/.keep
299
- - test/rails_app/log/test.log
300
299
  - test/rails_app/public/404.html
301
300
  - test/rails_app/public/422.html
302
301
  - test/rails_app/public/500.html