cherrypie-rails-sdk 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 852bae24086202eb021ffdcf15fcfc710eb2d045f27086fd4d4628c3aea409e0
4
- data.tar.gz: 52bf68d9350f8b42518f3020e2e3105c15e64e1cf5007bd25856930c8376ca35
3
+ metadata.gz: c8d85bc66fbe22cda53c392c416a6432e1c1f6a6853ac09cfb5f2e829b1d11f2
4
+ data.tar.gz: bdecc49fdd467bcdd2fea007d129a435965ea67f6e5b87d72c55e23184389fe8
5
5
  SHA512:
6
- metadata.gz: c2f3815c568f17d1a64910e4ab58c612c146c16b9b7cb416ee74644ca872628f7477107100238beee4cde04b793b5182e1f3db679f3e6e429fd8739be63a9088
7
- data.tar.gz: b6d830eabcf6536bb75ff2b158d71720b4dd91d9f8215ec7cccf9444179731e661c487855b9a28a048525c3c95970d457ef989415d5c67c8f7cfc51c83eba155
6
+ metadata.gz: 8bdfbe7370dbe5a1722275ef7b6e983ff0092aa7c20bf5653f2a78ee3b9b952bc9eed6447dccbcbfe294c00a2d89e5ee83cda525228c48c8554833d9f1e35cd5
7
+ data.tar.gz: ce87042d09062ea3b02f64ff09858e63f9c793240efacf3352bdf16aacb8c1b5ce5d16b439d50a8cfd088dc46b4d0c173f126c3e1a2807f0afe705a6bd93a487
data/README.md CHANGED
@@ -22,7 +22,40 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ```
26
+ # config/application.rb
27
+
28
+ require_relative "boot"
29
+
30
+ require "rails/all"
31
+ require 'cherrypie_rails_sdk'
32
+
33
+ # Require the gems listed in Gemfile, including any gems
34
+ # you've limited to :test, :development, or :production.
35
+ Bundler.require(*Rails.groups)
36
+
37
+ module HelloApp
38
+ class Application < Rails::Application
39
+ # Initialize configuration defaults for originally generated Rails version.
40
+ config.load_defaults 6.1
41
+
42
+ # Configuration for the application, engines, and railties goes here.
43
+ #
44
+ # These settings can be overridden in specific environments using the files
45
+ # in config/environments, which are processed later.
46
+ #
47
+ # config.time_zone = "Central Time (US & Canada)"
48
+ # config.eager_load_paths << Rails.root.join("extras")
49
+
50
+ config.middleware.use(CherrypieRailsSdk::Middleware, "<TOKEN>",
51
+ lambda{ |request| {
52
+ # request: ActionDispatch::Request
53
+ "entityKey"=> "1", "name"=> "RAILS"
54
+ } },
55
+ )
56
+ end
57
+ end
58
+ ```
26
59
 
27
60
  ## Development
28
61
 
@@ -5,7 +5,7 @@ require_relative "cherrypie_rails_sdk/version"
5
5
  module CherrypieRailsSdk
6
6
  class Error < StandardError; end
7
7
  class Middleware
8
- def initialize(app, api_key, api_url = "https://api.cherrypie.app", identity_function)
8
+ def initialize(app, api_key, identity_function, api_url: "http://api.cherrypie.app")
9
9
  @app = app
10
10
  @api_key = api_key
11
11
  @api_url = api_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CherrypieRailsSdk
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cherrypie-rails-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Macro Computer Club