api_models 0.1.0 → 0.2.0

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: dc2b42f380187648ed1eb18f3b2faa1ef2719e09e5e36245abb3441bfe90c215
4
- data.tar.gz: 7db4b2aa8b21342d5fee241631d579033097db73a78e635b71d2d33091756ce2
3
+ metadata.gz: d15654bae2fdd8b1d84425ceaabd11cc0a548be34c79136775480d73c83b0359
4
+ data.tar.gz: 19ecccad09c67196d4da2554bacf3f9978fe446a6a27a0c43f502ecaf0ebdf89
5
5
  SHA512:
6
- metadata.gz: 9eff6f1c11c250fc24d2799c75975d7f4eab183cf17fbb5da3b162239e14cf144b1dd27437bfcb4f4594886b593d5a8f14928f411cf1659fd0b36110c19ee4ac
7
- data.tar.gz: edc46b089835c626227297aa2147c3383ed5a22efe210507e737113cd21568c8a48c13b2eda95e527abf55686ab8ff6a7604cc6b5eaaddffec61324dd43e27a4
6
+ metadata.gz: f1f7142c73a205258042d362a331137363b201ab6b11a2b83255948620b8707767e581a2256364848dd7b86addeb66b5e937e0f43d322d02f0d4b8faae2a6480
7
+ data.tar.gz: 75f78e47b17485e02fe992488763ff5aa149343a61ec7508998d01a764f1556f0a512891763b24560f1e639d98d22fe09dcaed1ff88f8fdf5347d12ac15b4851
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiModel
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
data/lib/models/agent.rb CHANGED
@@ -15,7 +15,7 @@ class Agent
15
15
  field :app_version, type: String
16
16
  field :app_version_code, type: String
17
17
  field :app_environment, type: String, default: 'production'
18
- field :net_new_counted, type: Boolean, default: false
18
+ field :net_new_counted, type: Mongoid::Boolean, default: false
19
19
  # field :installed_version, type: String
20
20
  #
21
21
  # Relationships
data/lib/models/app.rb CHANGED
@@ -10,7 +10,7 @@ class App
10
10
  # Fields
11
11
  #
12
12
  field :name, type: String
13
- field :all_users, type: Boolean, default: false
13
+ field :all_users, type: Mongoid::Boolean, default: false
14
14
  #
15
15
  # Relationships
16
16
  #
@@ -15,7 +15,7 @@ class AppActiveBuild
15
15
  field :file_url
16
16
  field :environment
17
17
  field :platform
18
- field :enforce, type: Boolean, default: false
18
+ field :enforce, type: Mongoid::Boolean, default: false
19
19
  #
20
20
  # Relationships
21
21
  #
@@ -9,7 +9,7 @@ class AppPolicy
9
9
  #
10
10
  # Fields
11
11
  #
12
- field :active, type: Boolean, default: false
12
+ field :active, type: Mongoid::Boolean, default: false
13
13
  field :message, type: String
14
14
  #
15
15
  # Relationships
@@ -7,27 +7,27 @@ class AppShieldPolicy < AppPolicy
7
7
  #
8
8
  # iOS fields
9
9
  #
10
- field :ios_debug, type: Boolean, default: false
11
- field :ios_jail_break, type: Boolean, default: false
12
- field :ios_hooking_frameworks, type: Boolean, default: false
13
- field :ios_repackaging, type: Boolean, default: false
14
- field :ios_user_screenshot, type: Boolean, default: false
15
- field :ios_system_screenshot, type: Boolean, default: false
16
- field :ios_run_time_library, type: Boolean, default: false
17
- field :ios_library_injection, type: Boolean, default: false
18
- field :ios_keyboard_cache_monitor, type: Boolean, default: false
19
- field :ios_block_external_screens, type: Boolean, default: false
10
+ field :ios_debug, type: Mongoid::Boolean, default: false
11
+ field :ios_jail_break, type: Mongoid::Boolean, default: false
12
+ field :ios_hooking_frameworks, type: Mongoid::Boolean, default: false
13
+ field :ios_repackaging, type: Mongoid::Boolean, default: false
14
+ field :ios_user_screenshot, type: Mongoid::Boolean, default: false
15
+ field :ios_system_screenshot, type: Mongoid::Boolean, default: false
16
+ field :ios_run_time_library, type: Mongoid::Boolean, default: false
17
+ field :ios_library_injection, type: Mongoid::Boolean, default: false
18
+ field :ios_keyboard_cache_monitor, type: Mongoid::Boolean, default: false
19
+ field :ios_block_external_screens, type: Mongoid::Boolean, default: false
20
20
  # Android fields
