xip-facebook 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'xip/services/facebook/client'
4
+
5
+ module Xip
6
+ module Services
7
+ module Facebook
8
+
9
+ class Setup
10
+
11
+ class << self
12
+ def trigger
13
+ reply_handler = Xip::Services::Facebook::ReplyHandler.new
14
+ reply = reply_handler.messenger_profile
15
+ client = Xip::Services::Facebook::Client.new(reply: reply, endpoint: 'messenger_profile')
16
+ client.transmit
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xip
4
+ module Services
5
+ module Facebook
6
+ module Version
7
+ def self.version
8
+ File.read(File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'VERSION')).strip
9
+ end
10
+ end
11
+
12
+ VERSION = Version.version
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+
5
+ require 'xip'
6
+ require 'xip-facebook'
7
+
8
+ # Requires supporting files with custom matchers and macros, etc,
9
+ # in ./support/ and its subdirectories.
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ RSpec.configure do |config|
13
+
14
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
+
5
+ describe "Xip::Services::Facebook::Version" do
6
+
7
+ let(:version_in_file) { File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).strip }
8
+
9
+ it "should return the current gem version" do
10
+ expect(Xip::Services::Facebook::Version.version).to eq version_in_file
11
+ end
12
+
13
+ it "should return the current gem version via a constant" do
14
+ expect(Xip::Services::Facebook::VERSION).to eq version_in_file
15
+ end
16
+ end
@@ -0,0 +1,25 @@
1
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
+
3
+ version = File.read(File.join(File.dirname(__FILE__), 'VERSION')).strip
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'xip-facebook'
7
+ s.summary = 'Facebook Messenger Xip Kit component'
8
+ s.description = 'Facebook Messenger Xip Kit component.'
9
+ s.homepage = 'https://github.com/xipkit/xip-facebook'
10
+ s.licenses = ['MIT']
11
+ s.version = version
12
+ s.author = 'Mauricio Gomes'
13
+ s.email = 'mauricio@edge14.com'
14
+
15
+ s.add_dependency 'xip', '~> 2.0.0.beta'
16
+ s.add_dependency 'http', '~> 4.4'
17
+
18
+ s.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
19
+ s.add_development_dependency 'rack-test', '~> 1.1'
20
+
21
+ s.files = `git ls-files`.split("\n")
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
24
+ s.require_paths = ['lib']
25
+ end
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xip-facebook
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.22.0
5
+ platform: ruby
6
+ authors:
7
+ - Mauricio Gomes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: xip
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.0.beta
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.0.beta
27
+ - !ruby/object:Gem::Dependency
28
+ name: http
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec_junit_formatter
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack-test
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.1'
69
+ description: Facebook Messenger Xip Kit component.
70
+ email: mauricio@edge14.com
71
+ executables: []
72
+ extensions: []
73
+ extra_rdoc_files: []
74
+ files:
75
+ - Gemfile
76
+ - Gemfile.lock
77
+ - LICENSE
78
+ - README.md
79
+ - VERSION
80
+ - fb-config.png
81
+ - lib/xip-facebook.rb
82
+ - lib/xip/facebook.rb
83
+ - lib/xip/services/facebook/client.rb
84
+ - lib/xip/services/facebook/events/message_event.rb
85
+ - lib/xip/services/facebook/events/message_reads_event.rb
86
+ - lib/xip/services/facebook/events/messaging_referral_event.rb
87
+ - lib/xip/services/facebook/events/postback_event.rb
88
+ - lib/xip/services/facebook/message_handler.rb
89
+ - lib/xip/services/facebook/reply_handler.rb
90
+ - lib/xip/services/facebook/setup.rb
91
+ - lib/xip/services/facebook/version.rb
92
+ - spec/spec_helper.rb
93
+ - spec/version_spec.rb
94
+ - xip-facebook.gemspec
95
+ homepage: https://github.com/xipkit/xip-facebook
96
+ licenses:
97
+ - MIT
98
+ metadata: {}
99
+ post_install_message:
100
+ rdoc_options: []
101
+ require_paths:
102
+ - lib
103
+ required_ruby_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ requirements: []
114
+ rubygems_version: 3.1.2
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: Facebook Messenger Xip Kit component
118
+ test_files:
119
+ - spec/spec_helper.rb
120
+ - spec/version_spec.rb