solidus_dev_support 2.2.0 → 2.3.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: 0bf90c2bc57b80b7ac05afe68db8c72f7c5156ac479e8fee99d61f38d48ce3b4
4
- data.tar.gz: '0830edb6f1562d5b58345c9b79702f1d70aab2c5051cc03570772f5dbbef789d'
3
+ metadata.gz: 58949d06dbd9443030d57e6f70894aed059f00684f865d7f0b7b631590adddc8
4
+ data.tar.gz: 2963edee739c9fd30df63e896a1794f5765e2cb6f243e2093d59c9a3458224aa
5
5
  SHA512:
6
- metadata.gz: 2afaf6d12de41f7748891da69a9b02a769af1b30bd8124e65378c1633a79a951c608a7d30a5e47267ac3c631029c781a96e6f07e61405e970c7434dd136e27dc
7
- data.tar.gz: 4db74c432e1bc63e853c195d95d24e3ee7ed97854e0386ebea3ea4533bed82dbe23ee4eff46040d8b7603a126154a9d8fe91c7d899ca81e04a752ff49f40c48b
6
+ metadata.gz: e0a31ee39a78e7738f12a17d1cb0e75fe66e70a6249027f540f28c488ea3a21f826e6631b5233792b6b18f4802cc98dd86fbd6cab4bf39611f18acc8911f5ae8
7
+ data.tar.gz: 620fc9ec7cb78af1bd94ea12da18cb3452db2a6114e81b58d7e7f2bad46bd5744f3f18b6800d06d55b353bc65354fa8d054c5ebcc5e328f8dc1617e5962b8f58
@@ -1,8 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## [2.2.0](https://github.com/solidusio/solidus_dev_support/tree/2.2.0) (2020-11-27)
3
+ ## [2.3.0](https://github.com/solidusio/solidus_dev_support/tree/2.3.0) (2021-01-14)
4
4
 
