almapi 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92f368edda78eb8a33c2941d44e7c2e737b309e625c3fa4b56a76a09908356b4
4
- data.tar.gz: e25f8932a1d6a39ded7d8b93f4fc0a1324d70b399607777cef0374e2fcfe9c00
3
+ metadata.gz: 0f2c26aa18fade1372b97275580085b9ad05a60a2f7e73dca141e65f6990045d
4
+ data.tar.gz: b2e04d2a9f615f33db3c1802dd49894ddaa83397c629b73002080b6642478b48
5
5
  SHA512:
6
- metadata.gz: cfb6cd7d7473be8574058a4f2e1409c5cb7a28eafcd4773e14c9ed7d2032497c4699bef03b7a86f903ca8a60c069974068a129325894570eeafa77104dd6f77c
7
- data.tar.gz: 5101af4dc5f61e6e03c53bfd560f6d9fd1feb68d980b446a6bc96f857d4d2847ce326ad5b0d5510c0a3e1c97828f5e7a8215619a7fb8478f1dfe12e895b1681e
6
+ metadata.gz: 285d020a9b515fb8f28c77cc61e921460d60b4ab33d7c19bcdd0a6efb959f57ffbd233276ee6dff4399263e26dffb77a82bcedd2a56849770f2102e649b6ad89
7
+ data.tar.gz: e7cdb29ad8984185b9c2b846f88afb09196c336f68ed7d35fab7b60f905a1245ab2308d17a1c4875ecd953bc26f808d278f41bd60732e7e9d9838d7d8b889d76
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.5] - 2024-04-04
4
+
5
+ - Still trying to require_relative error (learning to create gem so may take a few versions :) .
6
+
7
+ ## [0.1.1] to [0.1.4]- 2024-04-04
8
+
9
+ - Correct require_relative error.
10
+
11
+ ## [0.1.0] - 2024-03-29
12
+
13
+ - 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 jerome.chiavassa-szenberg@campus-condorcet.fr. 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/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # Almapi
2
+
3
+ This gem is used to handle Alma'a API call.
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+
9
+ $ bundle add almapi
10
+
11
+ If bundler is not being used to manage dependencies, install the gem by executing:
12
+
13
+ $ gem install almapi
14
+
15
+ ## Usage
16
+
17
+ Almapi provides an Alampi module which contains the Api class.
18
+
19
+ An Api class object is created with two mandatory information: an key for Alma's API and a base URI for Alma's API.
20
+
21
+ The Api class is providing the following methods:
22
+ * delete: to handle DELETE method calls. Needs two mandatory parameters: resource and data
23
+ * get: to handle GET method calls. Needs two mandatory parameters: resource and resumption_token
24
+ * post: to handle PSOT method calls. Needs two mandatory parameters: resource and data
25
+ * put: to handle PUT method calls. Needs two mandatory parameters: resource and data
26
+
27
+ Here is a description of each parameter mentionned above:
28
+ * resource: it is the part that completes the base uri to create a complete Alma's API call, with the various ids and necessary parameters but without the apikey parameter that will be added automatically.
29
+ * data: the XML data needed by the called resource and method.
30
+ * resumption_token: is parameter is not mandatory and is used only for analytics calls.
31
+
32
+ ## Documentation
33
+
34
+ Documentation is provided in `doc` folder (use `yard`).
35
+
36
+ ## Development
37
+
38
+ Put your Ruby code in the file `lib/almapi`. To experiment with that code, run `bin/console` for an interactive prompt.
39
+
40
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests (see below). You can also run `bin/console` for an interactive prompt that will allow you to experiment.
41
+
42
+ 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).
43
+
44
+ ### Testing
45
+
46
+ Tested using `rspec`.
47
+
48
+ In spec directory, define a `almapi_spec_init.rb` with two string constants : APIKEY and URIBASE, giving an api key value and a uri base value.
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jszenb/almapi. 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/jszenb/almapi/blob/master/CODE_OF_CONDUCT.md).
53
+
54
+ ## License
55
+
56
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
57
+
58
+ ## Code of Conduct
59
+
60
+ Everyone interacting in the Almapi project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jszenb/almapi/blob/master/CODE_OF_CONDUCT.md).
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "almapi"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Almapi
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
data/lib/almapi.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "./almapi/version"
4
- require_relative './almapi/almapi_error'
5
- require_relative './almapi/almapi'
3
+ require "almapi/version"
4
+ require "almapi/almapi_error"
5
+ require "almapi/almapi"
6
6
 
7
7
  # Module Almapi handles Alma's API call and errors
8
8
  # @author jszenb
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: almapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - jszenb
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2024-04-04 00:00:00.000000000 Z
12
12
  dependencies:
@@ -115,6 +115,11 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - CHANGELOG.md
119
+ - CODE_OF_CONDUCT.md
120
+ - README.md
121
+ - bin/console
122
+ - bin/setup
118
123
  - lib/almapi.rb
119
124
  - lib/almapi/almapi.rb
120
125
  - lib/almapi/almapi_error.rb