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 +4 -4
- data/README.md +6 -9
- data/lib/sendowl/resources/license.rb +1 -3
- data/lib/sendowl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33ce48136fe0967dfeb8c42e9d076ecc8fff671c1ee6d66e89239756f8c03558
|
4
|
+
data.tar.gz: 3bcb7e4d509611ba9c542886f056d2aad2affb79c427f1e947afa691b80780f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
data/lib/sendowl/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|