moesif_api 1.2.6 → 1.2.7

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: 790a76c65b201a0778f2e71c6f55af5d43557be861fae237fcc8a3416b8d2e39
4
- data.tar.gz: d9150f671c23586c9bd8647c8c3c5893cc96826effd13abe40a583255c4c7d8f
3
+ metadata.gz: dd053a76f24b1942d4a54c814eff50de4c76c6aa92e532e07b22858b3fa7c1e7
4
+ data.tar.gz: 41c4d4cc8f34a8f0044fd9656ecf59a908eb8ac370920f08b5cab78d6d0d9d37
5
5
  SHA512:
6
- metadata.gz: d2e09621caf34c89118dcf63ed2d0f140e777b119e310af03cd9392a6d6860ad841000af450b3a8808b6ed1e7890842df77ddc4fe5bfa6b66c0e9987a176aba4
7
- data.tar.gz: 5d4fd39b2c50a7f76e37a179d1648085737546919d3857de24f126c0903aa9a70e399f99649f0791ff2b6a080b77c432debf183eec08ccc23f90b195619d353a
6
+ metadata.gz: 14d62471062e1348825a8bffc958778cc4bbe495fc95b889412ae5e437fe6cd17645e0f462f33a74005fdc020eab7ec75ff93fe4e3591c95a40422994988a403
7
+ data.tar.gz: cb2f9b976e7d785d7584133be56b4fcf83dc69f6834f749c21d84a44f241f39824196ade821a62b928d0f56bf0f920369fc3c5c125b7e661a8c10d174487ae1c
data/README.md CHANGED
@@ -177,8 +177,9 @@ Note: You will need to have internet access for this step.
177
177
  You can test the generated SDK and the server with automatically generated test
178
178
  cases as follows:
179
179
 
180
- 1. From terminal/cmd navigate to the root directory of the SDK.
181
- 2. Invoke: `bundle exec rake`
180
+ 1. Add your Moesif application id to 'test/controllers/controller_test_base'. You can find your Application Id from [_Moesif Dashboard_](https://www.moesif.com/) -> _Top Right Menu_ -> _Installation_
181
+ 2. From terminal/cmd navigate to the root directory of the SDK.
182
+ 3. Invoke: `bundle exec rake`
182
183
 
183
184
  [ico-built-for]: https://img.shields.io/badge/built%20for-rack-blue.svg
184
185
  [ico-version]: https://img.shields.io/gem/v/moesif_api.svg
@@ -8,7 +8,7 @@ module MoesifApi
8
8
  # Your Application Id for authentication/authorization
9
9
  @application_id = 'SET_ME'
10
10
 
11
- @version = '1.2.6'
11
+ @version = '1.2.7'
12
12
 
13
13
  # create the getters and setters
14
14
  class << self
@@ -70,7 +70,7 @@ module MoesifApi
70
70
  metadata = hash["metadata"]
71
71
 
72
72
  # Create object from extracted values
73
- UserModel.new(company_id,
73
+ CompanyModel.new(company_id,
74
74
  modified_time,
75
75
  ip_address,
76
76
  session_token,
@@ -124,6 +124,35 @@ class ApiControllerTests < ControllerTestBase
124
124
  assert_equal(@response_catcher.response.status_code, 201)
125
125
  end
126
126
 
127
+ # Add Batched Users via Ingestion API
128
+ def test_update_users_batch()
129
+ # Parameters for the API call
130
+
131
+ metadata = JSON.parse('{'\
132
+ '"email": "testrubyapi@user.com",'\
133
+ '"name": "ruby api user",'\
134
+ '"custom": "testdata"'\
135
+ '}')
136
+
137
+ user_model_A = UserModel.new()
138
+ user_model_A.modified_time = Time.now.utc.iso8601
139
+ user_model_A.user_id = "testrubyapiuser"
140
+ user_model_A.metadata = metadata
141
+
142
+ user_model_B = UserModel.new()
143
+ user_model_B.modified_time = Time.now.utc.iso8601
144
+ user_model_B.user_id = "testrubyapiuser1"
145
+ user_model_B.metadata = metadata
146
+
147
+ users = [user_model_A, user_model_B]
148
+
149
+ # Perform the API call through the SDK function
150
+ self.class.controller.update_users_batch(users)
151
+
152
+ # Test response code
153
+ assert_equal(@response_catcher.response.status_code, 201)
154
+ end
155
+
127
156
  # Get the application configuration
128
157
  def test_get_app_config()
129
158
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moesif_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moesif, Inc
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-02-20 00:00:00.000000000 Z
12
+ date: 2019-05-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit