cfc 0.1.1 → 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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -6
  3. data/lib/cfc/version.rb +1 -1
  4. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40bb48cf72eeb9528ed6c44396499aea91a719845094f1b389a7d891edb64b4c
4
- data.tar.gz: f2ffa1a259fdb63166799b050f4035a0023ca9424753336cb21ef4b138ddbc76
3
+ metadata.gz: 563b2293943b85d67b3dff9d612481addd9dc32272647691d891d3376ccdcf92
4
+ data.tar.gz: efa22237c80919923fe33a514bbb8779fd9bd9f36d568cf52c56f1f36bf02553
5
5
  SHA512:
6
- metadata.gz: ae3acc4b662407967520e549a66cd73846ab834a89159d4592a8775af0efccf15ffbdacd09da8464e7f88f3b1a48bf677411614094d5342e95242a795e45b87b
7
- data.tar.gz: eccf63a35470b2ee94f33324dd733b1393d43c0e36055840855c711c229b11e708bfae42f50c12443b0a6f6dd8f3b81026bf9fd7c5088996c689afa46ad50458
6
+ metadata.gz: 9b3de0e73d175282548bbf7c1e67a547d2942285feec299c3cb094af4bb836f10de4814039dc88e7df481b96c4b6a7276b3f559b353abb3b8147aacc12cf7f2f
7
+ data.tar.gz: 1b709a15c173a3d9b0476469a785e65f90d8d5e0cc76da60f20a34b2f821ae0dc6a4ebf8dba4d515df9c0f70800eef9cdb2c1865d75cc728e72322ca12d23678
data/README.md CHANGED
@@ -2,17 +2,27 @@
2
2
  Simple library for interacting with the Cloudflare API.
3
3
 
4
4
  ## Install
5
- Clone the repository. That's it!
5
+ ```
6
+ gem install cfc
7
+ ```
8
+
9
+ If you're installing for development/contribution, just clone the repository.
6
10
 
7
11
  ## Usage
8
- This library is intended to be very lightweight, to help with usage in quick but effective scripts. Scripts that use
9
- this library can be added to `scripts/` and run from there—it's *possible* for them to go anywhere, of course,
10
- but relative `require`s are easier from a proximate directory.
12
+ Once you've `require`d the gem, you _must_ then configure it with required credentials before you can use it. You can do
13
+ this by calling `CFC::Config.configure`, as shown below. You must provide a valid API token for the gem to use in API
14
+ requests.
15
+
16
+ ```ruby
17
+ CFC::Config.configure do |config|
18
+ config.token = 'your_api_token_here'
19
+ end
20
+ ```
11
21
 
12
- You can use the library either by instantiating `CFC::API` and using that class to send API requests directly,
22
+ You can then use the library either by instantiating `CFC::API` and using that class to send API requests directly,
13
23
  or, for simpler tasks, you can use pre-provided objects in `lib/objects/`, which represent a data type from the
14
24
  Cloudflare API and may provide methods to perform common or simple tasks on those types. See
15
- `lib/scripts/clear_cache.rb` for an example of how this may be done using `CFC::Zone` objects.
25
+ `lib/scripts/clear_cache.rb` for an example of how this may be done with `CFC::Zone` objects.
16
26
 
17
27
  ## Contributing
18
28
  As with all Codidact projects, contributions are welcome and must adhere to the
@@ -1,3 +1,3 @@
1
1
  module CFC
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Codidact Foundation
@@ -10,7 +10,8 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2020-12-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: 'See GitHub for usage details: https://github.com/codidact/cfc'
13
+ description: 'Simple API library for interacting with the Cloudflare API. See GitHub
14
+ for usage details: https://github.com/codidact/cfc'
14
15
  email: gems@codidact.org
15
16
  executables: []
16
17
  extensions: []