digto 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/digto.rb +8 -3
  3. metadata +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b767b8a136518d84683bc35c4a26ff96bf3d1df5e71acce3d573a74c43ef3983
4
- data.tar.gz: 6a93aec3fc8ee262be3e3ddbc6a4c4c50e13fb1ed0d9a68653e3ea59ecf8e445
3
+ metadata.gz: a589b0fb2a777d64e3ba32921da7c3467b2ed44789a8d09d03a9477f7fceb41a
4
+ data.tar.gz: 0d5d567ce151434f7a1e855e2939f7288bb256e12b083b3b9784a24f01193117
5
5
  SHA512:
6
- metadata.gz: d4f562282c42d87a7120cf911660a4dc31e69bc77d651c513592752943a3f241976ee40ceac7d5cf1b793f9f5aec8cf340880276f4f2a513d951c3da9d390362
7
- data.tar.gz: 914cf6752c57944ee6ca85f1a90ec7792301133292806f6105ad8a58784287afb656cc1b7d672d11bd9f1ebf4429917b24a631519f079e54982193c245ed5c78
6
+ metadata.gz: b912b25821ac1f7bfef5d51418938b6ec3d581442d5080b4322f6e92ee5077e742cacad2574cf0c2185fe30f90a0fdf01a54500a3b07dab8425765e4863411b4
7
+ data.tar.gz: 2e3fab8a7b16e4ebbab28f7050aa135b516f1157dff3205dd308da6f6a3a1d43cedae1c4ebb38d5c253f14cc69ea3609662bcecd3872472123c9d3d624619d6b
@@ -6,15 +6,20 @@ require 'http'
6
6
  module Digto
7
7
  # Client
8
8
  class Client
9
- attr_accessor :api_url, :subdomain
9
+ attr_accessor :api_host, :scheme, :subdomain
10
10
 
11
11
  def initialize(subdomain)
12
- @api_url = 'https://digto.org'
12
+ @scheme = 'https'
13
+ @api_host = 'digto.org'
13
14
  @subdomain = subdomain
14
15
  end
15
16
 
17
+ def public_url
18
+ "#{@scheme}://#{@subdomain}.#{@api_host}"
19
+ end
20
+
16
21
  def next
17
- url = "#{@api_url}/#{@subdomain}"
22
+ url = "#{@scheme}://#{@api_host}/#{@subdomain}"
18
23
 
19
24
  res = HTTP.get(url)
20
25
  Digto.check_res_err(res)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yad Smood
@@ -64,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubyforge_project:
68
- rubygems_version: 2.7.9
67
+ rubygems_version: 3.0.6
69
68
  signing_key:
70
69
  specification_version: 4
71
70
  summary: Ruby implementaion for digto