Comments (2)
Yeah, the common pattern for gems is to have (omitting extra folders for brevity) the following. Note that the file name path generally matches the class being implemented...e.g. lib/hawkular/metrics/nested_class_under_metrics.rb implements Hawkular::Metrics::NestedClassUnderMetrics.
hawular-client-ruby
├─ lib
| ├─ hawkular
| | ├─ metrics
| | | └─ nested_class_under_metrics.rb # implements Hawkular::Metrics::NestedClassUnderMetrics
| | └─ metrics.rb # implements Hawkular::Metrics
| └─ hawkular.rb # implements things directly in Hawkular module
...
When a gem is detected, the lib directory is put on the $LOAD_PATH. So, it's expected that the user will just do require 'hawkular'
and everything will just work. Actually, since the gem is named hawkular-client-ruby
the user might expect require 'hawkular/client/ruby'
or require 'hawkular-client-ruby'
to work. In particular, bundler defaults to the former. As such, you may want to add dummy files that when required will just subsequently require 'hawkular'
.
See also http://guides.rubygems.org/make-your-own-gem/#requiring-more-files for some of the layout details and http://guides.rubygems.org/name-your-gem/ for the naming conventions with respect to the gem name and how people might require the gem.
from hawkular-client-ruby.
@pilhuhn remember that this probably has repercussion on how we're using this gem for collecting metrics for OpenShift in ManageIQ. Let me know when you update the gem there so we can check if everything is in order.
from hawkular-client-ruby.
Related Issues (20)
- Return a more complete operation definition from inventory
- Another gsub does not work on URL issue HOT 8
- List operations sometimes fails
- get operation parameters via the official inventory way
- Add support for rates on query_stats mapping
- Support string metrics
- Allow to list tags in hawkular-metrics HOT 1
- ackBy no longer exists on alerts HOT 1
- Tenant handing in h-metrics 0.20 has changed
- Remove specs context metrics_0_16_ and leave only metric_services and metrics_0_8_0
- Add Test cases for XA Datasource to Datasource Add
- Add 'interval' field of alert conditions
- Add an option to query metrics based on tag only (regardless to type) HOT 2
- Support for multi-tenant operations HOT 6
- @inv_client.create_resource does not return path when resource already exists
- Add support for activesupport gem? HOT 12
- Consider replacing the websocket-client-simple gem with the same gem that is being used in the MiQ HOT 1
- Consider dropping support for v0.8 metrics HOT 5
- hawkular-website-bot's gh token lost the rights to push to the repo
- Incompatible with rest-client 2.1.0.rc1 ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hawkular-client-ruby.