darkwasp99_foodie 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/foodie +4 -0
- data/foodie.gemspec +39 -0
- data/lib/foodie.rb +8 -0
- data/lib/foodie/cli.rb +25 -0
- data/lib/foodie/food.rb +17 -0
- data/lib/foodie/generators/recipe.rb +24 -0
- data/lib/foodie/generators/recipe/recipe.txt +6 -0
- data/lib/foodie/version.rb +3 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c60b7ba1cb6d4e5da8f69ca5d16d5da8cfdd30fb3bad037c1f5126f40bd4b22e
|
4
|
+
data.tar.gz: 9bde75861037f8d16227a7fd965e13c0b973c4e0215272aa204b3cdfcfe33958
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 44a7cca566919274a9da730430bf4a392f92f16eb249a899b7d28352380e8ae8a5f56716146a24b409468431bbc7effe253304309f673a931343d4829938c49b
|
7
|
+
data.tar.gz: d731c150c8df3b718bb0194a8fa36fbe6fcd997806e8ccb6bd0f99a2a234b2e6f3985c4058c97793df594afbc72ec29c9c6178f07fed43da97ba1adec243bc66
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
File without changes
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
darkwasp99_foodie (0.2.0)
|
5
|
+
activesupport (~> 4.2.0)
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (4.2.11.1)
|
12
|
+
i18n (~> 0.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
15
|
+
tzinfo (~> 1.1)
|
16
|
+
aruba (0.14.11)
|
17
|
+
childprocess (>= 0.6.3, < 3.0.0)
|
18
|
+
contracts (~> 0.9)
|
19
|
+
cucumber (>= 1.3.19)
|
20
|
+
ffi (~> 1.9)
|
21
|
+
rspec-expectations (>= 2.99)
|
22
|
+
thor (~> 0.19)
|
23
|
+
backports (3.15.0)
|
24
|
+
builder (3.2.3)
|
25
|
+
childprocess (2.0.0)
|
26
|
+
rake (< 13.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.11.1)
|
47
|
+
gherkin (5.1.0)
|
48
|
+
i18n (0.9.5)
|
49
|
+
concurrent-ruby (~> 1.0)
|
50
|
+
minitest (5.11.3)
|
51
|
+
multi_json (1.13.1)
|
52
|
+
multi_test (0.1.2)
|
53
|
+
rake (10.5.0)
|
54
|
+
rspec (3.8.0)
|
55
|
+
rspec-core (~> 3.8.0)
|
56
|
+
rspec-expectations (~> 3.8.0)
|
57
|
+
rspec-mocks (~> 3.8.0)
|
58
|
+
rspec-core (3.8.2)
|
59
|
+
rspec-support (~> 3.8.0)
|
60
|
+
rspec-expectations (3.8.4)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.8.0)
|
63
|
+
rspec-mocks (3.8.1)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.8.0)
|
66
|
+
rspec-support (3.8.2)
|
67
|
+
thor (0.20.3)
|
68
|
+
thread_safe (0.3.6)
|
69
|
+
tzinfo (1.2.5)
|
70
|
+
thread_safe (~> 0.1)
|
71
|
+
|
72
|
+
PLATFORMS
|
73
|
+
ruby
|
74
|
+
|
75
|
+
DEPENDENCIES
|
76
|
+
aruba
|
77
|
+
bundler (~> 2.0)
|
78
|
+
cucumber
|
79
|
+
darkwasp99_foodie!
|
80
|
+
rake (~> 10.0)
|
81
|
+
rspec (~> 3.2)
|
82
|
+
|
83
|
+
BUNDLED WITH
|
84
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 DarkWasp
|
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
|
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.
|
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
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
data/exe/foodie
ADDED
data/foodie.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "foodie/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "darkwasp99_foodie"
|
7
|
+
spec.version = Foodie::VERSION
|
8
|
+
spec.authors = ["DarkWasp"]
|
9
|
+
spec.email = ["coderwasp@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{Playing around with ruby gems}
|
12
|
+
spec.description = %q{Sample gem to learn my way around ruby's gem ecosystem}
|
13
|
+
spec.homepage = "https://github.com/darkwasp99/foodie"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/darkwasp99/foodie"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/darkwasp99/foodie/blob/master/CHANGELOG.md"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
32
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
+
spec.add_development_dependency "rspec", "~> 3.2"
|
34
|
+
spec.add_development_dependency "cucumber"
|
35
|
+
spec.add_development_dependency "aruba"
|
36
|
+
|
37
|
+
spec.add_dependency "activesupport", "~> 4.2.0"
|
38
|
+
spec.add_dependency "thor"
|
39
|
+
end
|
data/lib/foodie.rb
ADDED
data/lib/foodie/cli.rb
ADDED
@@ -0,0 +1,25 @@
|
|
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 delicious or gross"
|
8
|
+
def portray(name)
|
9
|
+
puts Foodie::Food.portray(name)
|
10
|
+
end
|
11
|
+
|
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
|
+
|
20
|
+
desc "recipe", "Generates a recipe scaffold"
|
21
|
+
def recipe(group, name)
|
22
|
+
Foodie::Generators::Recipe.start([group, name])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/foodie/food.rb
ADDED
@@ -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
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: darkwasp99_foodie
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- DarkWasp
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: cucumber
|
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: aruba
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activesupport
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 4.2.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 4.2.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: thor
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Sample gem to learn my way around ruby's gem ecosystem
|
112
|
+
email:
|
113
|
+
- coderwasp@gmail.com
|
114
|
+
executables:
|
115
|
+
- foodie
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".gitignore"
|
120
|
+
- CHANGELOG.md
|
121
|
+
- Gemfile
|
122
|
+
- Gemfile.lock
|
123
|
+
- LICENSE.txt
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/console
|
127
|
+
- bin/setup
|
128
|
+
- exe/foodie
|
129
|
+
- foodie.gemspec
|
130
|
+
- lib/foodie.rb
|
131
|
+
- lib/foodie/cli.rb
|
132
|
+
- lib/foodie/food.rb
|
133
|
+
- lib/foodie/generators/recipe.rb
|
134
|
+
- lib/foodie/generators/recipe/recipe.txt
|
135
|
+
- lib/foodie/version.rb
|
136
|
+
homepage: https://github.com/darkwasp99/foodie
|
137
|
+
licenses:
|
138
|
+
- MIT
|
139
|
+
metadata:
|
140
|
+
allowed_push_host: https://rubygems.org
|
141
|
+
homepage_uri: https://github.com/darkwasp99/foodie
|
142
|
+
source_code_uri: https://github.com/darkwasp99/foodie
|
143
|
+
changelog_uri: https://github.com/darkwasp99/foodie/blob/master/CHANGELOG.md
|
144
|
+
post_install_message:
|
145
|
+
rdoc_options: []
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubygems_version: 3.0.3
|
160
|
+
signing_key:
|
161
|
+
specification_version: 4
|
162
|
+
summary: Playing around with ruby gems
|
163
|
+
test_files: []
|