chook 1.0.1.b1 → 1.0.1.b2
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 +4 -4
 - data/README.md +39 -23
 - data/lib/chook/subject/test_subject.rb +2 -2
 - data/lib/chook/version.rb +1 -1
 - metadata +9 -8
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e92976b3bdaf1f68f8b9f835d60801aaae016288
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: beef1b38609f5e0dd9e88f7426564e243a87cfe7
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 03aafa3c761df70e9ac55fb22262ef795148b0cde019c3e4ea11c9709618710bb29785de10f26c18640eb6ea2cbb894949a5474685311fe74e0412987fb5389e
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5b812b039b4298e8d662d778dd0ab9a5253f2a13ef29518c27869d169ce3228570036d9a64d85cfd9e0e5bee9d9ae96cb5a0f549d9377c02e0c30ee88ff81db6
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,6 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         | 
| 
       2 
2 
     | 
    
         
             
            # Chook
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
      
 4 
     | 
    
         
            +
            Documentation is a work in progress. Please get in touch for assistance. <3
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
       4 
6 
     | 
    
         
             
            - [Introduction](#introduction)
         
     | 
| 
       5 
7 
     | 
    
         
             
            - [The Framework](#the-framework)
         
     | 
| 
       6 
8 
     | 
    
         
             
              - [Event Handlers](#event-handlers)
         
     | 
| 
         @@ -9,7 +11,7 @@ 
     | 
|
| 
       9 
11 
     | 
    
         
             
              - [Putting It Together](#putting-it-together)
         
     | 
| 
       10 
12 
     | 
    
         
             
              - [Events and Subjects](#events-and-subjects)
         
     | 
| 
       11 
13 
     | 
    
         
             
            - [The Server](#the-server)
         
     | 
| 
       12 
     | 
    
         
            -
            - [Installing Chook 
     | 
| 
      
 14 
     | 
    
         
            +
            - [Installing Chook](#installing-chook)
         
     | 
| 
       13 
15 
     | 
    
         
             
            - [TODOs](#todos)
         
     | 
| 
       14 
16 
     | 
    
         | 
| 
       15 
17 
     | 
    
         | 
| 
         @@ -38,7 +40,8 @@ For more detail about the JSS webhooks API and the JSON data it passes, please s 
     | 
|
| 
       38 
40 
     | 
    
         
             
            [Bryson Tyrrell's documentation.](https://unofficial-jss-api-docs.atlassian.net/wiki/display/JRA/Webhooks+API)
         
     | 
| 
       39 
41 
     | 
    
         | 
| 
       40 
42 
     | 
    
         
             
            **Note:** When creating webhooks from your JSS to be handled by the framework, you must
         
     | 
| 
       41 
     | 
    
         
            -
            specify JSON in the "Content Type" section. This framework does not support XML 
     | 
| 
      
 43 
     | 
    
         
            +
            specify JSON in the "Content Type" section. This framework does not support XML and
         
     | 
| 
      
 44 
     | 
    
         
            +
            will only generate Events in JSON format.
         
     | 
| 
       42 
45 
     | 
    
         | 
| 
       43 
46 
     | 
    
         
             
            ## The Framework
         
     | 
| 
       44 
47 
     | 
    
         | 
| 
         @@ -195,27 +198,40 @@ functionality is defined. 
     | 
|
| 
       195 
198 
     | 
    
         
             
            The Subject classes aren't subclasses, but are dynamically-defined members of
         
     | 
| 
       196 
199 
     | 
    
         
             
            the `Chook::Subjects` module.
         
     | 
| 
       197 
200 
     | 
    
         | 
| 
       198 
     | 
    
         
            -
            | Event Classes | Subject Classes |
         
     | 
| 
      
 201 
     | 
    
         
            +
            | Handled Event Classes | Handled Subject Classes |
         
     | 
| 
       199 
202 
     | 
    
         
             
            | -------------- | ------------ |
         
     | 
| 
       200 
     | 
    
         
            -
            | Chook::ComputerAddedEvent | Chook:: 
     | 
| 
       201 
     | 
    
         
            -
            | Chook::ComputerCheckInEvent | Chook:: 
     | 
| 
       202 
     | 
    
         
            -
            | Chook::ComputerInventoryCompletedEvent | Chook:: 
     | 
| 
       203 
     | 
    
         
            -
            | Chook::ComputerPolicyFinishedEvent | Chook:: 
     | 
| 
       204 
     | 
    
         
            -
            | Chook::ComputerPushCapabilityChangedEvent | Chook:: 
     | 
| 
       205 
     | 
    
         
            -
            | Chook::JSSShutdownEvent | Chook:: 
     | 
| 
       206 
     | 
    
         
            -
            | Chook::JSSStartupEvent | Chook:: 
     | 
| 
       207 
     | 
    
         
            -
            | Chook::MobileDeviceCheckinEvent | Chook:: 
     | 
| 
       208 
     | 
    
         
            -
            | Chook::MobileDeviceCommandCompletedEvent | Chook:: 
     | 
| 
       209 
     | 
    
         
            -
            | Chook::MobileDeviceEnrolledEvent | Chook:: 
     | 
| 
       210 
     | 
    
         
            -
            | Chook::MobileDevicePushSentEvent | Chook:: 
     | 
| 
       211 
     | 
    
         
            -
            | Chook::MobileDeviceUnenrolledEvent | Chook:: 
     | 
| 
       212 
     | 
    
         
            -
            | Chook::PatchSoftwareTitleUpdateEvent | Chook:: 
     | 
| 
       213 
     | 
    
         
            -
            | Chook::PushSentEvent | Chook:: 
     | 
| 
       214 
     | 
    
         
            -
            | Chook::RestAPIOperationEvent | Chook:: 
     | 
| 
       215 
     | 
    
         
            -
            | Chook::SCEPChallengeEvent | Chook:: 
     | 
| 
       216 
     | 
    
         
            -
            | Chook::SmartGroupComputerMembershipChangeEvent | Chook:: 
     | 
| 
       217 
     | 
    
         
            -
            | Chook::SmartGroupMobileDeviveMembershipChangeEvent | Chook:: 
     | 
| 
       218 
     | 
    
         
            -
             
     | 
| 
      
 203 
     | 
    
         
            +
            | Chook::HandledEvents::ComputerAddedEvent | Chook::HandledSubjects::Computer |
         
     | 
| 
      
 204 
     | 
    
         
            +
            | Chook::HandledEvents::ComputerCheckInEvent | Chook::HandledSubjects::Computer |
         
     | 
| 
      
 205 
     | 
    
         
            +
            | Chook::HandledEvents::ComputerInventoryCompletedEvent | Chook::HandledSubjects::Computer |
         
     | 
| 
      
 206 
     | 
    
         
            +
            | Chook::HandledEvents::ComputerPolicyFinishedEvent | Chook::HandledSubjects::Computer |
         
     | 
| 
      
 207 
     | 
    
         
            +
            | Chook::HandledEvents::ComputerPushCapabilityChangedEvent | Chook::HandledSubjects::Computer |
         
     | 
| 
      
 208 
     | 
    
         
            +
            | Chook::HandledEvents::JSSShutdownEvent | Chook::HandledSubjects::JSS |
         
     | 
| 
      
 209 
     | 
    
         
            +
            | Chook::HandledEvents::JSSStartupEvent | Chook::HandledSubjects::JSS |
         
     | 
| 
      
 210 
     | 
    
         
            +
            | Chook::HandledEvents::MobileDeviceCheckinEvent | Chook::HandledSubjects::MobileDevice |
         
     | 
| 
      
 211 
     | 
    
         
            +
            | Chook::HandledEvents::MobileDeviceCommandCompletedEvent | Chook::HandledSubjects::MobileDevice |
         
     | 
| 
      
 212 
     | 
    
         
            +
            | Chook::HandledEvents::MobileDeviceEnrolledEvent | Chook::HandledSubjects::MobileDevice |
         
     | 
| 
      
 213 
     | 
    
         
            +
            | Chook::HandledEvents::MobileDevicePushSentEvent | Chook::HandledSubjects::MobileDevice |
         
     | 
| 
      
 214 
     | 
    
         
            +
            | Chook::HandledEvents::MobileDeviceUnenrolledEvent | Chook::HandledSubjects::MobileDevice |
         
     | 
| 
      
 215 
     | 
    
         
            +
            | Chook::HandledEvents::PatchSoftwareTitleUpdateEvent | Chook::HandledSubjects::PatchSoftwareTitleUpdate |
         
     | 
| 
      
 216 
     | 
    
         
            +
            | Chook::HandledEvents::PushSentEvent | Chook::HandledSubjects::Push |
         
     | 
| 
      
 217 
     | 
    
         
            +
            | Chook::HandledEvents::RestAPIOperationEvent | Chook::HandledSubjects::RestAPIOperation |
         
     | 
| 
      
 218 
     | 
    
         
            +
            | Chook::HandledEvents::SCEPChallengeEvent | Chook::HandledSubjects::SCEPChallenge |
         
     | 
| 
      
 219 
     | 
    
         
            +
            | Chook::HandledEvents::SmartGroupComputerMembershipChangeEvent | Chook::HandledSubjects::SmartGroup |
         
     | 
| 
      
 220 
     | 
    
         
            +
            | Chook::HandledEvent::SmartGroupMobileDeviveMembershipChangeEvent | Chook::HandledSubjects::SmartGroup |
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
            | Test Event Classes | Test Subject Classes |
         
     | 
| 
      
 223 
     | 
    
         
            +
            | -------------- | ------------ |
         
     | 
| 
      
 224 
     | 
    
         
            +
            | Chook::TestEvents::ComputerAddedEvent | Chook::TestSubjects::Computer |
         
     | 
| 
      
 225 
     | 
    
         
            +
            | Chook::TestEvents::ComputerCheckInEvent | Chook::TestSubjects::Computer |
         
     | 
| 
      
 226 
     | 
    
         
            +
            | Chook::TestEvents::ComputerInventoryCompletedEvent | Chook::TestSubjects::Computer |
         
     | 
| 
      
 227 
     | 
    
         
            +
            | Chook::TestEvents::ComputerPolicyFinishedEvent | Chook::TestSubjects::Computer |
         
     | 
| 
      
 228 
     | 
    
         
            +
            | Chook::TestEvents::ComputerPushCapabilityChangedEvent | Chook::TestSubjects::Computer |
         
     | 
| 
      
 229 
     | 
    
         
            +
            | Chook::TestEvents::MobileDeviceCheckinEvent | Chook::TestSubjects::MobileDevice |
         
     | 
| 
      
 230 
     | 
    
         
            +
            | Chook::TestEvents::MobileDeviceCommandCompletedEvent | Chook::TestSubjects::MobileDevice |
         
     | 
| 
      
 231 
     | 
    
         
            +
            | Chook::TestEvents::MobileDeviceEnrolledEvent | Chook::TestSubjects::MobileDevice |
         
     | 
| 
      
 232 
     | 
    
         
            +
            | Chook::TestEvents::MobileDevicePushSentEvent | Chook::TestSubjects::MobileDevice |
         
     | 
| 
      
 233 
     | 
    
         
            +
            | Chook::TestEvents::MobileDeviceUnenrolledEvent | Chook::TestSubjects::MobileDevice |
         
     | 
| 
      
 234 
     | 
    
         
            +
            | Chook::TestEvents::PatchSoftwareTitleUpdateEvent | Chook::TestSubjects::PatchSoftwareTitleUpdate |
         
     | 
| 
       219 
235 
     | 
    
         | 
| 
       220 
236 
     | 
    
         
             
            ## The Server
         
     | 
| 
       221 
237 
     | 
    
         | 
| 
         @@ -243,7 +259,7 @@ Then fire up `irb` and `require chook` to start playing around. 
     | 
|
| 
       243 
259 
     | 
    
         | 
| 
       244 
260 
     | 
    
         
             
            OR
         
     | 
| 
       245 
261 
     | 
    
         | 
| 
       246 
     | 
    
         
            -
            run `/usr/local/bin/chook` and point some JSS webhooks at that machine.
         
     | 
| 
      
 262 
     | 
    
         
            +
            run `/usr/local/bin/chook-server` and point some JSS webhooks at that machine.
         
     | 
| 
       247 
263 
     | 
    
         | 
| 
       248 
264 
     | 
    
         | 
| 
       249 
265 
     | 
    
         
             
            ## TODOs
         
     | 
| 
         @@ -72,8 +72,8 @@ module Chook 
     | 
|
| 
       72 
72 
     | 
    
         
             
                # a random test subject,
         
     | 
| 
       73 
73 
     | 
    
         
             
                def self.random
         
     | 
| 
       74 
74 
     | 
    
         
             
                  random_vals = {}
         
     | 
| 
       75 
     | 
    
         
            -
                  Chook::Subject.classes[].each do |attrib, deets|
         
     | 
| 
       76 
     | 
    
         
            -
                    random_vals[attrib] = Chook::Randomizers.send deets[:randomizer]
         
     | 
| 
      
 75 
     | 
    
         
            +
                  Chook::Subject.classes[self.const_get NAME_CONSTANT].each do |attrib, deets|
         
     | 
| 
      
 76 
     | 
    
         
            +
                    random_vals[attrib] = Chook::Randomizers.send deets[:randomizer] if deets[:randomizer]
         
     | 
| 
       77 
77 
     | 
    
         
             
                  end # each do |attr_def|
         
     | 
| 
       78 
78 
     | 
    
         
             
                  new random_vals
         
     | 
| 
       79 
79 
     | 
    
         
             
                end # end random
         
     | 
    
        data/lib/chook/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: chook
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.1.b2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Lasell
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2017-10- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2017-10-25 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: sinatra
         
     | 
| 
         @@ -32,7 +32,8 @@ description: |2 
     | 
|
| 
       32 
32 
     | 
    
         
             
                Chook also provides a simple, sinatra-based HTTP server, for handling those Events,
         
     | 
| 
       33 
33 
     | 
    
         
             
                and classes for sending simulated TestEvents to a webhook handling server.
         
     | 
| 
       34 
34 
     | 
    
         
             
            email: chook@pixar.com
         
     | 
| 
       35 
     | 
    
         
            -
            executables: 
     | 
| 
      
 35 
     | 
    
         
            +
            executables:
         
     | 
| 
      
 36 
     | 
    
         
            +
            - chook-server
         
     | 
| 
       36 
37 
     | 
    
         
             
            extensions: []
         
     | 
| 
       37 
38 
     | 
    
         
             
            extra_rdoc_files:
         
     | 
| 
       38 
39 
     | 
    
         
             
            - README.md
         
     | 
| 
         @@ -103,21 +104,21 @@ licenses: 
     | 
|
| 
       103 
104 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       104 
105 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       105 
106 
     | 
    
         
             
            rdoc_options:
         
     | 
| 
       106 
     | 
    
         
            -
            -  
     | 
| 
      
 107 
     | 
    
         
            +
            - --title
         
     | 
| 
       107 
108 
     | 
    
         
             
            - Chook
         
     | 
| 
       108 
     | 
    
         
            -
            -  
     | 
| 
       109 
     | 
    
         
            -
            -  
     | 
| 
      
 109 
     | 
    
         
            +
            - --line-numbers
         
     | 
| 
      
 110 
     | 
    
         
            +
            - --main
         
     | 
| 
       110 
111 
     | 
    
         
             
            - README.md
         
     | 
| 
       111 
112 
     | 
    
         
             
            require_paths:
         
     | 
| 
       112 
113 
     | 
    
         
             
            - lib
         
     | 
| 
       113 
114 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       114 
115 
     | 
    
         
             
              requirements:
         
     | 
| 
       115 
     | 
    
         
            -
              - -  
     | 
| 
      
 116 
     | 
    
         
            +
              - - '>='
         
     | 
| 
       116 
117 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       117 
118 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       118 
119 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       119 
120 
     | 
    
         
             
              requirements:
         
     | 
| 
       120 
     | 
    
         
            -
              - -  
     | 
| 
      
 121 
     | 
    
         
            +
              - - '>'
         
     | 
| 
       121 
122 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       122 
123 
     | 
    
         
             
                  version: 1.3.1
         
     | 
| 
       123 
124 
     | 
    
         
             
            requirements: []
         
     |