pandorified 0.9.0 → 0.9.1

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
- SHA1:
3
- metadata.gz: 86625391ab1a874c65ff69bb838fdcb9cf5849b9
4
- data.tar.gz: 60b899f6ac7405e7225e32eca029226125d17f1e
2
+ SHA256:
3
+ metadata.gz: c29806cae3b9186bd508ff496e48649d9efc97c5ea633eb5dcaf65b513fe6a3a
4
+ data.tar.gz: 7e986e6580f171c483e30cf3baa0c59e1b222fc772e51ae8eab267d4fbfc39fe
5
5
  SHA512:
6
- metadata.gz: a4c51bab5d8f395558f4ecddf3bb8e6d5c70076831ecfbf4d0c865e6e4cc5971cd34fc9b1d98a9c4cd1c79442c5830ce459aa6e7eef2f8df6f60444c6fc6a1e1
7
- data.tar.gz: af8ebc3a61fbfc2a2f219d483d073d3cf28441940bd8c475ed51a779fde6d17e5dbb26b079221569ba0e16725712386cc357896e9f2d4db3a9ea34631b9f86c3
6
+ metadata.gz: 3b6e0595add58542fd7a57c57a36d301a8350abb02e9e9206aa15e0e59d9089c8a997a72acd956f83038516c7b239c2d46000cfb6300e6e8d8f27105cd8f22fb
7
+ data.tar.gz: 9604590d769d5473b96bddd057d72c28a8249e683e6386294ad5f38415e5db93d3393af4bcb99209dd3af13aca2a5a6660c77c0f9cc244fc58c61c379b049959
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
2
  .bundle
3
3
  .yardoc
