household_people_and_contributions 0.0.8 → 0.0.9

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
  SHA1:
3
- metadata.gz: 7b9671c3c6bcb0fd94db54cd9b0867332bc9239a
4
- data.tar.gz: 351a66975be40f3dcdaa3c6155c72811f0832372
3
+ metadata.gz: 4b827cc54689810b5016338fd25f5d48abe3e72b
4
+ data.tar.gz: 13d21caec856b17af5a37a3b85d802f41322a871
5
5
  SHA512:
6
- metadata.gz: 9644bc684cffa9c9fac35867d1a3b148ae2e68977ac267c52bc9bf15b657fcce896c5c1219c4e07f3ce1ea9be7f7fa00ee467ab08d8cbc25e38534bb357a87d2
7
- data.tar.gz: 8c9896258beda5ee96f11012d529dabeb35ab0df277f1027e5228de375c6aae569248cddf7e8a7b54949b1bd0697f4c3305ab94cb8ad7d1b67e5fe13957bbc4d
6
+ metadata.gz: 795f3fcd411b2cf4c45743af89282769051480bf2a6cae0237fd5314a33fea66d214839d2c7249e1f94418f379aed7c63ca0e2192f45dcbb270dc2e0437bc35a
7
+ data.tar.gz: 4d0203baae91638059fb444a37a06583cc19962860735d99a8eb1a40a538af73e7b95fa7d22ce83ed1d203b5c9809149fabb6ff3a16b1db55a43812f86bd75d7
@@ -24,8 +24,10 @@ module HouseholdPeopleAndContributions
24
24
  CONFIG_DIR = "./config"
25
25
  fail help("missing config_dir: #{CONFIG_DIR.inspect}") unless File.exists?(CONFIG_DIR)
26
26
  KEY_FILE = ENV['KEY_FILE']
27
- fail help("missing KEY_FILE: #{KEY_FILE.inspect}") unless KEY_FILE && File.exists?(KEY_FILE)
28
- require_relative(KEY_FILE)
27
+ #fail help("missing KEY_FILE: #{KEY_FILE.inspect}") unless KEY_FILE && File.exists?(KEY_FILE)
28
+ if KEY_FILE && File.exists?(KEY_FILE)
29
+ require_relative(KEY_FILE)
30
+ end
29
31
 
30
32
  OUTPUT_DIR = "./output"
31
33
  fail help("missing output_dir: #{OUTPUT_DIR.inspect}") unless File.exists?(OUTPUT_DIR)
@@ -50,7 +52,7 @@ module HouseholdPeopleAndContributions
50
52
  def key
51
53
  unless @key
52
54
  @key =
53
- F1Keys::CONSUMER_KEY
55
+ ENV['CONSUMER_KEY'] || F1Keys::CONSUMER_KEY
54
56
  end
55
57
  @key
56
58
  end
@@ -58,7 +60,7 @@ module HouseholdPeopleAndContributions
58
60
  def secret
59
61
  unless @secret
60
62
  @secret =
61
- F1Keys::CONSUMER_SECRET
63
+ ENV['CONSUMER_SECRET'] || F1Keys::CONSUMER_SECRET
62
64
  end
63
65
  @secret
64
66
  end
@@ -66,7 +68,7 @@ module HouseholdPeopleAndContributions
66
68
  def consumer
67
69
  unless @consumer
68
70
  @consumer = OAuth::Consumer.new(key, secret, {
69
- site: "https://#{F1Keys::CHURCH_CODE}.#{F1Keys::ENVIRONMENT}.fellowshiponeapi.com",
71
+ site: "https://#{ENV['CHURCH_CODE'] || F1Keys::CHURCH_CODE}.#{ENV['ENVIRONMENT'] || F1Keys::ENVIRONMENT}.fellowshiponeapi.com",
70
72
  request_token_path: "/v1/Tokens/RequestToken",
71
73
  authorize_path: "/v1/PortalUser/Login",
72
74
  # access_token_path: "/v1/Tokens/AccessToken",
@@ -80,13 +82,13 @@ module HouseholdPeopleAndContributions
80
82
  end
81
83
 
82
84
  def oauth_tokens?
83
- F1Keys::OAUTH_TOKEN && F1Keys::OAUTH_SECRET
85
+ (ENV['OAUTH_TOKEN'] || F1Keys::OAUTH_TOKEN) && (ENV['OAUTH_SECRET'] || F1Keys::OAUTH_SECRET)
84
86
  end
85
87
 
86
88
  def access_token
87
89
  unless @access_token
88
90
  if oauth_tokens?
89
- @access_token = OAuth::AccessToken.new(consumer, F1Keys::OAUTH_TOKEN, F1Keys::OAUTH_SECRET)
91
+ @access_token = OAuth::AccessToken.new(consumer, ENV['OAUTH_TOKEN'] || F1Keys::OAUTH_TOKEN, ENV['OAUTH_SECRET'] || F1Keys::OAUTH_SECRET)
90
92
  end
91
93
  unless @access_token
92
94
  if File.exists?(MARSHALED_ACCESS_TOKEN_FILE)
@@ -1,3 +1,3 @@
1
1
  module HouseholdPeopleAndContributions
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: household_people_and_contributions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Tee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-15 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project: household_people_and_contributions
84
- rubygems_version: 2.4.8
84
+ rubygems_version: 2.6.10
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Extract GSP Data from Fellowshipone