mnwani-foodie 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b5854151a1b3451354274959aafb4b9ad1c71fea
4
+ data.tar.gz: 67de53b177fa02dbf8c626df9cdc93576897889e
5
+ SHA512:
6
+ metadata.gz: 03645bbedbd227bce351c623d11884ec6818264a69a3e1a099e0ded5f685d3f304f945973db5d52083d291622eeb6d44efd3995435fda94ed63bbc8c1f77ee19
7
+ data.tar.gz: a0ae17633fae601ff3fe402ad20643cb72455244a3ca57a218bff6856bc4ba4996892b62a9d52c04d919b6dfd794735f6a8b8256b07aa11c6934a386e50d1da7
@@ -0,0 +1,12 @@
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
+ .idea/
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.16.1
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in foodie.gemspec
6
+ gemspec
@@ -0,0 +1,84 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mnwani-foodie (0.1.0)
5
+ activesupport (~> 4.2.0)
6
+ aruba
7
+ cucumber
8
+ thor
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activesupport (4.2.10)
14
+ i18n (~> 0.7)
15
+ minitest (~> 5.1)
16
+ thread_safe (~> 0.3, >= 0.3.4)
17
+ tzinfo (~> 1.1)
18
+ aruba (0.14.5)
19
+ childprocess (>= 0.6.3, < 0.10.0)
20
+ contracts (~> 0.9)
21
+ cucumber (>= 1.3.19)
22
+ ffi (~> 1.9.10)
23
+ rspec-expectations (>= 2.99)
24
+ thor (~> 0.19)
25
+ backports (3.11.1)
26
+ builder (3.2.3)
27
+ childprocess (0.9.0)
28
+ ffi (~> 1.0, >= 1.0.11)
29
+ concurrent-ruby (1.0.5)
30
+ contracts (0.16.0)
31
+ cucumber (3.1.0)
32
+ builder (>= 2.1.2)
33
+ cucumber-core (~> 3.1.0)
34
+ cucumber-expressions (~> 5.0.4)
35
+ cucumber-wire (~> 0.0.1)
36
+ diff-lcs (~> 1.3)
37
+ gherkin (~> 5.0)
38
+ multi_json (>= 1.7.5, < 2.0)
39
+ multi_test (>= 0.1.2)
40
+ cucumber-core (3.1.0)
41
+ backports (>= 3.8.0)
42
+ cucumber-tag_expressions (~> 1.1.0)
43
+ gherkin (>= 5.0.0)
44
+ cucumber-expressions (5.0.13)
45
+ cucumber-tag_expressions (1.1.1)
46
+ cucumber-wire (0.0.1)
47
+ diff-lcs (1.3)
48
+ ffi (1.9.23)
49
+ gherkin (5.0.0)
50
+ i18n (0.9.5)
51
+ concurrent-ruby (~> 1.0)
52
+ minitest (5.11.3)
53
+ multi_json (1.13.1)
54
+ multi_test (0.1.2)
55
+ rake (10.5.0)
56
+ rspec (3.7.0)
57
+ rspec-core (~> 3.7.0)
58
+ rspec-expectations (~> 3.7.0)
59
+ rspec-mocks (~> 3.7.0)
60
+ rspec-core (3.7.1)
61
+ rspec-support (~> 3.7.0)
62
+ rspec-expectations (3.7.0)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.7.0)
65
+ rspec-mocks (3.7.0)
66
+ diff-lcs (>= 1.2.0, < 2.0)
67
+ rspec-support (~> 3.7.0)
68
+ rspec-support (3.7.1)
69
+ thor (0.20.0)
70
+ thread_safe (0.3.6)
71
+ tzinfo (1.2.5)
72
+ thread_safe (~> 0.1)
73
+
74
+ PLATFORMS
75
+ ruby
76
+
77
+ DEPENDENCIES
78
+ bundler (~> 1.16)
79
+ mnwani-foodie!
80
+ rake (~> 10.0)
81
+ rspec (~> 3.0)
82
+
83
+ BUNDLED WITH
84
+ 1.16.1
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Michael Nwani
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.
@@ -0,0 +1,40 @@
1
+ # Foodie
2
+
3
+ A ruby gem created by following Bundler's *[Developing a RubyGem using Bundler](http://bundler.io/v1.12/guides/creating_gem.html)* guide
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'foodie'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install foodie
20
+
21
+
22
+ ## Development
23
+
24
+ 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.
25
+
26
+ 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).
27
+
28
+ ## Usage
29
+ Example CLI usage:
30
+
31
+ $ foodie portray "Broccoli" # prints 'Gross!'
32
+ $ foodie portray "Chicken" # prints 'Delicious!'
33
+
34
+ ## Contributing
35
+
36
+ Bug reports and pull requests are welcome on GitHub at https://github.com/michaelnwani/foodie.
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -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__)
@@ -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
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'foodie/cli'
4
+ Foodie::CLI.start
@@ -0,0 +1,43 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "foodie/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mnwani-foodie"
8
+ spec.version = Foodie::VERSION
9
+ spec.authors = ["Michael Nwani"]
10
+ spec.email = ["kmichael24@gmail.com"]
11
+
12
+ spec.summary = %q{Foodie is a Ruby gem created by following Bundler's tutorial}
13
+ spec.description = %q{Foodie helps you find out whether or not a particular food is 'Gross!' or 'Delicious!'}
14
+ spec.homepage = "https://github.com/michaelnwani/foodie"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against " \
23
+ # "public gem pushes."
24
+ # end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.16"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
36
+
37
+ spec.add_dependency "activesupport", "~> 4.2.0"
38
+ spec.add_dependency "cucumber"
39
+ spec.add_dependency "aruba"
40
+ spec.add_dependency "thor"
41
+
42
+
43
+ end
@@ -0,0 +1,6 @@
1
+ require 'foodie/version'
2
+ require 'foodie/food'
3
+
4
+ module Foodie
5
+ # Your code goes here...
6
+ end
@@ -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 "portrary 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,17 @@
1
+ require 'active_support/inflector'
2
+
3
+ module Foodie
4
+ class Food
5
+ def self.portray(food)
6
+ if food.downcase == "broccoli"
7
+ "Gross!"
8
+ else
9
+ "Delicious!"
10
+ end
11
+ end
12
+
13
+ def self.pluralize(word)
14
+ word.pluralize
15
+ end
16
+ end
17
+ end
@@ -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 self.source_root
12
+ File.dirname(__FILE__) + "/recipe"
13
+ end
14
+
15
+ def create_group
16
+ empty_directory(group)
17
+ end
18
+
19
+ def copy_recipe
20
+ template("recipe.txt", "#{group}/#{name}.txt")
21
+ end
22
+
23
+ end
24
+ end
25
+ 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,3 @@
1
+ module Foodie
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,162 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mnwani-foodie
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Michael Nwani
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-04-02 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: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
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.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 4.2.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 4.2.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: cucumber
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
+ - !ruby/object:Gem::Dependency
84
+ name: aruba
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
+ - !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: Foodie helps you find out whether or not a particular food is 'Gross!'
112
+ or 'Delicious!'
113
+ email:
114
+ - kmichael24@gmail.com
115
+ executables:
116
+ - foodie
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - ".gitignore"
121
+ - ".rspec"
122
+ - ".travis.yml"
123
+ - Gemfile
124
+ - Gemfile.lock
125
+ - LICENSE.txt
126
+ - README.md
127
+ - Rakefile
128
+ - bin/console
129
+ - bin/setup
130
+ - exe/foodie
131
+ - foodie.gemspec
132
+ - lib/foodie.rb
133
+ - lib/foodie/cli.rb
134
+ - lib/foodie/food.rb
135
+ - lib/foodie/generators/recipe.rb
136
+ - lib/foodie/generators/recipe/recipe.txt
137
+ - lib/foodie/version.rb
138
+ homepage: https://github.com/michaelnwani/foodie
139
+ licenses:
140
+ - MIT
141
+ metadata: {}
142
+ post_install_message:
143
+ rdoc_options: []
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ requirements: []
157
+ rubyforge_project:
158
+ rubygems_version: 2.6.14
159
+ signing_key:
160
+ specification_version: 4
161
+ summary: Foodie is a Ruby gem created by following Bundler's tutorial
162
+ test_files: []