gem-jruby 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: 699668194203cdcb4aa77ea51c48132cf6c565209b816520d87d77dce666dee6
4
+ data.tar.gz: 2c1c2bedb694cdfc820834a18b0fbda08606598c27ab37b68e3edd4d8d1debb4
5
+ SHA512:
6
+ metadata.gz: 2c5b2b03d2280014aa1008871bfa000638730a71685b1fdba3a50688e9d94bfea8c5ba96ba74d3798c37c882cb085e9c8188efd8c3d581f0e66fbc4659fa733f
7
+ data.tar.gz: e79b77f4a1c1f21716365e730939a7cff159825df4b635f91d76a0b128e0568f3b36d2ab8c5d946a1241d9d4b599323c1585649bf6b3a9dc4e870b70ddd3d4dd
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.0
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2024-04-01
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dreamproperty.khanh@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 khanh-devos
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,129 @@
1
+ # GEM-JRUBY
2
+
3
+ # 📗 Table of Contents
4
+
5
+ - [📖 About the Project](#about-project)
6
+ - [🛠 Built With](#built-with)
7
+ - [Tech Stack](#tech-stack)
8
+ - [Key Features](#key-features)
9
+ - [💻 Usage ](#usage)
10
+ - [👥 Authors ](#-authors-)
11
+ - [🔭 Future Features ](#-future-features-)
12
+ - [🤝 Contributing ](#-contributing-)
13
+ - [⭐️ Show your support ](#️-show-your-support-)
14
+ <!-- - [🙏 Acknowledgments ](#-acknowledgments-) -->
15
+ <!-- - [📝 License ](#-license-) -->
16
+
17
+ # 📖 [gem-jruby] <a name="about-project"></a>
18
+
19
+ **Gem-jruby** is a gem for implementing some of ruby methods operated by JVM.
20
+
21
+ ## 🛠 Built With <a name="built-with"></a>
22
+
23
+ ### Tech Stack <a name="tech-stack"></a>
24
+
25
+ <details>
26
+ <summary>Server</summary>
27
+ <ul>
28
+ <li><a href="#">Ruby</a></li>
29
+ <li><a href="#">JRuby</a></li>
30
+ <li><a href="#">Java</a></li>
31
+ </ul>
32
+ </details>
33
+
34
+ <!-- Features -->
35
+
36
+ ### Key Features <a name="key-features"></a>
37
+
38
+ - **Show totalram**
39
+ - **Fibonacci sequence**
40
+ - **Quick sort**
41
+ - **Uppercase**
42
+ - **Uptime**
43
+ - **Loadavg**
44
+
45
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
46
+
47
+ <!-- GETTING STARTED -->
48
+
49
+ ## 💻 Usage <a name="usage"></a>
50
+
51
+ - INSTALLATION: gem install khanh
52
+
53
+ ```
54
+ require "khanh"
55
+ ```
56
+
57
+ ### Specific Props
58
+ | Methods | Type | Description |
59
+ |-------------|---------|----------------------------------------------|
60
+ | uptime | string | show the time since the boosting point of time |
61
+ | totalram | string | the total ram based on linux library sysinfo |
62
+ | loadavg | string | average of tasks done in 1, 5 & 15 minutes |
63
+ | 10.bigFib | array | a Fibonacci sequence with length 10 (max 98) |
64
+ | Khanh::CRuby.bigFib 10 | array | a Fibonacci sequence with length 10 (max over 100) |
65
+ | "a1b2c".cUpcase | string | upper all the letters |
66
+ | Khanh.sort([array]) | Array | quick-sort ascending an array |
67
+ | | | |
68
+
69
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
70
+
71
+ <!-- AUTHORS -->
72
+
73
+ ## 👥 Authors <a name="authors"></a>
74
+
75
+ 👤 **Khanh**
76
+
77
+ - GitHub: [khanh-devos](https://github.com/khanh-devos)
78
+ - Twitter: [@khanhror](https://twitter.com/home?lang=en)
79
+ - LinkedIn: [Khanh RoR](https://www.linkedin.com/in/khanh-dom/)
80
+
81
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
82
+
83
+ <!-- FUTURE FEATURES -->
84
+
85
+ ## 🔭 Future Features <a name="future-features"></a>
86
+
87
+ - **Hash code**
88
+ - **Puma Server**
89
+ - **Multi-thread**
90
+ - **Active Record**
91
+ - **Action View**
92
+
93
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
94
+
95
+ <!-- CONTRIBUTING -->
96
+
97
+ <!-- ## 🤝 Contributing <a name="contributing"></a>
98
+
99
+ Contributions, issues, and feature requests are welcome!
100
+
101
+ Feel free to check the [issues page](https://github.com/khanh-devos/react-reflection/issues).
102
+
103
+ <p align="right">(<a href="#readme-top">back to top</a>)</p> -->
104
+
105
+ <!-- SUPPORT -->
106
+
107
+ ## ⭐️ Show your support <a name="support"></a>
108
+
109
+ If you like this project give it a ⭐️
110
+
111
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
112
+
113
+ <!-- ACKNOWLEDGEMENTS -->
114
+ <!--
115
+ ## 🙏 Acknowledgments <a name="acknowledgements"></a>
116
+
117
+ I would like to thank all contributors.
118
+
119
+ <p align="right">(<a href="#readme-top">back to top</a>)</p> -->
120
+
121
+ <!-- LICENSE -->
122
+
123
+ <!-- ## 📝 License <a name="license"></a>
124
+
125
+ This project is [MIT](./MIT.md) licensed.
126
+
127
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
128
+
129
+ <a name="readme-top"></a> -->
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
data/exe/food ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'gem/jruby/cli.rb'
4
+ Gem::Jruby::CLI.start
@@ -0,0 +1,28 @@
1
+ require 'thor'
2
+ require_relative './food'
3
+
4
+
5
+ module Gem
6
+ module Jruby
7
+
8
+ class CLI < Thor
9
+ desc "portray ITEM", "Determines if a piece of food is gross or delicious"
10
+ def portray(name)
11
+ puts Gem::Jruby::Food.portray(name)
12
+ # can try to execute the CLI by: bundle exec exe/food portray broccoli
13
+ end
14
+
15
+ desc "pluralize", "Pluralizes a word"
16
+ method_option :word, aliases: "-w"
17
+ def pluralize
18
+ puts Gem::Jruby::Food.pluralize(options[:word])
19
+
20
+ # to understand the method_option: try below
21
+ # bundle exec exe/food pluralize --word
22
+ # bundle exec exe/food pluralize -w
23
+ end
24
+
25
+ end
26
+
27
+ end
28
+ end
@@ -0,0 +1,19 @@
1
+ require 'active_support/inflector'
2
+
3
+ module Gem
4
+ module Jruby
5
+ class Food
6
+ def self.portray(food)
7
+ return "Gross!" if food.downcase == "broccoli"
8
+ "Delicious!"
9
+ end
10
+
11
+ def self.pluralize(word)
12
+ word.pluralize
13
+ end
14
+
15
+ end
16
+
17
+
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gem
4
+ module Jruby
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
data/lib/gem/jruby.rb ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "jruby/version"
4
+
5
+ module Gem
6
+ module Jruby
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+
10
+ end
11
+ end
12
+
13
+
14
+ require_relative "jruby/food"
15
+ require_relative "jruby/cli"
data/sig/gem/jruby.rbs ADDED
@@ -0,0 +1,6 @@
1
+ module Gem
2
+ module Jruby
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
data/wtest ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ p "123, #{RUBY_VERSION}"
metadata ADDED
@@ -0,0 +1,130 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gem-jruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - khanh-devos
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-04-05 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: 7.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 7.1.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: Just visit the HOMEPAGE to the gem source.
84
+ email:
85
+ - dreamproperty.khanh@gmail.com
86
+ executables:
87
+ - food
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - ".ruby-version"
92
+ - CHANGELOG.md
93
+ - CODE_OF_CONDUCT.md
94
+ - LICENSE.txt
95
+ - README.md
96
+ - Rakefile
97
+ - exe/food
98
+ - lib/gem/jruby.rb
99
+ - lib/gem/jruby/cli.rb
100
+ - lib/gem/jruby/food.rb
101
+ - lib/gem/jruby/version.rb
102
+ - sig/gem/jruby.rbs
103
+ - wtest
104
+ homepage: https://github.com/khanh-devos/gem-jruby
105
+ licenses:
106
+ - MIT
107
+ metadata:
108
+ allowed_push_host: https://rubygems.org
109
+ homepage_uri: https://github.com/khanh-devos/gem-jruby
110
+ source_code_uri: https://github.com/khanh-devos/gem-jruby
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubygems_version: 3.5.6
127
+ signing_key:
128
+ specification_version: 4
129
+ summary: This is for study a gem with a jruby extension.
130
+ test_files: []