derail_specs 0.5.1 → 0.6.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/Gemfile.lock +1 -1
- data/example/Gemfile.lock +1 -1
- data/example/tests.sh +5 -0
- data/lib/derail_specs/factory_bot.rb +4 -0
- data/lib/derail_specs/factory_bot_stub.rb +8 -0
- data/lib/derail_specs/server/app.rb +8 -0
- data/lib/derail_specs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f41316c2b4b33b60d06fb9a0a0b8fc647f93455e3a1a8978fd16f27b7c118b37
|
4
|
+
data.tar.gz: 4c3d831d2f467eb42fac527d07ff5edcb943b8ed36fc358ff239d5045acd3f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b92ec87ddeabfc801dfaae6dab6f064ddf9b98dd4677bcef61041da677534944fcefc038f676f7b2f99dfec8e5c62b29ada587bd5c9aba366cad89994dbb32d9
|
7
|
+
data.tar.gz: e304ee8306d696348c44427febd0090912942cc4c07fc5334e1cea6d5aaf5521b8f72db997aa55fb6cdfbb5c991e71a7eddec9bbe251dfbf2a52f12ad596b836
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/example/Gemfile.lock
CHANGED
data/example/tests.sh
CHANGED
@@ -6,3 +6,8 @@ curl -X POST \
|
|
6
6
|
-d '["test", { "name": "Test Name from Curl", "created_at": "2011-11-11 11:11:11" }]' \
|
7
7
|
-H 'Content-Type: application/json' \
|
8
8
|
127.0.0.1:3001/factory-bot/create
|
9
|
+
|
10
|
+
curl -X POST \
|
11
|
+
-d '["test", 3, { "name": "Test Name from Curl", "created_at": "2011-11-11 11:11:11" }]' \
|
12
|
+
-H 'Content-Type: application/json' \
|
13
|
+
127.0.0.1:3001/factory-bot/create-list
|
@@ -1,6 +1,14 @@
|
|
1
1
|
module DerailSpecs
|
2
2
|
class FactoryBot
|
3
3
|
def self.create(*_)
|
4
|
+
not_installed_message
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.create_list(*_)
|
8
|
+
not_installed_message
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.not_installed_message
|
4
12
|
puts "factory_bot_rails is not installed in group :test"
|
5
13
|
puts "Please add factory_bot_rails to your Gemfile to use this feature"
|
6
14
|
end
|
@@ -15,6 +15,14 @@ module DerailSpecs
|
|
15
15
|
[202, { "Content-Type" => "application/json" }, [object.to_json]]
|
16
16
|
}
|
17
17
|
end
|
18
|
+
map "/factory-bot/create-list" do
|
19
|
+
run lambda { |env|
|
20
|
+
body = Rack::Request.new(env).body.gets
|
21
|
+
object = FactoryBot.create_list(*JSON.parse(body))
|
22
|
+
|
23
|
+
[202, { "Content-Type" => "application/json" }, [object.to_json]]
|
24
|
+
}
|
25
|
+
end
|
18
26
|
map "/" do
|
19
27
|
run Rails.application
|
20
28
|
end
|
data/lib/derail_specs/version.rb
CHANGED