etabliocms_core 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module EtabliocmsCore
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,4 @@
1
+ textile_extension_pack
2
+ ============
3
+
4
+ Extends textile with some custom tags like images with colorbox support or google maps.
@@ -0,0 +1,3 @@
1
+ require 'textile_extension_pack'
2
+ RedCloth.send(:include, TextileExtensionPack::RegularExpressions)
3
+ RedCloth::Formatters::HTML.send(:include, TextileExtensionPack::Tags)
@@ -0,0 +1,30 @@
1
+ module TextileExtensionPack
2
+ module Tags
3
+
4
+ def icon(opts)
5
+ img, text, url = opts[:text].split('|').map! { |str| str.strip }
6
+ html = %Q{<figure>\n}
7
+ html << %Q{<div class="image-wrapper #{opts[:class]}">\n}
8
+ html << %Q{<div class="image-wrapper-inner">\n}
9
+ html << %Q{<div class="image-wrapper-inner-inner">\n}
10
+ html << %Q{ <a href="#{url}" title="#{text}">} if url.present?
11
+ html << %Q{ <img src="#{img}" alt="#{text}" />}
12
+ html << %Q{ </a>\n} if url.present?
13
+ html << %Q{</div>\n}
14
+ html << %Q{</div>\n}
15
+ html << %Q{</div>\n}
16
+ html << %Q{ <figcaption>#{text}</figcaption>\n} if text.present?
17
+ html << %Q{</figure>\n}
18
+ end
19
+ end
20
+
21
+ module RegularExpressions
22
+ def tags(text)
23
+ text.gsub!(/cleaner./, '<hr class="cleaner" />')
24
+ text.gsub!(/columnsstart./, '<div class="column">')
25
+ text.gsub!(/columnend./, '</div>')
26
+ text.gsub!(/decolumnize./, '</div>')
27
+ text.gsub!(/columnize./, '<div class="columnized">')
28
+ end
29
+ end
30
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etabliocms_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-09 00:00:00.000000000 Z
12
+ date: 2012-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &8387660 !ruby/object:Gem::Requirement
16
+ requirement: &18753820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *8387660
24
+ version_requirements: *18753820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &8386120 !ruby/object:Gem::Requirement
27
+ requirement: &18753240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *8386120
35
+ version_requirements: *18753240
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jquery-ui-rails
38
- requirement: &8384380 !ruby/object:Gem::Requirement
38
+ requirement: &18752620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *8384380
46
+ version_requirements: *18752620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: devise
49
- requirement: &8383000 !ruby/object:Gem::Requirement
49
+ requirement: &18751820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.0.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *8383000
57
+ version_requirements: *18751820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: configatron
60
- requirement: &8382000 !ruby/object:Gem::Requirement
60
+ requirement: &18750920 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *8382000
68
+ version_requirements: *18750920
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: RedCloth
71
- requirement: &8381040 !ruby/object:Gem::Requirement
71
+ requirement: &18749660 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - =
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 4.2.9
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *8381040
79
+ version_requirements: *18749660
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sqlite3
82
- requirement: &8380280 !ruby/object:Gem::Requirement
82
+ requirement: &18765220 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *8380280
90
+ version_requirements: *18765220
91
91
  description: Small CMS
92
92
  email:
93
93
  - patrikjira@gmail.com
@@ -205,6 +205,9 @@ files:
205
205
  - public/markitup/h4.png
206
206
  - public/markitup/youtube.png
207
207
  - public/markitup/code.png
208
+ - vendor/plugins/textile_extension_pack/lib/textile_extension_pack.rb
209
+ - vendor/plugins/textile_extension_pack/init.rb
210
+ - vendor/plugins/textile_extension_pack/README
208
211
  - vendor/plugins/acts_as_sluggy/lib/active_record/acts/sluggy.rb
209
212
  - vendor/plugins/acts_as_sluggy/init.rb
210
213
  - vendor/plugins/acts_as_sluggy/Rakefile