git_history_rails 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cad8be2eef6266fd0fb835b43ab913f83c8651d7
|
4
|
+
data.tar.gz: f7fed28d513d0f9a590f1d574a572f602d2560ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 201c68d5d386c55b67e6b6b0e0da887f7483c95fd70e781350b88c6707348a29d41da1eea2235ed3d0d1e6556ea75466d054d940fdcd45505672f175e19ae6f4
|
7
|
+
data.tar.gz: b4fd7959d3b2dc4780a614085d2a42b8f76e8a66c6deed4ff0ecefa759371c66bdd6c44e706de65d71943c9d27cb109541f3a741997508b14a1d3c9246c0b335
|
data/lib/git_history_rails.rb
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
require "git_history_rails/engine"
|
2
2
|
|
3
3
|
module GitHistoryRails
|
4
|
+
module ApplicationHelper
|
5
|
+
def method_missing method, *args, &block
|
6
|
+
puts "LOOKING FOR ROUTES #{method}"
|
7
|
+
if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
|
8
|
+
if main_app.respond_to?(method)
|
9
|
+
main_app.send(method, *args)
|
10
|
+
else
|
11
|
+
super
|
12
|
+
end
|
13
|
+
else
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def respond_to?(method)
|
19
|
+
if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
|
20
|
+
if main_app.respond_to?(method)
|
21
|
+
true
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
25
|
+
else
|
26
|
+
super
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
4
30
|
|
5
31
|
end
|
@@ -3,17 +3,44 @@ module GitHistoryRails
|
|
3
3
|
isolate_namespace GitHistoryRails
|
4
4
|
require "git"
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
module ApplicationHelper
|
7
|
+
def method_missing method, *args, &block
|
8
|
+
puts "LOOKING FOR ROUTES #{method}"
|
9
|
+
if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
|
10
|
+
if main_app.respond_to?(method)
|
11
|
+
main_app.send(method, *args)
|
12
|
+
else
|
13
|
+
super
|
14
|
+
end
|
15
|
+
else
|
16
|
+
super
|
17
|
+
end
|
11
18
|
end
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
|
20
|
+
def respond_to?(method)
|
21
|
+
if method.to_s.end_with?('_path') or method.to_s.end_with?('_url')
|
22
|
+
if main_app.respond_to?(method)
|
23
|
+
true
|
24
|
+
else
|
25
|
+
super
|
26
|
+
end
|
27
|
+
else
|
28
|
+
super
|
15
29
|
end
|
16
30
|
end
|
17
31
|
end
|
32
|
+
|
33
|
+
initializer 'git_history_rails.configuration' do |app|
|
34
|
+
if app.config.try(:git_history_rails) && app.config.git_history_rails[:mounted_path]
|
35
|
+
app.routes.append do
|
36
|
+
mount GitHistoryRails::Engine => app.config.git_history_rails[:mounted_path]
|
37
|
+
end
|
38
|
+
else
|
39
|
+
app.routes.append do
|
40
|
+
mount GitHistoryRails::Engine => "/git_history"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
18
45
|
end
|
19
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_history_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Vítek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.2.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 4.2.0
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.2.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: hamlit
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|