smartness_detector 0.1.2

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 91b96a1f691b58beaa2bae2d058aa1bf4841fe971766589ddbc9f5fe60f41d8d
4
+ data.tar.gz: e5c5b8f58ca501aebca57c4d9568e37bb6c5fc81b41544b993be4d6991075c6c
5
+ SHA512:
6
+ metadata.gz: afcbc58aa89259e08d3ff0b5ad6db79904a4d6aa219eb07e0dd2beae5439fd6d7a66966699c82e91a99675cfa95c3dd6115228a1659fa3dbe9e31d8461645ed3
7
+ data.tar.gz: 002fca1a4b94e391415d83118fd0a8982ecf284baaa2df112103c4dd918684203acb31355a00b7fd64164a61e9da09ea90c19e40f5bb1755c6333f0d6bea97a9
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ .idea
@@ -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 sajjadumardev@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 smartness_detector.gemspec
4
+ gemspec
5
+
6
+ gem 'rake', '~> 12.0'
@@ -0,0 +1,104 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ smartness_detector (0.1.2)
5
+ activesupport (~> 6.0, >= 6.0.3.4)
6
+ thor (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (6.0.3.4)
12
+ concurrent-ruby (~> 1.0, >= 1.0.2)
13
+ i18n (>= 0.7, < 2)
14
+ minitest (~> 5.1)
15
+ tzinfo (~> 1.1)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
17
+ aruba (1.0.3)
18
+ childprocess (>= 2.0, < 5.0)
19
+ contracts (~> 0.16.0)
20
+ cucumber (>= 2.4, < 6.0)
21
+ ffi (~> 1.9)
22
+ rspec-expectations (~> 3.4)
23
+ thor (~> 1.0)
24
+ builder (3.2.4)
25
+ childprocess (4.0.0)
26
+ concurrent-ruby (1.1.7)
27
+ contracts (0.16.0)
28
+ cucumber (5.2.0)
29
+ builder (~> 3.2, >= 3.2.4)
30
+ cucumber-core (~> 8.0, >= 8.0.1)
31
+ cucumber-create-meta (~> 2.0, >= 2.0.2)
32
+ cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
33
+ cucumber-gherkin (~> 15.0, >= 15.0.2)
34
+ cucumber-html-formatter (~> 9.0, >= 9.0.0)
35
+ cucumber-messages (~> 13.1, >= 13.1.0)
36
+ cucumber-wire (~> 4.0, >= 4.0.1)
37
+ diff-lcs (~> 1.4, >= 1.4.4)
38
+ multi_test (~> 0.1, >= 0.1.2)
39
+ sys-uname (~> 1.2, >= 1.2.1)
40
+ cucumber-core (8.0.1)
41
+ cucumber-gherkin (~> 15.0, >= 15.0.2)
42
+ cucumber-messages (~> 13.0, >= 13.0.1)
43
+ cucumber-tag-expressions (~> 2.0, >= 2.0.4)
44
+ cucumber-create-meta (2.0.4)
45
+ cucumber-messages (~> 13.1, >= 13.1.0)
46
+ sys-uname (~> 1.2, >= 1.2.1)
47
+ cucumber-cucumber-expressions (10.3.0)
48
+ cucumber-gherkin (15.0.2)
49
+ cucumber-messages (~> 13.0, >= 13.0.1)
50
+ cucumber-html-formatter (9.0.0)
51
+ cucumber-messages (~> 13.0, >= 13.0.1)
52
+ cucumber-messages (13.1.0)
53
+ protobuf-cucumber (~> 3.10, >= 3.10.8)
54
+ cucumber-tag-expressions (2.0.4)
55
+ cucumber-wire (4.0.1)
56
+ cucumber-core (~> 8.0, >= 8.0.1)
57
+ cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
58
+ cucumber-messages (~> 13.0, >= 13.0.1)
59
+ diff-lcs (1.4.4)
60
+ ffi (1.13.1)
61
+ i18n (1.8.5)
62
+ concurrent-ruby (~> 1.0)
63
+ middleware (0.1.0)
64
+ minitest (5.14.2)
65
+ multi_test (0.1.2)
66
+ protobuf-cucumber (3.10.8)
67
+ activesupport (>= 3.2)
68
+ middleware
69
+ thor
70
+ thread_safe
71
+ rake (12.3.3)
72
+ rspec (3.10.0)
73
+ rspec-core (~> 3.10.0)
74
+ rspec-expectations (~> 3.10.0)
75
+ rspec-mocks (~> 3.10.0)
76
+ rspec-core (3.10.0)
77
+ rspec-support (~> 3.10.0)
78
+ rspec-expectations (3.10.0)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.10.0)
81
+ rspec-mocks (3.10.0)
82
+ diff-lcs (>= 1.2.0, < 2.0)
83
+ rspec-support (~> 3.10.0)
84
+ rspec-support (3.10.0)
85
+ sys-uname (1.2.2)
86
+ ffi (~> 1.1)
87
+ thor (1.0.1)
88
+ thread_safe (0.3.6)
89
+ tzinfo (1.2.7)
90
+ thread_safe (~> 0.1)
91
+ zeitwerk (2.4.1)
92
+
93
+ PLATFORMS
94
+ ruby
95
+
96
+ DEPENDENCIES
97
+ aruba (~> 1.0, >= 1.0.3)
98
+ cucumber (~> 5.2)
99
+ rake (~> 12.0)
100
+ rspec (~> 3.10)
101
+ smartness_detector!
102
+
103
+ BUNDLED WITH
104
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 sumar7
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,44 @@
1
+ # SmartnessDetector
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/smartness_detector`. 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 'smartness_detector'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install smartness_detector
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]/smartness_detector. 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]/smartness_detector/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 SmartnessDetector project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/smartness_detector/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'smartness_detector'
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 'smartness_detector/cli'
4
+ SmartnessDetector::CLI.start
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'smartness_detector/version'
4
+ require 'smartness_detector/detect'
5
+
6
+ module SmartnessDetector
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+ require 'smartness_detector'
5
+ require 'smartness_detector/generators/install'
6
+
7
+
8
+ module SmartnessDetector
9
+ class CLI < Thor
10
+ desc 'Detect Smartness', 'Detect the smartness'
11
+ def smartness(name)
12
+ puts SmartnessDetector::Detect.smartness(name)
13
+ end
14
+
15
+ desc 'Pluralize the word', 'Smartly Pluralize the word'
16
+ method_option :word, aliases: '-w'
17
+ def pluralize
18
+ puts SmartnessDetector::Detect.pluralize(options[:word])
19
+ end
20
+
21
+ desc 'install', 'Smartness Generator'
22
+ def install(group, name)
23
+ SmartnessDetector::Generators::Install.start([group, name])
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/inflector'
4
+
5
+ module SmartnessDetector
6
+ class Detect
7
+ def self.smartness(name)
8
+ if name == 'RoR'
9
+ 'Smart!'
10
+ else
11
+ 'Dull!'
12
+ end
13
+ end
14
+
15
+ def self.pluralize(word)
16
+ word.pluralize
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor/group'
4
+
5
+ module SmartnessDetector
6
+ module Generators
7
+ class Install < Thor::Group
8
+ argument :group, type: :string
9
+ argument :name, type: :string
10
+ include Thor::Actions
11
+
12
+ def self.source_root
13
+ "#{File.dirname(__FILE__)}/smartness"
14
+ end
15
+
16
+ def self.exit_on_failure?
17
+ true
18
+ end
19
+
20
+ def create_group
21
+ empty_directory(group)
22
+ end
23
+
24
+ def smartness
25
+ template('smartness.txt', "#{group}/#{name}.txt")
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,5 @@
1
+ ##### Ruby on Rails #####
2
+ All <%= name %> developers are smart
3
+
4
+ ##### Alert #####
5
+ Everything else is dull!
@@ -0,0 +1,3 @@
1
+ module SmartnessDetector
2
+ VERSION = '0.1.2'.freeze
3
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/smartness_detector/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'smartness_detector'
7
+ spec.version = SmartnessDetector::VERSION
8
+ spec.authors = ['sumar7']
9
+ spec.email = ['sajjadumardev@gmail.com']
10
+
11
+ spec.summary = 'This is a super cool gem to detect smartness of people.'
12
+ spec.description = 'A super cool gem (test gem for education purpose).'
13
+ spec.homepage = 'https://github.com/SUMAR7/smartness_detectore'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
16
+
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = 'https://github.com/SUMAR7/smartness_detectore'
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ end
25
+ spec.bindir = 'exe'
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ['lib']
28
+
29
+ # development dependencies
30
+ spec.add_development_dependency 'aruba', '~> 1.0', '>= 1.0.3'
31
+ spec.add_development_dependency 'cucumber', '~> 5.2'
32
+ spec.add_development_dependency 'rspec', '~> 3.10'
33
+
34
+ # external dependencies
35
+ spec.add_dependency 'activesupport', '~> 6.0', '>= 6.0.3.4'
36
+
37
+ # Thor is a toolkit for building powerful command-line interfaces.
38
+ spec.add_dependency 'thor', '~> 1.0', '>= 1.0.1'
39
+ end
metadata ADDED
@@ -0,0 +1,151 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: smartness_detector
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - sumar7
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-11-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aruba
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.3
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.3
33
+ - !ruby/object:Gem::Dependency
34
+ name: cucumber
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '5.2'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.2'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.10'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.10'
61
+ - !ruby/object:Gem::Dependency
62
+ name: activesupport
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '6.0'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 6.0.3.4
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '6.0'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 6.0.3.4
81
+ - !ruby/object:Gem::Dependency
82
+ name: thor
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '1.0'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 1.0.1
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '1.0'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 1.0.1
101
+ description: A super cool gem (test gem for education purpose).
102
+ email:
103
+ - sajjadumardev@gmail.com
104
+ executables:
105
+ - smartness_detector
106
+ extensions: []
107
+ extra_rdoc_files: []
108
+ files:
109
+ - ".gitignore"
110
+ - CODE_OF_CONDUCT.md
111
+ - Gemfile
112
+ - Gemfile.lock
113
+ - LICENSE.txt
114
+ - README.md
115
+ - Rakefile
116
+ - bin/console
117
+ - bin/setup
118
+ - exe/smartness_detector
119
+ - lib/smartness_detector.rb
120
+ - lib/smartness_detector/cli.rb
121
+ - lib/smartness_detector/detect.rb
122
+ - lib/smartness_detector/generators/install.rb
123
+ - lib/smartness_detector/generators/smartness/smartness.txt
124
+ - lib/smartness_detector/version.rb
125
+ - smartness_detector.gemspec
126
+ homepage: https://github.com/SUMAR7/smartness_detectore
127
+ licenses:
128
+ - MIT
129
+ metadata:
130
+ homepage_uri: https://github.com/SUMAR7/smartness_detectore
131
+ source_code_uri: https://github.com/SUMAR7/smartness_detectore
132
+ post_install_message:
133
+ rdoc_options: []
134
+ require_paths:
135
+ - lib
136
+ required_ruby_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: 2.3.0
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ requirements: []
147
+ rubygems_version: 3.1.2
148
+ signing_key:
149
+ specification_version: 4
150
+ summary: This is a super cool gem to detect smartness of people.
151
+ test_files: []