billplz 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 396dcae8959f96089fb7475ce462ba8a48d24259
4
- data.tar.gz: 430be52e924f8e7d167b4258de0967bea8ba0a01
3
+ metadata.gz: 7bc2357c211f99e8bcb0bd4918f5e45cdd75a4f9
4
+ data.tar.gz: d7b1d3a4472c00408f05b89375c075827523c4b3
5
5
  SHA512:
6
- metadata.gz: e02c0c88a730d1f9c311831e77c7706a5231b23e37c75335efab7388a3bca22fa3e6930f8bac98ffd561c5da5d66a5c281d3e24bf98698e93158c60da5ccd156
7
- data.tar.gz: db53f6c06997177a343e0722c342f59e495607ca8d687a7dadfcad719eb2d0cb167f52c1b66be19c293aa72806139147567e320dbd81710f560e5583c9add265
6
+ metadata.gz: 93d382a657af60e32b115152db55f5a4d405df0dcf1844e49b0361ba5405769590ea65801bbf687f3df8988e699687ba903cd1c8501d68e1e3d5089d2b2d2943
7
+ data.tar.gz: 805ab40c6c00412ba1b21a46aeebcfe9ac03b33a95db5511972929bb26e35dd048f4403fb315931915ff7bd8ce456168531a6e2f7524548bf10dab6940a7cf2c
data/CODE_OF_CONDUCT.md CHANGED
@@ -35,7 +35,7 @@ This code of conduct applies both within project spaces and in public spaces
35
35
  when an individual is representing the project or its community.
36
36
 
37
37
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at sy4mil@gmail.com. All
38
+ reported by contacting a project maintainer at syamilmj@tideee.com. All
39
39
  complaints will be reviewed and investigated and will result in a response that
40
40
  is deemed necessary and appropriate to the circumstances. Maintainers are
41
41
  obligated to maintain confidentiality with regard to the reporter of an
data/Gemfile CHANGED
@@ -1,4 +1,2 @@
1
1
  source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in billplz.gemspec
4
2
  gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Syamil MJ
3
+ Copyright (c) 2016 Tideee Sdn Bhd
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Billplz
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/billplz.svg)](https://badge.fury.io/rb/billplz)
3
4
  [![Circle CI](https://circleci.com/gh/syamilmj/billplz.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/syamilmj/billplz)
5
+ [![Code Climate](https://codeclimate.com/github/syamilmj/billplz/badges/gpa.svg)](https://codeclimate.com/github/syamilmj/billplz)
4
6
 
5
7
  An abstraction library to interface with the [Billplz API](https://www.billplz.com/api)
6
8
 
@@ -14,11 +16,15 @@ gem 'billplz'
14
16
 
15
17
  And then execute:
16
18
 
17
- $ bundle
19
+ ```
20
+ $ bundle
21
+ ```
18
22
 
19
23
  Or install it yourself as:
20
24
 
21
- $ gem install billplz
25
+ ```
26
+ $ gem install billplz
27
+ ```
22
28
 
23
29
  ## Usage
24
30
 
@@ -29,14 +35,14 @@ You may store your Billplz configuration during runtime:
29
35
  ```ruby
30
36
  # config/initializers/billplz.rb
31
37
  Billplz.configure do |config|
32
- config.api_key = ENV['BILLPLZ_API_KEY']
38
+ config.api_key = ENV['BILLPLZ_API_KEY']
33
39
  end
34
40
  ```
35
41
 
36
42
  All the options above can be overridden manually:
37
43
 
38
44
  ```ruby
39
- Billplz.configuration.api_key = 'your-api-key'
45
+ Billplz.configuration.api_key = 'your-api-key'
40
46
  ```
41
47
 
42
48
  Or, as a hash:
@@ -83,28 +89,26 @@ Standard Net::HTTP response will be returned by all of the above methods. Howeve
83
89
 
84
90
  1. `#success?`
85
91
 
86
- You can check for a successfull request using `success?`, example:
92
+ You can check for a successfull request using `success?`, example:
87
93
 
88
- ```
89
- bill.success?
90
- ```
94
+ ```
95
+ bill.success?
96
+ ```
91
97
 
92
98
  2. `#parsed_json`
93
99
 
94
- This is a convenient helper to parse the JSON response from the API, example:
100
+ A convenient helper to parse the JSON response from the API, example:
95
101
 
96
- ```ruby
97
- bill_id = bill.parsed_json['id']
98
- ```
102
+ ```ruby
103
+ bill_id = bill.parsed_json['id']
104
+ ```
99
105
 
100
106
  ## Development
101
107
 
102
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
108
+ Run `rake test` to run the unit tests.
103
109
 
104
110
  Running `rake test:remote` will run tests that performs actual communication with the API server. Proceed with caution.
105
111
 
106
- 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).
107
-
108
112
  ## Contributing
109
113
 
110
114
  Bug reports and pull requests are welcome on GitHub at https://github.com/syamilmj/billplz. 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.
data/Rakefile CHANGED
@@ -19,10 +19,4 @@ namespace :test do
19
19
  t.libs << 'test'
20
20
  t.verbose = true
21
21
  end
22
- end
23
-
24
- desc "Tag and release"
25
- task :tag_release do
26
- system "git tag 'v#{Billplz::VERSION}'"
27
- system "git push --tags"
28
22
  end
data/billplz.gemspec CHANGED
@@ -8,19 +8,15 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Billplz::VERSION
9
9
 
10
10
  spec.summary = 'Abstraction library to interface with the Billplz API'
11
- spec.homepage = 'http://tideee.com'
12
11
  spec.license = 'MIT'
13
-
14
12
  spec.author = 'Syamil MJ'
15
13
  spec.email = 'syamilmj@tideee.com'
16
- spec.homepage = 'http://tideee.com/'
14
+ spec.homepage = 'https://github.com/tideee/billplz'
17
15
 
18
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = "exe"
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
17
  spec.require_paths = ["lib"]
22
18
 
23
19
  spec.add_development_dependency "rake"
24
- spec.add_development_dependency "test-unit"
25
- spec.add_development_dependency "mocha"
20
+ spec.add_development_dependency "test-unit", "~> 1"
21
+ spec.add_development_dependency "mocha", "~> 3"
26
22
  end
data/bin/console CHANGED
@@ -2,13 +2,6 @@
2
2
 
3
3
  require "bundler/setup"
4
4
  require "billplz"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
5
  require "irb"
6
+
14
7
  IRB.start
data/lib/billplz/model.rb CHANGED
@@ -61,6 +61,8 @@ module Billplz
61
61
  def http
62
62
  http = Net::HTTP.new(endpoint.host, endpoint.port)
63
63
  http.use_ssl = true
64
+ http.open_timeout = Billplz.configuration.http_timeout
65
+ http.read_timeout = Billplz.configuration.http_timeout
64
66
  # http.set_debug_output($stdout)
65
67
  http
66
68
  end
@@ -1,3 +1,3 @@
1
1
  module Billplz
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billplz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syamil MJ
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-17 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: test-unit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mocha
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '3'
55
55
  description:
56
56
  email: syamilmj@tideee.com
57
57
  executables: []
@@ -74,7 +74,7 @@ files:
74
74
  - lib/billplz/configuration.rb
75
75
  - lib/billplz/model.rb
76
76
  - lib/billplz/version.rb
77
- homepage: http://tideee.com/
77
+ homepage: https://github.com/tideee/billplz
78
78
  licenses:
79
79
  - MIT
80
80
  metadata: {}