tkh_content 0.10.1 → 0.10.2

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: 06f86d84351c152fdab67aefec8f3c0e04750e12
4
- data.tar.gz: cf36bd8e44e6d4807b7ff9d0d7912db49f364bc1
3
+ metadata.gz: a4940ec28f1e9d1c1ea0397601ed252bc9755feb
4
+ data.tar.gz: 9a609610722c5421c2ff36d2dff847d4b3231d8d
5
5
  SHA512:
6
- metadata.gz: afcc65531f6e39abf351eceec41abca479c0eb4d3369ab026bf26b40039a257b41f6de186730fa12ccb0f8ad883ede7e1ad56cd30973859a12e281a5d5a37b1f
7
- data.tar.gz: e0bc0a3924e410fac5b969185dd8f28b09365f807a96c26734e1192f11f06d64a232293705ee9bfc3bc6375ae37f76006cd4c9e3abe2102aa8ce5bfd6af861fe
6
+ metadata.gz: 4fc0d8bbe10c1cf1a96b715fe488b9abc6a9cda74c17f3391d489ab5a6a0722cc3ec33afca7a0c2f15191250e9d1248e80d7d43dcf5966a72bc3781fa800dad8
7
+ data.tar.gz: a3bcf41d5f77224af679797fe7759748bacd0a3647ed8acf6272ae0572d67354cfe5d008efb37c3fecde6d77712b3b5f374af42884e4b102845f2948b15317dc
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # TKH Content
2
2
 
3
3
 
4
+ ## 0.10.2
5
+
6
+ * Refactored the tkhed pages helper method. It can render the new DSL syntax for the contact form and enabled the upcoming events generator to work with the tkh_events gem.
7
+
4
8
 
5
9
  ## 0.10.1
6
10
 
@@ -1,10 +1,25 @@
1
1
  module PagesHelper
2
+
2
3
  def tkhed(content)
3
- content = content.gsub /\(-: contact_us_form :-\)/, render('contacts/form') if content.match(/\(-: contact_us_form :-\)/)
4
- # from what will be the tkh_yoga_center_gem
5
- content = content.gsub /\(-: dropin_class_schedule :-\)/, render('dropin_classes/schedule') if content.match(/\(-: dropin_class_schedule :-\)/)
6
- # from what will be the tkh_upcoming_events_gem
7
- content = content.gsub /\(-: upcoming_events_list :-\)/, render('events/upcoming_events_list') if content.match(/\(-: upcoming_events_list :-\)/)
4
+ content = generate_contact_form(content)
5
+ content = generate_upcoming_events_list(content) #
6
+ end
7
+
8
+ private
9
+
10
+ def generate_contact_form(content)
11
+ # general TKH CMS feature
12
+ # the legacy syntax -- (-: contact_us_form :-)
13
+ content = content.gsub(/\(-: contact_us_form :-\)/, render('contacts/form')) if content.match(/\(-: contact_us_form :-\)/)
14
+ # the new syntax -- tkh_contact_form
15
+ content = content.gsub(/tkh_contact_form/, render('contacts/form')) if content.match(/tkh_contact_form/)
16
+ content
17
+ end
18
+
19
+ def generate_upcoming_events_list(content)
20
+ # from the tkh_events gem
21
+ content = content.gsub /tkh_upcoming_events/, render('events/upcoming_events_list') if content.match(/tkh_upcoming_events/)
8
22
  content
9
23
  end
24
+
10
25
  end
@@ -1,3 +1,3 @@
1
1
  module TkhContent
2
- VERSION = "0.10.1"
2
+ VERSION = "0.10.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swami Atma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2015-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails