cherrypie-rails-sdk 0.2.5 → 0.2.6
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 +2 -19
- data/lib/cherrypie_rails_sdk.rb +3 -3
- data/lib/cherrypie_rails_sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dbf37c31a4ee19ebc946c565c5393b116eab396744d6161002fff824073b7ef
|
4
|
+
data.tar.gz: 70f0b037240d413617b3bdc2499329a1c7a61f4477401a99d06b738be943d55f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec05e31a58e44d9524f116fe8603c2d7919ef42ac765997885ecfbd30b49f186ddf8a737e92df4fce067fa8f286658a04d7ead87b894770770257f5b89c7eb44
|
7
|
+
data.tar.gz: 6f0d5b5d489a50a599a4862eb38c09c5c12a5d0a56dd8d266a764a3fe804d248381c9dfa841948af6273c1b5ac2e7b21c59b4a2034309123d631d03c74c0023d
|
data/README.md
CHANGED
@@ -28,23 +28,11 @@ require_relative "boot"
|
|
28
28
|
require "rails/all"
|
29
29
|
require 'cherrypie_rails_sdk'
|
30
30
|
|
31
|
-
# Require the gems listed in Gemfile, including any gems
|
32
|
-
# you've limited to :test, :development, or :production.
|
33
31
|
Bundler.require(*Rails.groups)
|
34
32
|
|
35
|
-
module
|
33
|
+
module ExampleApp
|
36
34
|
class Application < Rails::Application
|
37
|
-
|
38
|
-
config.load_defaults 6.1
|
39
|
-
|
40
|
-
# Configuration for the application, engines, and railties goes here.
|
41
|
-
#
|
42
|
-
# These settings can be overridden in specific environments using the files
|
43
|
-
# in config/environments, which are processed later.
|
44
|
-
#
|
45
|
-
# config.time_zone = "Central Time (US & Canada)"
|
46
|
-
# config.eager_load_paths << Rails.root.join("extras")
|
47
|
-
|
35
|
+
...
|
48
36
|
config.middleware.use(CherrypieRailsSdk::Middleware, "<TOKEN>",
|
49
37
|
lambda{ |request| {
|
50
38
|
# request: ActionDispatch::Request
|
@@ -55,11 +43,6 @@ module HelloApp
|
|
55
43
|
end
|
56
44
|
```
|
57
45
|
|
58
|
-
## Development
|
59
|
-
|
60
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
61
|
-
|
62
|
-
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
63
46
|
|
64
47
|
## Contributing
|
65
48
|
|
data/lib/cherrypie_rails_sdk.rb
CHANGED
@@ -77,9 +77,9 @@ module CherrypieRailsSdk
|
|
77
77
|
)
|
78
78
|
request.body = payload
|
79
79
|
# Only log non-300 statuses.
|
80
|
-
if !(
|
81
|
-
|
82
|
-
|
80
|
+
if !(@status >= 300 && @status <= 399)
|
81
|
+
cherrypie_response = http.request(request)
|
82
|
+
end
|
83
83
|
[@status, @headers, @response]
|
84
84
|
end
|
85
85
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cherrypie-rails-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Macro Computer Club
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: CherryPie Rails SDK
|
14
14
|
email:
|