richie-foodie 0.1.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: 297695c301d89b2c2785ae94c9c41a1485e69415185f7a74e50b573f514b613e
4
+ data.tar.gz: 505072a5a5ddeafa722bdd22ffd7561f6a33a0e4358ee064b1f9e5612c2bada7
5
+ SHA512:
6
+ metadata.gz: 4dd2261524d7a154ec59a0592243ccc668cd1dd2caa241ae4cf3d31b74517e96807138b2e51b8ae3ccd8ae8e0f6ea59b6f1c0fbfaeae32715b7a9f2a37a08ebf
7
+ data.tar.gz: 6b563415e9804e655e3c4bd84ee999ef29da2d4a6656c980c111983bc387d52042dd99d0d4a7ed5fcf447334365ae04f2b12a9d7a99ed0c557a8403f24dc9fb3
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-06-07
4
+
5
+ - Initial release
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 richie-foodie.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,94 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ richie-foodie (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.1.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, < 9.0)
21
+ rspec-expectations (~> 3.4)
22
+ thor (~> 1.0)
23
+ builder (3.2.4)
24
+ byebug (11.1.3)
25
+ childprocess (4.1.0)
26
+ concurrent-ruby (1.1.10)
27
+ contracts (0.16.1)
28
+ cucumber (8.0.0)
29
+ builder (~> 3.2, >= 3.2.4)
30
+ cucumber-ci-environment (~> 9.0, >= 9.0.4)
31
+ cucumber-core (~> 11.0, >= 11.0.0)
32
+ cucumber-cucumber-expressions (~> 15.1, >= 15.1.1)
33
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
34
+ cucumber-html-formatter (~> 19.1, >= 19.1.0)
35
+ cucumber-messages (~> 18.0, >= 18.0.0)
36
+ diff-lcs (~> 1.5, >= 1.5.0)
37
+ mime-types (~> 3.4, >= 3.4.1)
38
+ multi_test (~> 1.1, >= 1.1.0)
39
+ sys-uname (~> 1.2, >= 1.2.2)
40
+ cucumber-ci-environment (9.0.4)
41
+ cucumber-core (11.0.0)
42
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
43
+ cucumber-messages (~> 18.0, >= 18.0.0)
44
+ cucumber-tag-expressions (~> 4.1, >= 4.1.0)
45
+ cucumber-cucumber-expressions (15.2.0)
46
+ cucumber-gherkin (23.0.1)
47
+ cucumber-messages (~> 18.0, >= 18.0.0)
48
+ cucumber-html-formatter (19.2.0)
49
+ cucumber-messages (~> 18.0, >= 18.0.0)
50
+ cucumber-messages (18.0.0)
51
+ cucumber-tag-expressions (4.1.0)
52
+ diff-lcs (1.5.0)
53
+ ffi (1.15.5)
54
+ i18n (0.9.5)
55
+ concurrent-ruby (~> 1.0)
56
+ mime-types (3.4.1)
57
+ mime-types-data (~> 3.2015)
58
+ mime-types-data (3.2022.0105)
59
+ minitest (5.15.0)
60
+ multi_test (1.1.0)
61
+ rake (13.0.6)
62
+ rspec (3.11.0)
63
+ rspec-core (~> 3.11.0)
64
+ rspec-expectations (~> 3.11.0)
65
+ rspec-mocks (~> 3.11.0)
66
+ rspec-core (3.11.0)
67
+ rspec-support (~> 3.11.0)
68
+ rspec-expectations (3.11.0)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.11.0)
71
+ rspec-mocks (3.11.1)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.11.0)
74
+ rspec-support (3.11.0)
75
+ sys-uname (1.2.2)
76
+ ffi (~> 1.1)
77
+ thor (1.2.1)
78
+ thread_safe (0.3.6)
79
+ tzinfo (1.2.9)
80
+ thread_safe (~> 0.1)
81
+
82
+ PLATFORMS
83
+ x86_64-darwin-19
84
+
85
+ DEPENDENCIES
86
+ aruba
87
+ byebug (~> 11.1)
88
+ cucumber
89
+ rake (~> 13.0)
90
+ richie-foodie!
91
+ rspec (~> 3.0)
92
+
93
+ BUNDLED WITH
94
+ 2.3.14
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Richie
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,33 @@
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
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add foodie
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install foodie
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ 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.
24
+
25
+ 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).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/foodie.
30
+
31
+ ## License
32
+
33
+ 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/dinner/salad.txt ADDED
@@ -0,0 +1,6 @@
1
+ ##### Ingredients #####
2
+ Ingredients for delicious salad go here.
3
+
4
+
5
+ ##### Instructions #####
6
+ Tips on how to make delicious salad 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,3 @@
1
+ #!/usr/bin/env ruby
2
+ require 'foodie/cli'
3
+ Foodie::CLI.start
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
+
8
+ desc "portray ITEM", "Determines if a piece of food is gross or delicious"
9
+ def portray(name)
10
+ puts Foodie::Food.portray(name)
11
+ end
12
+
13
+ desc "pluralize", "Pluralizes a word."
14
+ method_option :word, aliases: "-w"
15
+ def pluralize
16
+ puts Foodie::Food.pluralize(options[:word])
17
+ end
18
+
19
+ desc "recipe", "Generates a recipe scaffold"
20
+ def recipe(group, name)
21
+ Foodie::Generators::Recipe.start([group, name])
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,18 @@
1
+ require 'active_support/inflector'
2
+
3
+ module Foodie
4
+ class Food
5
+
6
+ def self.pluralize(word)
7
+ word.pluralize
8
+ end
9
+
10
+ def self.portray(food)
11
+ if food.downcase == "broccoli"
12
+ "Gross!"
13
+ else
14
+ "Delicious!"
15
+ end
16
+ end
17
+ end
18
+ 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,24 @@
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
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Foodie
4
+ VERSION = "0.1.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 "foodie/food"
5
+
6
+ module Foodie
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
data/sig/foodie.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Foodie
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: richie-foodie
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Richie
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-06-12 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: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '11.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '11.1'
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: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 4.2.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 4.2.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: thor
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Richie's `foodie` gem implementation (from Bundler tutorial).
98
+ email:
99
+ - rickthomas1980@gmail.com
100
+ executables:
101
+ - foodie
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - ".rspec"
106
+ - CHANGELOG.md
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - LICENSE.txt
110
+ - README.md
111
+ - Rakefile
112
+ - dinner/salad.txt
113
+ - dinner/steak.txt
114
+ - exe/foodie
115
+ - lib/foodie.rb
116
+ - lib/foodie/cli.rb
117
+ - lib/foodie/food.rb
118
+ - lib/foodie/generators/recipe.rb
119
+ - lib/foodie/generators/recipe/recipe.txt
120
+ - lib/foodie/version.rb
121
+ - sig/foodie.rbs
122
+ homepage: https://bundler.io/v2.0/guides/creating_gem.html
123
+ licenses:
124
+ - MIT
125
+ metadata:
126
+ homepage_uri: https://bundler.io/v2.0/guides/creating_gem.html
127
+ source_code_uri: https://bundler.io/v2.0/guides/creating_gem.html
128
+ changelog_uri: https://bundler.io/v2.0/guides/creating_gem.html
129
+ post_install_message:
130
+ rdoc_options: []
131
+ require_paths:
132
+ - lib
133
+ required_ruby_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: 2.6.0
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ requirements: []
144
+ rubygems_version: 3.0.1
145
+ signing_key:
146
+ specification_version: 4
147
+ summary: Richie's `foodie` gem implementation (from Bundler tutorial).
148
+ test_files: []