readonce 1.0.10 → 1.0.11

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: 4f2a13d3e04199da1361827ee5dab35c50332d96
4
- data.tar.gz: 482f654ba6a9d680545c56f525b8e57dd172f6ac
3
+ metadata.gz: 607078cf98fa67cee12f883eed77fd23b6fccd43
4
+ data.tar.gz: ffc1c83b5ab728f4c60b4a1fd89898325c368773
5
5
  SHA512:
6
- metadata.gz: 915dc1ae7de190f842f750a7d93eb25db3946ed946bad14b3036957642d409edb1ba973b6eb265773980b49f3367dda40a16115f2b1b94dc71af31eb9472da21
7
- data.tar.gz: c53be3375d26bd8623ba35c605e2fa3a7c2e9d68a6345357bb7801109316ffcad5bd357f6a0fddaeff42850566dd407a7921704d89d3e3e2cf57b0eda15bc9d8
6
+ metadata.gz: 53ba36487462911b774661db4e47e835ef8cd855271bcb21d2e345e037ef5fe69d9ba4d6ed8640cc76d029fac6da2324245f8e8161acc9de43a12a767b25ffb3
7
+ data.tar.gz: 32cdcbd7081ee3fbf39cc35a60e210be62af84cb75fea83fb05e69dae26a5a42418a14744a8ae2ce78e76a4c14cc9db7c355ccec655b33422dde9899e34cbc25
@@ -1,6 +1,6 @@
1
1
  module Readonce
2
2
  MAJOR_VERSION = 1
3
3
  MINOR_VERSION = 0
4
- PATCH_VERSION = 10
4
+ PATCH_VERSION = 11
5
5
  VERSION = "#{MAJOR_VERSION}.#{MINOR_VERSION}.#{PATCH_VERSION}"
6
6
  end
data/lib/readonce.rb CHANGED
@@ -27,7 +27,7 @@ class ReadOnce
27
27
  end
28
28
 
29
29
  def self.from_data(data)
30
- self.exit_if_gem_outdated!
30
+ self.class.exit_if_gem_outdated!
31
31
  response = post '/create', body: data, headers: {'Content-type' => 'text/plain'}.merge(USER_AGENT_HEADER)
32
32
  r = ReadOnce.new
33
33
  r.instance_variable_set(:@key, response.body)
@@ -39,19 +39,19 @@ class ReadOnce
39
39
  end
40
40
 
41
41
  def read?
42
- self.exit_if_gem_outdated!
42
+ self.class.exit_if_gem_outdated!
43
43
  response = self.class.get "/status/#{key}", headers: USER_AGENT_HEADER
44
44
  !JSON.parse(response.body)['accessed_at'].nil?
45
45
  end
46
46
 
47
47
  def exists?
48
- self.exit_if_gem_outdated!
48
+ self.class.exit_if_gem_outdated!
49
49
  response = self.class.get "/status/#{key}", headers: USER_AGENT_HEADER
50
50
  response.code == 200
51
51
  end
52
52
 
53
53
  def status
54
- self.exit_if_gem_outdated!
54
+ self.class.exit_if_gem_outdated!
55
55
  response = self.class.get "/status/#{key}", headers: USER_AGENT_HEADER
56
56
  JSON.parse(response.body)
57
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: readonce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robby Grossman