nds_api 0.1.1 → 0.1.3

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
  SHA256:
3
- metadata.gz: 3ff25f4aa5ac9c5d7a6d6fecdd328f3cc1afcbf796298ac39fd1261428da1a2b
4
- data.tar.gz: 29f356e9819fb9ffe7f76bc2eb2c92b6090580fb2e9a464e44c7cade4f5c9da6
3
+ metadata.gz: 41cbceb1b44bdc0a4a0f445485a6cfea4760a664592bfb3265b39d00ab1e4c67
4
+ data.tar.gz: f82d9ebb1f44260f0c0e138eb4a6510d39ccaf406ba928acbb06091d7601cc4e
5
5
  SHA512:
6
- metadata.gz: c911221508e892aa31f3b8888525b27432a7bf9e0a1d6dc530c011087c15da567e29e82de074b0cfd3b9540bf68b80950dda4ef3a8ce64e4ba77222e134c934a
7
- data.tar.gz: a152a13255b8e1b442f6e738d60298af0b967683bef7142700090ed0e8bcd1c3f9f755bc6e87551c7b7878e7013cbd7e3925885a6593b45dc2efe0de1599bb0a
6
+ metadata.gz: e3dc8f39e5d35398d7a950aa81f981c04a6e95ce5172757b87369e9649c031d4f95030c155b0c79689afa784524712077093a90ebcbd1cbb2f777b06c095ceaa
7
+ data.tar.gz: 0c3dd6365b0500e9aee848679c321aa9a1879cc82bafdce4c7003756cc88c2bf51fa41efedcc47a12cf394029ed71fa0bf34b802e12cf4939261c3c93bc8a14a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nds_api (0.1.1)
4
+ nds_api (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -121,9 +121,16 @@ After checking out the repo, run `bin/setup` to install dependencies. You can al
121
121
 
122
122
  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).
123
123
 
124
+ ## Publication
125
+
126
+ `bundle exec rake release`
127
+
128
+ `gem push pkg/nds_api-0.X.X.gem`
129
+
130
+
124
131
  ## Contributing
125
132
 
126
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nds_api.
133
+ Bug reports and pull requests are welcome on GitHub at https://github.com/exygy/nds_api.
127
134
 
128
135
  ## License
129
136
 
data/lib/nds_api/http.rb CHANGED
@@ -35,7 +35,8 @@ module NdsApi
35
35
  req.basic_auth api_user, api_password
36
36
  # req.use_ssl = true
37
37
  req.body = data.to_json
38
- Net::HTTP.new(url.host, url.port).request(req)
38
+ response = Net::HTTP.new(url.host, url.port).request(req)
39
+ JSON.parse(response.body)
39
40
  rescue => e
40
41
  puts "failed #{e}"
41
42
  return e
data/lib/nds_api/url.rb CHANGED
@@ -65,12 +65,10 @@ module NdsApi
65
65
  ##### PROVIDERS #####
66
66
 
67
67
  def search_providers
68
- stg_search = 'http://staging-nds-api-app.emrcsv38cq.us-east-1.elasticbeanstalk.com/providers/search/findByCriteriaObject'
69
- prod_search = 'http://www.google.com'
70
-
71
- puts @prod ? prod_search : stg_search
72
-
73
- @prod ? prod_search : stg_search
68
+ # stg_search = 'http://staging-nds-api-app.emrcsv38cq.us-east-1.elasticbeanstalk.com/providers/search/findByCriteriaObject'
69
+ # prod_search = 'http://staging-nds-api-app.emrcsv38cq.us-east-1.elasticbeanstalk.com/providers/search/findByCriteriaObject'
70
+ # @prod ? prod_search : stg_search
71
+ 'http://staging-nds-api-app.emrcsv38cq.us-east-1.elasticbeanstalk.com/providers/search/findByCriteriaObject'
74
72
  end
75
73
 
76
74
  def providers
@@ -146,8 +144,8 @@ module NdsApi
146
144
  end
147
145
 
148
146
  def base_url
149
- sub_domain = @prod ? 'uatup' : 'developer.staging'
150
- "https://#{sub_domain}.naccrraware.net/nds-api"
147
+ # sub_domain = @prod ? 'uatup' : 'developer.staging'
148
+ "https://uatup.naccrraware.net/nds-api"
151
149
  end
152
150
  end
153
151
  end
@@ -1,3 +1,3 @@
1
1
  module NdsApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/nds_api.rb CHANGED
@@ -24,7 +24,7 @@ module NdsApi
24
24
  @method = NdsApi::Method.new(method)
25
25
  @args = *args
26
26
  response = http_action(method, *args, &block)
27
- NdsApi::Utils.hash_keys_str_to_sym(JSON.parse(response.body))
27
+ NdsApi::Utils.hash_keys_str_to_sym(response)
28
28
  end
29
29
 
30
30
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nds_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Hunault