foodie_maful 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/.gitignore +92 -0
- data/.idea/.gitignore +2 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/foodie_maful.iml +41 -0
- data/.idea/inspectionProfiles/Project_Default.xml +10 -0
- data/.idea/misc.xml +7 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +85 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/foodie +3 -0
- data/features/food.feature +12 -0
- data/features/generator.feature +18 -0
- data/features/support/setup.rb +1 -0
- data/foodie_maful.gemspec +28 -0
- data/lib/foodie_maful.rb +6 -0
- data/lib/foodie_maful/cli.rb +23 -0
- data/lib/foodie_maful/food.rb +17 -0
- data/lib/foodie_maful/generators/recipe.rb +24 -0
- data/lib/foodie_maful/generators/recipe/recipe.txt +6 -0
- data/lib/foodie_maful/version.rb +3 -0
- data/spec/foodie_maful_spec.rb +19 -0
- data/spec/spec_helper.rb +14 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 963ba1d202e48cc3aa7f5be38c3a96c8573dd30c741db0d7b67dbe3fc7cf1d11
|
4
|
+
data.tar.gz: ca6c9d8c92a19a0bc38b891020b9a7b7b082b4a2b6c9f74c748eb5c94b48590f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ed73720be2b1c9c503fc5fb98814bff8e2efbb949c335bd3b48914d9a594ce361246f760b090566a6db2fe34b746542981c92223e371450012af5f6834ddf5c
|
7
|
+
data.tar.gz: 8ae9c16435a9607988c52227adc49ee8f8afc42a5ea52140d52cc979108d3c713c479fca1c2a0ea8eed75e3a4755ca21326caf1d8ef281a171529bca757dd542
|
data/.gitignore
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
|
10
|
+
# rspec failure tracking
|
11
|
+
.rspec_status
|
12
|
+
|
13
|
+
# User-specific stuff
|
14
|
+
.idea/**/workspace.xml
|
15
|
+
.idea/**/tasks.xml
|
16
|
+
.idea/**/usage.statistics.xml
|
17
|
+
.idea/**/dictionaries
|
18
|
+
.idea/**/shelf
|
19
|
+
|
20
|
+
# Generated files
|
21
|
+
.idea/**/contentModel.xml
|
22
|
+
|
23
|
+
# Sensitive or high-churn files
|
24
|
+
.idea/**/dataSources/
|
25
|
+
.idea/**/dataSources.ids
|
26
|
+
.idea/**/dataSources.local.xml
|
27
|
+
.idea/**/sqlDataSources.xml
|
28
|
+
.idea/**/dynamic.xml
|
29
|
+
.idea/**/uiDesigner.xml
|
30
|
+
.idea/**/dbnavigator.xml
|
31
|
+
|
32
|
+
# Gradle
|
33
|
+
.idea/**/gradle.xml
|
34
|
+
.idea/**/libraries
|
35
|
+
|
36
|
+
# Gradle and Maven with auto-import
|
37
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
38
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
39
|
+
# auto-import.
|
40
|
+
# .idea/modules.xml
|
41
|
+
# .idea/*.iml
|
42
|
+
# .idea/modules
|
43
|
+
# *.iml
|
44
|
+
# *.ipr
|
45
|
+
|
46
|
+
# CMake
|
47
|
+
cmake-build-*/
|
48
|
+
|
49
|
+
# Mongo Explorer plugin
|
50
|
+
.idea/**/mongoSettings.xml
|
51
|
+
|
52
|
+
# File-based project format
|
53
|
+
*.iws
|
54
|
+
|
55
|
+
# IntelliJ
|
56
|
+
out/
|
57
|
+
|
58
|
+
# mpeltonen/sbt-idea plugin
|
59
|
+
.idea_modules/
|
60
|
+
|
61
|
+
# JIRA plugin
|
62
|
+
atlassian-ide-plugin.xml
|
63
|
+
|
64
|
+
# Cursive Clojure plugin
|
65
|
+
.idea/replstate.xml
|
66
|
+
|
67
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
68
|
+
com_crashlytics_export_strings.xml
|
69
|
+
crashlytics.properties
|
70
|
+
crashlytics-build.properties
|
71
|
+
fabric.properties
|
72
|
+
|
73
|
+
# Editor-based Rest Client
|
74
|
+
.idea/httpRequests
|
75
|
+
|
76
|
+
# Android studio 3.1+ serialized cache file
|
77
|
+
.idea/caches/build_file_checksums.ser
|
78
|
+
|
79
|
+
# *.iml
|
80
|
+
# modules.xml
|
81
|
+
# .idea/misc.xml
|
82
|
+
# *.ipr
|
83
|
+
|
84
|
+
# Sonarlint plugin
|
85
|
+
.idea/**/sonarlint/
|
86
|
+
|
87
|
+
# SonarQube Plugin
|
88
|
+
.idea/**/sonarIssues.xml
|
89
|
+
|
90
|
+
# Markdown Navigator plugin
|
91
|
+
.idea/**/markdown-navigator.xml
|
92
|
+
.idea/**/markdown-navigator/
|
data/.idea/.gitignore
ADDED
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build foodie_maful-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install foodie_maful-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install foodie_maful-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push foodie_maful-0.1.0.gem to TODO: Set to 'http://mygemserver.com'" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$" />
|
8
|
+
<orderEntry type="inheritedJdk" />
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="activesupport (v6.0.2.1, rbenv: 2.6.3) [gem]" level="application" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="aruba (v0.14.14, rbenv: 2.6.3) [gem]" level="application" />
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="backports (v3.15.0, rbenv: 2.6.3) [gem]" level="application" />
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 2.6.3) [gem]" level="application" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.2, rbenv: 2.6.3) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="childprocess (v3.0.0, rbenv: 2.6.3) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.5, rbenv: 2.6.3) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="contracts (v0.16.0, rbenv: 2.6.3) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber (v3.1.2, rbenv: 2.6.3) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-core (v3.2.1, rbenv: 2.6.3) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-expressions (v6.0.1, rbenv: 2.6.3) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-tag_expressions (v1.1.1, rbenv: 2.6.3) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-wire (v0.0.1, rbenv: 2.6.3) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, rbenv: 2.6.3) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.12.1, rbenv: 2.6.3) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="gherkin (v5.1.0, rbenv: 2.6.3) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.8.2, rbenv: 2.6.3) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.14.0, rbenv: 2.6.3) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.14.1, rbenv: 2.6.3) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_test (v0.1.2, rbenv: 2.6.3) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, rbenv: 2.6.3) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.9.0, rbenv: 2.6.3) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.9.0, rbenv: 2.6.3) [gem]" level="application" />
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.9.0, rbenv: 2.6.3) [gem]" level="application" />
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.0, rbenv: 2.6.3) [gem]" level="application" />
|
35
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.0, rbenv: 2.6.3) [gem]" level="application" />
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v1.0.1, rbenv: 2.6.3) [gem]" level="application" />
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, rbenv: 2.6.3) [gem]" level="application" />
|
38
|
+
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.6, rbenv: 2.6.3) [gem]" level="application" />
|
39
|
+
<orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.2.2, rbenv: 2.6.3) [gem]" level="application" />
|
40
|
+
</component>
|
41
|
+
</module>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
2
|
+
<profile version="1.0">
|
3
|
+
<option name="myName" value="Project Default" />
|
4
|
+
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
5
|
+
<option name="processCode" value="true" />
|
6
|
+
<option name="processLiterals" value="true" />
|
7
|
+
<option name="processComments" value="true" />
|
8
|
+
</inspection_tool>
|
9
|
+
</profile>
|
10
|
+
</component>
|
data/.idea/misc.xml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="JavaScriptSettings">
|
4
|
+
<option name="languageLevel" value="ES6" />
|
5
|
+
</component>
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.6.3" project-jdk-type="RUBY_SDK" />
|
7
|
+
</project>
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/foodie_maful.iml" filepath="$PROJECT_DIR$/.idea/foodie_maful.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
data/.idea/vcs.xml
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at mafulprayoga@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
foodie_maful (0.1.0)
|
5
|
+
activesupport (~> 6.0, >= 6.0.2.1)
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (6.0.2.1)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 0.7, < 2)
|
14
|
+
minitest (~> 5.1)
|
15
|
+
tzinfo (~> 1.1)
|
16
|
+
zeitwerk (~> 2.2)
|
17
|
+
aruba (0.14.14)
|
18
|
+
childprocess (>= 0.6.3, < 4.0.0)
|
19
|
+
contracts (~> 0.9)
|
20
|
+
cucumber (>= 1.3.19)
|
21
|
+
ffi (~> 1.9)
|
22
|
+
rspec-expectations (>= 2.99)
|
23
|
+
thor (>= 0.19, < 2.0)
|
24
|
+
backports (3.15.0)
|
25
|
+
builder (3.2.4)
|
26
|
+
childprocess (3.0.0)
|
27
|
+
concurrent-ruby (1.1.5)
|
28
|
+
contracts (0.16.0)
|
29
|
+
cucumber (3.1.2)
|
30
|
+
builder (>= 2.1.2)
|
31
|
+
cucumber-core (~> 3.2.0)
|
32
|
+
cucumber-expressions (~> 6.0.1)
|
33
|
+
cucumber-wire (~> 0.0.1)
|
34
|
+
diff-lcs (~> 1.3)
|
35
|
+
gherkin (~> 5.1.0)
|
36
|
+
multi_json (>= 1.7.5, < 2.0)
|
37
|
+
multi_test (>= 0.1.2)
|
38
|
+
cucumber-core (3.2.1)
|
39
|
+
backports (>= 3.8.0)
|
40
|
+
cucumber-tag_expressions (~> 1.1.0)
|
41
|
+
gherkin (~> 5.0)
|
42
|
+
cucumber-expressions (6.0.1)
|
43
|
+
cucumber-tag_expressions (1.1.1)
|
44
|
+
cucumber-wire (0.0.1)
|
45
|
+
diff-lcs (1.3)
|
46
|
+
ffi (1.12.1)
|
47
|
+
gherkin (5.1.0)
|
48
|
+
i18n (1.8.2)
|
49
|
+
concurrent-ruby (~> 1.0)
|
50
|
+
minitest (5.14.0)
|
51
|
+
multi_json (1.14.1)
|
52
|
+
multi_test (0.1.2)
|
53
|
+
rake (10.5.0)
|
54
|
+
rspec (3.9.0)
|
55
|
+
rspec-core (~> 3.9.0)
|
56
|
+
rspec-expectations (~> 3.9.0)
|
57
|
+
rspec-mocks (~> 3.9.0)
|
58
|
+
rspec-core (3.9.0)
|
59
|
+
rspec-support (~> 3.9.0)
|
60
|
+
rspec-expectations (3.9.0)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.9.0)
|
63
|
+
rspec-mocks (3.9.0)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.9.0)
|
66
|
+
rspec-support (3.9.0)
|
67
|
+
thor (1.0.1)
|
68
|
+
thread_safe (0.3.6)
|
69
|
+
tzinfo (1.2.6)
|
70
|
+
thread_safe (~> 0.1)
|
71
|
+
zeitwerk (2.2.2)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
|
76
|
+
DEPENDENCIES
|
77
|
+
aruba (~> 0.14.14)
|
78
|
+
bundler (~> 2.0)
|
79
|
+
cucumber (~> 3.1, >= 3.1.2)
|
80
|
+
foodie_maful!
|
81
|
+
rake (~> 10.0)
|
82
|
+
rspec (~> 3.0)
|
83
|
+
|
84
|
+
BUNDLED WITH
|
85
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 maful
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# FoodieMaful
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/foodie_maful`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'foodie_maful'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install foodie_maful
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/foodie_maful. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the FoodieMaful project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/foodie_maful/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "foodie_maful"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/foodie
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: FoodMaful
|
2
|
+
In order to portray or pluralize food
|
3
|
+
As a CLI
|
4
|
+
I want to be as objective as possible
|
5
|
+
|
6
|
+
Scenario: Broccoli is gross
|
7
|
+
When I run `foodie portray broccoli`
|
8
|
+
Then the output should contain "Gross!"
|
9
|
+
|
10
|
+
Scenario: Tomato, or Tomato?
|
11
|
+
When I run `foodie pluralize --word Tomato`
|
12
|
+
Then the output should contain "Tomatoes"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: Generating things
|
2
|
+
In order to generate many a thing
|
3
|
+
As a CLI newbie
|
4
|
+
I want foodie to hold my hand, tightly
|
5
|
+
|
6
|
+
Scenario: Recipes
|
7
|
+
When I run `foodie recipe dinner steak`
|
8
|
+
Then the following files should exist:
|
9
|
+
| dinner/steak.txt |
|
10
|
+
Then the file "dinner/steak.txt" should contain:
|
11
|
+
"""
|
12
|
+
##### Ingredients #####
|
13
|
+
Ingredients for delicious steak go here.
|
14
|
+
|
15
|
+
|
16
|
+
##### Instructions #####
|
17
|
+
Tips on how to make delicious steak go here.
|
18
|
+
"""
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'aruba/cucumber'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'foodie_maful/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'foodie_maful'
|
7
|
+
spec.version = FoodieMaful::VERSION
|
8
|
+
spec.authors = ['maful']
|
9
|
+
spec.email = ['mafulprayoga@gmail.com']
|
10
|
+
spec.summary = 'Simple couple of food gem'
|
11
|
+
spec.description = 'Simple couple of food'
|
12
|
+
spec.homepage = 'https://github.com/maful/foodie_maful'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.bindir = 'exe'
|
17
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'aruba', '~> 0.14.14'
|
21
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
22
|
+
spec.add_development_dependency 'cucumber', '~> 3.1', '>= 3.1.2'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
25
|
+
|
26
|
+
spec.add_dependency 'activesupport', '~> 6.0', '>= 6.0.2.1'
|
27
|
+
spec.add_dependency 'thor'
|
28
|
+
end
|
data/lib/foodie_maful.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'foodie_maful'
|
3
|
+
require 'foodie_maful/generators/recipe'
|
4
|
+
|
5
|
+
module FoodieMaful
|
6
|
+
class CLI < Thor
|
7
|
+
desc 'portray ITEM', 'Determines if a piece of food is gross or delicious'
|
8
|
+
def portray(name)
|
9
|
+
puts FoodieMaful::Food.portray(name)
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'pluralize', 'Pluralizes a word'
|
13
|
+
method_option :word, aliases: '-w'
|
14
|
+
def pluralize
|
15
|
+
puts FoodieMaful::Food.pluralize(options[:word])
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'recipe', 'Generates a recipe scaffold'
|
19
|
+
def recipe(group, name)
|
20
|
+
FoodieMaful::Generators::Recipe.start([group, name])
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
|
3
|
+
module FoodieMaful
|
4
|
+
module Generators
|
5
|
+
class Recipe < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
argument :group, type: :string
|
9
|
+
argument :name, type: :string
|
10
|
+
|
11
|
+
def create_group
|
12
|
+
empty_directory(group)
|
13
|
+
end
|
14
|
+
|
15
|
+
def copy_recipe
|
16
|
+
template('recipe.txt', "#{group}/#{name}.txt")
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.source_root
|
20
|
+
File.dirname(__FILE__) + '/recipe'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'foodie_maful'
|
2
|
+
|
3
|
+
RSpec.describe FoodieMaful do
|
4
|
+
it 'has a version number' do
|
5
|
+
expect(FoodieMaful::VERSION).not_to be nil
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'brocoli is gross' do
|
9
|
+
expect(FoodieMaful::Food.portray('Broccoli')).to eq('Gross!')
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'anything else is delicious' do
|
13
|
+
expect(FoodieMaful::Food.portray('Not Broccoli')).to eq('Delicious!')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'pluralize a word' do
|
17
|
+
expect(FoodieMaful::Food.pluralize('Tomato')).to eq('Tomatoes')
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "foodie_maful"
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Enable flags like --only-failures and --next-failure
|
6
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
+
|
8
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
9
|
+
config.disable_monkey_patching!
|
10
|
+
|
11
|
+
config.expect_with :rspec do |c|
|
12
|
+
c.syntax = :expect
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: foodie_maful
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- maful
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aruba
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.14.14
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.14.14
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: cucumber
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.1'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 3.1.2
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '3.1'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 3.1.2
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rake
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '10.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '10.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rspec
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3.0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: activesupport
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '6.0'
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 6.0.2.1
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '6.0'
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 6.0.2.1
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: thor
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
type: :runtime
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
description: Simple couple of food
|
124
|
+
email:
|
125
|
+
- mafulprayoga@gmail.com
|
126
|
+
executables:
|
127
|
+
- foodie
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files: []
|
130
|
+
files:
|
131
|
+
- ".gitignore"
|
132
|
+
- ".idea/.gitignore"
|
133
|
+
- ".idea/.rakeTasks"
|
134
|
+
- ".idea/foodie_maful.iml"
|
135
|
+
- ".idea/inspectionProfiles/Project_Default.xml"
|
136
|
+
- ".idea/misc.xml"
|
137
|
+
- ".idea/modules.xml"
|
138
|
+
- ".idea/vcs.xml"
|
139
|
+
- ".rspec"
|
140
|
+
- ".travis.yml"
|
141
|
+
- CODE_OF_CONDUCT.md
|
142
|
+
- Gemfile
|
143
|
+
- Gemfile.lock
|
144
|
+
- LICENSE.txt
|
145
|
+
- README.md
|
146
|
+
- Rakefile
|
147
|
+
- bin/console
|
148
|
+
- bin/setup
|
149
|
+
- exe/foodie
|
150
|
+
- features/food.feature
|
151
|
+
- features/generator.feature
|
152
|
+
- features/support/setup.rb
|
153
|
+
- foodie_maful.gemspec
|
154
|
+
- lib/foodie_maful.rb
|
155
|
+
- lib/foodie_maful/cli.rb
|
156
|
+
- lib/foodie_maful/food.rb
|
157
|
+
- lib/foodie_maful/generators/recipe.rb
|
158
|
+
- lib/foodie_maful/generators/recipe/recipe.txt
|
159
|
+
- lib/foodie_maful/version.rb
|
160
|
+
- spec/foodie_maful_spec.rb
|
161
|
+
- spec/spec_helper.rb
|
162
|
+
homepage: https://github.com/maful/foodie_maful
|
163
|
+
licenses:
|
164
|
+
- MIT
|
165
|
+
metadata: {}
|
166
|
+
post_install_message:
|
167
|
+
rdoc_options: []
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
requirements: []
|
181
|
+
rubygems_version: 3.0.3
|
182
|
+
signing_key:
|
183
|
+
specification_version: 4
|
184
|
+
summary: Simple couple of food gem
|
185
|
+
test_files: []
|