bibo 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: '09ef91de4f6a336da1d97c7cd411ef95ec9f8900'
4
+ data.tar.gz: a897af8c6f9bbefde3d83237517fa203ae8cf731
5
+ SHA512:
6
+ metadata.gz: 3682a34f8cbcd17b55b8ee1a9019706405a8831203b4053b121999efd3025188c31028348dd0196562c88b3d983d589e042f6a93a18133efb194651f15e7a4ab
7
+ data.tar.gz: bd9a055a26efd2e1ebcb11b200d27dafbd8d9e51ca5acb9c7cc5959cd653314014dfa6584ac1d9d63ebab353936c8568cee9a30cb89df94ed9e361633b55ebce
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --format doc
3
+ --color true
data/.rubocop.yml ADDED
@@ -0,0 +1,35 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.1
3
+ Exclude:
4
+ - 'examples/**/*'
5
+ - 'Gemfile'
6
+ - 'bin/*'
7
+ - '*.gemspec'
8
+
9
+ Rails:
10
+ Enabled: false
11
+
12
+ Documentation:
13
+ Enabled: false
14
+ Style/RaiseArgs:
15
+ EnforcedStyle: compact
16
+ # Maximum line length
17
+ LineLength:
18
+ Max: 100
19
+
20
+ # Maximum method length
21
+ MethodLength:
22
+ Max: 30
23
+
24
+ # Tune to MethodLength
25
+ Metrics/AbcSize:
26
+ Max: 30
27
+
28
+ # Tune to MethodLength
29
+ Metrics/ClassLength:
30
+ Max: 200
31
+
32
+ Metrics/BlockLength:
33
+ ExcludedMethods: ['describe', 'context', 'before', 'shared_context', 'let']
34
+ Exclude:
35
+ - "**/*_spec.rb"
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1
4
+ install:
5
+ - gem install bundler --pre
6
+ - bundle install
7
+ script:
8
+ - rubocop
9
+ - bundle exec rspec
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in bibo.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,36 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bibo (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.3.0)
10
+ parallel (1.12.1)
11
+ parser (2.4.0.2)
12
+ ast (~> 2.3)
13
+ powerpack (0.1.1)
14
+ rainbow (3.0.0)
15
+ rake (10.5.0)
16
+ rubocop (0.52.1)
17
+ parallel (~> 1.10)
18
+ parser (>= 2.4.0.2, < 3.0)
19
+ powerpack (~> 0.1)
20
+ rainbow (>= 2.2.2, < 4.0)
21
+ ruby-progressbar (~> 1.7)
22
+ unicode-display_width (~> 1.0, >= 1.0.1)
23
+ ruby-progressbar (1.9.0)
24
+ unicode-display_width (1.3.0)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bibo!
31
+ bundler (~> 1.16)
32
+ rake (~> 10.0)
33
+ rubocop (~> 0.52.1)
34
+
35
+ BUNDLED WITH
36
+ 1.16.0
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # Bibo
2
+
3
+ Welcome to Bibo. This gem purpose matching response for chatbot from text file.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'bibo'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install bibo
20
+
21
+ ## Usage
22
+
23
+ ### Source data example: source.json
24
+
25
+ ```
26
+ {
27
+ "2": "Hello!",
28
+ "hello": [
29
+ "hi", "2", "xin chao"
30
+ ],
31
+ "how are you": [
32
+ "I'm fine", "it ok"
33
+ ]
34
+ }
35
+
36
+ ```
37
+ ### Use
38
+
39
+ ```
40
+ require 'bibo'
41
+
42
+ bibo = Bibo::Bibo.new("source.json")
43
+ bibo.question("2")
44
+
45
+ # Hello!
46
+
47
+ bibo.question("hello")
48
+
49
+ # I'm fine
50
+
51
+ ```
52
+
53
+ ## Contributing
54
+
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/haanhduclinh/bibo.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bibo.gemspec ADDED
@@ -0,0 +1,30 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "bibo/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bibo"
8
+ spec.version = Bibo::VERSION
9
+ spec.authors = ["HuanNV","DucLinh"]
10
+ spec.email = ["huanvan.uet@gmail.com","haanhduclinh@yahoo.com"]
11
+
12
+ spec.summary = "Random responses from available data"
13
+ spec.description = "Input your data to create amazing talk"
14
+ spec.homepage = "https://github.com/haanhduclinh/bibo.git"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
+ f.match(%r{^(test|spec|features)/})
21
+ end
22
+ spec.bindir = "exe"
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.16"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rubocop", "~> 0.52.1"
29
+ spec.required_ruby_version = '>= 2.1'
30
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "bibo"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/bibo.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "bibo/version"
2
+
3
+ module Bibo
4
+ class Bibo
5
+
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module Bibo
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bibo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - HuanNV
8
+ - DucLinh
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2017-12-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.16'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.16'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '10.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '10.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rubocop
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 0.52.1
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 0.52.1
56
+ description: Input your data to create amazing talk
57
+ email:
58
+ - huanvan.uet@gmail.com
59
+ - haanhduclinh@yahoo.com
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - ".gitignore"
65
+ - ".rspec"
66
+ - ".rubocop.yml"
67
+ - ".travis.yml"
68
+ - Gemfile
69
+ - Gemfile.lock
70
+ - README.md
71
+ - Rakefile
72
+ - bibo.gemspec
73
+ - bin/console
74
+ - bin/setup
75
+ - lib/bibo.rb
76
+ - lib/bibo/version.rb
77
+ homepage: https://github.com/haanhduclinh/bibo.git
78
+ licenses: []
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '2.1'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.6.14
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Random responses from available data
100
+ test_files: []