paggi 0.1.0 → 0.1.1

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: 3040c05c193b4100f974efac33a9eb66357fae76
4
- data.tar.gz: 9656bb3aa89c0bb4a063e974c3de42b5983c8e82
3
+ metadata.gz: 18d6a5181a514f7e0faab310abec995a7529202f
4
+ data.tar.gz: 2db1523d2a0a5d301a6e6a71f572fe485c83b93a
5
5
  SHA512:
6
- metadata.gz: 982a957150e8a65d6721eecc0fc47baebc1072939f54d6ec2cbc2cc34eb70fac2ac0f77e6ec7f7ec8751daf62d1bf53683103a7c9a639d1c70b42f76b2609a3a
7
- data.tar.gz: c84388d82a44af76fcb39b76b54b1f7e1563d3e668830eb5def3f861b4f03ef3bfd9fd3a6c73434824bcdb73ce6f173c401e8c028d28f6c27ab32da71aabc1b9
6
+ metadata.gz: 97f1f67790d3605317af9f39026f5aa9801397b85bd48daf40dcf43ae97fca7a86ffb3e2affbc18fc0c87d4ebffacd37e91a45f88db3cabaf3fbea0229eafd24
7
+ data.tar.gz: 40923291cdbb50bf61427a164e0d51997c1b309253cd4676d0612488925b32fc70362628eeeb3f71d7d9711f859666fc7a973988a180c6d04c96d1abc57ac3e1
data/README.md CHANGED
@@ -43,27 +43,27 @@ It is recommended to create a YAML configuration file and a Ruby initializer fil
43
43
  # paggi.yml
44
44
  development:
45
45
  api_key: payos_test
46
- host: http://localhost:8800
47
- version: '0.3'
46
+ host: http://localhost:4000
47
+ version: 'v4'
48
48
  staging:
49
49
  api_key: B31DCE74-E768-43ED-86DA-85501612548F
50
- host: https://demo.kiik.com
51
- version: '0.3'
50
+ host: https://online.paggi.com
51
+ version: 'v4'
52
52
  production:
53
53
  api_key: B31DCE74-E768-43ED-86DA-85501612548F
54
- host: https://api.kiik.com
55
- version: '0.3'
54
+ host: https://online.paggi.com
55
+ version: 'v4'
56
56
  ```
57
57
 
58
58
  ```ruby
59
59
  # paggi.rb
60
- KIIK_ENV = ENV['KIIK_ENV'] || 'development'
61
- KIIK_CONFIG = YAML.load_file('./kiik.yml')[KIIK_ENV]
60
+ PAGGI_ENV = ENV['PAGGI_ENV'] || ENV['RAILS_ENV'] || 'development'
61
+ PAGGI_CONFIG = YAML.load_file("#{Rails.root}/config/kiik.yml")[PAGGI_ENV]
62
62
 
63
- Kiik.setup do |config|
64
- config.host = KIIK_CONFIG['host']
65
- config.api_key = KIIK_CONFIG['api_key']
66
- config.version = KIIK_CONFIG['version']
63
+ Paggi.setup do |config|
64
+ config.host = PAGGI_CONFIG['host']
65
+ config.api_key = PAGGI_CONFIG['api_key']
66
+ config.version = PAGGI_CONFIG['version']
67
67
  end
68
68
  ```
69
69
 
@@ -73,7 +73,7 @@ end
73
73
 
74
74
  ```ruby
75
75
  #Create customer
76
- customer = Kiik::Customer.create({name: "User name", email: "user@email.com"})
76
+ customer = Paggi::Customer.create({name: "User name", email: "user@email.com"})
77
77
  ```
78
78
 
79
79
  ### Production
@@ -1,5 +1,5 @@
1
1
  PAGGI_ENV = ENV['PAGGI_ENV'] || ENV['RAILS_ENV'] || 'development'
2
- PAGGI_CONFIG = YAML.load_file("#{Rails.root}/config/kiik.yml")[PAGGI_ENV]
2
+ PAGGI_CONFIG = YAML.load_file("#{Rails.root}/config/paggi.yml")[PAGGI_ENV]
3
3
 
4
4
  Paggi.setup do |config|
5
5
  config.host = PAGGI_CONFIG['host']
@@ -11,7 +11,7 @@ module Paggi
11
11
  end
12
12
 
13
13
  def url
14
- "#{Paggi.configuration.host}api/#{Paggi.configuration.version}/#{Paggi::Util.underscore(class_name)}s"
14
+ "#{Paggi.configuration.host}/api/#{Paggi.configuration.version}/#{Paggi::Util.underscore(class_name)}s"
15
15
  end
16
16
 
17
17
  def opts(headers={})
data/paggi.gemspec CHANGED
@@ -1,8 +1,9 @@
1
+ # coding: utf-8
1
2
  $:.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = 'paggi'
5
- s.version = '0.1.0'
6
+ s.version = '0.1.1'
6
7
  s.summary = 'Integrate Paggi with your Ruby app'
7
8
  s.description = 'Paggi\'s official gem that helps you to integrate with our services. See https://docs.paggi.com for details.'
8
9
  s.authors = ['Esdras Eduardo', 'Flávio Vieira']
data/test/test_helper.rb CHANGED
@@ -13,7 +13,7 @@ class Test::Unit::TestCase
13
13
  Paggi.setup do |config|
14
14
  config.api_key = '123'
15
15
  config.version = 'v4demo'
16
- config.host = 'http://online.paggi.com/'
16
+ config.host = 'http://online.paggi.com'
17
17
  end
18
18
  end
19
19
  end
data/test/test_mock.rb CHANGED
@@ -7,7 +7,7 @@ module Paggi
7
7
  headers = {
8
8
  content_type: 'application/json'
9
9
  }
10
- uri = Paggi.configuration.api_key + ":@#{host}api/#{version}/#{url}"
10
+ uri = Paggi.configuration.api_key + ":@#{host}/api/#{version}/#{url}"
11
11
  stub_request(method, uri)
12
12
  .with(headers: headers)
13
13
  .with(body: params)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paggi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esdras Eduardo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-24 00:00:00.000000000 Z
12
+ date: 2017-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mocha
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubyforge_project:
155
- rubygems_version: 2.6.8
155
+ rubygems_version: 2.4.5.1
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Integrate Paggi with your Ruby app