Skip to content

Commit

Permalink
Merge pull request #3 from groupme/gem_update
Browse files Browse the repository at this point in the history
gem update
  • Loading branch information
Kostiantyn Masliuk committed Jun 10, 2021
2 parents e0b260f + 14a91dc commit ca205d0
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 47 deletions.
86 changes: 51 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,67 @@ PATH
specs:
em-kannel (0.2.0)
activemodel (~> 3.1)
em-http-request (>= 1.0.0.beta.4)
eventmachine (>= 1.0.0.beta.3)
em-http-request (>= 1.1.6)
eventmachine (>= 1.2.7)

GEM
remote: http://rubygems.org/
specs:
activemodel (3.1.3)
activesupport (= 3.1.3)
activemodel (3.2.22.5)
activesupport (= 3.2.22.5)
builder (~> 3.0.0)
i18n (~> 0.6)
activesupport (3.1.3)
activesupport (3.2.22.5)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.2.6)
builder (3.0.0)
cookiejar (0.3.0)
crack (0.3.1)
diff-lcs (1.1.3)
em-http-request (1.0.1)
addressable (>= 2.2.3)
cookiejar
em-socksify
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
builder (3.0.4)
concurrent-ruby (1.1.9)
cookiejar (0.3.3)
crack (0.4.5)
rexml
diff-lcs (1.4.4)
em-http-request (1.1.7)
addressable (>= 2.3.4)
cookiejar (!= 0.3.1)
em-socksify (>= 0.3)
eventmachine (>= 1.0.3)
http_parser.rb (>= 0.6.0)
em-socksify (0.3.2)
eventmachine (>= 1.0.0.beta.4)
http_parser.rb (>= 0.5.3)
em-socksify (0.1.0)
eventmachine
eventmachine (1.0.0.beta.4)
http_parser.rb (0.5.3)
i18n (0.6.0)
multi_json (1.0.4)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
rspec-mocks (~> 2.7.0)
rspec-core (2.7.0)
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
webmock (1.7.7)
addressable (~> 2.2, > 2.2.5)
crack (>= 0.1.7)
eventmachine (1.2.7)
hashdiff (1.0.1)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
multi_json (1.15.0)
public_suffix (4.0.6)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
webmock (3.13.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
ruby

DEPENDENCIES
em-kannel!
rspec (~> 2.7.0)
webmock (~> 1.7.7)
rspec
webmock

BUNDLED WITH
2.2.15
8 changes: 4 additions & 4 deletions em-kannel.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_dependency "eventmachine", ">= 1.0.0.beta.3"
s.add_dependency "em-http-request", ">= 1.0.0.beta.4"
s.add_dependency "eventmachine", ">= 1.2.7"
s.add_dependency "em-http-request", ">= 1.1.6"
s.add_dependency "activemodel", "~> 3.1"

s.add_development_dependency "rspec", "~> 2.7.0"
s.add_development_dependency "webmock", "~> 1.7.7"
s.add_development_dependency "rspec"
s.add_development_dependency "webmock"
end
1 change: 0 additions & 1 deletion lib/em-kannel/log_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def message
"CODE=#{@response.status}",
"FROM=#{@message.from}",
"TO=#{Digest::MD5.hexdigest(@message.to.delete(" "))}",
"BODY=#{@message.body[0..100]}",
"RESPONSE=#{@response.body}",
"TIME=#{@response.duration}"
]
Expand Down
4 changes: 2 additions & 2 deletions spec/em-kannel/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
to_return(:status => 202, :body => uuid)

EM::Kannel.logger.should_receive(:info).with(
/CODE=202 FROM=\+12125551212 TO=78c929715ef3d957ad835697ced0e295 BODY=testing RESPONSE=#{uuid} TIME=[0-9]/
/CODE=202 FROM=\+12125551212 TO=78c929715ef3d957ad835697ced0e295 RESPONSE=#{uuid} TIME=[0-9]/

)

Expand All @@ -74,7 +74,7 @@
to_return(:status => 404, :body => "API not available")

EM::Kannel.logger.should_receive(:info).with(
/CODE=404 FROM=\+12125551212 TO=78c929715ef3d957ad835697ced0e295 BODY=testing RESPONSE=API not available TIME=[0-9]/
/CODE=404 FROM=\+12125551212 TO=78c929715ef3d957ad835697ced0e295 RESPONSE=API not available TIME=[0-9]/
)

EM.run_block {
Expand Down
8 changes: 4 additions & 4 deletions spec/em-kannel/response_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require "spec_helper"

describe EM::Kannel::Response do
let(:header) { mock(:header, status: "202") }
let(:header) { double(:header, status: "202") }
let(:body) { "0: Accepted for delivery: 26ecfeea-6015-4025-bcae-0d0b71467d83" }
let(:http) { mock(:http_client, response_header: header, response: body) }
let(:http) { double(:http_client, response_header: header, response: body) }

before do
now = Time.now
Expand All @@ -13,7 +13,7 @@
describe "#status" do
it "returns the status code" do
started = Time.now - 10
http = mock(:http_client, response_header: header)
http = double(:http_client, response_header: header)

response = EM::Kannel::Response.new(http, started)
response.status.should == 202
Expand All @@ -29,7 +29,7 @@
end

context "other status codes" do
let(:header) { mock(:header, status: "500") }
let(:header) { double(:header, status: "500") }

it "returns false" do
response = EM::Kannel::Response.new(http)
Expand Down
2 changes: 1 addition & 1 deletion spec/em-kannel/validations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Model
it "returns true" do
instance = Model.new
instance.value = "value"
instance.validate!.should be_true
instance.validate!.should be true
end
end
end
Expand Down

0 comments on commit ca205d0

Please sign in to comment.