configem 1.0.1 → 1.0.3

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 +35 -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: 951be63c4c472185405fc9b8f97ed8bae90153029549f4db7309fc9b004b5d63
4
+ data.tar.gz: cb38c9cada27277f697e846c0cebc1bc6b2e0c07dc7ce09d65c0570f19562d96
5
5
  SHA512:
6
- metadata.gz: 5b0bc69f1ff6d504682574ce15e110f224621c2cfcf452e2ffd53b779047668ad09559feca3f8d0d121fd0d2f13c1d3456496cff53f131ead067aedb6f5fe10f
7
- data.tar.gz: 1fb1204493dcd6fecca4619780bcf3aa2f65d9b7867463b9be6ce6513c43b0b28387751afb55128da1c34566606676f782348d51b3cc3e98db76ab858d75f55d
6
+ metadata.gz: 0d01792a831239547eec1bbd134a07ae8e3574f7e3186dee194a397b5c13b290a46725d86ed36d38f633c684d08f327e9fc41d2bd5fd27e507d8bd6acada4922
7
+ data.tar.gz: 7a19c00a8190b1461cde8e91969de64c06b44d792a758f0801774e876af5200f339f93b71e99d0d83c181e3d608de973d6f4625324cd127076718d55f4599f12
data/README.md CHANGED
@@ -1,5 +1,7 @@
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
+
3
5
  A simple mixin to add configuration functionality to your classes
4
6
 
5
7
  ## Installation
@@ -8,22 +10,50 @@ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with
8
10
 
9
11
  Install the gem and add to the application's Gemfile by executing:
10
12
 
11
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
13
+ $ bundle add configem
12
14
 
13
15
  If bundler is not being used to manage dependencies, install the gem by executing:
14
16
 
15
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
17
+ $ gem install configem
16
18
 
17
19
  ## Usage
18
20
 
19
- TODO: Write usage instructions here
21
+ ```sh
22
+ class Example1
23
+ include Configem
24
+ end
25
+
26
+ class Example2
27
+ extend Configem
28
+ end
29
+
30
+ class Example3
31
+ prepend Configem
32
+ end
33
+
34
+ Example1.configure do |config|
35
+ config.api_key_1 = "api_key_1_value"
36
+ end
37
+
38
+ Example2.configure do |config|
39
+ config.api_key_2 = "api_key_2_value"
40
+ end
41
+
42
+ Example3.configure do |config|
43
+ config.api_key_3 = "api_key_3_value"
44
+ end
45
+
46
+ puts Example1.config.api_key_1
47
+
48
+ puts Example2.config.api_key_2
49
+
50
+ puts Example3.config.api_key_3
51
+ ```
20
52
 
21
53
  ## Development
22
54
 
23
55
  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
56
 
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
57
  ## Contributing
28
58
 
29
59
  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.3"
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksandar Popovic