mimoco 1.0.0 → 1.0.1
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/.github/workflows/rake.yml +13 -14
- data/.gitignore +2 -1
- data/.ruby-gemset +1 -1
- data/.ruby-version +1 -1
- data/lib/mimoco/version.rb +2 -1
- data/lib/mimoco_models.rb +2 -1
- data/lib/mimoco_valid.rb +2 -1
- data/test/internal/app/controllers/application_controller.rb +0 -1
- data/test/internal/app/controllers/orders_controller.rb +15 -26
- metadata +3 -6
- data/test/internal/app/views/orders/_order.json.jbuilder +0 -2
- data/test/internal/app/views/orders/index.json.jbuilder +0 -1
- data/test/internal/app/views/orders/show.json.jbuilder +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1796b354edbe98b20ea8aadfdf251b0c9729741df6960747cd68e678996d7451
|
4
|
+
data.tar.gz: d21b500b222ec94c01425d329bac0bbf2182492baaceffdd4d20a52d685576f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37dd105bd461a6538047de9c27f046e46881474abebf878094b5e6c8567a52e1210d8f5ad0a8ca4f7530f80d40c291f831ddb80e8c01b8fbfa9728a62099a2d6
|
7
|
+
data.tar.gz: 134215525e99400306ae22f85f28a021fa47a91a37f7dc74ee712080635f19a9396edfa01766be4f2d087be1273f1c36eaf3e7c39339587efac14c5fd3fb035a
|
data/.github/workflows/rake.yml
CHANGED
@@ -8,19 +8,18 @@ jobs:
|
|
8
8
|
strategy:
|
9
9
|
fail-fast: false
|
10
10
|
matrix:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
ruby: ["3.0", "3.2", 3.3]
|
12
|
+
gemfile:
|
13
|
+
- Gemfile
|
14
|
+
# - gemfiles/Gemfile.rails-7.1
|
15
|
+
runs-on: ubuntu-latest
|
15
16
|
|
16
17
|
steps:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
bundle
|
25
|
-
bundle update
|
26
|
-
- run: ${{ matrix.test_command }}
|
18
|
+
- uses: actions/checkout@v3
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby_version }}
|
23
|
+
bundler-cache: true
|
24
|
+
- name: Build and test with Rake
|
25
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.ruby-gemset
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rails-7.
|
1
|
+
rails-7.1
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-3.
|
1
|
+
ruby-3.3.0
|
data/lib/mimoco/version.rb
CHANGED
data/lib/mimoco_models.rb
CHANGED
@@ -26,7 +26,8 @@ module Minitest
|
|
26
26
|
raise ValidMissingError unless klass_params
|
27
27
|
|
28
28
|
methods.each { |meth|
|
29
|
-
row, _msg = @klass.create(klass_params)
|
29
|
+
# row, _msg = @klass.create(klass_params)
|
30
|
+
row = @klass.new(klass_params)
|
30
31
|
check_no_nil row.send(meth), "<#{meth}> should return no nil"
|
31
32
|
}
|
32
33
|
end
|
data/lib/mimoco_valid.rb
CHANGED
@@ -5,12 +5,12 @@ class OrdersController < ApplicationController
|
|
5
5
|
"just for testing purposes"
|
6
6
|
end
|
7
7
|
|
8
|
-
# GET /orders
|
8
|
+
# GET /orders
|
9
9
|
def index
|
10
10
|
@orders = Order.all
|
11
11
|
end
|
12
12
|
|
13
|
-
# GET /orders/1
|
13
|
+
# GET /orders/1
|
14
14
|
def show
|
15
15
|
end
|
16
16
|
|
@@ -23,41 +23,30 @@ class OrdersController < ApplicationController
|
|
23
23
|
def edit
|
24
24
|
end
|
25
25
|
|
26
|
-
# POST /orders
|
26
|
+
# POST /orders
|
27
27
|
def create
|
28
28
|
@order = Order.new(order_params)
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
else
|
35
|
-
format.html { render :new, status: :unprocessable_entity }
|
36
|
-
format.json { render json: @order.errors, status: :unprocessable_entity }
|
37
|
-
end
|
30
|
+
if @order.save
|
31
|
+
redirect_to @order, notice: "Order was successfully created."
|
32
|
+
else
|
33
|
+
render :new, status: :unprocessable_entity
|
38
34
|
end
|
39
35
|
end
|
40
36
|
|
41
|
-
# PATCH/PUT /orders/1
|
37
|
+
# PATCH/PUT /orders/1
|
42
38
|
def update
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
else
|
48
|
-
format.html { render :edit, status: :unprocessable_entity }
|
49
|
-
format.json { render json: @order.errors, status: :unprocessable_entity }
|
50
|
-
end
|
39
|
+
if @order.update(order_params)
|
40
|
+
redirect_to @order, notice: "Order was successfully updated.", status: :see_other
|
41
|
+
else
|
42
|
+
render :edit, status: :unprocessable_entity
|
51
43
|
end
|
52
44
|
end
|
53
45
|
|
54
|
-
# DELETE /orders/1
|
46
|
+
# DELETE /orders/1
|
55
47
|
def destroy
|
56
|
-
@order.destroy
|
57
|
-
|
58
|
-
format.html { redirect_to orders_url, notice: "Order was successfully destroyed." }
|
59
|
-
format.json { head :no_content }
|
60
|
-
end
|
48
|
+
@order.destroy!
|
49
|
+
redirect_to orders_url, notice: "Order was successfully destroyed.", status: :see_other
|
61
50
|
end
|
62
51
|
|
63
52
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mimoco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: combustion
|
@@ -82,13 +82,10 @@ files:
|
|
82
82
|
- test/internal/app/models/order.rb
|
83
83
|
- test/internal/app/views/orders/_form.html.erb
|
84
84
|
- test/internal/app/views/orders/_order.html.erb
|
85
|
-
- test/internal/app/views/orders/_order.json.jbuilder
|
86
85
|
- test/internal/app/views/orders/edit.html.erb
|
87
86
|
- test/internal/app/views/orders/index.html.erb
|
88
|
-
- test/internal/app/views/orders/index.json.jbuilder
|
89
87
|
- test/internal/app/views/orders/new.html.erb
|
90
88
|
- test/internal/app/views/orders/show.html.erb
|
91
|
-
- test/internal/app/views/orders/show.json.jbuilder
|
92
89
|
- test/internal/config/database.yml
|
93
90
|
- test/internal/config/routes.rb
|
94
91
|
- test/internal/db/migrate/20141016161801_create_orders.rb
|
@@ -117,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
114
|
- !ruby/object:Gem::Version
|
118
115
|
version: '0'
|
119
116
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
117
|
+
rubygems_version: 3.5.6
|
121
118
|
signing_key:
|
122
119
|
specification_version: 4
|
123
120
|
summary: 'Mimoco: some minitests for models and controllers'
|
@@ -1 +0,0 @@
|
|
1
|
-
json.array! @orders, partial: "orders/order", as: :order
|
@@ -1 +0,0 @@
|
|
1
|
-
json.partial! "orders/order", order: @order
|