5
- [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.1.0...2.2.0)
5
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.2.0...2.3.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Do not raise if source\_code\_uri is missing in the gemspec [\#163](https://github.com/solidusio/solidus_dev_support/pull/163) ([kennyadsl](https://github.com/kennyadsl))
10
+ - Factory bot fixes for latest Solidus 2.11 release [\#162](https://github.com/solidusio/solidus_dev_support/pull/162) ([elia](https://github.com/elia))
11
+
12
+ **Fixed bugs:**
13
+
14
+ - use rubocop-rspec 2.x [\#161](https://github.com/solidusio/solidus_dev_support/pull/161) ([ccarruitero](https://github.com/ccarruitero))
15
+
16
+ ## [v2.2.0](https://github.com/solidusio/solidus_dev_support/tree/v2.2.0) (2020-11-27)
17
+
18
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.1.0...v2.2.0)
6
19
 
7
20
  **Implemented enhancements:**
8
21
 
@@ -44,7 +57,7 @@
44
57
 
45
58
  ## [v2.0.0](https://github.com/solidusio/solidus_dev_support/tree/v2.0.0) (2020-09-22)
46
59
 
47
- [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.5.0...v2.0.0)
60
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.6.0...v2.0.0)
48
61
 
49
62
  **Breaking changes:**
50
63
 
@@ -55,6 +68,19 @@
55
68
  - Enable new RuboCop cops automatically [\#143](https://github.com/solidusio/solidus_dev_support/pull/143) ([aldesantis](https://github.com/aldesantis))
56
69
  - Don't forcefully close issues via stale-bot [\#139](https://github.com/solidusio/solidus_dev_support/pull/139) ([elia](https://github.com/elia))
57
70
  - Add the approximate recommendation for dev-support to the gemspec [\#137](https://github.com/solidusio/solidus_dev_support/pull/137) ([elia](https://github.com/elia))
71
+
72
+ **Fixed bugs:**
73
+
74
+ - fix capybara driver declaration [\#141](https://github.com/solidusio/solidus_dev_support/pull/141) ([ccarruitero](https://github.com/ccarruitero))
75
+ - Bump RuboCop to latest 0.90.0 version [\#138](https://github.com/solidusio/solidus_dev_support/pull/138) ([peterberkenbosch](https://github.com/peterberkenbosch))
76
+ - Fix missing backslash in solidus install command [\#135](https://github.com/solidusio/solidus_dev_support/pull/135) ([nirebu](https://github.com/nirebu))
77
+
78
+ ## [v1.6.0](https://github.com/solidusio/solidus_dev_support/tree/v1.6.0) (2020-08-26)
79
+
80
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.5.0...v1.6.0)
81
+
82
+ **Implemented enhancements:**
83
+
58
84
  - Let the extension name include spaces [\#133](https://github.com/solidusio/solidus_dev_support/pull/133) ([elia](https://github.com/elia))
59
85
  - Add precompiled badges fro CI and coverage [\#132](https://github.com/solidusio/solidus_dev_support/pull/132) ([elia](https://github.com/elia))
60
86
  - Add Changelog Rake task [\#128](https://github.com/solidusio/solidus_dev_support/pull/128) ([tvdeyen](https://github.com/tvdeyen))
@@ -62,16 +88,9 @@
62
88
 
63
89
  **Fixed bugs:**
64
90
 
65
- - fix capybara driver declaration [\#141](https://github.com/solidusio/solidus_dev_support/pull/141) ([ccarruitero](https://github.com/ccarruitero))
66
- - Bump RuboCop to latest 0.90.0 version [\#138](https://github.com/solidusio/solidus_dev_support/pull/138) ([peterberkenbosch](https://github.com/peterberkenbosch))
67
- - Fix missing backslash in solidus install command [\#135](https://github.com/solidusio/solidus_dev_support/pull/135) ([nirebu](https://github.com/nirebu))
68
91
  - Don't install a payment-method in the sandbox [\#131](https://github.com/solidusio/solidus_dev_support/pull/131) ([elia](https://github.com/elia))
69
92
  - Run extension generator in sandbox [\#127](https://github.com/solidusio/solidus_dev_support/pull/127) ([elia](https://github.com/elia))
70
93
 
71
- **Merged pull requests:**
72
-
73
- - Update readme template [\#109](https://github.com/solidusio/solidus_dev_support/pull/109) ([aldesantis](https://github.com/aldesantis))
74
-
75
94
  ## [v1.5.0](https://github.com/solidusio/solidus_dev_support/tree/v1.5.0) (2020-06-13)
76
95
 
77
96
  [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.4.0...v1.5.0)
data/Gemfile CHANGED
@@ -15,7 +15,6 @@ gem 'rails', '>0.a'
15
15
 
16
16
  # These gems will be used by the temporary extensions generated by tests
17
17
  group :test do
18
- gem 'factory_bot', '> 4.10.0'
19
18
  gem 'mysql2'
20
19
  gem 'pg'
21
20
  gem 'solidus_auth_devise'
@@ -83,6 +83,16 @@ module SolidusDevSupport
83
83
  config.user = repo.owner
84
84
  config.project = repo.name
85
85
  config.future_release = "v#{ENV['UNRELEASED_VERSION'] || gemspec.version}"
86
+
87
+ rescue Octokit::InvalidRepository
88
+ warn <<~WARN
89
+ It won't be possible to automatically generate the CHANGELOG for this extension because the
90
+ gemspec is missing the `source_code_uri` metadata. Please add this line to the gemspec to
91
+ enable automatic CHANGELOG generation:
92
+
93
+ s.metadata["source_code_uri"] = 'https://github.com/org/repo'
94
+
95
+ WARN
86
96
  end
87
97
  end
88
98
  end
@@ -20,10 +20,9 @@ require 'spree/testing_support/factories'
20
20
  require 'spree/testing_support/url_helpers'
21
21
  require 'spree/testing_support/preferences'
22
22
  require 'spree/testing_support/controller_requests'
23
+ require 'solidus_dev_support/testing_support/factories'
23
24
  require 'solidus_dev_support/testing_support/preferences'
24
25
 
25
- FactoryBot.find_definitions
26
-
27
26
  RSpec.configure do |config|
28
27
  config.infer_spec_type_from_file_location!
29
28
 
@@ -19,7 +19,7 @@ require 'solidus_dev_support/rspec/feature_helper'
19
19
  Dir["#{__dir__}/support/**/*.rb"].sort.each { |f| require f }
20
20
 
21
21
  # Requires factories defined in lib/<%= file_name %>/testing_support/factories.rb
22
- require '<%= file_name %>/testing_support/factories'
22
+ SolidusDevSupport::TestingSupport::Factories.load_for(<%= class_name %>::Engine)
23
23
 
24
24
  RSpec.configure do |config|
25
25
  config.infer_spec_type_from_file_location!
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spree/testing_support/factories'
4
+ require 'factory_bot'
5
+
6
+ module SolidusDevSupport
7
+ module TestingSupport
8
+ module Factories
9
+ def self.load_for(*engines)
10
+ paths = engines.flat_map do |engine|
11
+ engine.root.glob('lib/**/factories.rb')
12
+ end
13
+
14
+ if Spree::TestingSupport.respond_to? :load_all_factories
15
+ FactoryBot.definition_file_paths.concat(
16
+ paths.map { |path| path.sub(/.rb\z/, '').to_s }
17
+ )
18
+ FactoryBot.reload
19
+ else
20
+ FactoryBot.find_definitions
21
+
22
+ paths.each { |path| require path }
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusDevSupport
4
- VERSION = "2.2.0"
4
+ VERSION = "2.3.0"
5
5
 
6
6
  def self.gem_version
7
7
  Gem::Version.new(VERSION)
@@ -32,7 +32,8 @@ Gem::Specification.new do |spec|
32
32
  spec.add_dependency 'capybara-screenshot', '~> 1.0'
33
33
  spec.add_dependency 'codecov', '~> 0.2'
34
34
  spec.add_dependency 'database_cleaner', '~> 1.7'
35
- spec.add_dependency 'factory_bot_rails', '~> 5.1'
35
+ spec.add_dependency 'factory_bot', '~> 4.8'
36
+ spec.add_dependency 'factory_bot_rails'
36
37
  spec.add_dependency 'ffaker', '~> 2.13'
37
38
  spec.add_dependency 'gem-release', '~> 2.1'
38
39
  spec.add_dependency 'github_changelog_generator', '~> 1.15'
@@ -42,7 +43,7 @@ Gem::Specification.new do |spec|
42
43
  spec.add_dependency 'rubocop', '~> 1.0'
43
44
  spec.add_dependency 'rubocop-performance', '~> 1.5'
44
45
  spec.add_dependency 'rubocop-rails', '~> 2.3'
45
- spec.add_dependency 'rubocop-rspec', '~> 1.36'
46
+ spec.add_dependency 'rubocop-rspec', '~> 2.0'
46
47
  spec.add_dependency 'solidus_core', ['>= 2.0', '< 3']
47
48
  spec.add_dependency 'webdrivers', '~> 4.4'
48
49
 
@@ -122,11 +122,16 @@ RSpec.describe 'Create extension' do
122
122
  end
123
123
 
124
124
  def check_run_specs
125
+ install_path.join('lib', 'solidus_test_extension', 'testing_support', 'factories.rb').open('a') do |factories_file|
126
+ factories_file.write "\n puts 'loading test_extension factories'"
127
+ end
128
+
125
129
  install_path.join('spec', 'some_spec.rb').write(
126
130
  "require 'spec_helper'\nRSpec.describe 'Some test' do it { expect(true).to be_truthy } end\n"
127
131
  )
128
132
  cd(install_path) do
129
133
  output = sh('bundle exec rspec')
134
+ expect(output).to include('loading test_extension factories')
130
135
  expect(output).to include('1 example, 0 failures')
131
136
  expect(output).to include(ENV['CODECOV_TOKEN'] ? 'Coverage reports upload successfully' : 'Provide a CODECOV_TOKEN environment variable to enable Codecov uploads')
132
137
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_dev_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-27 00:00:00.000000000 Z
11
+ date: 2021-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -67,19 +67,33 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.7'
69
69
  - !ruby/object:Gem::Dependency
70
- name: factory_bot_rails
70
+ name: factory_bot
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '5.1'
75
+ version: '4.8'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '5.1'
82
+ version: '4.8'
83
+ - !ruby/object:Gem::Dependency
84
+ name: factory_bot_rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: ffaker
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +226,14 @@ dependencies:
212
226
  requirements:
213
227
  - - "~>"
214
228
  - !ruby/object:Gem::Version
215
- version: '1.36'
229
+ version: '2.0'
216
230
  type: :runtime
217
231
  prerelease: false
218
232
  version_requirements: !ruby/object:Gem::Requirement
219
233
  requirements:
220
234
  - - "~>"
221
235
  - !ruby/object:Gem::Version
222
- version: '1.36'
236
+ version: '2.0'
223
237
  - !ruby/object:Gem::Dependency
224
238
  name: solidus_core
225
239
  requirement: !ruby/object:Gem::Requirement
@@ -356,6 +370,7 @@ files:
356
370
  - lib/solidus_dev_support/templates/extension/rspec
357
371
  - lib/solidus_dev_support/templates/extension/rubocop.yml
358
372
  - lib/solidus_dev_support/templates/extension/spec/spec_helper.rb.tt
373
+ - lib/solidus_dev_support/testing_support/factories.rb
359
374
  - lib/solidus_dev_support/testing_support/preferences.rb
360
375
  - lib/solidus_dev_support/version.rb
361
376
  - solidus_dev_support.gemspec