21
- field :android_debug, type: Boolean, default: false
22
- field :android_jail_break, type: Boolean, default: false
23
- field :android_hooking_frameworks, type: Boolean, default: false
24
- field :android_repackaging, type: Boolean, default: false
25
- field :android_user_screenshot, type: Boolean, default: false
26
- field :android_system_screenshot, type: Boolean, default: false
27
- field :android_run_time_library, type: Boolean, default: false
28
- field :android_library_injection, type: Boolean, default: false
29
- field :android_keyboard_cache_monitor, type: Boolean, default: false
30
- field :android_block_external_screens, type: Boolean, default: false
21
+ field :android_debug, type: Mongoid::Boolean, default: false
22
+ field :android_jail_break, type: Mongoid::Boolean, default: false
23
+ field :android_hooking_frameworks, type: Mongoid::Boolean, default: false
24
+ field :android_repackaging, type: Mongoid::Boolean, default: false
25
+ field :android_user_screenshot, type: Mongoid::Boolean, default: false
26
+ field :android_system_screenshot, type: Mongoid::Boolean, default: false
27
+ field :android_run_time_library, type: Mongoid::Boolean, default: false
28
+ field :android_library_injection, type: Mongoid::Boolean, default: false
29
+ field :android_keyboard_cache_monitor, type: Mongoid::Boolean, default: false
30
+ field :android_block_external_screens, type: Mongoid::Boolean, default: false
31
31
 
32
32
  def enforce_policy(_agent)
33
33
  {}
@@ -7,7 +7,7 @@ class AuthorizedUserPolicy < AppPolicy
7
7
  #
8
8
  # fields
9
9
  #
10
- field :wipe_app_data, type: Boolean, default: false
10
+ field :wipe_app_data, type: Mongoid::Boolean, default: false
11
11
 
12
12
  #
13
13
  # return the policy hash for this agent
@@ -16,14 +16,14 @@ module App47AppAnalyzable
16
16
  # Fields
17
17
  #
18
18
  field :usage_ranking, type: Integer, default: 0
19
- field :analyzable, type: Boolean, default: true
19
+ field :analyzable, type: Mongoid::Boolean, default: true
20
20
  field :agent_count, type: Integer, default: 0
21
21
  field :agent_log_level, type: String, default: 'Info'
22
- field :agent_capture_timed_events, type: Boolean, default: true
23
- field :agent_capture_generic_events, type: Boolean, default: true
24
- field :agent_capture_sessions, type: Boolean, default: true
25
- field :agent_enabled, type: Boolean, default: true
26
- field :agent_upload_on_exit, type: Boolean, default: true
22
+ field :agent_capture_timed_events, type: Mongoid::Boolean, default: true
23
+ field :agent_capture_generic_events, type: Mongoid::Boolean, default: true
24
+ field :agent_capture_sessions, type: Mongoid::Boolean, default: true
25
+ field :agent_enabled, type: Mongoid::Boolean, default: true
26
+ field :agent_upload_on_exit, type: Mongoid::Boolean, default: true
27
27
  field :agent_capture_crash_format, type: String, default: 'none'
28
28
  field :agent_delay_data_upload_interval, type: Integer, default: 1
29
29
  field :agent_configuration_update_frequency, type: Float, default: 1
@@ -16,9 +16,9 @@ module App47AppBuildable
16
16
  #
17
17
  # Fields
18
18
  #
19
- field :notify_users_on_build_activation, type: Boolean, default: true
19
+ field :notify_users_on_build_activation, type: Mongoid::Boolean, default: true
20
20
  field :max_builds, type: Integer, default: 10
21
- field :buildable, type: Boolean, default: true
21
+ field :buildable, type: Mongoid::Boolean, default: true
22
22
  field :ios_tracked_version, type: String, default: TRACKED_VERSION
23
23
  field :android_tracked_version, type: String, default: TRACKED_VERSION
24
24
  #
@@ -28,7 +28,7 @@ module App47AppConfigurable
28
28
  #
29
29
  # Fields
30
30
  #
31
- field :configurable, type: Boolean, default: true
31
+ field :configurable, type: Mongoid::Boolean, default: true
32
32
  end
33
33
  end
34
34
  end
@@ -12,7 +12,7 @@ module App47EmailSendable
12
12
  field :email_bounce_date, type: Time
13
13
  field :email_bounce_reason, type: String
14
14
  field :unconfirmed_email, type: String
15
- field :email_enabled, type: Boolean, default: true
15
+ field :email_enabled, type: Mongoid::Boolean, default: true
16
16
 
17
17
  before_validation :downcase_email
18
18
  end
@@ -13,7 +13,7 @@ class ConfigurationGroup
13
13
  # Fields
14
14
  #
15
15
  field :name, type: String
16
- field :active, type: Boolean, default: true
16
+ field :active, type: Mongoid::Boolean, default: true
17
17
  field :version, type: Integer, default: 1
18
18
  #
19
19
  # Relationships
@@ -9,7 +9,7 @@ class ConfigurationRule
9
9
  #
10
10
  # Fields
11
11
  #
12
- field :active, type: Boolean, default: false
12
+ field :active, type: Mongoid::Boolean, default: false
13
13
  field :option, type: String
14
14
  field :operator, type: String
15
15
  field :platform, type: Array, default: %w[android ios]
@@ -11,5 +11,5 @@ class ExternalApp < App
11
11
  field :windows_external_id, type: String
12
12
  field :additional_note, type: String
13
13
  field :windows_external_url, type: String
14
- field :external_auto_update, type: Boolean, default: true
14
+ field :external_auto_update, type: Mongoid::Boolean, default: true
15
15
  end
@@ -16,7 +16,7 @@ class ProductApp < App
16
16
  #
17
17
  # Fields
18
18
  #
19
- field :restart_required, type: Boolean, default: false
20
- field :accept_permissions, type: Boolean, default: false
21
- field :return_to_update, type: Boolean, default: false
19
+ field :restart_required, type: Mongoid::Boolean, default: false
20
+ field :accept_permissions, type: Mongoid::Boolean, default: false
21
+ field :return_to_update, type: Mongoid::Boolean, default: false
22
22
  end
@@ -8,6 +8,6 @@ class SsoDirectoryGroup < Group
8
8
  # Fields
9
9
  #
10
10
  field :dn, type: String
11
- field :synchronize, type: Boolean, default: false
12
- field :auto_approve_devices, type: Boolean, default: true
11
+ field :synchronize, type: Mongoid::Boolean, default: false
12
+ field :auto_approve_devices, type: Mongoid::Boolean, default: true
13
13
  end
@@ -5,8 +5,8 @@
5
5
  #
6
6
  class SsoDirectoryServer < SsoServer
7
7
  # fields
8
- field :ssl, type: Boolean, default: false
9
- field :currently_syncing, type: Boolean, default: false
8
+ field :ssl, type: Mongoid::Boolean, default: false
9
+ field :currently_syncing, type: Mongoid::Boolean, default: false
10
10
  field :server_name, type: String
11
11
  field :port, type: String, default: '389'
12
12
  field :username, type: String
@@ -10,8 +10,8 @@ class SsoServer
10
10
  #
11
11
  # fields
12
12
  #
13
- field :active, type: Boolean, default: false
14
- field :external_authentication, type: Boolean, default: false
13
+ field :active, type: Mongoid::Boolean, default: false
14
+ field :external_authentication, type: Mongoid::Boolean, default: false
15
15
  field :name, type: String
16
16
  field :default_user_invitation_message, type: String
17
17
  #
@@ -38,9 +38,9 @@ class TimeBombPolicy < AppPolicy
38
38
  field :time_window_time_zone, type: String, default: 'local'
39
39
  field :days, type: String, default: 'MTWHFSU'
40
40
  field :time_window_message, type: String, default: 'The application is trying to run outside of the allowed time'
41
- field :time_window_active, type: Boolean, default: false
42
- field :expiration_active, type: Boolean, default: false
43
- field :check_in_active, type: Boolean, default: false
41
+ field :time_window_active, type: Mongoid::Boolean, default: false
42
+ field :expiration_active, type: Mongoid::Boolean, default: false
43
+ field :check_in_active, type: Mongoid::Boolean, default: false
44
44
 
45
45
  #
46
46
  # return the policy hash for this agent
data/lib/models/user.rb CHANGED
@@ -13,9 +13,9 @@ class User
13
13
  # Fields
14
14
  #
15
15
  field :name, type: String
16
- field :active, type: Boolean, default: true
16
+ field :active, type: Mongoid::Boolean, default: true
17
17
  field :pin_code, type: String
18
- field :pin_code_locked, type: Boolean, default: false
18
+ field :pin_code_locked, type: Mongoid::Boolean, default: false
19
19
  #
20
20
  # Relationships
21
21
  #
@@ -8,7 +8,7 @@ class UserAppPermission
8
8
  include Mongoid::Timestamps
9
9
 
10
10
  # Fast access to determine if this is added by belonging to a group.
11
- field :group_app, default: false, type: Boolean
11
+ field :group_app, default: false, type: Mongoid::Boolean
12
12
 
13
13
  belongs_to :group, inverse_of: :user_app_permissions, optional: true
14
14
  belongs_to :app, inverse_of: :user_app_permissions
@@ -7,6 +7,6 @@ class WebApp < App
7
7
  include App47AppAnalyzable
8
8
  # Fields
9
9
  field :uri, type: String
10
- field :capture_usage, type: Boolean, default: true
10
+ field :capture_usage, type: Mongoid::Boolean, default: true
11
11
  field :version, type: String, default: '1.0'
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-02 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -234,6 +234,20 @@ dependencies:
234
234
  version: '0'
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: shoulda
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '4.0'
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - "~>"
247
+ - !ruby/object:Gem::Version
248
+ version: '4.0'
249
+ - !ruby/object:Gem::Dependency
250
+ name: shoulda-matchers
237
251
  requirement: !ruby/object:Gem::Requirement
238
252
  requirements:
239
253
  - - ">="
@@ -247,7 +261,21 @@ dependencies:
247
261
  - !ruby/object:Gem::Version
248
262
  version: '0'
249
263
  - !ruby/object:Gem::Dependency
250
- name: shoulda-matchers
264
+ name: shoulda-context
265
+ requirement: !ruby/object:Gem::Requirement
266
+ requirements:
267
+ - - ">="
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
270
+ type: :development
271
+ prerelease: false
272
+ version_requirements: !ruby/object:Gem::Requirement
273
+ requirements:
274
+ - - ">="
275
+ - !ruby/object:Gem::Version
276
+ version: '0'
277
+ - !ruby/object:Gem::Dependency
278
+ name: shoulda-activemodel
251
279
  requirement: !ruby/object:Gem::Requirement
252
280
  requirements:
253
281
  - - ">="
@@ -401,7 +429,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
401
429
  - !ruby/object:Gem::Version
402
430
  version: '0'
403
431
  requirements: []
404
- rubygems_version: 3.4.10
432
+ rubygems_version: 3.1.2
405
433
  signing_key:
406
434
  specification_version: 4
407
435
  summary: App47 API Model Library.