accredible-ruby 0.1.8 → 0.1.9

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
  SHA1:
3
- metadata.gz: 3215fa05571869674a932321e67bb279dd3b7e02
4
- data.tar.gz: 439468a8668ca4fd6796ec1eb633c2ccdbd387e2
3
+ metadata.gz: 07764fbf9847f0a6b47dc7a09903ca6b30dc8521
4
+ data.tar.gz: df088ea0c1bd238f43cba2cba57c9a4451bb27e4
5
5
  SHA512:
6
- metadata.gz: ba3d26d15bd7b28887090aa9e34655c2d0f7ec2b041fea2cc9b03793940f271640133b92f3e6237e1e21ee48f6d61f464cd453d0b4cf7467e9d6f6366a012713
7
- data.tar.gz: 8808ee31e391eb9ffcce06ff829d950fcc7b1cbda05e1c0ba3e80812a41a51d463f75529c7582823be49bab1ee88b825b86e8a289633a8d14fadf5ecd0e2a43f
6
+ metadata.gz: 028a92f60543dc78fa84be4fc6023bea90492554e622239825b8040cff6b6af884f6e4ea8c0909958061b609ff86c17749373c2ba77387125a554ec0b76abf19
7
+ data.tar.gz: a462a3fc43828da82b72f6e3226fae20a9b34c856c6bdb5323a183854b34878f47f4bad68f2c65bd1af49b7daca7d648edef2fecc49474cd201931cba8614726
data/README.md CHANGED
@@ -1 +1,61 @@
1
1
  # accredible
2
+ Install
3
+ --------
4
+ Add the following line to Gemfile:
5
+
6
+ ```ruby
7
+ gem 'accredible-ruby'
8
+ ```
9
+ and run `bundle install` from your shell.
10
+ Then add the following line to an initializer, or appropriate config file.
11
+
12
+ ```ruby
13
+ Accredible.api_key = ENV['ACCREDIBLE_API_KEY']
14
+ ```
15
+
16
+ Basic Usage
17
+ -----------
18
+ ```ruby
19
+ # creating a certificate
20
+ recipient = {name: "Jared Smith", email: "example@example.com"}
21
+ credential = {name: "#{course.title}",
22
+ cohort_name: "Example Cohort",
23
+ description: "A certificate of completion for a cool course",
24
+ issued_on: "2016-03-15",
25
+ course_link: "http://onemonth.com/courses/one-month-rails"}
26
+
27
+ # evidence and references are both optional but can be constructed like this
28
+ evidence =
29
+ [{description: "Evidence of completion",
30
+ url: "http://example.com/evidence",
31
+ category: "url"},
32
+ {description: "Evidence of completion 2",
33
+ file: "https://s3.amazonaws.com/accredible_api_evidence_items/files/12/original/open-uri20140316-15266-1m3by6h.jpeg",
34
+ category: "file"}]
35
+ references= [{description: "John worked hard",
36
+ relationship: "managed",
37
+ referee: {name: "Jane Doe",
38
+ email: "jane@example.com",
39
+ avatar: "https://placehold.it/100x100"}}
40
+ ]
41
+
42
+ Accredible::Credential.create(
43
+ recipient: recipient,
44
+ credential: credential,
45
+ evidence: evidence,
46
+ references: references)
47
+ ```
48
+
49
+ Supported Ruby versions
50
+ -----------------------
51
+ Currently only Ruby 2.0+ is supported. Contributions are welcome if you need to
52
+ support a different version.
53
+
54
+ License
55
+ -------
56
+ Accredible-Ruby is is free software, and may be redistributed under the
57
+ terms specified in the [LICENSE](/LICENSE) file.
58
+
59
+ Thanks to
60
+ ---------
61
+ [One Month](http://onemonth.com) - For allowing this gem to be extracted and open sourced.
@@ -6,7 +6,7 @@ module Accredible
6
6
  Accredible.request(uri)
7
7
  end
8
8
 
9
- def self.create(recipient:, credential:, evidence: {}, references: {})
9
+ def self.create(recipient:, credential:, evidence: [], references: [])
10
10
  params = Util.build_create_credential_params(recipient, credential, evidence, references)
11
11
  uri = Credential.api_end_point
12
12
  Accredible.request(uri, :post, params)
@@ -1,3 +1,3 @@
1
1
  module Accredible
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -21,7 +21,7 @@ module CredentialHelper
21
21
 
22
22
  def reference_details
23
23
  {description: "John worked hard",
24
- relationshi: "managed",
24
+ relationship: "managed",
25
25
  referee: {name: "Jane Doe",
26
26
  email: "jane@example.com",
27
27
  avatar: "https://placehold.it/100x100"}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accredible-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Smith
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.6.1
163
+ rubygems_version: 2.5.1
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Accredible API gem