Class: Fcmpush::Configuration
- Inherits:
-
Object
- Object
- Fcmpush::Configuration
- Defined in:
- lib/fcmpush/configuration.rb
Instance Attribute Summary collapse
-
#json_key_io ⇒ Object
Returns the value of attribute json_key_io.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#server_key ⇒ Object
Returns the value of attribute server_key.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fcmpush/configuration.rb', line 5 def initialize @scope = ['https://www.googleapis.com/auth/firebase.messaging'] # set file path @json_key_io = nil # Or Environment Variable # ENV['GOOGLE_ACCOUNT_TYPE'] = 'service_account' # ENV['GOOGLE_CLIENT_ID'] = '000000000000000000000' # ENV['GOOGLE_CLIENT_EMAIL'] = '[email protected]' # ENV['GOOGLE_PRIVATE_KEY'] = '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n' # regacy auth @server_key = ENV['FCM_SERVER_KEY'] # THIS IS EXPERIMENTAL # NOT support `HTTPS_PROXY` environment variable. This feature not tested well on CI. # cf. https://github.com/miyataka/fcmpush/pull/39#issuecomment-1722533622 # proxy @proxy = :ENV end |
Instance Attribute Details
#json_key_io ⇒ Object
Returns the value of attribute json_key_io.
3 4 5 |
# File 'lib/fcmpush/configuration.rb', line 3 def json_key_io @json_key_io end |
#proxy ⇒ Object
Returns the value of attribute proxy.
3 4 5 |
# File 'lib/fcmpush/configuration.rb', line 3 def proxy @proxy end |
#scope ⇒ Object
Returns the value of attribute scope.
3 4 5 |
# File 'lib/fcmpush/configuration.rb', line 3 def scope @scope end |
#server_key ⇒ Object
Returns the value of attribute server_key.
3 4 5 |
# File 'lib/fcmpush/configuration.rb', line 3 def server_key @server_key end |