papago 1.0.5 → 1.0.6

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: 5feb091b95a7beb3f4fa4decd5dfeebfc0c93a121f237c7b48b6a240fde57e49
4
- data.tar.gz: 1287c7cbc52e2ae05087c6410be5743cba14de5662cc5774e941971eb78b0572
3
+ metadata.gz: 0cdfd9fd622e112fd35971989ec48fbd6630ce45d4abe3e3ca7d8c70e4a0f13b
4
+ data.tar.gz: 2a481fbab5bf21693dc592f1a29f6c41424a38d4c686ffea0bc721c076205e9e
5
5
  SHA512:
6
- metadata.gz: 5c1204d5916cd31df5def351db1c19f55e68421fd5ac2c62d4ea1fec4044bb710bfe239a3a258f7df6b1577c60a7dadfd2af6eee852ff1ac0af39410ec597b1e
7
- data.tar.gz: 12ca99c431f1a387730f29c7a3a62a4fc02ff9c3af295bf1f5c0703fab2f23247bc276df141ea91488e6571ec232a9667074adb5590bfc44c917f1556ec8cf75
6
+ metadata.gz: 4219ee217f27cc1b858730c725e8393bab023c752c7f56bca5ac953680cde0cff96e3101ee50c2c2d757e386969408301e78ea98a29d08e1681b90c61626ccdc
7
+ data.tar.gz: 6dc81c79d6a4b09f535daf9e4bbf6eb467bde7c15f088774998ba42291a93b26fa52748642df5e02f80dba8db2a694f8707adf2bf0687eb280ac216b3ffcb002
data/bin/papago CHANGED
@@ -8,8 +8,7 @@ require 'active_support/core_ext/string/filters'
8
8
  require 'mercenary'
9
9
 
10
10
  Papago.configure do |config|
11
- config.keyfrom = ENV['PAPAGO_CLIENT_ID']
12
- config.key = ENV['PAPAGO_CLIENT_SECRET']
11
+ config.api_key = ENV['PAPAGO_API_KEY']
13
12
  end
14
13
 
15
14
  Mercenary.program(:papago) do |program|
@@ -2,6 +2,10 @@ module Papago
2
2
  class Configuration
3
3
  attr_accessor :key
4
4
  attr_accessor :keyfrom
5
+
6
+ def api_key=(api_key)
7
+ @keyfrom, @key = api_key.gsub(/[\w]+/).to_a
8
+ end
5
9
  end
6
10
 
7
11
  def self.configuration
@@ -1,3 +1,3 @@
1
1
  module Papago
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papago
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - matark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-21 00:00:00.000000000 Z
11
+ date: 2019-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest