solidus_social 1.3.1 → 1.4.0

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
  SHA256:
3
- metadata.gz: 4505b80691751ffd50922035e8c2c9f52392eca4fd157e072b7dfacec62f2d68
4
- data.tar.gz: ad006d45a7f3ec7b81411c1ae5e42be924226b5f5d54bd3bb4d7e0cc2fac7ec6
3
+ metadata.gz: a86b6cfe4109e24c01c128b99b42a23c5387001a642acbdb4ae78d0efbf5e108
4
+ data.tar.gz: 116bca0155aa00db87caac0c00a59bbc2139729e2addd378d7159641ba424613
5
5
  SHA512:
6
- metadata.gz: 84706b9de07eeee8828868a39006587b33db9ccf0771997b0c35de90919353c41183b4626a688cbc4aae87f42f48a603ad17ad119fcf2e6c0133fd4bc095dbd3
7
- data.tar.gz: 4e01a2aa429faf038845636040276376d9659778ce61182d9cc584889e0b79b464b73326f81a25e0effade1fbd4d1d83cc5176cc8fc9c35a258373d9ce0f5624
6
+ metadata.gz: 3d37b9986abcee5ddd8dd82c003f92b5a497ccbe36c619268f20fc390db9375dd88a05a4536942418afc4193e147fd82028b136d4578cd8888157daa4ea5ce7c
7
+ data.tar.gz: 737587a8380670d75146924a52a3794bf628679e6b1701129b10f88fbace10259920b5654b9108f7ba0859a739f529d2c5249afc5e91941cd6016b7ccfc6708b
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spree
4
+ module PermissionSets
5
+ class AuthenticationMethodDisplay < PermissionSets::Base
6
+ def activate!
7
+ can [:display, :admin], Spree::AuthenticationMethod
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spree
4
+ module PermissionSets
5
+ class AuthenticationMethodManagement < PermissionSets::Base
6
+ def activate!
7
+ can :manage, Spree::AuthenticationMethod
8
+ end
9
+ end
10
+ end
11
+ end
@@ -3,5 +3,10 @@
3
3
  Deface::Override.new(virtual_path: 'spree/admin/shared/_configuration_menu',
4
4
  name: 'add_social_providers_link_configuration_menu',
5
5
  insert_bottom: '[data-hook="admin_configurations_sidebar_menu"]',
6
- text: '<%= configurations_sidebar_menu_item I18n.t("spree.social_authentication_methods"), spree.admin_authentication_methods_path %>',
7
- disabled: false)
6
+ disabled: false) do
7
+ <<-HTML
8
+ <% if can? :admin, Spree::AuthenticationMethod %>
9
+ <%= configurations_sidebar_menu_item I18n.t("spree.social_authentication_methods"), spree.admin_authentication_methods_path %>
10
+ <% end %>
11
+ HTML
12
+ end
@@ -13,6 +13,8 @@
13
13
  <%= form_for [:admin, @authentication_method] do |f| %>
14
14
  <fieldset class="no-border-top">
15
15
  <%= render 'form', f: f %>
16
- <%= render 'spree/admin/shared/edit_resource_links' %>
16
+ <% if can? :manage, Spree::AuthenticationMethod %>
17
+ <%= render 'spree/admin/shared/edit_resource_links' %>
18
+ <% end %>
17
19
  </fieldset>
18
20
  <% end %>
@@ -5,11 +5,13 @@
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <ul class="actions inline-menu">
9
- <li>
10
- <%= link_to I18n.t('spree.new_social_method'), new_object_url, id: 'admin_new_slide_link' %>
11
- </li>
12
- </ul>
8
+ <% if can? :manage, Spree::AuthenticationMethod %>
9
+ <ul class="actions inline-menu">
10
+ <li>
11
+ <%= link_to I18n.t('spree.new_social_method'), new_object_url, id: 'admin_new_slide_link' %>
12
+ </li>
13
+ </ul>
14
+ <% end %>
13
15
  <% end %>
14
16
 
15
17
  <% if @authentication_methods.any? %>
@@ -39,8 +41,10 @@
39
41
  <td class="align-center"><%= method.environment.to_s.titleize %></td>
40
42
  <td class="align-center"><%= method.active ? I18n.t('spree.yes') : I18n.t('spree.no') %></td>
41
43
  <td class="actions">
42
- <%= link_to_edit method, no_text: true %>
43
- <%= link_to_delete method, no_text: true %>
44
+ <% if can? :manage, Spree::AuthenticationMethod %>
45
+ <%= link_to_edit method, no_text: true %>
46
+ <%= link_to_delete method, no_text: true %>
47
+ <% end %>
44
48
  </td>
45
49
  </tr>
46
50
  <% end %>
@@ -13,6 +13,8 @@
13
13
  <%= form_for [:admin, @authentication_method] do |f| %>
14
14
  <fieldset class="no-border-top">
15
15
  <%= render 'form', f: f %>
16
- <%= render 'spree/admin/shared/new_resource_links' %>
16
+ <% if can? :manage, Spree::AuthenticationMethod %>
17
+ <%= render 'spree/admin/shared/new_resource_links' %>
18
+ <% end %>
17
19
  </fieldset>
18
20
  <% end %>
@@ -1,8 +1,11 @@
1
1
  ---
2
2
  es-MX:
3
+ authentications:
4
+ spree:
5
+ destroy: Método de autenticación eliminado
3
6
  devise:
4
7
  omniauth_callbacks:
5
- success: "Estás sesión con tu cuenta de %{kind}."
8
+ success: "Estás en sesión con tu cuenta de %{kind}."
6
9
  spree:
7
10
  user_was_not_valid: "El usuario no fue válido."
8
11
  add_another_service: 'Añadir otro servicio para inicio de sesión:'
@@ -24,3 +27,4 @@ es-MX:
24
27
  please_confirm_your_email: 'Por favor confirme su email para continuar'
25
28
  sign_in_with: 'Autenticado con %{provider}'
26
29
  you_have_signed_in_with_these_services: "Has iniciado sesión con estos servicios"
30
+ environment: Ambiente
@@ -0,0 +1,30 @@
1
+ ---
2
+ es:
3
+ authentications:
4
+ spree:
5
+ destroy: Método de autenticación eliminado
6
+ devise:
7
+ omniauth_callbacks:
8
+ success: "Estás en sesión con tu cuenta de %{kind}."
9
+ spree:
10
+ user_was_not_valid: "El usuario no fue válido."
11
+ add_another_service: 'Añadir otro servicio para inicio de sesión:'
12
+ authentications:
13
+ destroy: 'Método de autenticación eliminado exitosamente.'
14
+ back_to_authentication_methods_list: "Volver a la lista de métodos de autenticación"
15
+ edit_social_method: 'Editando metodo de autenticación'
16
+ new_social_method: 'Nuevo método de autenticación'
17
+ no_authentication_methods_found: "No se encuentran ningún método de autenticación"
18
+ one_more_step: 'Un paso más para completar tu registro desde %{kind}'
19
+ remove_authentication_option_confirmation: '¿Está seguro que quiere eliminar este método de autenticación?'
20
+ sign_into_account: 'Puedes iniciar sesión usando:'
21
+ sign_in_through_one_of_these_services: 'Iniciar sesión a través de uno de estos servicios:'
22
+ social_api_key: 'API Clave'
23
+ social_api_secret: 'API Secreto'
24
+ social_authentication_methods: 'Métodos de autenticación'
25
+ social_authentication_methods_description: 'Configurar métodos de autenticación de OAuth'
26
+ social_provider: 'Proveedor social'
27
+ please_confirm_your_email: 'Por favor confirme su email para continuar'
28
+ sign_in_with: 'Autenticado con %{provider}'
29
+ you_have_signed_in_with_these_services: "Has iniciado sesión con estos servicios"
30
+ environment: Ambiente
@@ -12,7 +12,7 @@ require 'solidus_social/facebook_omniauth_strategy_ext'
12
12
 
13
13
  module SolidusSocial
14
14
  class Engine < Rails::Engine
15
- include SolidusSupport::EngineExtensions::Decorators
15
+ include SolidusSupport::EngineExtensions
16
16
 
17
17
  isolate_namespace ::Spree
18
18
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusSocial
4
- VERSION = '1.3.1'
4
+ VERSION = '1.4.0'
5
5
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.metadata['source_code_uri'] = 'https://github.com/solidusio-contrib/solidus_social'
18
18
  spec.metadata['changelog_uri'] = 'https://github.com/solidusio-contrib/solidus_social/blob/master/CHANGELOG.md'
19
19
 
20
- spec.required_ruby_version = Gem::Requirement.new('~> 2.4')
20
+ spec.required_ruby_version = '>= 2.4'
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -37,8 +37,8 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency 'omniauth-google-oauth2'
38
38
  spec.add_dependency 'omniauth-twitter'
39
39
  spec.add_dependency 'solidus_auth_devise'
40
- spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 3']
41
- spec.add_dependency 'solidus_support', '>= 0.4', '< 0.6'
40
+ spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 4']
41
+ spec.add_dependency 'solidus_support', '~> 0.5'
42
42
 
43
43
  spec.add_development_dependency 'solidus_dev_support'
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_social
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Dyer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-16 00:00:00.000000000 Z
11
+ date: 2021-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -145,7 +145,7 @@ dependencies:
145
145
  version: 2.0.0
146
146
  - - "<"
147
147
  - !ruby/object:Gem::Version
148
- version: '3'
148
+ version: '4'
149
149
  type: :runtime
150
150
  prerelease: false
151
151
  version_requirements: !ruby/object:Gem::Requirement
@@ -155,27 +155,21 @@ dependencies:
155
155
  version: 2.0.0
156
156
  - - "<"
157
157
  - !ruby/object:Gem::Version
158
- version: '3'
158
+ version: '4'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: solidus_support
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- version: '0.4'
166
- - - "<"
163
+ - - "~>"
167
164
  - !ruby/object:Gem::Version
168
- version: '0.6'
165
+ version: '0.5'
169
166
  type: :runtime
170
167
  prerelease: false
171
168
  version_requirements: !ruby/object:Gem::Requirement
172
169
  requirements:
173
- - - ">="
170
+ - - "~>"
174
171
  - !ruby/object:Gem::Version
175
- version: '0.4'
176
- - - "<"
177
- - !ruby/object:Gem::Version
178
- version: '0.6'
172
+ version: '0.5'
179
173
  - !ruby/object:Gem::Dependency
180
174
  name: solidus_dev_support
181
175
  requirement: !ruby/object:Gem::Requirement
@@ -190,7 +184,7 @@ dependencies:
190
184
  - - ">="
191
185
  - !ruby/object:Gem::Version
192
186
  version: '0'
193
- description:
187
+ description:
194
188
  email: jdyer@spreecommerce.com
195
189
  executables: []
196
190
  extensions: []
@@ -198,7 +192,6 @@ extra_rdoc_files: []
198
192
  files:
199
193
  - ".circleci/config.yml"
200
194
  - ".gem_release.yml"
201
- - ".github/stale.yml"
202
195
  - ".gitignore"
203
196
  - ".rspec"
204
197
  - ".rubocop.yml"
@@ -214,6 +207,8 @@ files:
214
207
  - app/controllers/spree/admin/authentication_methods_controller.rb
215
208
  - app/controllers/spree/omniauth_callbacks_controller.rb
216
209
  - app/controllers/spree/user_authentications_controller.rb
210
+ - app/core/spree/permission_sets/authentication_method_display.rb
211
+ - app/core/spree/permission_sets/authentication_method_management.rb
217
212
  - app/decorators/controllers/solidus_social/spree/user_registrations_controller_decorator.rb
218
213
  - app/decorators/models/solidus_social/spree/user_decorator.rb
219
214
  - app/helpers/spree/omniauth_callbacks_helper.rb
@@ -239,6 +234,7 @@ files:
239
234
  - config/locales/de.yml
240
235
  - config/locales/en.yml
241
236
  - config/locales/es-MX.yml
237
+ - config/locales/es.yml
242
238
  - config/locales/fr.yml
243
239
  - config/locales/it.yml
244
240
  - config/locales/nl.yml
@@ -273,13 +269,13 @@ metadata:
273
269
  homepage_uri: https://github.com/solidusio-contrib/solidus_social#readme
274
270
  source_code_uri: https://github.com/solidusio-contrib/solidus_social
275
271
  changelog_uri: https://github.com/solidusio-contrib/solidus_social/blob/master/CHANGELOG.md
276
- post_install_message:
272
+ post_install_message:
277
273
  rdoc_options: []
278
274
  require_paths:
279
275
  - lib
280
276
  required_ruby_version: !ruby/object:Gem::Requirement
281
277
  requirements:
282
- - - "~>"
278
+ - - ">="
283
279
  - !ruby/object:Gem::Version
284
280
  version: '2.4'
285
281
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -288,8 +284,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
284
  - !ruby/object:Gem::Version
289
285
  version: '0'
290
286
  requirements: []
291
- rubygems_version: 3.0.3
292
- signing_key:
287
+ rubygems_version: 3.1.4
288
+ signing_key:
293
289
  specification_version: 4
294
290
  summary: Adds social network login services (OAuth) to Solidus
295
291
  test_files:
data/.github/stale.yml DELETED
@@ -1,17 +0,0 @@
1
- # Number of days of inactivity before an issue becomes stale
2
- daysUntilStale: 60
3
- # Number of days of inactivity before a stale issue is closed
4
- daysUntilClose: 7
5
- # Issues with these labels will never be considered stale
6
- exemptLabels:
7
- - pinned
8
- - security
9
- # Label to use when marking an issue as stale
10
- staleLabel: wontfix
11
- # Comment to post when marking an issue as stale. Set to `false` to disable
12
- markComment: >
13
- This issue has been automatically marked as stale because it has not had
14
- recent activity. It will be closed if no further activity occurs. Thank you
15
- for your contributions.
16
- # Comment to post when closing a stale issue. Set to `false` to disable
17
- closeComment: false