foodie-nest 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 89d8d76f2a31cef27d7dd310b86e3a8343490e72c47bfc5e6552427322995c7f
4
+ data.tar.gz: 76f601a8d3853a8972fe49396fe51975ae4f20d7a3387509629d1e4a52729fbe
5
+ SHA512:
6
+ metadata.gz: 4116766edafe38b9449871d8e6c93e5b02b03aa1fe3268f1f07900791d88d395e97467dc52d0bd65a69c1a4ad3417d608fc7135f965a8a2ecd9d81418ae204d6
7
+ data.tar.gz: b112306224060fbab1f36ce8076f25ae64826e1c81d42491de7c6524b725feba4ba86f03b3687e2f00632751cd6632af268f0040dc9808d6b7c7613180ab44bd
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -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 surajshende247@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 [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in foodie.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,98 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ foodie-nest (0.1.0)
5
+ activesupport (~> 4.2.0)
6
+ thor
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (4.2.11.3)
12
+ i18n (~> 0.7)
13
+ minitest (~> 5.1)
14
+ thread_safe (~> 0.3, >= 0.3.4)
15
+ tzinfo (~> 1.1)
16
+ aruba (2.0.0)
17
+ bundler (>= 1.17, < 3.0)
18
+ childprocess (>= 2.0, < 5.0)
19
+ contracts (>= 0.16.0, < 0.18.0)
20
+ cucumber (>= 4.0, < 8.0)
21
+ rspec-expectations (~> 3.4)
22
+ thor (~> 1.0)
23
+ builder (3.2.4)
24
+ childprocess (4.1.0)
25
+ concurrent-ruby (1.1.9)
26
+ contracts (0.16.1)
27
+ cucumber (7.1.0)
28
+ builder (~> 3.2, >= 3.2.4)
29
+ cucumber-core (~> 10.1, >= 10.1.0)
30
+ cucumber-create-meta (~> 6.0, >= 6.0.1)
31
+ cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
32
+ cucumber-gherkin (~> 22.0, >= 22.0.0)
33
+ cucumber-html-formatter (~> 17.0, >= 17.0.0)
34
+ cucumber-messages (~> 17.1, >= 17.1.1)
35
+ cucumber-wire (~> 6.2, >= 6.2.0)
36
+ diff-lcs (~> 1.4, >= 1.4.4)
37
+ mime-types (~> 3.3, >= 3.3.1)
38
+ multi_test (~> 0.1, >= 0.1.2)
39
+ sys-uname (~> 1.2, >= 1.2.2)
40
+ cucumber-core (10.1.0)
41
+ cucumber-gherkin (~> 22.0, >= 22.0.0)
42
+ cucumber-messages (~> 17.1, >= 17.1.1)
43
+ cucumber-tag-expressions (~> 4.0, >= 4.0.2)
44
+ cucumber-create-meta (6.0.4)
45
+ cucumber-messages (~> 17.1, >= 17.1.1)
46
+ sys-uname (~> 1.2, >= 1.2.2)
47
+ cucumber-cucumber-expressions (14.0.0)
48
+ cucumber-gherkin (22.0.0)
49
+ cucumber-messages (~> 17.1, >= 17.1.1)
50
+ cucumber-html-formatter (17.0.0)
51
+ cucumber-messages (~> 17.1, >= 17.1.0)
52
+ cucumber-messages (17.1.1)
53
+ cucumber-tag-expressions (4.1.0)
54
+ cucumber-wire (6.2.1)
55
+ cucumber-core (~> 10.1, >= 10.1.0)
56
+ cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
57
+ diff-lcs (1.5.0)
58
+ ffi (1.15.4)
59
+ i18n (0.9.5)
60
+ concurrent-ruby (~> 1.0)
61
+ mime-types (3.4.1)
62
+ mime-types-data (~> 3.2015)
63
+ mime-types-data (3.2022.0105)
64
+ minitest (5.15.0)
65
+ multi_test (0.1.2)
66
+ rake (12.3.3)
67
+ rspec (3.10.0)
68
+ rspec-core (~> 3.10.0)
69
+ rspec-expectations (~> 3.10.0)
70
+ rspec-mocks (~> 3.10.0)
71
+ rspec-core (3.10.1)
72
+ rspec-support (~> 3.10.0)
73
+ rspec-expectations (3.10.1)
74
+ diff-lcs (>= 1.2.0, < 2.0)
75
+ rspec-support (~> 3.10.0)
76
+ rspec-mocks (3.10.2)
77
+ diff-lcs (>= 1.2.0, < 2.0)
78
+ rspec-support (~> 3.10.0)
79
+ rspec-support (3.10.3)
80
+ sys-uname (1.2.2)
81
+ ffi (~> 1.1)
82
+ thor (1.2.1)
83
+ thread_safe (0.3.6)
84
+ tzinfo (1.2.9)
85
+ thread_safe (~> 0.1)
86
+
87
+ PLATFORMS
88
+ ruby
89
+
90
+ DEPENDENCIES
91
+ aruba
92
+ cucumber
93
+ foodie-nest!
94
+ rake (~> 12.0)
95
+ rspec (~> 3.2)
96
+
97
+ BUNDLED WITH
98
+ 2.1.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Suraj Shende
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,44 @@
1
+ # Foodie
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`. 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'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install foodie
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. 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. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/foodie/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+
42
+ ## Code of Conduct
43
+
44
+ Everyone interacting in the Foodie project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/foodie/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "foodie"
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
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/foodie ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require 'foodie/cli'
3
+ Foodie::CLI.start
data/foodie.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ require_relative 'lib/foodie/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "foodie-nest"
5
+ spec.version = Foodie::VERSION
6
+ spec.authors = ["Suraj Shende"]
7
+ spec.email = ["surajshende247@gmail.com"]
8
+
9
+ spec.add_development_dependency "rspec", "~> 3.2"
10
+ spec.add_dependency "activesupport", "~> 4.2.0"
11
+ spec.add_development_dependency "cucumber"
12
+ spec.add_development_dependency "aruba"
13
+ spec.add_dependency "thor"
14
+
15
+ spec.summary = "This is foodie Gem"
16
+ spec.description = "We call our gem foodie because this gem is going to do a couple of things around food, such as portraying them as either Delicious! or Gross!. Stay tuned."
17
+ spec.homepage = "https://github.com/surajshende247/foodie"
18
+ spec.license = "MIT"
19
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
20
+
21
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
22
+
23
+ spec.metadata["homepage_uri"] = spec.homepage
24
+ spec.metadata["source_code_uri"] = "https://github.com/surajshende247/foodie"
25
+ spec.metadata["changelog_uri"] = "https://github.com/surajshende247/foodie"
26
+
27
+ # Specify which files should be added to the gem when it is released.
28
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
29
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
30
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
31
+ end
32
+ spec.bindir = "exe"
33
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
+ spec.require_paths = ["lib"]
35
+ end
@@ -0,0 +1,19 @@
1
+ require 'active_support/inflector'
2
+
3
+ module Foodie
4
+ class Food
5
+
6
+ def self.portray(food)
7
+ if food.downcase == "broccoli"
8
+ "Gross!"
9
+ else
10
+ "Delicious!"
11
+ end
12
+ end
13
+
14
+ def self.pluralize(word)
15
+ word.pluralize
16
+ end
17
+
18
+ end
19
+ end
data/lib/foodie/cli.rb ADDED
@@ -0,0 +1,24 @@
1
+ require 'thor'
2
+ require 'foodie'
3
+ require 'foodie/generators/recipe'
4
+
5
+ module Foodie
6
+ class CLI < Thor
7
+ desc "portray ITEM", "Determines if a piece of food is gross or delicious"
8
+ def portray(name)
9
+ puts Foodie::Food.portray(name)
10
+ end
11
+
12
+ desc "pluralize", "Pluralizes a word"
13
+ method_option :word, aliases: "-w"
14
+ def pluralize
15
+ puts Foodie::Food.pluralize(options[:word])
16
+ end
17
+
18
+ desc "recipe", "Generates a recipe scaffold"
19
+ def recipe(group, name)
20
+ Foodie::Generators::Recipe.start([group, name])
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,6 @@
1
+ ##### Ingredients #####
2
+ Ingredients for delicious <%= name %> go here.
3
+
4
+
5
+ ##### Instructions #####
6
+ Tips on how to make delicious <%= name %> go here.
@@ -0,0 +1,23 @@
1
+ require 'thor/group'
2
+
3
+ module Foodie
4
+ module Generators
5
+ class Recipe < Thor::Group
6
+ argument :group, :type => :string
7
+ argument :name, :type => :string
8
+ include Thor::Actions
9
+
10
+ def self.source_root
11
+ File.dirname(__FILE__) + "/recipe"
12
+ end
13
+
14
+ def create_group
15
+ empty_directory(group)
16
+ end
17
+
18
+ def copy_recipe
19
+ template("recipe.txt", "#{group}/#{name}.txt")
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ module Foodie
2
+ VERSION = "0.1.0"
3
+ end
data/lib/foodie.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'foodie/food'
2
+
3
+ module Foodie
4
+
5
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: foodie-nest
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Suraj Shende
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 4.2.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 4.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: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: aruba
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: We call our gem foodie because this gem is going to do a couple of things
84
+ around food, such as portraying them as either Delicious! or Gross!. Stay tuned.
85
+ email:
86
+ - surajshende247@gmail.com
87
+ executables:
88
+ - foodie
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - ".gitignore"
93
+ - CODE_OF_CONDUCT.md
94
+ - Gemfile
95
+ - Gemfile.lock
96
+ - LICENSE.txt
97
+ - README.md
98
+ - Rakefile
99
+ - bin/console
100
+ - bin/setup
101
+ - exe/foodie
102
+ - foodie.gemspec
103
+ - lib/foodie.rb
104
+ - lib/foodie/Food.rb
105
+ - lib/foodie/cli.rb
106
+ - lib/foodie/generators/recipe.rb
107
+ - lib/foodie/generators/recipe/recipe.txt
108
+ - lib/foodie/version.rb
109
+ homepage: https://github.com/surajshende247/foodie
110
+ licenses:
111
+ - MIT
112
+ metadata:
113
+ allowed_push_host: https://rubygems.org
114
+ homepage_uri: https://github.com/surajshende247/foodie
115
+ source_code_uri: https://github.com/surajshende247/foodie
116
+ changelog_uri: https://github.com/surajshende247/foodie
117
+ post_install_message:
118
+ rdoc_options: []
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: 2.3.0
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ requirements: []
132
+ rubygems_version: 3.1.2
133
+ signing_key:
134
+ specification_version: 4
135
+ summary: This is foodie Gem
136
+ test_files: []