camaleon_spree 0.0.1 → 0.0.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: 39d35ba38f34032cfce0332e9557ee52fb31c4a8
4
- data.tar.gz: 8110a524ba6f5620a1da12acfd87d0c664eedc53
3
+ metadata.gz: 0dfaf8971a7a688eb8494173bd9831aa327c1839
4
+ data.tar.gz: adbead18ce9160dc0f24c46e97d016efb0465cfd
5
5
  SHA512:
6
- metadata.gz: 1954178f245f8a37fe410edb1ded31d1235898eef589494434e5899335b9497f1754ff602ded158635d08afd92034aaf676febe2e537a5f1f706c0c2898f037e
7
- data.tar.gz: 6bade47eb96dbdbbcae16de1004af7b80b0abfa38b0bb7284c6c7f8cf9616d90ebb2ed650958123a833ad006bd2a6828dd7833cc3280bddf02b1d8efa3bf3f22
6
+ metadata.gz: 28adadb28f2699ada78c886923a2b50313f038f6cba3ed1cb63d4ed54aa63d463cf8283edd644efa631f1517d6d6ace6226f2677e3894565075481a2ebe5b62b
7
+ data.tar.gz: 2af69f1cafd2c4b523ad602c83611d33dbda58d0db3675f84231a64ca31486ef7727dd4b6a79e3377c43caaf3f141955e45089024b9d152151b0fcdb0aeee240
@@ -1,9 +1,21 @@
1
1
  class Camaspreehelperroutes
2
2
  def self.update_helper_routes
3
- _routes = ['cama_profile', 'cama_search', 'cama_post_of_posttype', 'cama_save_comment', 'cama_save_form', 'cama_post_type', 'cama_hierarchy_post', 'cama_post_tag', 'cama_post', 'cama_root', 'cama_admin', 'cama_admin_dashboard']
3
+
4
+ # not arguments
5
+ _routes = ['cama_profile', 'cama_search', 'cama_post_of_posttype', 'cama_save_comment', 'cama_save_form', 'cama_post_type', 'cama_hierarchy_post', 'cama_post_tag', 'cama_post', 'cama_root', 'cama_admin', 'cama_admin_dashboard',
6
+ 'cama_category', 'cama_post_of_category', 'cama_post_of_post_type', 'cama_post_type']
4
7
  _routes += Cama::PostType.pluck(:id).map{|id| "cama_post_type_#{id}"}
5
8
 
6
- _cama_lang_routes = ['cama_category', 'cama_post_of_category', 'cama_post_of_post_type', 'cama_post_type']
9
+ # three arguments
10
+ ['edit_cama_admin_post_type_post_tag_url', 'edit_cama_admin_post_type_post_url'].each do |u|
11
+ Spree::BaseHelper.module_eval <<-eoruby, __FILE__, __LINE__ + 1
12
+ def #{u}(pt_id, object, args)
13
+ Rails.application.routes.url_helpers.#{u}(pt_id, object, args)
14
+ end
15
+ eoruby
16
+ end
17
+
18
+ _cama_lang_routes = ['cama_post_type']
7
19
  Cama::Site.main_site.get_languages.each{|_l| _cama_lang_routes.each{|_r| _routes << "#{_r}_#{_l}" } }
8
20
  _routes.each do |x|
9
21
  Spree::BaseHelper.module_eval <<-eoruby, __FILE__, __LINE__ + 1
@@ -17,14 +29,7 @@ class Camaspreehelperroutes
17
29
  eoruby
18
30
  end
19
31
 
20
- ['edit_cama_admin_post_type_post_tag_url', 'edit_cama_admin_post_type_post_url'].each do |u|
21
- Spree::BaseHelper.module_eval <<-eoruby, __FILE__, __LINE__ + 1
22
- def #{u}(pt_id, object, args)
23
- Rails.application.routes.url_helpers.#{u}(pt_id, object, args)
24
- end
25
- eoruby
26
- end
27
-
32
+ # two arguments
28
33
  ['edit_cama_admin_post_type_category_url', 'edit_cama_admin_settings_post_type_url'].each do |u|
29
34
  Spree::BaseHelper.module_eval <<-eoruby, __FILE__, __LINE__ + 1
30
35
  def #{u}(id, args)
@@ -1,3 +1,3 @@
1
1
  module CamaleonSpree
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camaleon_spree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Peredo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-07 00:00:00.000000000 Z
11
+ date: 2017-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails