crimson-falcon 0.2.0 → 0.2.1

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: 4f3687cfcf6757911d841c6e46de04d7271029eb88c6a2f37ca811287ddc6d88
4
- data.tar.gz: 342736c69fef8789af32fe21ea9a3ea945c24d6d166481891c8c0460e25731fa
3
+ metadata.gz: 94eaa34feffaf17afbaddfbf1002ed2edf1c0316b40503d9d7c22eb38c512bf5
4
+ data.tar.gz: e6b7e1d2c5722d0785fd6e5f1e675b731b0609c81b19beb4edd50473af79719a
5
5
  SHA512:
6
- metadata.gz: 8ea1cb88447ba4d7e3260d9c7e077be2f5cc91a7da6aca24ed5d4395af6303ff992d3af1486266422bb22ce7255b45dc74af5495063ef4bc2ef1cc20fba27ce0
7
- data.tar.gz: 67fac6ce0051bdb7000c20cf620661285cc3d66bdfb09e3aae306a7c9bc10e03eeede5d3aa889e20eca243f5389397e47cb39b341a6dce9afa9b7a1f053919c2
6
+ metadata.gz: cd001fb1e9d4e094e72d430da01f3220f1c375c574eec484724ae1627f4e54e393ba901d99af9cccb6cfaef9d53f3f9e423d295f87a154ce355594c8e18ba891
7
+ data.tar.gz: 4f6889d28b0c236ae12fb71587f8b96ec5022f8ba6200f4cc0330dc3eaaad3bd21c89cecd175f488b50758088340dea0b1a94a785a1515c11ad472fb5769e547
data/README.md CHANGED
@@ -1,14 +1,25 @@
1
1
  # Crimson Falcon - The CrowdStrike Falcon SDK for Ruby
2
2
 
3
- *Empower* your Ruby applications with the robust capabilities of the CrowdStrike Falcon platform,
4
- using the Crimson Falcon SDK. This sophisticated Ruby gem, designed to align with the CrowdStrike
5
- API Specification, facilitates smooth and efficient interaction with a wide range of API endpoints
6
- within your Falcon environment. Utilizing this SDK allows for seamless integration, operational
7
- consistency, and enhanced functionality in your cybersecurity workflows.
3
+ [![Gem Version](https://badge.fury.io/rb/crimson-falcon.svg)](https://badge.fury.io/rb/crimson-falcon)
4
+
5
+ Welcome to Crimson Falcon, the Ruby SDK for the CrowdStrike Falcon Platform. This is where the power of the CrowdStrike Falcon Platform meets the elegance and simplicity of Ruby.
6
+
7
+ "Why Ruby?" you might ask.
8
+
9
+ Well, Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. It's unique balance of simplicity, productivity, and just sheer fun, makes coding feel less like a task and more like a hobby. It's like your favorite pair of comfy shoes - familiar, comfortable, and always reliable. :wink:
10
+
11
+ That's what we aim to achieve with Crimson Falcon - a tool that brings together the robust capabilities of CrowdStrike Falcon with the friendly charm of Ruby.
12
+
13
+ Ready to bring some fun to your cybersecurity game with Ruby and Crimson Falcon? Let's jump right in!
14
+
15
+ - [Installation](#installation)
16
+ - [Getting Started](#getting-started)
17
+ - [Contribute to Crimson Falcon](#contribute-to-crimson-falcon)
18
+ - [Crimson Falcon API Docs](#crimson-falcon-api-docs)
8
19
 
9
20
  ## Installation
10
21
 
11
- ### From RubyGems (Coming Soon)
22
+ ### From RubyGems (*This is the way*)
12
23
 
13
24
  To install from RubyGems, use the following command:
14
25
 
@@ -19,7 +30,7 @@ gem install crimson-falcon
19
30
  Add this to the Gemfile:
20
31
  <!-- x-release-please-start-version -->
21
32
  ```ruby
22
- gem 'crimson-falcon', '~> 0.2.0'
33
+ gem 'crimson-falcon', '~> 0.2.1'
23
34
  ```
24
35
  <!-- x-release-please-end -->
25
36
  ### From Source to Gem: Building the Ruby Code
@@ -33,13 +44,13 @@ gem build crimson-falcon.gemspec
33
44
  Then install the gem locally:
34
45
  <!-- x-release-please-start-version -->
35
46
  ```shell
36
- gem install ./crimson-falcon-0.2.0.gem
47
+ gem install ./crimson-falcon-0.2.1.gem
37
48
  ```
38
49
  <!-- x-release-please-end -->
39
50
  Finally, add this to the Gemfile:
40
51
  <!-- x-release-please-start-version -->
41
52
  ```ruby
42
- gem 'crimson-falcon', '~> 0.2.0'
53
+ gem 'crimson-falcon', '~> 0.2.1'
43
54
  ```
44
55
  <!-- x-release-please-end -->
45
56
  ### Install from Git
@@ -96,6 +107,16 @@ end
96
107
 
97
108
  Welcome aboard the Crimson Falcon! Fly high, code with grace.
98
109
 
110
+ ## Contribute to Crimson Falcon
111
+
112
+ We are always excited to have contributions from the community! It's what makes open source truly powerful. If you are looking to help out, that's awesome and we thank you in advance.
113
+
114
+ To get started, please read our [Contributing Guide](./CONTRIBUTING.md) that explains the development process, the project structure, how to propose bugfixes and improvements, and how to build and test your changes to the project. It's a set of directions that will help establish a baseline of expectation for any contributions.
115
+
116
+ Please make sure you also follow our [Code of Conduct](./CODE_OF_CONDUCT.md). It outlines our expectations for participant behavior as well as the steps for reporting unacceptable behavior.
117
+
118
+ We appreciate your interest in our project and look forward to collaborating with you!
119
+
99
120
  ## Crimson Falcon API Docs
100
121
 
101
122
  > :recycle: ***API Docs are automatically generated from the CrowdStrike API specification.*** :recycle:
@@ -359,9 +359,17 @@ module Falcon
359
359
  # @param [String] mime MIME
360
360
  # @return [Boolean] True if the MIME is application/json
361
361
  def json_mime?(mime)
362
- (mime == "*/*") || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
362
+ mime = mime.downcase
363
+ return true if mime == '*/*'
364
+
365
+ mime_type, subtype = mime.split('/')
366
+ return false unless mime_type == 'application'
367
+
368
+ subtype_main = subtype.split(';').first
369
+ subtype_main == 'json' || subtype_main == 'jsonp'
363
370
  end
364
371
 
372
+
365
373
  # Deserialize the response to the given return type.
366
374
  #
367
375
  # @param [Response] response HTTP response
@@ -443,7 +451,7 @@ module Falcon
443
451
  # @param [String] filename the filename to be sanitized
444
452
  # @return [String] the sanitized filename
445
453
  def sanitize_filename(filename)
446
- filename.gsub(/.*[\/\\]/, "")
454
+ File.basename(filename.gsub("\\", "/")) unless filename.nil?
447
455
  end
448
456
 
449
457
  def build_request_url(path, opts = {})
@@ -33,5 +33,5 @@ CrowdStrike Swagger API Version: 2023-05-30T23:10:32Z
33
33
  =end
34
34
 
35
35
  module Falcon
36
- VERSION = '0.2.0'.freeze
36
+ VERSION = '0.2.1'.freeze
37
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crimson-falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CRWD Solution Architects
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-18 00:00:00.000000000 Z
11
+ date: 2023-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus