configem 1.0.1 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -5
  3. data/lib/configem.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4fc5524a8f7ac2a70778a20bdd6a7c7b9656ad40175742faa3f908baa53fb1a
4
- data.tar.gz: 2e2ed8f74b9cc167eb45350756bffd64017494e7edcc0eb0627e3af96f04e984
3
+ metadata.gz: 48ed3b022f9c657bf2380dd9afb62d8e8c9e4bdf74b955ff3084acea1cbdb616
4
+ data.tar.gz: 65f19837f6e68ed98d6d7c150d4fc1d08e68614bc74c9aa82e0ad0907ab84ec9
5
5
  SHA512:
6
- metadata.gz: 5b0bc69f1ff6d504682574ce15e110f224621c2cfcf452e2ffd53b779047668ad09559feca3f8d0d121fd0d2f13c1d3456496cff53f131ead067aedb6f5fe10f
7
- data.tar.gz: 1fb1204493dcd6fecca4619780bcf3aa2f65d9b7867463b9be6ce6513c43b0b28387751afb55128da1c34566606676f782348d51b3cc3e98db76ab858d75f55d
6
+ metadata.gz: 973d7cfcbe2f0ae283a1c09dea672e0f0f881a7f6efdffc344065b97ddb43c4c80fe86ae8bfce8ab866d059f8aab88e7d43e557822a14774e87f0ec956131807
7
+ data.tar.gz: fea479fbc49f349bb6d649d98186e590f0056d6f51ec99512c1cb98855c8948b0cdf8184e967825cc3ecb1adf5bc4ccb6f91d05d44883e684ae877ebd96d699d
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Configem
2
2
 
3
+ [![Ruby](https://github.com/alekpopovic/configem/actions/workflows/ruby.yml/badge.svg)](https://github.com/alekpopovic/configem/actions/workflows/ruby.yml)
4
+
5
+ [![Ruby Gem](https://github.com/alekpopovic/configem/actions/workflows/gem-push.yml/badge.svg)](https://github.com/alekpopovic/configem/actions/workflows/gem-push.yml)
6
+
3
7
  A simple mixin to add configuration functionality to your classes
4
8
 
5
9
  ## Installation
@@ -8,22 +12,50 @@ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with
8
12
 
9
13
  Install the gem and add to the application's Gemfile by executing:
10
14
 
11
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
15
+ $ bundle add configem
12
16
 
13
17
  If bundler is not being used to manage dependencies, install the gem by executing:
14
18
 
15
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
19
+ $ gem install configem
16
20
 
17
21
  ## Usage
18
22
 
19
- TODO: Write usage instructions here
23
+ ```sh
24
+ class Example1
25
+ include Configem
26
+ end
27
+
28
+ class Example2
29
+ extend Configem
30
+ end
31
+
32
+ class Example3
33
+ prepend Configem
34
+ end
35
+
36
+ Example1.configure do |config|
37
+ config.api_key_1 = "api_key_1_value"
38
+ end
39
+
40
+ Example2.configure do |config|
41
+ config.api_key_2 = "api_key_2_value"
42
+ end
43
+
44
+ Example3.configure do |config|
45
+ config.api_key_3 = "api_key_3_value"
46
+ end
47
+
48
+ puts Example1.config.api_key_1
49
+
50
+ puts Example2.config.api_key_2
51
+
52
+ puts Example3.config.api_key_3
53
+ ```
20
54
 
21
55
  ## Development
22
56
 
23
57
  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.
24
58
 
25
- 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
-
27
59
  ## Contributing
28
60
 
29
61
  Bug reports and pull requests are welcome on GitHub at https://github.com/alekpopovic/configem/issues. 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/alekpopovic/configem/blob/master/CODE_OF_CONDUCT.md).
data/lib/configem.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Configem
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.7"
5
5
 
6
6
  class << self
7
7
  def included(base)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksandar Popovic