magazine 0.0.2 → 0.0.3

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: 9eb9c014ef8cd09875a5d3fa74c2f2fd488368c8
4
- data.tar.gz: 85fcba48f132fb79a0eb947b0b2b583a92fa9bfa
3
+ metadata.gz: bd36fbf27fbbcc3425f838debddac03490217d9b
4
+ data.tar.gz: 57c4a672906b5768ad43b80fa87dd8d3840e71af
5
5
  SHA512:
6
- metadata.gz: 295fb46816b9accfd71a03cea50390336541c984d2c3c8145a244da5dd1fc42881d6302d6b5d5b7fea4200de81a0855091bafdf3e4f61177b73216745cde5899
7
- data.tar.gz: eb16d5397da58cc329dd12d4d7d1dc89b84a302cc835eaed14bedc60017a66284191dd176c7654dec35bcf680dcfa92173455c8211d14f19bb4853ce293bacb0
6
+ metadata.gz: 264f09ce859ebedc88a30d4c00770fcd0bfc7a436f0aa0897ab8fb605f72154d27b3b769e11d9aa619b99b620c57e18b4fe0bd7e60769a55788231f28e92a3a6
7
+ data.tar.gz: fb5ffd91c17a20779a23050989f937f184a4639238321e51786988ffcabec4b4bc2da45d41f8396c9ebe89bfbe9499e1d641b585189664f5e73e804d3e7af50a
@@ -18,6 +18,30 @@ module Magazine
18
18
  ['magazine', 'articles', 'shared', category.try(:category_slug), article.try(:slug), name].compact.join('/')
19
19
  end
20
20
 
21
+ def method_missing method, *args, &block
22
+ if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
23
+ if main_app.respond_to?(method)
24
+ main_app.send(method, *args)
25
+ else
26
+ super
27
+ end
28
+ else
29
+ super
30
+ end
31
+ end
32
+
33
+ def respond_to?(method)
34
+ if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
35
+ if main_app.respond_to?(method)
36
+ true
37
+ else
38
+ super
39
+ end
40
+ else
41
+ super
42
+ end
43
+ end
44
+
21
45
  private
22
46
  def _magazine_val(name, options)
23
47
  val = nil
@@ -18,6 +18,31 @@ module Magazine
18
18
  ['magazine', 'articles', 'shared', category.try(:category_slug), article.try(:slug), name].compact.join('/')
19
19
  end
20
20
 
21
+ def method_missing method, *args, &block
22
+ puts "LOOKING FOR ROUTES #{method}"
23
+ if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
24
+ if main_app.respond_to?(method)
25
+ main_app.send(method, *args)
26
+ else
27
+ super
28
+ end
29
+ else
30
+ super
31
+ end
32
+ end
33
+
34
+ def respond_to?(method)
35
+ if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
36
+ if main_app.respond_to?(method)
37
+ true
38
+ else
39
+ super
40
+ end
41
+ else
42
+ super
43
+ end
44
+ end
45
+
21
46
  private
22
47
  def _magazine_val(name, options)
23
48
  val = nil
@@ -1,3 +1,3 @@
1
1
  module Magazine
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Magazine
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: magazine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kozo yamagata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-18 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails