shaliu_foodie 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 42b6bea0c71f846868d7c62d54ba7481323c167ade3a2071b4ce450a2cc6a675
4
+ data.tar.gz: e9eca52c17d9a7a749076eb2ad91d0de46a5221cb05c328b740ff8a31c764b7b
5
+ SHA512:
6
+ metadata.gz: 9ffcd99283411bc020dd89c206533d9495528bacab3fcda86eda89454f97c9a1e4b0feef77bf3d84be9d345be242aebf934dc2a3a2b3d7accdfa34466295257d
7
+ data.tar.gz: 4324c7aad293947623f4be68fcde7af905d964d1160f724e855b4d6ac505e8c1a28e0e7ea06bceecdd51aeaeef0446b291aa43864d36d93af733867fa7965210
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in foodie.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,100 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ shaliu_foodie (0.4.0)
5
+ activesupport
6
+ thor
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (6.1.4.1)
12
+ concurrent-ruby (~> 1.0, >= 1.0.2)
13
+ i18n (>= 1.6, < 2)
14
+ minitest (>= 5.1)
15
+ tzinfo (~> 2.0)
16
+ zeitwerk (~> 2.3)
17
+ aruba (2.0.0)
18
+ bundler (>= 1.17, < 3.0)
19
+ childprocess (>= 2.0, < 5.0)
20
+ contracts (>= 0.16.0, < 0.18.0)
21
+ cucumber (>= 4.0, < 8.0)
22
+ rspec-expectations (~> 3.4)
23
+ thor (~> 1.0)
24
+ builder (3.2.4)
25
+ childprocess (4.1.0)
26
+ concurrent-ruby (1.1.9)
27
+ contracts (0.16.1)
28
+ cucumber (7.1.0)
29
+ builder (~> 3.2, >= 3.2.4)
30
+ cucumber-core (~> 10.1, >= 10.1.0)
31
+ cucumber-create-meta (~> 6.0, >= 6.0.1)
32
+ cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
33
+ cucumber-gherkin (~> 22.0, >= 22.0.0)
34
+ cucumber-html-formatter (~> 17.0, >= 17.0.0)
35
+ cucumber-messages (~> 17.1, >= 17.1.1)
36
+ cucumber-wire (~> 6.2, >= 6.2.0)
37
+ diff-lcs (~> 1.4, >= 1.4.4)
38
+ mime-types (~> 3.3, >= 3.3.1)
39
+ multi_test (~> 0.1, >= 0.1.2)
40
+ sys-uname (~> 1.2, >= 1.2.2)
41
+ cucumber-core (10.1.0)
42
+ cucumber-gherkin (~> 22.0, >= 22.0.0)
43
+ cucumber-messages (~> 17.1, >= 17.1.1)
44
+ cucumber-tag-expressions (~> 4.0, >= 4.0.2)
45
+ cucumber-create-meta (6.0.1)
46
+ cucumber-messages (~> 17.0, >= 17.0.1)
47
+ sys-uname (~> 1.2, >= 1.2.2)
48
+ cucumber-cucumber-expressions (14.0.0)
49
+ cucumber-gherkin (22.0.0)
50
+ cucumber-messages (~> 17.1, >= 17.1.1)
51
+ cucumber-html-formatter (17.0.0)
52
+ cucumber-messages (~> 17.1, >= 17.1.0)
53
+ cucumber-messages (17.1.1)
54
+ cucumber-tag-expressions (4.1.0)
55
+ cucumber-wire (6.2.0)
56
+ cucumber-core (~> 10.1, >= 10.1.0)
57
+ cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
58
+ cucumber-messages (~> 17.1, >= 17.1.1)
59
+ diff-lcs (1.4.4)
60
+ ffi (1.15.4)
61
+ i18n (1.8.10)
62
+ concurrent-ruby (~> 1.0)
63
+ mime-types (3.3.1)
64
+ mime-types-data (~> 3.2015)
65
+ mime-types-data (3.2021.0901)
66
+ minitest (5.14.4)
67
+ multi_test (0.1.2)
68
+ rake (13.0.6)
69
+ rspec (3.10.0)
70
+ rspec-core (~> 3.10.0)
71
+ rspec-expectations (~> 3.10.0)
72
+ rspec-mocks (~> 3.10.0)
73
+ rspec-core (3.10.1)
74
+ rspec-support (~> 3.10.0)
75
+ rspec-expectations (3.10.1)
76
+ diff-lcs (>= 1.2.0, < 2.0)
77
+ rspec-support (~> 3.10.0)
78
+ rspec-mocks (3.10.2)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.10.0)
81
+ rspec-support (3.10.2)
82
+ sys-uname (1.2.2)
83
+ ffi (~> 1.1)
84
+ thor (1.1.0)
85
+ tzinfo (2.0.4)
86
+ concurrent-ruby (~> 1.0)
87
+ zeitwerk (2.4.2)
88
+
89
+ PLATFORMS
90
+ x86_64-darwin-19
91
+
92
+ DEPENDENCIES
93
+ aruba
94
+ cucumber
95
+ rake (~> 13.0)
96
+ rspec (~> 3.0)
97
+ shaliu_foodie!
98
+
99
+ BUNDLED WITH
100
+ 2.2.26
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 SET mentor
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,39 @@
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. 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 the created tag, 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.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "foodie"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ 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/dinner/salmon.txt ADDED
@@ -0,0 +1,6 @@
1
+ ##### Ingredients #####
2
+ Ingredients for delicious salmon go here.
3
+
4
+
5
+ ##### Instructions #####
6
+ Tips on how to make delicious salmon go here.
data/dinner/steak.txt ADDED
@@ -0,0 +1,6 @@
1
+ ##### Ingredients #####
2
+ Ingredients for delicious steak go here.
3
+
4
+
5
+ ##### Instructions #####
6
+ Tips on how to make delicious steak go here.
data/exe/foodie ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'foodie/cli'
4
+ Foodie::CLI.start
data/foodie.gemspec ADDED
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/foodie/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+
7
+ URL = "https://example.com"
8
+
9
+ spec.name = "shaliu_foodie"
10
+ spec.version = Foodie::VERSION
11
+ spec.authors = ["SET mentor"]
12
+ spec.email = ["setmentor_parttime02@academyxi.com"]
13
+
14
+ spec.summary = ""
15
+ spec.description = ""
16
+ spec.homepage = URL
17
+ spec.license = "MIT"
18
+ spec.required_ruby_version = ">= 2.4.0"
19
+
20
+ # spec.metadata["allowed_push_host"] = ""
21
+
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = URL
24
+ spec.metadata["changelog_uri"] = URL
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
29
+ `git ls-files -z`.split("\x0").reject do |f|
30
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
31
+ end
32
+ end
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ # Uncomment to register a new dependency of your gem
38
+ spec.add_development_dependency "rspec", "~> 3.2"
39
+ spec.add_dependency "activesupport"
40
+ spec.add_development_dependency "cucumber"
41
+ spec.add_development_dependency "aruba"
42
+ spec.add_dependency "thor"
43
+
44
+
45
+ # For more information and examples about making a new gem, checkout our
46
+ # guide at: https://bundler.io/guides/creating_gem.html
47
+ end
data/lib/foodie/cli.rb ADDED
@@ -0,0 +1,28 @@
1
+ require 'thor'
2
+ require 'foodie'
3
+ require 'foodie/generators/recipe'
4
+
5
+ module Foodie
6
+
7
+ class CLI < Thor
8
+
9
+ desc "portray ITEM", "Determines if a piece of food is gross or delicious"
10
+ def portray(name)
11
+ puts Foodie::Food.portray(name)
12
+ end
13
+
14
+ desc "pluralize", "Pluralizes a word"
15
+ # method_option :word, aliases: "-w"
16
+ method_options word: :string, uppercase: :boolean
17
+ def pluralize
18
+ puts Foodie::Food.pluralize(options[:word])
19
+ end
20
+
21
+ desc "recipe", "Generates a recipe scaffold"
22
+ def recipe(group, name)
23
+ Foodie::Generators::Recipe.start([group, name])
24
+ end
25
+
26
+ end
27
+
28
+ end
@@ -0,0 +1,20 @@
1
+ require 'active_support/inflector'
2
+
3
+ module Foodie
4
+
5
+ class Food
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
+ end
18
+
19
+
20
+ 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,25 @@
1
+ require 'thor/group'
2
+
3
+ module Foodie
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
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Foodie
4
+ VERSION = "0.4.0"
5
+ end
data/lib/foodie.rb ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "foodie/version"
4
+ require_relative 'foodie/food'
5
+
6
+ module Foodie
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shaliu_foodie
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
+ platform: ruby
6
+ authors:
7
+ - SET mentor
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-10-14 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: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '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: ''
84
+ email:
85
+ - setmentor_parttime02@academyxi.com
86
+ executables:
87
+ - foodie
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".rspec"
92
+ - Gemfile
93
+ - Gemfile.lock
94
+ - LICENSE.txt
95
+ - README.md
96
+ - Rakefile
97
+ - bin/console
98
+ - bin/setup
99
+ - dinner/salmon.txt
100
+ - dinner/steak.txt
101
+ - exe/foodie
102
+ - foodie.gemspec
103
+ - lib/foodie.rb
104
+ - lib/foodie/cli.rb
105
+ - lib/foodie/food.rb
106
+ - lib/foodie/generators/recipe.rb
107
+ - lib/foodie/generators/recipe/recipe.txt
108
+ - lib/foodie/version.rb
109
+ homepage: https://example.com
110
+ licenses:
111
+ - MIT
112
+ metadata:
113
+ homepage_uri: https://example.com
114
+ source_code_uri: https://example.com
115
+ changelog_uri: https://example.com
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 2.4.0
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubygems_version: 3.2.26
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: ''
135
+ test_files: []