rspec_starter 2.1.0 → 3.0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/rspec_starter/options.rb +3 -3
- data/lib/rspec_starter/step_options.rb +3 -3
- data/lib/rspec_starter/tasks/rebuild_rails_app_database.rb +1 -1
- data/lib/rspec_starter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52bd99dd54801371da5a1c49bf6df75cb8a2a291c9febd7cdbb1891747449197
|
|
4
|
+
data.tar.gz: f5a254fca78c6e341998e4f6b7e16f44d22a969a840e5886f808dac6386eedda
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb8d51b98ac53ebc1e2feb83050f2b21c85d93464fe9235a936f5b50a6c4038e65ffe4ec7bb32c81984c3d1cbc0152ebd4dd223f09afe71901aad3f0b0114522
|
|
7
|
+
data.tar.gz: caa4321bc5337bab6233136d6be548e68ac87ab9e640d91aaf87cbf0395bfa16ffc9210fdbc9c8522d80385530047a27caab4347ff5f35cbbbdd80412d11956b
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Issues are tracked at https://github.com/roberts1000/rspec_starter/issues. Issues marked as **(Internal)** only affect development.
|
|
4
4
|
|
|
5
|
+
## 3.0.0 (Mar 08, 2024)
|
|
6
|
+
|
|
7
|
+
1. [#153](../../issues/153): Make `:rebuild_rails_app_database` task use `db:schema:load`.
|
|
8
|
+
|
|
5
9
|
## 2.1.0 (Jan 28, 2024)
|
|
6
10
|
|
|
7
11
|
1. [#132](../../issues/132): Use `colorize ~> 1.1.0`.
|
data/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Any options that you add to steps inside the block, become available to the task
|
|
|
82
82
|
RspecStarter.start do
|
|
83
83
|
task :verify_display_servr, foo: :bar
|
|
84
84
|
task :remove_tmp_folder
|
|
85
|
-
task :rebuild_rails_app_database, command: "rake db:drop db:create db:
|
|
85
|
+
task :rebuild_rails_app_database, command: "RAILS_ENV=test rake db:drop db:create db:schema:load", quiet: false
|
|
86
86
|
task :start_rspec, quiet: true
|
|
87
87
|
end
|
|
88
88
|
```
|
|
@@ -42,14 +42,14 @@ module RspecStarter
|
|
|
42
42
|
|
|
43
43
|
def all_task_options
|
|
44
44
|
hash = {}
|
|
45
|
-
@registered_task_options.
|
|
45
|
+
@registered_task_options.each_value do |options|
|
|
46
46
|
options.each do |option|
|
|
47
47
|
hash[option.switch] = option unless hash.has_key?(option.switch)
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
list = []
|
|
52
|
-
hash.
|
|
52
|
+
hash.each_value { |option| list << option }
|
|
53
53
|
list
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -63,7 +63,7 @@ module RspecStarter
|
|
|
63
63
|
|
|
64
64
|
def all_task_switches
|
|
65
65
|
list = Set.new
|
|
66
|
-
@registered_task_options.
|
|
66
|
+
@registered_task_options.each_value do |options|
|
|
67
67
|
options.each { |option| list << option.switch unless option.switch.nil? }
|
|
68
68
|
end
|
|
69
69
|
list.to_a
|
|
@@ -5,14 +5,14 @@ module RspecStarter
|
|
|
5
5
|
# methods when needed.
|
|
6
6
|
class StepOptions
|
|
7
7
|
def add(key, value)
|
|
8
|
-
instance_variable_set("@#{key}", value)
|
|
8
|
+
instance_variable_set(:"@#{key}", value)
|
|
9
9
|
self.class.define_method(key.to_s) do
|
|
10
|
-
instance_variable_get("@#{key}")
|
|
10
|
+
instance_variable_get(:"@#{key}")
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def update(key, value, add_missing: true)
|
|
15
|
-
return instance_variable_set("@#{key}", value) if respond_to?(key)
|
|
15
|
+
return instance_variable_set(:"@#{key}", value) if respond_to?(key)
|
|
16
16
|
|
|
17
17
|
add(key, value) if add_missing
|
|
18
18
|
end
|
|
@@ -9,7 +9,7 @@ class RebuildRailsAppDatabase < RspecStarterTask
|
|
|
9
9
|
register_option default: false, switch: '--skip-db-prep',
|
|
10
10
|
switch_description: "DO NOT prepare the Rails application database"
|
|
11
11
|
register_option name: "command",
|
|
12
|
-
default: "DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=test rake db:drop db:create db:
|
|
12
|
+
default: "DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=test rake db:drop db:create db:schema:load",
|
|
13
13
|
description: "A command string that is used to rebuild the database."
|
|
14
14
|
end
|
|
15
15
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec_starter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- roberts1000
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
132
132
|
- !ruby/object:Gem::Version
|
|
133
133
|
version: '0'
|
|
134
134
|
requirements: []
|
|
135
|
-
rubygems_version: 3.
|
|
135
|
+
rubygems_version: 3.5.6
|
|
136
136
|
signing_key:
|
|
137
137
|
specification_version: 4
|
|
138
138
|
summary: A Ruby gem that helps run RSpec in a standard manner.
|