cookbook 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.rubocop.yml +10 -0
- data/Gemfile +39 -0
- data/Gemfile.lock +367 -0
- data/LICENSE.txt +20 -0
- data/README.md +105 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/app/assets/stylesheets/cookbook/application.scss +180 -0
- data/app/controllers/concerns/cookbook/params.rb +27 -0
- data/app/helpers/cookbook/application_helper.rb +38 -0
- data/app/models/cookbook/use.rb +26 -0
- data/app/views/cookbook/_fields.html.haml +11 -0
- data/app/views/cookbook/_used_in.html.haml +15 -0
- data/app/views/cookbook/_uses_of.html.haml +11 -0
- data/app/views/cookbook/uses/_fields.html.haml +17 -0
- data/bin/rails +16 -0
- data/config/initializers/simple_form.rb +180 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/cookbook.gemspec +249 -0
- data/db/migrate/20210909141929_create_uses.cookbook.rb +21 -0
- data/lib/cookbook/configuration.rb +28 -0
- data/lib/cookbook/engine.rb +34 -0
- data/lib/cookbook/extensions/float.rb +10 -0
- data/lib/cookbook/mixins/acts_as_use_of.rb +45 -0
- data/lib/cookbook/mixins/acts_as_used_in.rb +43 -0
- data/lib/cookbook/railtie.rb +6 -0
- data/lib/cookbook/version.rb +9 -0
- data/lib/cookbook.rb +27 -0
- data/lib/tasks/cookbook_tasks.rake +5 -0
- data/lib/templates/haml/scaffold/_form.html.haml +12 -0
- data/spec/cookbook_spec.rb +9 -0
- data/spec/dummy/Rakefile +8 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/assets/stylesheets/scaffolds.scss +65 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +6 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +6 -0
- data/spec/dummy/app/controllers/application_controller.rb +4 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/how_tos_controller.rb +61 -0
- data/spec/dummy/app/controllers/ingredients_controller.rb +60 -0
- data/spec/dummy/app/controllers/recipes_controller.rb +61 -0
- data/spec/dummy/app/controllers/supplies_controller.rb +60 -0
- data/spec/dummy/app/controllers/tools_controller.rb +60 -0
- data/spec/dummy/app/javascript/packs/application.js +16 -0
- data/spec/dummy/app/jobs/application_job.rb +9 -0
- data/spec/dummy/app/mailers/application_mailer.rb +6 -0
- data/spec/dummy/app/models/ability.rb +21 -0
- data/spec/dummy/app/models/application_record.rb +7 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/how_to.rb +5 -0
- data/spec/dummy/app/models/ingredient.rb +5 -0
- data/spec/dummy/app/models/recipe.rb +5 -0
- data/spec/dummy/app/models/supply.rb +5 -0
- data/spec/dummy/app/models/tool.rb +5 -0
- data/spec/dummy/app/models/user.rb +8 -0
- data/spec/dummy/app/views/how_tos/_form.html.haml +7 -0
- data/spec/dummy/app/views/how_tos/edit.html.haml +7 -0
- data/spec/dummy/app/views/how_tos/index.html.haml +25 -0
- data/spec/dummy/app/views/how_tos/new.html.haml +5 -0
- data/spec/dummy/app/views/how_tos/show.html.haml +17 -0
- data/spec/dummy/app/views/ingredients/_form.html.haml +8 -0
- data/spec/dummy/app/views/ingredients/edit.html.haml +7 -0
- data/spec/dummy/app/views/ingredients/index.html.haml +29 -0
- data/spec/dummy/app/views/ingredients/new.html.haml +5 -0
- data/spec/dummy/app/views/ingredients/show.html.haml +23 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/app/views/recipes/_form.html.haml +9 -0
- data/spec/dummy/app/views/recipes/edit.html.haml +7 -0
- data/spec/dummy/app/views/recipes/index.html.haml +29 -0
- data/spec/dummy/app/views/recipes/new.html.haml +5 -0
- data/spec/dummy/app/views/recipes/show.html.haml +23 -0
- data/spec/dummy/app/views/supplies/_form.html.haml +6 -0
- data/spec/dummy/app/views/supplies/edit.html.haml +7 -0
- data/spec/dummy/app/views/supplies/index.html.haml +25 -0
- data/spec/dummy/app/views/supplies/new.html.haml +5 -0
- data/spec/dummy/app/views/supplies/show.html.haml +17 -0
- data/spec/dummy/app/views/tools/_form.html.haml +6 -0
- data/spec/dummy/app/views/tools/edit.html.haml +7 -0
- data/spec/dummy/app/views/tools/index.html.haml +25 -0
- data/spec/dummy/app/views/tools/new.html.haml +5 -0
- data/spec/dummy/app/views/tools/show.html.haml +17 -0
- data/spec/dummy/bin/rails +6 -0
- data/spec/dummy/bin/rake +6 -0
- data/spec/dummy/bin/setup +35 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +7 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +7 -0
- data/spec/dummy/config/environments/development.rb +80 -0
- data/spec/dummy/config/environments/production.rb +122 -0
- data/spec/dummy/config/environments/test.rb +61 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +9 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +10 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +29 -0
- data/spec/dummy/config/initializers/cookbook.rb +6 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +313 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +8 -0
- data/spec/dummy/config/initializers/inflections.rb +17 -0
- data/spec/dummy/config/initializers/json.rb +20 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/permissions_policy.rb +12 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +16 -0
- data/spec/dummy/config/locales/devise.en.yml +65 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +45 -0
- data/spec/dummy/config/routes.rb +13 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config.ru +8 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20210909175711_create_how_tos.rb +16 -0
- data/spec/dummy/db/migrate/20210909181442_create_ingredients.rb +16 -0
- data/spec/dummy/db/migrate/20210909181455_create_supplies.rb +14 -0
- data/spec/dummy/db/migrate/20210909181516_create_tools.rb +14 -0
- data/spec/dummy/db/migrate/20210909181533_create_recipes.rb +16 -0
- data/spec/dummy/db/migrate/20210909185303_create_uses.cookbook.rb +23 -0
- data/spec/dummy/db/migrate/20210910142322_create_users.rb +11 -0
- data/spec/dummy/db/migrate/20210910142323_add_devise_to_users.rb +50 -0
- data/spec/dummy/db/schema.rb +92 -0
- data/spec/dummy/db/seeds.rb +10 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/lib/templates/haml/scaffold/_form.html.haml +6 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/log/development.log +6643 -0
- data/spec/dummy/log/test.log +25990 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/storage/.keep +0 -0
- data/spec/factories/how_tos.rb +9 -0
- data/spec/factories/ingredients.rb +11 -0
- data/spec/factories/recipes.rb +11 -0
- data/spec/factories/supplies.rb +9 -0
- data/spec/factories/tools.rb +9 -0
- data/spec/factories/users.rb +9 -0
- data/spec/factories/uses.rb +24 -0
- data/spec/helpers/cookbook/application_helper_spec.rb +47 -0
- data/spec/models/cookbook/use_spec.rb +82 -0
- data/spec/models/how_to_spec.rb +18 -0
- data/spec/models/ingredient_spec.rb +15 -0
- data/spec/models/recipe_spec.rb +18 -0
- data/spec/models/supply_spec.rb +15 -0
- data/spec/models/tool_spec.rb +15 -0
- data/spec/rails_helper.rb +92 -0
- data/spec/requests/how_tos_spec.rb +114 -0
- data/spec/requests/recipes_spec.rb +116 -0
- data/spec/spec_helper.rb +44 -0
- metadata +517 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
- usables.each do |usable|
|
2
|
+
- if usable.uses.any?
|
3
|
+
%h3= usable.title
|
4
|
+
%ul.used_in{class: usable.plural_class}
|
5
|
+
- usable.uses.each do |use|
|
6
|
+
%li.use_in{class: usable.singular_class}
|
7
|
+
#{use.quantity_with_unit}
|
8
|
+
- if use.preparation.present?
|
9
|
+
= succeed ', ' do
|
10
|
+
= link_to use.use_of.name, use.use_of
|
11
|
+
= use.preparation
|
12
|
+
- else
|
13
|
+
= link_to use.use_of.name, use.use_of
|
14
|
+
- if use.note.present?
|
15
|
+
(#{use.note})
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- if uses.any?
|
2
|
+
%h3 Used In
|
3
|
+
%ul.uses_of
|
4
|
+
- uses.each do |use|
|
5
|
+
:ruby
|
6
|
+
amount_plus_prep = [use.quantity_with_unit.presence, use.preparation.presence].compact.join(', ')
|
7
|
+
details = [amount_plus_prep.presence, use.note.presence].compact.join(': ')
|
8
|
+
%li.use_of
|
9
|
+
= link_to use.use_in.name, use.use_in
|
10
|
+
- if details.present?
|
11
|
+
(#{details})
|
@@ -0,0 +1,17 @@
|
|
1
|
+
:ruby
|
2
|
+
table_sym = form.object_name.gsub(/[^\[]+\[([^\]]+)_uses_attributes\].*/, "\\1").pluralize
|
3
|
+
model = table_sym.to_s.classify.constantize
|
4
|
+
collection = if Cookbook.configuration.authorize_with == :cancancan
|
5
|
+
model.accessible_by(current_ability, :select)
|
6
|
+
else
|
7
|
+
model.all
|
8
|
+
end
|
9
|
+
= form.hidden_field :use_of_type, value: model.model_name.to_s
|
10
|
+
= form.input :use_of_id, collection: collection, as: :select, label_method: model.label_method, value_method: :id, selected: form.object.use_of_id, include_blank: "Select #{model.model_name.human}"
|
11
|
+
= form.input :quantity_minimum
|
12
|
+
= form.input :quantity_maximum
|
13
|
+
= form.input :unit
|
14
|
+
= form.input :sort
|
15
|
+
= form.input :preparation, hint: 'like "crushed" or "greased"'
|
16
|
+
= form.input :note, hint: 'like "to taste"'
|
17
|
+
= link_to_remove_nested(form, link_classes: 'button button-danger')
|
data/bin/rails
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# This command will automatically be run when you run "rails" with Rails gems
|
5
|
+
# installed from the root of your application.
|
6
|
+
|
7
|
+
ENGINE_ROOT = File.expand_path('..', __dir__)
|
8
|
+
ENGINE_PATH = File.expand_path('../lib/cookbook/engine', __dir__)
|
9
|
+
APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
|
10
|
+
|
11
|
+
# Set up gems listed in the Gemfile.
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
13
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
14
|
+
|
15
|
+
require 'rails/all'
|
16
|
+
require 'rails/engine/commands'
|
@@ -0,0 +1,180 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Uncomment this and change the path if necessary to include your own
|
5
|
+
# components.
|
6
|
+
# See https://github.com/heartcombo/simple_form#custom-components to know
|
7
|
+
# more about custom components.
|
8
|
+
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
|
9
|
+
#
|
10
|
+
# Use this setup block to configure all options available in SimpleForm.
|
11
|
+
SimpleForm.setup do |config|
|
12
|
+
# Wrappers are used by the form builder to generate a
|
13
|
+
# complete input. You can remove any component from the
|
14
|
+
# wrapper, change the order or even add your own to the
|
15
|
+
# stack. The options given below are used to wrap the
|
16
|
+
# whole input.
|
17
|
+
config.wrappers :default,
|
18
|
+
class: :input,
|
19
|
+
hint_class: :field_with_hint,
|
20
|
+
error_class: :field_with_errors,
|
21
|
+
valid_class: :field_without_errors do |b|
|
22
|
+
## Extensions enabled by default
|
23
|
+
# Any of these extensions can be disabled for a
|
24
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
25
|
+
# You can make any of these extensions optional by
|
26
|
+
# renaming `b.use` to `b.optional`.
|
27
|
+
|
28
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
29
|
+
# and required attributes
|
30
|
+
b.use :html5
|
31
|
+
|
32
|
+
# Calculates placeholders automatically from I18n
|
33
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
34
|
+
b.use :placeholder
|
35
|
+
|
36
|
+
## Optional extensions
|
37
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => true`
|
38
|
+
# to the input. If so, they will retrieve the values from the model
|
39
|
+
# if any exists. If you want to enable any of those
|
40
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
41
|
+
|
42
|
+
# Calculates maxlength from length validations for string inputs
|
43
|
+
# and/or database column lengths
|
44
|
+
b.optional :maxlength
|
45
|
+
|
46
|
+
# Calculate minlength from length validations for string inputs
|
47
|
+
b.optional :minlength
|
48
|
+
|
49
|
+
# Calculates pattern from format validations for string inputs
|
50
|
+
b.optional :pattern
|
51
|
+
|
52
|
+
# Calculates min and max from length validations for numeric inputs
|
53
|
+
b.optional :min_max
|
54
|
+
|
55
|
+
# Calculates readonly automatically from readonly attributes
|
56
|
+
b.optional :readonly
|
57
|
+
|
58
|
+
## Inputs
|
59
|
+
# b.use :input, class: 'input', error_class: 'is-invalid', valid_class: 'is-valid'
|
60
|
+
b.use :label_input
|
61
|
+
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
62
|
+
b.use :error, wrap_with: { tag: :span, class: :error }
|
63
|
+
|
64
|
+
## full_messages_for
|
65
|
+
# If you want to display the full error message for the attribute, you can
|
66
|
+
# use the component :full_error, like:
|
67
|
+
#
|
68
|
+
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
69
|
+
end
|
70
|
+
|
71
|
+
# The default wrapper to be used by the FormBuilder.
|
72
|
+
config.default_wrapper = :default
|
73
|
+
|
74
|
+
# Define the way to render check boxes / radio buttons with labels.
|
75
|
+
# Defaults to :nested for bootstrap config.
|
76
|
+
# inline: input + label
|
77
|
+
# nested: label > input
|
78
|
+
config.boolean_style = :nested
|
79
|
+
|
80
|
+
# Default class for buttons
|
81
|
+
config.button_class = 'btn'
|
82
|
+
|
83
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
84
|
+
# :first lists the first message for each field.
|
85
|
+
# Use :to_sentence to list all errors for each field.
|
86
|
+
# config.error_method = :first
|
87
|
+
|
88
|
+
# Default tag used for error notification helper.
|
89
|
+
config.error_notification_tag = :div
|
90
|
+
|
91
|
+
# CSS class to add for error notification helper.
|
92
|
+
config.error_notification_class = 'error_notification'
|
93
|
+
|
94
|
+
# Series of attempts to detect a default label method for collection.
|
95
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
96
|
+
|
97
|
+
# Series of attempts to detect a default value method for collection.
|
98
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
99
|
+
|
100
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
101
|
+
# config.collection_wrapper_tag = nil
|
102
|
+
|
103
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
104
|
+
# config.collection_wrapper_class = nil
|
105
|
+
|
106
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
107
|
+
# defaulting to :span.
|
108
|
+
# config.item_wrapper_tag = :span
|
109
|
+
|
110
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
111
|
+
# config.item_wrapper_class = nil
|
112
|
+
|
113
|
+
# How the label text should be generated altogether with the required text.
|
114
|
+
# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
|
115
|
+
|
116
|
+
# You can define the class to use on all labels. Default is nil.
|
117
|
+
# config.label_class = nil
|
118
|
+
|
119
|
+
# You can define the default class to be used on forms. Can be overriden
|
120
|
+
# with `html: { :class }`. Defaulting to none.
|
121
|
+
# config.default_form_class = nil
|
122
|
+
|
123
|
+
# You can define which elements should obtain additional classes
|
124
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
125
|
+
|
126
|
+
# Whether attributes are required by default (or not). Default is true.
|
127
|
+
# config.required_by_default = true
|
128
|
+
|
129
|
+
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
130
|
+
# These validations are enabled in SimpleForm's internal config but disabled by default
|
131
|
+
# in this configuration, which is recommended due to some quirks from different browsers.
|
132
|
+
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
133
|
+
# change this configuration to true.
|
134
|
+
config.browser_validations = false
|
135
|
+
|
136
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
137
|
+
# to match as key, and the input type that will be used when the field name
|
138
|
+
# matches the regexp as value.
|
139
|
+
# config.input_mappings = { /count/ => :integer }
|
140
|
+
|
141
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
142
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
143
|
+
# config.wrapper_mappings = { string: :prepend }
|
144
|
+
|
145
|
+
# Namespaces where SimpleForm should look for custom input classes that
|
146
|
+
# override default inputs.
|
147
|
+
# config.custom_inputs_namespaces << "CustomInputs"
|
148
|
+
|
149
|
+
# Default priority for time_zone inputs.
|
150
|
+
# config.time_zone_priority = nil
|
151
|
+
|
152
|
+
# Default priority for country inputs.
|
153
|
+
# config.country_priority = nil
|
154
|
+
|
155
|
+
# When false, do not use translations for labels.
|
156
|
+
# config.translate_labels = true
|
157
|
+
|
158
|
+
# Automatically discover new inputs in Rails' autoload path.
|
159
|
+
# config.inputs_discovery = true
|
160
|
+
|
161
|
+
# Cache SimpleForm inputs discovery
|
162
|
+
# config.cache_discovery = !Rails.env.development?
|
163
|
+
|
164
|
+
# Default class for inputs
|
165
|
+
# config.input_class = nil
|
166
|
+
|
167
|
+
# Define the default class of the input wrapper of the boolean input.
|
168
|
+
config.boolean_label_class = 'checkbox'
|
169
|
+
|
170
|
+
# Defines if the default input wrapper class should be included in radio
|
171
|
+
# collection wrappers.
|
172
|
+
# config.include_default_input_wrapper_class = true
|
173
|
+
|
174
|
+
# Defines which i18n scope will be used in Simple Form.
|
175
|
+
# config.i18n_scope = 'simple_form'
|
176
|
+
|
177
|
+
# Defines validation classes to the input_field. By default it's nil.
|
178
|
+
# config.input_field_valid_class = 'is-valid'
|
179
|
+
# config.input_field_error_class = 'is-invalid'
|
180
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
en:
|
2
|
+
simple_form:
|
3
|
+
"yes": 'Yes'
|
4
|
+
"no": 'No'
|
5
|
+
required:
|
6
|
+
text: 'required'
|
7
|
+
mark: '*'
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
+
# When using html, text and mark won't be used.
|
10
|
+
# html: '<abbr title="required">*</abbr>'
|
11
|
+
error_notification:
|
12
|
+
default_message: "Please review the problems below:"
|
13
|
+
# Examples
|
14
|
+
# labels:
|
15
|
+
# defaults:
|
16
|
+
# password: 'Password'
|
17
|
+
# user:
|
18
|
+
# new:
|
19
|
+
# email: 'E-mail to sign in.'
|
20
|
+
# edit:
|
21
|
+
# email: 'E-mail.'
|
22
|
+
# hints:
|
23
|
+
# defaults:
|
24
|
+
# username: 'User name to sign in.'
|
25
|
+
# password: 'No special characters, please.'
|
26
|
+
# include_blanks:
|
27
|
+
# defaults:
|
28
|
+
# age: 'Rather not say'
|
29
|
+
# prompts:
|
30
|
+
# defaults:
|
31
|
+
# age: 'Select your age'
|
data/cookbook.gemspec
ADDED
@@ -0,0 +1,249 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: cookbook 0.1.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "cookbook".freeze
|
9
|
+
s.version = "0.1.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.metadata = { "source_code_uri" => "http://github.com/gemvein/cookbook" } if s.respond_to? :metadata=
|
13
|
+
s.require_paths = ["lib".freeze]
|
14
|
+
s.authors = ["Loren Lundgren".freeze]
|
15
|
+
s.date = "2021-09-10"
|
16
|
+
s.description = "Cookbook allows you to associate instructions with components in a cross referenced way. Good for cooking recipes or an instruction manual for DIY projects.".freeze
|
17
|
+
s.email = "loren.lundgren@gmail.com".freeze
|
18
|
+
s.executables = ["rails".freeze]
|
19
|
+
s.extra_rdoc_files = [
|
20
|
+
"LICENSE.txt",
|
21
|
+
"README.md"
|
22
|
+
]
|
23
|
+
s.files = [
|
24
|
+
".document",
|
25
|
+
".rspec",
|
26
|
+
".rubocop.yml",
|
27
|
+
"Gemfile",
|
28
|
+
"Gemfile.lock",
|
29
|
+
"LICENSE.txt",
|
30
|
+
"README.md",
|
31
|
+
"Rakefile",
|
32
|
+
"VERSION",
|
33
|
+
"app/assets/stylesheets/cookbook/application.scss",
|
34
|
+
"app/controllers/concerns/cookbook/params.rb",
|
35
|
+
"app/helpers/cookbook/application_helper.rb",
|
36
|
+
"app/models/cookbook/use.rb",
|
37
|
+
"app/views/cookbook/_fields.html.haml",
|
38
|
+
"app/views/cookbook/_used_in.html.haml",
|
39
|
+
"app/views/cookbook/_uses_of.html.haml",
|
40
|
+
"app/views/cookbook/uses/_fields.html.haml",
|
41
|
+
"bin/rails",
|
42
|
+
"config/initializers/simple_form.rb",
|
43
|
+
"config/locales/simple_form.en.yml",
|
44
|
+
"cookbook.gemspec",
|
45
|
+
"db/migrate/20210909141929_create_uses.cookbook.rb",
|
46
|
+
"lib/cookbook.rb",
|
47
|
+
"lib/cookbook/configuration.rb",
|
48
|
+
"lib/cookbook/engine.rb",
|
49
|
+
"lib/cookbook/extensions/float.rb",
|
50
|
+
"lib/cookbook/mixins/acts_as_use_of.rb",
|
51
|
+
"lib/cookbook/mixins/acts_as_used_in.rb",
|
52
|
+
"lib/cookbook/railtie.rb",
|
53
|
+
"lib/cookbook/version.rb",
|
54
|
+
"lib/tasks/cookbook_tasks.rake",
|
55
|
+
"lib/templates/haml/scaffold/_form.html.haml",
|
56
|
+
"spec/cookbook_spec.rb",
|
57
|
+
"spec/dummy/Rakefile",
|
58
|
+
"spec/dummy/app/assets/config/manifest.js",
|
59
|
+
"spec/dummy/app/assets/images/.keep",
|
60
|
+
"spec/dummy/app/assets/stylesheets/application.css",
|
61
|
+
"spec/dummy/app/assets/stylesheets/scaffolds.scss",
|
62
|
+
"spec/dummy/app/channels/application_cable/channel.rb",
|
63
|
+
"spec/dummy/app/channels/application_cable/connection.rb",
|
64
|
+
"spec/dummy/app/controllers/application_controller.rb",
|
65
|
+
"spec/dummy/app/controllers/concerns/.keep",
|
66
|
+
"spec/dummy/app/controllers/how_tos_controller.rb",
|
67
|
+
"spec/dummy/app/controllers/ingredients_controller.rb",
|
68
|
+
"spec/dummy/app/controllers/recipes_controller.rb",
|
69
|
+
"spec/dummy/app/controllers/supplies_controller.rb",
|
70
|
+
"spec/dummy/app/controllers/tools_controller.rb",
|
71
|
+
"spec/dummy/app/javascript/packs/application.js",
|
72
|
+
"spec/dummy/app/jobs/application_job.rb",
|
73
|
+
"spec/dummy/app/mailers/application_mailer.rb",
|
74
|
+
"spec/dummy/app/models/ability.rb",
|
75
|
+
"spec/dummy/app/models/application_record.rb",
|
76
|
+
"spec/dummy/app/models/concerns/.keep",
|
77
|
+
"spec/dummy/app/models/how_to.rb",
|
78
|
+
"spec/dummy/app/models/ingredient.rb",
|
79
|
+
"spec/dummy/app/models/recipe.rb",
|
80
|
+
"spec/dummy/app/models/supply.rb",
|
81
|
+
"spec/dummy/app/models/tool.rb",
|
82
|
+
"spec/dummy/app/models/user.rb",
|
83
|
+
"spec/dummy/app/views/how_tos/_form.html.haml",
|
84
|
+
"spec/dummy/app/views/how_tos/edit.html.haml",
|
85
|
+
"spec/dummy/app/views/how_tos/index.html.haml",
|
86
|
+
"spec/dummy/app/views/how_tos/new.html.haml",
|
87
|
+
"spec/dummy/app/views/how_tos/show.html.haml",
|
88
|
+
"spec/dummy/app/views/ingredients/_form.html.haml",
|
89
|
+
"spec/dummy/app/views/ingredients/edit.html.haml",
|
90
|
+
"spec/dummy/app/views/ingredients/index.html.haml",
|
91
|
+
"spec/dummy/app/views/ingredients/new.html.haml",
|
92
|
+
"spec/dummy/app/views/ingredients/show.html.haml",
|
93
|
+
"spec/dummy/app/views/layouts/application.html.erb",
|
94
|
+
"spec/dummy/app/views/layouts/mailer.html.erb",
|
95
|
+
"spec/dummy/app/views/layouts/mailer.text.erb",
|
96
|
+
"spec/dummy/app/views/recipes/_form.html.haml",
|
97
|
+
"spec/dummy/app/views/recipes/edit.html.haml",
|
98
|
+
"spec/dummy/app/views/recipes/index.html.haml",
|
99
|
+
"spec/dummy/app/views/recipes/new.html.haml",
|
100
|
+
"spec/dummy/app/views/recipes/show.html.haml",
|
101
|
+
"spec/dummy/app/views/supplies/_form.html.haml",
|
102
|
+
"spec/dummy/app/views/supplies/edit.html.haml",
|
103
|
+
"spec/dummy/app/views/supplies/index.html.haml",
|
104
|
+
"spec/dummy/app/views/supplies/new.html.haml",
|
105
|
+
"spec/dummy/app/views/supplies/show.html.haml",
|
106
|
+
"spec/dummy/app/views/tools/_form.html.haml",
|
107
|
+
"spec/dummy/app/views/tools/edit.html.haml",
|
108
|
+
"spec/dummy/app/views/tools/index.html.haml",
|
109
|
+
"spec/dummy/app/views/tools/new.html.haml",
|
110
|
+
"spec/dummy/app/views/tools/show.html.haml",
|
111
|
+
"spec/dummy/bin/rails",
|
112
|
+
"spec/dummy/bin/rake",
|
113
|
+
"spec/dummy/bin/setup",
|
114
|
+
"spec/dummy/config.ru",
|
115
|
+
"spec/dummy/config/application.rb",
|
116
|
+
"spec/dummy/config/boot.rb",
|
117
|
+
"spec/dummy/config/cable.yml",
|
118
|
+
"spec/dummy/config/database.yml",
|
119
|
+
"spec/dummy/config/environment.rb",
|
120
|
+
"spec/dummy/config/environments/development.rb",
|
121
|
+
"spec/dummy/config/environments/production.rb",
|
122
|
+
"spec/dummy/config/environments/test.rb",
|
123
|
+
"spec/dummy/config/initializers/application_controller_renderer.rb",
|
124
|
+
"spec/dummy/config/initializers/assets.rb",
|
125
|
+
"spec/dummy/config/initializers/backtrace_silencers.rb",
|
126
|
+
"spec/dummy/config/initializers/content_security_policy.rb",
|
127
|
+
"spec/dummy/config/initializers/cookbook.rb",
|
128
|
+
"spec/dummy/config/initializers/cookies_serializer.rb",
|
129
|
+
"spec/dummy/config/initializers/devise.rb",
|
130
|
+
"spec/dummy/config/initializers/filter_parameter_logging.rb",
|
131
|
+
"spec/dummy/config/initializers/inflections.rb",
|
132
|
+
"spec/dummy/config/initializers/json.rb",
|
133
|
+
"spec/dummy/config/initializers/mime_types.rb",
|
134
|
+
"spec/dummy/config/initializers/permissions_policy.rb",
|
135
|
+
"spec/dummy/config/initializers/wrap_parameters.rb",
|
136
|
+
"spec/dummy/config/locales/devise.en.yml",
|
137
|
+
"spec/dummy/config/locales/en.yml",
|
138
|
+
"spec/dummy/config/puma.rb",
|
139
|
+
"spec/dummy/config/routes.rb",
|
140
|
+
"spec/dummy/config/storage.yml",
|
141
|
+
"spec/dummy/db/development.sqlite3",
|
142
|
+
"spec/dummy/db/migrate/20210909175711_create_how_tos.rb",
|
143
|
+
"spec/dummy/db/migrate/20210909181442_create_ingredients.rb",
|
144
|
+
"spec/dummy/db/migrate/20210909181455_create_supplies.rb",
|
145
|
+
"spec/dummy/db/migrate/20210909181516_create_tools.rb",
|
146
|
+
"spec/dummy/db/migrate/20210909181533_create_recipes.rb",
|
147
|
+
"spec/dummy/db/migrate/20210909185303_create_uses.cookbook.rb",
|
148
|
+
"spec/dummy/db/migrate/20210910142322_create_users.rb",
|
149
|
+
"spec/dummy/db/migrate/20210910142323_add_devise_to_users.rb",
|
150
|
+
"spec/dummy/db/schema.rb",
|
151
|
+
"spec/dummy/db/seeds.rb",
|
152
|
+
"spec/dummy/db/test.sqlite3",
|
153
|
+
"spec/dummy/lib/assets/.keep",
|
154
|
+
"spec/dummy/lib/templates/haml/scaffold/_form.html.haml",
|
155
|
+
"spec/dummy/log/.keep",
|
156
|
+
"spec/dummy/log/development.log",
|
157
|
+
"spec/dummy/log/test.log",
|
158
|
+
"spec/dummy/public/404.html",
|
159
|
+
"spec/dummy/public/422.html",
|
160
|
+
"spec/dummy/public/500.html",
|
161
|
+
"spec/dummy/public/apple-touch-icon-precomposed.png",
|
162
|
+
"spec/dummy/public/apple-touch-icon.png",
|
163
|
+
"spec/dummy/public/favicon.ico",
|
164
|
+
"spec/dummy/storage/.keep",
|
165
|
+
"spec/factories/how_tos.rb",
|
166
|
+
"spec/factories/ingredients.rb",
|
167
|
+
"spec/factories/recipes.rb",
|
168
|
+
"spec/factories/supplies.rb",
|
169
|
+
"spec/factories/tools.rb",
|
170
|
+
"spec/factories/users.rb",
|
171
|
+
"spec/factories/uses.rb",
|
172
|
+
"spec/helpers/cookbook/application_helper_spec.rb",
|
173
|
+
"spec/models/cookbook/use_spec.rb",
|
174
|
+
"spec/models/how_to_spec.rb",
|
175
|
+
"spec/models/ingredient_spec.rb",
|
176
|
+
"spec/models/recipe_spec.rb",
|
177
|
+
"spec/models/supply_spec.rb",
|
178
|
+
"spec/models/tool_spec.rb",
|
179
|
+
"spec/rails_helper.rb",
|
180
|
+
"spec/requests/how_tos_spec.rb",
|
181
|
+
"spec/requests/recipes_spec.rb",
|
182
|
+
"spec/spec_helper.rb"
|
183
|
+
]
|
184
|
+
s.homepage = "https://gemvein.com/museum/cases/cookbook".freeze
|
185
|
+
s.licenses = ["MIT".freeze]
|
186
|
+
s.rubygems_version = "3.0.3".freeze
|
187
|
+
s.summary = "Mountable Engine to show instructions with components, like a cookbook or instruction manual".freeze
|
188
|
+
|
189
|
+
if s.respond_to? :specification_version then
|
190
|
+
s.specification_version = 4
|
191
|
+
|
192
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
193
|
+
s.add_runtime_dependency(%q<rails>.freeze, [">= 6", "< 7"])
|
194
|
+
s.add_runtime_dependency(%q<haml-rails>.freeze, [">= 2.0", "< 3"])
|
195
|
+
s.add_runtime_dependency(%q<sass-rails>.freeze, [">= 6", "< 7"])
|
196
|
+
s.add_runtime_dependency(%q<cancancan>.freeze, [">= 3.3", "< 4"])
|
197
|
+
s.add_runtime_dependency(%q<simple_form>.freeze, [">= 5.1", "< 6"])
|
198
|
+
s.add_runtime_dependency(%q<vanilla_nested>.freeze, [">= 1.3", "< 2"])
|
199
|
+
s.add_development_dependency(%q<database_cleaner>.freeze, [">= 1.8", "< 2"])
|
200
|
+
s.add_development_dependency(%q<devise>.freeze, [">= 4.8", "< 5"])
|
201
|
+
s.add_development_dependency(%q<faker>.freeze, [">= 0"])
|
202
|
+
s.add_development_dependency(%q<sqlite3>.freeze, [">= 1.4.2", "< 2"])
|
203
|
+
s.add_development_dependency(%q<bundler>.freeze, [">= 2", "< 3"])
|
204
|
+
s.add_development_dependency(%q<factory_bot_rails>.freeze, [">= 5.1", "< 6"])
|
205
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
206
|
+
s.add_development_dependency(%q<puma>.freeze, [">= 4.3", "< 5"])
|
207
|
+
s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
|
208
|
+
s.add_development_dependency(%q<rubocop-rails>.freeze, [">= 0"])
|
209
|
+
s.add_development_dependency(%q<rubocop-rspec>.freeze, [">= 0"])
|
210
|
+
else
|
211
|
+
s.add_dependency(%q<rails>.freeze, [">= 6", "< 7"])
|
212
|
+
s.add_dependency(%q<haml-rails>.freeze, [">= 2.0", "< 3"])
|
213
|
+
s.add_dependency(%q<sass-rails>.freeze, [">= 6", "< 7"])
|
214
|
+
s.add_dependency(%q<cancancan>.freeze, [">= 3.3", "< 4"])
|
215
|
+
s.add_dependency(%q<simple_form>.freeze, [">= 5.1", "< 6"])
|
216
|
+
s.add_dependency(%q<vanilla_nested>.freeze, [">= 1.3", "< 2"])
|
217
|
+
s.add_dependency(%q<database_cleaner>.freeze, [">= 1.8", "< 2"])
|
218
|
+
s.add_dependency(%q<devise>.freeze, [">= 4.8", "< 5"])
|
219
|
+
s.add_dependency(%q<faker>.freeze, [">= 0"])
|
220
|
+
s.add_dependency(%q<sqlite3>.freeze, [">= 1.4.2", "< 2"])
|
221
|
+
s.add_dependency(%q<bundler>.freeze, [">= 2", "< 3"])
|
222
|
+
s.add_dependency(%q<factory_bot_rails>.freeze, [">= 5.1", "< 6"])
|
223
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
224
|
+
s.add_dependency(%q<puma>.freeze, [">= 4.3", "< 5"])
|
225
|
+
s.add_dependency(%q<rubocop>.freeze, [">= 0"])
|
226
|
+
s.add_dependency(%q<rubocop-rails>.freeze, [">= 0"])
|
227
|
+
s.add_dependency(%q<rubocop-rspec>.freeze, [">= 0"])
|
228
|
+
end
|
229
|
+
else
|
230
|
+
s.add_dependency(%q<rails>.freeze, [">= 6", "< 7"])
|
231
|
+
s.add_dependency(%q<haml-rails>.freeze, [">= 2.0", "< 3"])
|
232
|
+
s.add_dependency(%q<sass-rails>.freeze, [">= 6", "< 7"])
|
233
|
+
s.add_dependency(%q<cancancan>.freeze, [">= 3.3", "< 4"])
|
234
|
+
s.add_dependency(%q<simple_form>.freeze, [">= 5.1", "< 6"])
|
235
|
+
s.add_dependency(%q<vanilla_nested>.freeze, [">= 1.3", "< 2"])
|
236
|
+
s.add_dependency(%q<database_cleaner>.freeze, [">= 1.8", "< 2"])
|
237
|
+
s.add_dependency(%q<devise>.freeze, [">= 4.8", "< 5"])
|
238
|
+
s.add_dependency(%q<faker>.freeze, [">= 0"])
|
239
|
+
s.add_dependency(%q<sqlite3>.freeze, [">= 1.4.2", "< 2"])
|
240
|
+
s.add_dependency(%q<bundler>.freeze, [">= 2", "< 3"])
|
241
|
+
s.add_dependency(%q<factory_bot_rails>.freeze, [">= 5.1", "< 6"])
|
242
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
243
|
+
s.add_dependency(%q<puma>.freeze, [">= 4.3", "< 5"])
|
244
|
+
s.add_dependency(%q<rubocop>.freeze, [">= 0"])
|
245
|
+
s.add_dependency(%q<rubocop-rails>.freeze, [">= 0"])
|
246
|
+
s.add_dependency(%q<rubocop-rspec>.freeze, [">= 0"])
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|