forest_liana 1.5.13 → 1.5.14
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: d465cac650830fd8f71903a65b822f4e3734bccf
|
|
4
|
+
data.tar.gz: be8b133ba5dd8a046b701f95588e77a351f2704f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 001764f65008472fd615b6fb395916db7eb7a39c0b81140cb4bdf0774ede763fb540751834d74d4ee39d6ae1822549eb568065f02110da74ff0eded4ce341041
|
|
7
|
+
data.tar.gz: 46e2d9c7f17cbfa2ed9ecf46661ac107a7a09ab8bae2f00be40f8ec071225f9adb7d5cc889273971443db0a0977fce0aaf710f548583b43d6d69e531bbf9abd5
|
|
@@ -5,6 +5,8 @@ module ForestLiana
|
|
|
5
5
|
rescue NameError
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
+
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
|
|
9
|
+
|
|
8
10
|
if Rails::VERSION::MAJOR < 4
|
|
9
11
|
before_filter :find_resource
|
|
10
12
|
else
|
|
@@ -87,5 +89,9 @@ module ForestLiana
|
|
|
87
89
|
.select { |a| SchemaUtils.model_included?(a.klass) }
|
|
88
90
|
.map { |a| a.name.to_s }
|
|
89
91
|
end
|
|
92
|
+
|
|
93
|
+
def record_not_found
|
|
94
|
+
head :not_found
|
|
95
|
+
end
|
|
90
96
|
end
|
|
91
97
|
end
|
|
@@ -73,12 +73,9 @@ module ForestLiana
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
def create_factories
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
ForestLiana::SerializerFactory.new.serializer_for(model)
|
|
80
|
-
ForestLiana::ControllerFactory.new.controller_for(model)
|
|
81
|
-
end
|
|
76
|
+
ForestLiana.models.map do |model|
|
|
77
|
+
ForestLiana::SerializerFactory.new.serializer_for(model)
|
|
78
|
+
ForestLiana::ControllerFactory.new.controller_for(model)
|
|
82
79
|
end
|
|
83
80
|
|
|
84
81
|
# Monkey patch the find_serializer_class_name method to specify the
|
|
@@ -117,9 +114,7 @@ module ForestLiana
|
|
|
117
114
|
end
|
|
118
115
|
|
|
119
116
|
def create_apimap
|
|
120
|
-
|
|
121
|
-
model = SchemaUtils.find_model_from_table_name(table_name)
|
|
122
|
-
|
|
117
|
+
ForestLiana.models.map do |model|
|
|
123
118
|
if analyze_model?(model)
|
|
124
119
|
SchemaAdapter.new(model).perform
|
|
125
120
|
end
|
data/lib/forest_liana/engine.rb
CHANGED
|
@@ -19,8 +19,7 @@ module ForestLiana
|
|
|
19
19
|
|
|
20
20
|
config.middleware.insert_before 0, rack_cors_class do
|
|
21
21
|
allow do
|
|
22
|
-
hostnames = ['localhost:4200',
|
|
23
|
-
'www.forestadmin.com']
|
|
22
|
+
hostnames = ['localhost:4200', /\A.*\.forestadmin\.com\z/]
|
|
24
23
|
hostnames += ENV['CORS_ORIGINS'].split(',') if ENV['CORS_ORIGINS']
|
|
25
24
|
|
|
26
25
|
origins hostnames
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_liana
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sandro Munda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|