sendowl 0.0.1 → 0.0.2

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: 8d8116e7166cf1ba6cc5d3dafbce5859f5e08626fff048a39f49c8ec405aa7e4
4
- data.tar.gz: 066e82ebec298ab61d3ce6a11fdb8af91ce0e5c7fa3c66353d99c576e10c530e
3
+ metadata.gz: 33ce48136fe0967dfeb8c42e9d076ecc8fff671c1ee6d66e89239756f8c03558
4
+ data.tar.gz: 3bcb7e4d509611ba9c542886f056d2aad2affb79c427f1e947afa691b80780f6
5
5
  SHA512:
6
- metadata.gz: 64f3cd0c9664f7d221fbb729ae55930e66898a3ed7906f980e67dad6a2d2ce5f6c14c3468f56945ed11a55d108d0127ee842b34e918d7674147bc646e6669b02
7
- data.tar.gz: 0c3423fc0f055fd7de977f540f0eb08296b4a5de260ef882c273dd49e9f050ffaccd17d3121fb66f494a559fcae5de8b74fd277be97601ffe0fc221ad132f6c3
6
+ metadata.gz: 853b6f242598165fd526cb3287da8d6da80bb9c74390c59472cec10b1b9036b6dc56b7da09312060118026ab696f1d4fde64a8a0d94bc52de71f47714b0eca41
7
+ data.tar.gz: 3e5e0764943ac8a63b20e46c5766978da08d3e9af878f70a12ad18394e1abcd1b612f6a84610036fc0a46be583d9efff1b71e130b5e11552777c7425e6adbacc
data/README.md CHANGED
@@ -29,8 +29,7 @@ Sendowl.api_key = "YOUR_API_KEY"
29
29
  Sendowl.api_secret = "YOUR_API_SECRET"
30
30
  ```
31
31
 
32
- or set the environment variable _SENDOWL\_API\_KEY_ (**recommended**)
33
- and _SENDOWL\_API\_SECRET_ (**recommended if needed**)
32
+ or set the environment variable _SENDOWL\_API\_KEY_ and _SENDOWL\_API\_SECRET_ (**recommended**)
34
33
 
35
34
  ## Usage
36
35
 
@@ -46,7 +45,11 @@ To validate a License Key, all you need to do is the following:
46
45
  Sendowl::License.new(product_id: 1, key: "ABCD-1234-EFGH-5678").valid?
47
46
  ```
48
47
 
49
- This returns `true` or `false`
48
+ This returns either an instance of Sendowl::License
49
+ ```ruby
50
+ #<Sendowl::License:0x00007ff96efe2008 @id=11111111, @order_id=22222222, @product_id=1, @key="ABCD-1234-EFGH-5678", @order_refunded=false>
51
+ ```
52
+ or simply `nil`
50
53
 
51
54
  ## Contributing
52
55
 
@@ -61,12 +64,6 @@ because I only needed one feature of it, has no open source CI configured nor
61
64
  anything that remotely guarantees its stability. So help in making it stable is
62
65
  also welcome.
63
66
 
64
- ### Development
65
-
66
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
67
-
68
- 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
69
-
70
67
  ### Bugs and Issues
71
68
 
72
69
  Bug reports and pull requests are welcome on GitHub at https://github.com/tdtadeu/sendowl. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -11,14 +11,12 @@ module Sendowl
11
11
  end
12
12
 
13
13
  def valid?
14
- license = Sendowl::Request.new(
14
+ Sendowl::Request.new(
15
15
  check_valid_path,
16
16
  "GET",
17
17
  self.class,
18
18
  { query: { key: key } }
19
19
  ).call.first
20
-
21
- !(license.nil? || license.order_id.nil? || license.order_refunded)
22
20
  end
23
21
 
24
22
  class << self
@@ -1,3 +1,3 @@
1
1
  module Sendowl
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendowl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Dias
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-06 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler