forest_liana 2.11.13 → 2.12.0

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.
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: 2.11.13
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-11 00:00:00.000000000 Z
11
+ date: 2018-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -122,6 +122,48 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rotp
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: base32
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: httparty
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
125
167
  description: Forest is a modern admin interface that works on all major web frameworks.
126
168
  forest_liana is the gem that makes Forest admin work on any Rails application (Rails
127
169
  >= 4.0).
@@ -172,13 +214,12 @@ files:
172
214
  - app/serializers/forest_liana/stripe_invoice_serializer.rb
173
215
  - app/serializers/forest_liana/stripe_payment_serializer.rb
174
216
  - app/serializers/forest_liana/stripe_subscription_serializer.rb
175
- - app/services/forest_liana/allowed_users_getter.rb
176
217
  - app/services/forest_liana/apimap_sorter.rb
218
+ - app/services/forest_liana/authorization_getter.rb
177
219
  - app/services/forest_liana/base_getter.rb
178
220
  - app/services/forest_liana/belongs_to_updater.rb
179
221
  - app/services/forest_liana/controller_factory.rb
180
222
  - app/services/forest_liana/forest_api_requester.rb
181
- - app/services/forest_liana/google_authorized_user_getter.rb
182
223
  - app/services/forest_liana/has_many_associator.rb
183
224
  - app/services/forest_liana/has_many_dissociator.rb
184
225
  - app/services/forest_liana/has_many_getter.rb
@@ -188,6 +229,7 @@ files:
188
229
  - app/services/forest_liana/intercom_conversations_getter.rb
189
230
  - app/services/forest_liana/line_stat_getter.rb
190
231
  - app/services/forest_liana/live_query_checker.rb
232
+ - app/services/forest_liana/login_handler.rb
191
233
  - app/services/forest_liana/mixpanel_last_events_getter.rb
192
234
  - app/services/forest_liana/operator_date_interval_parser.rb
193
235
  - app/services/forest_liana/operator_value_parser.rb
@@ -213,7 +255,8 @@ files:
213
255
  - app/services/forest_liana/stripe_sources_getter.rb
214
256
  - app/services/forest_liana/stripe_subscription_getter.rb
215
257
  - app/services/forest_liana/stripe_subscriptions_getter.rb
216
- - app/services/forest_liana/users_getter.rb
258
+ - app/services/forest_liana/two_factor_registration_confirmer.rb
259
+ - app/services/forest_liana/user_secret_creator.rb
217
260
  - app/services/forest_liana/value_stat_getter.rb
218
261
  - app/views/layouts/forest_liana/application.html.erb
219
262
  - config/initializers/arel-helpers.rb
@@ -1,31 +0,0 @@
1
- module ForestLiana
2
- class AllowedUsersGetter < UsersGetter
3
- def initialize(rendering_id)
4
- super('allowed-users', rendering_id)
5
- end
6
-
7
- def handle_service_response(response)
8
- if response.is_a?(Net::HTTPOK)
9
- body = JSON.parse(response.body)
10
- ForestLiana.allowed_users = body['data'].map do |d|
11
- user = d['attributes']
12
- user['id'] = d['id']
13
-
14
- user
15
- end
16
- elsif response.is_a?(Net::HTTPNotFound)
17
- FOREST_LOGGER.error "Cannot retrieve the project you\'re trying " \
18
- "to unlock. Can you check that you properly copied the Forest " \
19
- "env_secret in the forest_liana initializer?"
20
- elsif response.is_a?(Net::HTTPUnprocessableEntity)
21
- FOREST_LOGGER.error "Cannot retrieve any users for the project you\'re trying to " \
22
- "unlock. Your secret key seems to be missing in your Forest configuration."
23
- []
24
- else
25
- FOREST_LOGGER.error "Cannot retrieve any users for the project " \
26
- "you\'re trying to unlock. An error occured in Forest API."
27
- []
28
- end
29
- end
30
- end
31
- end
@@ -1,28 +0,0 @@
1
- module ForestLiana
2
- class GoogleAuthorizedUserGetter < UsersGetter
3
- def initialize(rendering_id, forest_token)
4
- @forest_token = forest_token
5
- super('google-authorization', rendering_id)
6
- end
7
-
8
- def handle_service_response(response)
9
- if response.is_a?(Net::HTTPOK)
10
- body = JSON.parse(response.body)
11
- body['data']['attributes']
12
- elsif response.is_a?(Net::HTTPNotFound)
13
- FOREST_LOGGER.error "Cannot retrieve the project you\'re trying " \
14
- "to unlock. Can you check that you properly copied the Forest " \
15
- "env_secret in the forest_liana initializer?"
16
- nil
17
- elsif response.is_a?(Net::HTTPUnauthorized)
18
- FOREST_LOGGER.error "Cannot retrieve the user for the project " \
19
- "you\'re trying to unlock. The google user account seems invalid."
20
- nil
21
- else
22
- FOREST_LOGGER.error "Cannot retrieve the user for the project " \
23
- "you\'re trying to unlock. An error occured in Forest API."
24
- nil
25
- end
26
- end
27
- end
28
- end
@@ -1,21 +0,0 @@
1
- module ForestLiana
2
- class UsersGetter < ForestApiRequester
3
- def initialize(endpoint, rendering_id)
4
- @uri = URI.parse("#{forest_api_url}/forest/renderings/#{rendering_id}/#{endpoint}")
5
- end
6
-
7
- def perform
8
- perform_request
9
- rescue => exception
10
- FOREST_LOGGER.error "Cannot retrieve any users for the project you\'re trying to unlock. Forest API seems to be down right now."
11
- FOREST_LOGGER.error exception
12
- nil
13
- end
14
-
15
- private
16
-
17
- def handle_service_response
18
- raise 'Abstract class method, this method must be implemented.'
19
- end
20
- end
21
- end