4
+ Gemfile.lock
4
5
  pkg/*
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
data/README.md CHANGED
@@ -6,11 +6,11 @@ Pandorified is a simple Ruby wrapper for the Pandorabots API. Talk to chat bots
6
6
  Installation
7
7
  ------------
8
8
 
9
- gem install pandorified
9
+ `gem install pandorified`
10
10
 
11
11
  Or add Pandorified to your project's Gemfile:
12
12
 
13
- gem 'pandorified'
13
+ `gem 'pandorified'`
14
14
 
15
15
  Getting Started
16
16
  ---------------
@@ -19,18 +19,22 @@ To interact with the Pandorabots, you need to know the BOTID of the bot you wish
19
19
 
20
20
  Here is a basic example:
21
21
 
22
- require 'pandorified'
23
-
24
- CHOMSKY_BOTID = 'b0dafd24ee35a477'
25
-
26
- # Send a message to Chomsky and print the response
27
- puts Pandorified.talk!("Hello, Bot!", CHOMSKY_BOTID)
22
+ ```ruby
23
+ require 'pandorified'
24
+
25
+ CHOMSKY_BOTID = 'b0dafd24ee35a477'
26
+
27
+ # Send a message to Chomsky and print the response
28
+ puts Pandorified.talk!("Hello, Bot!", CHOMSKY_BOTID)
29
+ ```
28
30
 
29
31
  If you want the bot to remember who you are, you can create a session object and re-use it.
30
32
 
31
- bot = Pandorified::Session.new('b0dafd24ee35a477')
32
- puts bot.talk!("Hello")
33
- puts bot.talk!("Goodbye now!")
33
+ ```ruby
34
+ bot = Pandorified::Session.new('b0dafd24ee35a477')
35
+ puts bot.talk!("Hello")
36
+ puts bot.talk!("Goodbye now!")
37
+ ```
34
38
 
35
39
  Full documentation is available [here](http://rubydoc.info/gems/pandorified/frames). If anything in the documentation is not clear, please [report it as a bug][1].
36
40
 
@@ -39,6 +43,8 @@ Contributing
39
43
 
40
44
  If you've found a bug or have a feature suggestion, let me know on the [issue tracker][1] or [send me an e-mail][2]. I welcome all feedback, and I'd love to hear about what cool things you've made with this!
41
45
 
46
+ Run tests with `bundle exec rspec` or just `rake`.
47
+
42
48
  Author
43
49
  ------
44
50
 
@@ -47,7 +53,7 @@ Author
47
53
  License
48
54
  -------
49
55
 
50
- Copyright © 2011-2013 Justin Workman
56
+ Copyright © 2011-2019 Justin Workman
51
57
 
52
58
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
53
59
 
@@ -55,5 +61,5 @@ The above copyright notice and this permission notice shall be included in all c
55
61
 
56
62
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57
63
 
58
- [1]: https://bitbucket.org/xtagon/pandorified/issues?status=new&status=open
64
+ [1]: https://github.com/xtagon/pandorified-gem/issues
59
65
  [2]: mailto:xtagon@gmail.com
data/Rakefile CHANGED
@@ -1,6 +1,11 @@
1
1
  require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
2
7
 
3
8
  desc 'Open an irb session preloaded with this library'
4
9
  task :console do
5
- sh "irb -rubygems -I lib -r pandorified.rb"
10
+ sh "irb -rubygems -I lib -r pandorified.rb"
6
11
  end
@@ -3,33 +3,33 @@ require 'pandorified/result'
3
3
  require 'pandorified/session'
4
4
 
5
5
  module Pandorified
6
- # Send a message to a bot and receive a response.
7
- #
8
- # See {Pandorified::Result} for ways to handle the response, or use {.talk!} which raises an exception on errors.
9
- # If you want to remember the {botid} and {custid} between multiple calls, you should use {Pandorabots::Session} instead of this method.
10
- #
11
- # @param [String] input Text to say to the bot.
12
- # @param [String] botid A valid Pandorabots botid.
13
- # @param [String] custid An itentifier used to keep track of this conversaion.
14
- #
15
- # @return [Pandorified::Result] The bot's response as a result object.
16
- def self.talk(input, botid, custid = nil)
17
- Pandorified::Session.new(botid, custid).talk(input)
18
- end
6
+ # Send a message to a bot and receive a response.
7
+ #
8
+ # See {Pandorified::Result} for ways to handle the response, or use {.talk!} which raises an exception on errors.
9
+ # If you want to remember the {botid} and {custid} between multiple calls, you should use {Pandorabots::Session} instead of this method.
10
+ #
11
+ # @param [String] input Text to say to the bot.
12
+ # @param [String] botid A valid Pandorabots botid.
13
+ # @param [String] custid An itentifier used to keep track of this conversaion.
14
+ #
15
+ # @return [Pandorified::Result] The bot's response as a result object.
16
+ def self.talk(input, botid, custid = nil)
17
+ Pandorified::Session.new(botid, custid).talk(input)
18
+ end
19
19
 
20
- # Send a message to a bot and receive a response (if successsful).
21
- #
22
- # If Pandorabots respondes with an error, {Pandorified::PandorabotsError} is raised.
23
- # If you'd rather check for and handle the error yourself, use {.talk} instead of this method.
24
- #
25
- # If you want to remember the {botid} and {custid} between multiple calls, you should use {Pandorabots::Session} instead of this method.
26
- #
27
- # @param [String] input Text to say to the bot.
28
- # @param [String] botid A valid Pandorabots botid.
29
- # @param [String] custid An itentifier used to keep track of this conversaion.
30
- #
31
- # @return [String] The bot's response text.
32
- def self.talk!(input, botid, custid = nil)
33
- Pandorified::Session.new(botid, custid).talk!(input).to_s
34
- end
20
+ # Send a message to a bot and receive a response (if successsful).
21
+ #
22
+ # If Pandorabots responds with an error, {Pandorified::PandorabotsError} is raised.
23
+ # If you'd rather check for and handle the error yourself, use {.talk} instead of this method.
24
+ #
25
+ # If you want to remember the {botid} and {custid} between multiple calls, you should use {Pandorabots::Session} instead of this method.
26
+ #
27
+ # @param [String] input Text to say to the bot.
28
+ # @param [String] botid A valid Pandorabots botid.
29
+ # @param [String] custid An itentifier used to keep track of this conversaion.
30
+ #
31
+ # @return [String] The bot's response text.
32
+ def self.talk!(input, botid, custid = nil)
33
+ Pandorified::Session.new(botid, custid).talk!(input).to_s
34
+ end
35
35
  end
@@ -2,64 +2,64 @@ require 'rest_client'
2
2
  require 'nokogiri'
3
3
 
4
4
  module Pandorified
5
- API_URL = 'http://www.pandorabots.com/pandora/talk-xml'
5
+ API_URL = 'https://www.pandorabots.com/pandora/talk-xml'
6
6
 
7
- class Result
8
- def initialize(params)
9
- @xml = Nokogiri::XML(RestClient.post(API_URL, params))
10
- end
7
+ class Result
8
+ def initialize(params)
9
+ @xml = Nokogiri::XML(RestClient.post(API_URL, params))
10
+ end
11
11
 
12
- # @return [String] The bot's response to the input.
13
- def that
14
- @that ||= @xml.xpath('/result/that').first.text.strip
15
- end
12
+ # @return [String] The bot's response to the input.
13
+ def that
14
+ @that ||= @xml.xpath('/result/that').first.text.strip
15
+ end
16
16
 
17
- alias_method :to_s, :that
17
+ alias_method :to_s, :that
18
18
 
19
- # Check the status of this result. See {#success?} and {#error?}.
20
- #
21
- # @return [Number] A status number as returned by Pandorabots.
22
- def status
23
- @status ||= @xml.xpath('/result/@status').first.value.to_i
24
- end
19
+ # Check the status of this result. See {#success?} and {#error?}.
20
+ #
21
+ # @return [Number] A status number as returned by Pandorabots.
22
+ def status
23
+ @status ||= @xml.xpath('/result/@status').first.value.to_i
24
+ end
25
25
 
26
- # @return `true` if this result was successful (no error was returned by Pandorabots), `false` otherwise.
27
- def success?
28
- self.status.zero?
29
- end
26
+ # @return `true` if this result was successful (no error was returned by Pandorabots), `false` otherwise.
27
+ def success?
28
+ self.status.zero?
29
+ end
30
30
 
31
- alias_method :ok?, :success?
32
- alias_method :successful?, :success?
31
+ alias_method :ok?, :success?
32
+ alias_method :successful?, :success?
33
33
 
34
- # @note After checking if there is an error, you can read the error message with {#message}.
35
- #
36
- # @return `true` if Pandorabots returned an error.
37
- def error?
38
- !self.success?
39
- end
34
+ # @note After checking if there is an error, you can read the error message with {#message}.
35
+ #
36
+ # @return `true` if Pandorabots returned an error.
37
+ def error?
38
+ !self.success?
39
+ end
40
40
 
41
- # @return [String] The error message as returned by Pandorabots, if an error occured.
42
- def message
43
- return nil if self.success?
44
- @message ||= @xml.xpath('/result/message').first.text
45
- end
41
+ # @return [String] The error message as returned by Pandorabots, if an error occured.
42
+ def message
43
+ return nil if self.success?
44
+ @message ||= @xml.xpath('/result/message').first.text
45
+ end
46
46
 
47
- alias_method :error, :message
48
- alias_method :error_message, :message
47
+ alias_method :error, :message
48
+ alias_method :error_message, :message
49
49
 
50
- # @return [String] The botid of the bot this result is for.
51
- def botid
52
- @botid ||= @xml.xpath('/result/@botid').first.value
53
- end
50
+ # @return [String] The botid of the bot this result is for.
51
+ def botid
52
+ @botid ||= @xml.xpath('/result/@botid').first.value
53
+ end
54
54
 
55
- # @return [String] The custid for this session.
56
- def custid
57
- @custid ||= @xml.xpath('/result/@custid').first.value
58
- end
55
+ # @return [String] The custid for this session.
56
+ def custid
57
+ @custid ||= @xml.xpath('/result/@custid').first.value
58
+ end
59
59
 
60
- # @return [String] The orginal input that triggered this response.
61
- def input
62
- @input ||= @xml.xpath('/result/input').first.text
63
- end
64
- end
60
+ # @return [String] The orginal input that triggered this response.
61
+ def input
62
+ @input ||= @xml.xpath('/result/input').first.text
63
+ end
64
+ end
65
65
  end
@@ -1,47 +1,47 @@
1
1
  require 'pandorified/result'
2
2
 
3
3
  module Pandorified
4
- # Raised when Pandorabots returns an API result with a non-zero status.
5
- class PandorabotsError < StandardError; end
4
+ # Raised when Pandorabots returns an API result with a non-zero status.
5
+ class PandorabotsError < StandardError; end
6
6
 
7
- class Session
8
- # A new session for conversing with a bot.
9
- #
10
- # @note If you choose not to specify a {custid}, one will be automatically chosen and remembered throughout the session.
11
- #
12
- # @param [String] botid A valid Pandorabots botid.
13
- # @param [String] custid An identifier used to keep track of this conversation.
14
- def initialize(botid, custid = nil)
15
- @botid = botid
16
- @custid = custid
17
- end
7
+ class Session
8
+ # A new session for conversing with a bot.
9
+ #
10
+ # @note If you choose not to specify a {custid}, one will be automatically chosen and remembered throughout the session.
11
+ #
12
+ # @param [String] botid A valid Pandorabots botid.
13
+ # @param [String] custid An identifier used to keep track of this conversation.
14
+ def initialize(botid, custid = nil)
15
+ @botid = botid
16
+ @custid = custid
17
+ end
18
18
 
19
- # Send a message to this session's bot and receive a response.
20
- #
21
- # See {Pandorified::Result} for how to check for an error response and get the error message.
22
- # Alternatively, you can use {#talk!} instead of this method, which raises an exception when Pandorabots API returns an error.
23
- #
24
- # @param [String] input Text to say to the bot.
25
- #
26
- # @return [Pandorified::Result] The bot's response as a result object.
27
- def talk(input)
28
- result = Pandorified::Result.new(botid: @botid, custid: @custid, input: input)
29
- @custid ||= result.custid if result.success?
30
- result
31
- end
19
+ # Send a message to this session's bot and receive a response.
20
+ #
21
+ # See {Pandorified::Result} for how to check for an error response and get the error message.
22
+ # Alternatively, you can use {#talk!} instead of this method, which raises an exception when Pandorabots API returns an error.
23
+ #
24
+ # @param [String] input Text to say to the bot.
25
+ #
26
+ # @return [Pandorified::Result] The bot's response as a result object.
27
+ def talk(input)
28
+ result = Pandorified::Result.new(botid: @botid, custid: @custid, input: input)
29
+ @custid ||= result.custid if result.success?
30
+ result
31
+ end
32
32
 
33
- # Send a message to this session's bot and receive a response (if successful).
34
- #
35
- # If Pandorabots API responds with an error, {Pandorified::PandorabotsError} is raised with the specific error message.
36
- # If you'd like to check for and handle the error yourself, you can use {#talk} instead of this method.
37
- #
38
- # @param [String] input Text to say to the bot.
39
- #
40
- # @return [String] The bot's response text.
41
- def talk!(input)
42
- result = self.talk(input)
43
- raise Pandorified::PandorabotsError, "Pandorabots returned status #{result.status}: #{result.message}" if result.error?
44
- result.that
45
- end
46
- end
33
+ # Send a message to this session's bot and receive a response (if successful).
34
+ #
35
+ # If Pandorabots API responds with an error, {Pandorified::PandorabotsError} is raised with the specific error message.
36
+ # If you'd like to check for and handle the error yourself, you can use {#talk} instead of this method.
37
+ #
38
+ # @param [String] input Text to say to the bot.
39
+ #
40
+ # @return [String] The bot's response text.
41
+ def talk!(input)
42
+ result = self.talk(input)
43
+ raise Pandorified::PandorabotsError, "Pandorabots returned status #{result.status}: #{result.message}" if result.error?
44
+ result.that
45
+ end
46
+ end
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module Pandorified
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
@@ -3,18 +3,21 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
  require 'pandorified/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'pandorified'
7
- spec.version = Pandorified::VERSION
8
- spec.authors = 'Justin Workman'
9
- spec.email = 'xtagon@gmail.com'
10
- spec.summary = 'A Ruby client for the Pandorabots API.'
11
- spec.description = 'Pandorified makes it easy for your Ruby scripts to interact with chat bots hosted on Pandorabots.'
6
+ spec.name = 'pandorified'
7
+ spec.version = Pandorified::VERSION
8
+ spec.authors = 'Justin Workman'
9
+ spec.email = 'xtagon@gmail.com'
10
+ spec.summary = 'A Ruby client for the Pandorabots API.'
11
+ spec.description = 'Pandorified makes it easy for your Ruby scripts to interact with chat bots hosted on Pandorabots.'
12
12
 
13
- spec.files = `git ls-files`.split("\n")
14
- spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
- spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
- spec.require_paths = ['lib']
13
+ spec.files = `git ls-files`.split("\n")
14
+ spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ spec.require_paths = ['lib']
17
17
 
18
- spec.add_runtime_dependency 'rest-client'
19
- spec.add_runtime_dependency 'nokogiri'
18
+ spec.add_runtime_dependency 'rest-client', '>= 1.7.3'
19
+ spec.add_runtime_dependency 'nokogiri', '>= 1.8.5'
20
+
21
+ spec.add_development_dependency 'rspec'
22
+ spec.add_development_dependency 'webmock'
20
23
  end
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Pandorified do
4
+ describe "#talk!" do
5
+ let(:input) { "Are you a robot?" }
6
+ let(:botid) { "np218q9s7r346nqo" }
7
+ let(:custid) { nil }
8
+
9
+ let(:request_body) do
10
+ {
11
+ "botid" => botid,
12
+ "custid" => nil,
13
+ "input" => input
14
+ }
15
+ end
16
+
17
+ context "when successful" do
18
+ subject { described_class.talk!(input, botid, custid) }
19
+
20
+ let(:that) { "Of course not!" }
21
+
22
+ let(:response_body) do
23
+ <<~XML
24
+ <result status="0" botid="#{botid}" custid="fec7cfc40e5b751a"><input>#{input}</input><that>#{that}</that></result>"
25
+ XML
26
+ end
27
+
28
+ let(:response_headers) do
29
+ {content_type: "text/xml"}
30
+ end
31
+
32
+ before :each do
33
+ stub_request(:post, "https://www.pandorabots.com/pandora/talk-xml").
34
+ with(body: request_body).
35
+ to_return(status: 200, body: response_body, headers: response_headers)
36
+ end
37
+
38
+ it { is_expected.to eq(that) }
39
+ end
40
+
41
+ context "when unsuccessful" do
42
+ pending { is_expected.to raise_error(described_class::PandorabotsError) }
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,104 @@
1
+ require 'pandorified'
2
+
3
+ require 'webmock/rspec'
4
+
5
+ # This file was generated by the `rspec --init` command. Conventionally, all
6
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
7
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
8
+ # this file to always be loaded, without a need to explicitly require it in any
9
+ # files.
10
+ #
11
+ # Given that it is always loaded, you are encouraged to keep this file as
12
+ # light-weight as possible. Requiring heavyweight dependencies from this file
13
+ # will add to the boot time of your test suite on EVERY test run, even for an
14
+ # individual file that may not need all of that loaded. Instead, consider making
15
+ # a separate helper file that requires the additional dependencies and performs
16
+ # the additional setup, and require it from the spec files that actually need
17
+ # it.
18
+ #
19
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
20
+ RSpec.configure do |config|
21
+ # rspec-expectations config goes here. You can use an alternate
22
+ # assertion/expectation library such as wrong or the stdlib/minitest
23
+ # assertions if you prefer.
24
+ config.expect_with :rspec do |expectations|
25
+ # This option will default to `true` in RSpec 4. It makes the `description`
26
+ # and `failure_message` of custom matchers include text for helper methods
27
+ # defined using `chain`, e.g.:
28
+ # be_bigger_than(2).and_smaller_than(4).description
29
+ # # => "be bigger than 2 and smaller than 4"
30
+ # ...rather than:
31
+ # # => "be bigger than 2"
32
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
33
+ end
34
+
35
+ # rspec-mocks config goes here. You can use an alternate test double
36
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
37
+ config.mock_with :rspec do |mocks|
38
+ # Prevents you from mocking or stubbing a method that does not exist on
39
+ # a real object. This is generally recommended, and will default to
40
+ # `true` in RSpec 4.
41
+ mocks.verify_partial_doubles = true
42
+ end
43
+
44
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
45
+ # have no way to turn it off -- the option exists only for backwards
46
+ # compatibility in RSpec 3). It causes shared context metadata to be
47
+ # inherited by the metadata hash of host groups and examples, rather than
48
+ # triggering implicit auto-inclusion in groups with matching metadata.
49
+ config.shared_context_metadata_behavior = :apply_to_host_groups
50
+
51
+ # The settings below are suggested to provide a good initial experience
52
+ # with RSpec, but feel free to customize to your heart's content.
53
+ =begin
54
+ # This allows you to limit a spec run to individual examples or groups
55
+ # you care about by tagging them with `:focus` metadata. When nothing
56
+ # is tagged with `:focus`, all examples get run. RSpec also provides
57
+ # aliases for `it`, `describe`, and `context` that include `:focus`
58
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
59
+ config.filter_run_when_matching :focus
60
+
61
+ # Allows RSpec to persist some state between runs in order to support
62
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
63
+ # you configure your source control system to ignore this file.
64
+ config.example_status_persistence_file_path = "spec/examples.txt"
65
+
66
+ # Limits the available syntax to the non-monkey patched syntax that is
67
+ # recommended. For more details, see:
68
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
69
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
70
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
71
+ config.disable_monkey_patching!
72
+
73
+ # This setting enables warnings. It's recommended, but in some cases may
74
+ # be too noisy due to issues in dependencies.
75
+ config.warnings = true
76
+
77
+ # Many RSpec users commonly either run the entire suite or an individual
78
+ # file, and it's useful to allow more verbose output when running an
79
+ # individual spec file.
80
+ if config.files_to_run.one?
81
+ # Use the documentation formatter for detailed output,
82
+ # unless a formatter has already been configured
83
+ # (e.g. via a command-line flag).
84
+ config.default_formatter = "doc"
85
+ end
86
+
87
+ # Print the 10 slowest examples and example groups at the
88
+ # end of the spec run, to help surface which specs are running
89
+ # particularly slow.
90
+ config.profile_examples = 10
91
+
92
+ # Run specs in random order to surface order dependencies. If you find an
93
+ # order dependency and want to debug it, you can fix the order by providing
94
+ # the seed, which is printed after each run.
95
+ # --seed 1234
96
+ config.order = :random
97
+
98
+ # Seed global randomization in this process using the `--seed` CLI option.
99
+ # Setting this allows you to use `--seed` to deterministically reproduce
100
+ # test failures related to randomization by passing the same `--seed` value
101
+ # as the one that triggered the failure.
102
+ Kernel.srand config.seed
103
+ =end
104
+ end
metadata CHANGED
@@ -1,41 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandorified
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Workman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-09 00:00:00.000000000 Z
11
+ date: 2019-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.7.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.7.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.8.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.8.5
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
69
  description: Pandorified makes it easy for your Ruby scripts to interact with chat
@@ -45,9 +73,9 @@ executables: []
45
73
  extensions: []
46
74
  extra_rdoc_files: []
47
75
  files:
48
- - .gitignore
76
+ - ".gitignore"
77
+ - ".rspec"
49
78
  - Gemfile
50
- - Gemfile.lock
51
79
  - README.md
52
80
  - Rakefile
53
81
  - lib/pandorified.rb
@@ -55,6 +83,8 @@ files:
55
83
  - lib/pandorified/session.rb
56
84
  - lib/pandorified/version.rb
57
85
  - pandorified.gemspec
86
+ - spec/lib/pandorified_spec.rb
87
+ - spec/spec_helper.rb
58
88
  homepage:
59
89
  licenses: []
60
90
  metadata: {}
@@ -64,17 +94,16 @@ require_paths:
64
94
  - lib
65
95
  required_ruby_version: !ruby/object:Gem::Requirement
66
96
  requirements:
67
- - - '>='
97
+ - - ">="
68
98
  - !ruby/object:Gem::Version
69
99
  version: '0'
70
100
  required_rubygems_version: !ruby/object:Gem::Requirement
71
101
  requirements:
72
- - - '>='
102
+ - - ">="
73
103
  - !ruby/object:Gem::Version
74
104
  version: '0'
75
105
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.0.0.rc.2
106
+ rubygems_version: 3.0.1
78
107
  signing_key:
79
108
  specification_version: 4
80
109
  summary: A Ruby client for the Pandorabots API.
@@ -1,20 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- pandorified (0.8.0)
5
- nokogiri
6
- rest-client
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- mime-types (1.22)
12
- nokogiri (1.5.9)
13
- rest-client (1.6.7)
14
- mime-types (>= 1.16)
15
-
16
- PLATFORMS
17
- ruby
18
-
19
- DEPENDENCIES
20
- pandorified!