bobot 2.6.2 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -1,5 +1,5 @@
1
- bobot_config_path = Rails.root.join("config", "bobot.yml")
2
- bobot_config = YAML.safe_load(ERB.new(File.read(bobot_config_path)).result, [], [], true)[Rails.env]
1
+ bobot_config_path = Rails.root.join("config", "secrets.yml")
2
+ bobot_config = YAML.safe_load(ERB.new(File.read(bobot_config_path)).result, [], [], true)[Rails.env]["bobot"]
3
3
 
4
4
  if bobot_config.present?
5
5
  unless bobot_config.key?("pages")
@@ -10,14 +10,14 @@ if bobot_config.present?
10
10
  config.app_secret = bobot_config["app_secret"],
11
11
  config.verify_token = bobot_config["verify_token"],
12
12
  config.domains = bobot_config["domains"],
13
- config.debug_log = bobot_config["debug_log"],
14
13
  config.async = bobot_config["async"],
15
14
  bobot_config["pages"].each do |page|
16
- config.pages << Bobot::Configuration::Page.new(
17
- name: page["name"],
18
- language: page["language"],
19
- page_access_token: page["page_access_token"],
20
- page_id: page["page_id"],
15
+ config.pages << Bobot::Page.new(
16
+ slug: page["slug"],
17
+ language: page["language"],
18
+ page_id: page["page_id"],
19
+ page_access_token: page["page_access_token"],
20
+ get_started_payload: page["get_started_payload"],
21
21
  )
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bobot
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Navid EMAD
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-23 00:00:00.000000000 Z
11
+ date: 2017-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -83,13 +83,13 @@ files:
83
83
  - lib/bobot/events/referral.rb
84
84
  - lib/bobot/exceptions.rb
85
85
  - lib/bobot/graph_facebook.rb
86
+ - lib/bobot/page.rb
86
87
  - lib/bobot/profile.rb
87
88
  - lib/bobot/subscription.rb
88
89
  - lib/bobot/user.rb
89
90
  - lib/bobot/version.rb
90
91
  - lib/generators/bobot/install_generator.rb
91
92
  - lib/generators/bobot/templates/app/bobot/workflow.rb
92
- - lib/generators/bobot/templates/config/bobot.yml
93
93
  - lib/generators/bobot/templates/config/initializers/bobot.rb
94
94
  - lib/generators/bobot/templates/config/locales/bobot.en.yml
95
95
  - lib/generators/bobot/templates/config/locales/bobot.fr.yml
@@ -108,6 +108,7 @@ files:
108
108
  - spec/bobot/event/referral_spec.rb
109
109
  - spec/bobot/event_spec.rb
110
110
  - spec/bobot/install_generator_spec.rb
111
+ - spec/bobot/page_spec.rb
111
112
  - spec/bobot/profile_spec.rb
112
113
  - spec/bobot/subscription_spec.rb
113
114
  - spec/bobot/user_spec.rb
@@ -151,8 +152,8 @@ files:
151
152
  - spec/dummy/config/spring.rb
152
153
  - spec/dummy/log/development.log
153
154
  - spec/dummy/log/test.log
155
+ - spec/dummy/public/favicon.ico
154
156
  - spec/dummy/tmp/generator/app/bobot/workflow.rb
155
- - spec/dummy/tmp/generator/config/bobot.yml
156
157
  - spec/dummy/tmp/generator/config/initializers/bobot.rb
157
158
  - spec/dummy/tmp/generator/config/locales/bobot.en.yml
158
159
  - spec/dummy/tmp/generator/config/locales/bobot.fr.yml
@@ -163,7 +164,6 @@ files:
163
164
  - spec/lint/rubocop_spec.rb
164
165
  - spec/rails_helper.rb
165
166
  - spec/spec_helper.rb
166
- - spec/travis/database.travis.mysql.yml
167
167
  homepage: https://github.com/navidemad/bobot
168
168
  licenses:
169
169
  - MIT
@@ -202,6 +202,7 @@ test_files:
202
202
  - spec/bobot/event/referral_spec.rb
203
203
  - spec/bobot/event_spec.rb
204
204
  - spec/bobot/install_generator_spec.rb
205
+ - spec/bobot/page_spec.rb
205
206
  - spec/bobot/profile_spec.rb
206
207
  - spec/bobot/subscription_spec.rb
207
208
  - spec/bobot/user_spec.rb
@@ -244,9 +245,9 @@ test_files:
244
245
  - spec/dummy/config.ru
245
246
  - spec/dummy/log/development.log
246
247
  - spec/dummy/log/test.log
248
+ - spec/dummy/public/favicon.ico
247
249
  - spec/dummy/Rakefile
248
250
  - spec/dummy/tmp/generator/app/bobot/workflow.rb
249
- - spec/dummy/tmp/generator/config/bobot.yml
250
251
  - spec/dummy/tmp/generator/config/initializers/bobot.rb
251
252
  - spec/dummy/tmp/generator/config/locales/bobot.en.yml
252
253
  - spec/dummy/tmp/generator/config/locales/bobot.fr.yml
@@ -257,4 +258,3 @@ test_files:
257
258
  - spec/lint/rubocop_spec.rb
258
259
  - spec/rails_helper.rb
259
260
  - spec/spec_helper.rb
260
- - spec/travis/database.travis.mysql.yml
@@ -1,52 +0,0 @@
1
- development:
2
- app_id: "123"
3
- app_secret: "456"
4
- verify_token: "your token"
5
- domains: "whitelisted-domain.com,second-whitelisted-domain.com"
6
- debug_log: true
7
- async: false
8
- pages:
9
- - slug: "facebook_1"
10
- language: "fr"
11
- page_id: "789"
12
- page_access_token: "abc"
13
- get_started_payload: "get_started"
14
-
15
- test:
16
- app_id: "123"
17
- app_secret: "456"
18
- verify_token: "your token"
19
- domains: "whitelisted-domain.com,second-whitelisted-domain.com"
20
- debug_log: true
21
- async: false
22
- pages:
23
- - slug: "facebook_1"
24
- page_id: "789"
25
- page_access_token: "abc"
26
- get_started_payload: "get_started"
27
-
28
- staging:
29
- app_id: <%= ENV["STAGING_BOBOT_APP_ID"] %>
30
- app_secret: <%= ENV["STAGING_BOBOT_APP_SECRET"] %>
31
- verify_token: <%= ENV["STAGING_BOBOT_VERIFY_TOKEN"] %>
32
- domains: <%= ENV["STAGING_BOBOT_DOMAINS"] %>
33
- debug_log: <%= ENV["STAGING_BOBOT_DEBUG_LOG"] %>
34
- async: <%= ENV["STAGING_BOBOT_ASYNC"] %>
35
- pages:
36
- - slug: <%= ENV["STAGING_BOBOT_PAGE_SLUG"] %>
37
- page_id: <%= ENV["STAGING_BOBOT_PAGE_ID"] %>
38
- page_access_token: <%= ENV["STAGING_BOBOT_PAGE_ACCESS_TOKEN"] %>
39
- get_started_payload: <%= ENV["STAGING_BOBOT_GET_STARTED_PAYLOAD"] %>
40
-
41
- production:
42
- app_id: <%= ENV["PRODUCTION_BOBOT_APP_ID"] %>
43
- app_secret: <%= ENV["PRODUCTION_BOBOT_APP_SECRET"] %>
44
- verify_token: <%= ENV["PRODUCTION_BOBOT_VERIFY_TOKEN"] %>
45
- domains: <%= ENV["PRODUCTION_BOBOT_DOMAINS"] %>
46
- debug_log: <%= ENV["PRODUCTION_BOBOT_DEBUG_LOG"] %>
47
- async: <%= ENV["PRODUCTION_BOBOT_ASYNC"] %>
48
- pages:
49
- - slug: <%= ENV["PRODUCTION_BOBOT_PAGE_SLUG"] %>
50
- page_id: <%= ENV["PRODUCTION_BOBOT_PAGE_ID"] %>
51
- page_access_token: <%= ENV["PRODUCTION_BOBOT_PAGE_ACCESS_TOKEN"] %>
52
- get_started_payload: <%= ENV["PRODUCTION_BOBOT_GET_STARTED_PAYLOAD"] %>
@@ -1,52 +0,0 @@
1
- development:
2
- app_id: "123"
3
- app_secret: "456"
4
- verify_token: "your token"
5
- domains: "whitelisted-domain.com,second-whitelisted-domain.com"
6
- debug_log: true
7
- async: false
8
- pages:
9
- - slug: "facebook_1"
10
- language: "fr"
11
- page_id: "789"
12
- page_access_token: "abc"
13
- get_started_payload: "get_started"
14
-
15
- test:
16
- app_id: "123"
17
- app_secret: "456"
18
- verify_token: "your token"
19
- domains: "whitelisted-domain.com,second-whitelisted-domain.com"
20
- debug_log: true
21
- async: false
22
- pages:
23
- - slug: "facebook_1"
24
- page_id: "789"
25
- page_access_token: "abc"
26
- get_started_payload: "get_started"
27
-
28
- staging:
29
- app_id: <%= ENV["STAGING_BOBOT_APP_ID"] %>
30
- app_secret: <%= ENV["STAGING_BOBOT_APP_SECRET"] %>
31
- verify_token: <%= ENV["STAGING_BOBOT_VERIFY_TOKEN"] %>
32
- domains: <%= ENV["STAGING_BOBOT_DOMAINS"] %>
33
- debug_log: <%= ENV["STAGING_BOBOT_DEBUG_LOG"] %>
34
- async: <%= ENV["STAGING_BOBOT_ASYNC"] %>
35
- pages:
36
- - slug: <%= ENV["STAGING_BOBOT_PAGE_SLUG"] %>
37
- page_id: <%= ENV["STAGING_BOBOT_PAGE_ID"] %>
38
- page_access_token: <%= ENV["STAGING_BOBOT_PAGE_ACCESS_TOKEN"] %>
39
- get_started_payload: <%= ENV["STAGING_BOBOT_GET_STARTED_PAYLOAD"] %>
40
-
41
- production:
42
- app_id: <%= ENV["PRODUCTION_BOBOT_APP_ID"] %>
43
- app_secret: <%= ENV["PRODUCTION_BOBOT_APP_SECRET"] %>
44
- verify_token: <%= ENV["PRODUCTION_BOBOT_VERIFY_TOKEN"] %>
45
- domains: <%= ENV["PRODUCTION_BOBOT_DOMAINS"] %>
46
- debug_log: <%= ENV["PRODUCTION_BOBOT_DEBUG_LOG"] %>
47
- async: <%= ENV["PRODUCTION_BOBOT_ASYNC"] %>
48
- pages:
49
- - slug: <%= ENV["PRODUCTION_BOBOT_PAGE_SLUG"] %>
50
- page_id: <%= ENV["PRODUCTION_BOBOT_PAGE_ID"] %>
51
- page_access_token: <%= ENV["PRODUCTION_BOBOT_PAGE_ACCESS_TOKEN"] %>
52
- get_started_payload: <%= ENV["PRODUCTION_BOBOT_GET_STARTED_PAYLOAD"] %>
@@ -1,19 +0,0 @@
1
- default: &default
2
- adapter: mysql2
3
- encoding: utf8mb4
4
- collation: utf8mb4_bin
5
- pool: 5
6
- username: travis
7
- password:
8
-
9
- development:
10
- <<: *default
11
- database: bobot_development
12
-
13
- test:
14
- <<: *default
15
- database: bobot_test
16
-
17
- production:
18
- <<: *default
19
- database: bobot_production