smster 0.0.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/Rakefile +0 -6
- data/app/controllers/smster/clickatell_controller.rb +3 -1
- data/app/controllers/smster/nexmo_controller.rb +2 -2
- data/app/controllers/smster/smsru_controller.rb +10 -9
- data/lib/generators/smster/install/templates/create_smsters.rb +2 -2
- data/lib/generators/smster/install/templates/smster.rb +5 -5
- data/lib/generators/smster/install_generator.rb +9 -8
- data/lib/smster.rb +5 -4
- data/lib/smster/sms.rb +37 -19
- data/lib/smster/version.rb +1 -1
- data/test/controller/smster/clickatell_controller_test.rb +22 -13
- data/test/controller/smster/nexmo_controller_test.rb +18 -5
- data/test/controller/smster/smsru_controller_test.rb +17 -9
- data/test/dummy/Rakefile +0 -3
- data/test/dummy/config/initializers/smster.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +49 -0
- data/test/dummy/log/test.log +7653 -0
- data/test/smster/sms/clickatell_test.rb +16 -10
- data/test/smster/sms/nexmo_test.rb +15 -10
- data/test/smster/sms/smsru_test.rb +13 -10
- data/test/smster_test.rb +2 -2
- data/test/test_helper.rb +13 -6
- metadata +16 -6
- data/lib/smster/configuration.rb +0 -12
- data/lib/smster/sms/clickatell.rb +0 -34
- data/lib/smster/sms/nexmo.rb +0 -43
- data/lib/smster/sms/smsru.rb +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b4a43ae5bd049ae49c9ddcd6eca1dd1478e160b
|
4
|
+
data.tar.gz: 70a88091d388966c6555309f0f49ed1ed63c148d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6ba1c25cf27a1ee741ffa9cd2664254a6cada3cf2b36b57f7f7c7701fa86d1f2a2daf993f208c61cbb5c9e97d92c24483608f7f36e9b42bd4c35fab4190097f
|
7
|
+
data.tar.gz: 973c0fac4f1e4a4e6d8e3f752432205098e30f535a1022e3a1b5a659f9e81fded037a57ec4375f32d512573e65fe6ae6634d1d3a00d21c62eb38d206d5c4f03b
|
data/README.rdoc
CHANGED
@@ -25,7 +25,7 @@ Add to routes, setup provider callbacks and get sms statuses:
|
|
25
25
|
post 'smster/$provider_name/callback'
|
26
26
|
|
27
27
|
== Feedback
|
28
|
-
Please use the {issue tracker}[https://github.com/IlyaDonskikh/smster/issues].
|
28
|
+
Please use the {issue tracker}[https://github.com/IlyaDonskikh/smster/issues] or send mail to {donivrecord@gmail.com}[mailto:donivrecord@gmail.com].
|
29
29
|
|
30
30
|
== Thanks
|
31
31
|
1. {Mickhail Zelenin}[https://github.com/MioGreen] for the idea for this gem.
|
data/Rakefile
CHANGED
@@ -14,11 +14,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
17
|
Bundler::GemHelper.install_tasks
|
23
18
|
|
24
19
|
require 'rake/testtask'
|
@@ -30,5 +25,4 @@ Rake::TestTask.new(:test) do |t|
|
|
30
25
|
t.verbose = false
|
31
26
|
end
|
32
27
|
|
33
|
-
|
34
28
|
task default: :test
|
@@ -4,6 +4,7 @@ class Smster::ClickatellController < ApplicationController
|
|
4
4
|
def callback
|
5
5
|
code = clickatell_params[:apiMessageId]
|
6
6
|
description = clickatell_params[:description]
|
7
|
+
|
7
8
|
sms = Sms::Clickatell.find_by!(code: code)
|
8
9
|
|
9
10
|
sms.status_message = description
|
@@ -16,7 +17,8 @@ class Smster::ClickatellController < ApplicationController
|
|
16
17
|
end
|
17
18
|
|
18
19
|
private
|
20
|
+
|
19
21
|
def clickatell_params
|
20
22
|
params.require(:data)
|
21
23
|
end
|
22
|
-
end
|
24
|
+
end
|
@@ -4,23 +4,24 @@ class Smster::SmsruController < ApplicationController
|
|
4
4
|
def callback
|
5
5
|
smsru_params.each do |data|
|
6
6
|
data = data.split(/\n/)
|
7
|
-
if data[0] == 'sms_status'
|
8
|
-
code = data[1]
|
9
|
-
status = data[2]
|
10
|
-
@sms = Sms::Smsru.find_by!(code: code)
|
11
7
|
|
12
|
-
|
13
|
-
@sms.save
|
8
|
+
next unless data[0] == 'sms_status'
|
14
9
|
|
15
|
-
|
16
|
-
|
10
|
+
code = data[1]
|
11
|
+
status = data[2]
|
12
|
+
@sms = Sms::Smsru.find_by!(code: code)
|
13
|
+
|
14
|
+
@sms.update(status_message: status)
|
15
|
+
|
16
|
+
@sms.accept! if status.to_s == '100'
|
17
17
|
end
|
18
18
|
|
19
19
|
render nothing: true, status: 100
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
23
|
+
|
23
24
|
def smsru_params
|
24
25
|
params.require(:data)
|
25
26
|
end
|
26
|
-
end
|
27
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateSmsters< ActiveRecord::Migration
|
1
|
+
class CreateSmsters < ActiveRecord::Migration
|
2
2
|
def up
|
3
3
|
create_table :smsters do |t|
|
4
4
|
t.string :text
|
@@ -17,4 +17,4 @@ class CreateSmsters< ActiveRecord::Migration
|
|
17
17
|
def down
|
18
18
|
drop_table :smsters
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Smster.configure do |config|
|
2
2
|
## Nexmo
|
3
|
-
config.nexmo_key =
|
4
|
-
config.nexmo_sekret =
|
3
|
+
config.nexmo_key = ''
|
4
|
+
config.nexmo_sekret = ''
|
5
5
|
|
6
6
|
## Clickatell
|
7
|
-
config.clickatell_authorization_code =
|
7
|
+
config.clickatell_authorization_code = ''
|
8
8
|
|
9
9
|
## Smsru
|
10
|
-
config.smsru_api_id =
|
11
|
-
end
|
10
|
+
config.smsru_api_id = ''
|
11
|
+
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
require 'rails/generators'
|
2
2
|
module Smster
|
3
3
|
class InstallGenerator < Rails::Generators::Base
|
4
|
-
desc
|
4
|
+
desc 'Add migration'
|
5
5
|
include Rails::Generators::Migration
|
6
6
|
source_root File.expand_path('../install/templates', __FILE__)
|
7
7
|
|
8
8
|
def copy_migrations
|
9
|
-
copy_migration
|
9
|
+
copy_migration 'create_smsters'
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.next_migration_number(
|
13
|
-
|
14
|
-
@prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
15
|
-
else
|
12
|
+
def self.next_migration_number(_)
|
13
|
+
if @prev_migration_nr
|
16
14
|
@prev_migration_nr += 1
|
15
|
+
else
|
16
|
+
@prev_migration_nr = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
|
17
17
|
end
|
18
18
|
@prev_migration_nr.to_s
|
19
19
|
end
|
@@ -27,9 +27,10 @@ module Smster
|
|
27
27
|
end
|
28
28
|
|
29
29
|
protected
|
30
|
+
|
30
31
|
def copy_migration(filename)
|
31
|
-
if self.class.migration_exists?(
|
32
|
-
say_status(
|
32
|
+
if self.class.migration_exists?('db/migrate', "#{filename}")
|
33
|
+
say_status('skipped', "Migration #{filename}.rb already exists")
|
33
34
|
else
|
34
35
|
migration_template "#{filename}.rb", "db/migrate/#{filename}.rb"
|
35
36
|
end
|
data/lib/smster.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
require 'rest_client'
|
2
|
-
require
|
2
|
+
require 'smster'
|
3
|
+
require 'smster/configuration'
|
3
4
|
require 'smster/sms'
|
4
|
-
require 'smster/sms/clickatell'
|
5
|
-
require 'smster/sms/nexmo'
|
6
5
|
require 'smster/sms/smsru'
|
6
|
+
require 'smster/sms/nexmo'
|
7
|
+
require 'smster/sms/clickatell'
|
7
8
|
|
8
9
|
module Smster
|
9
10
|
class Engine < Rails::Engine; end
|
10
|
-
|
11
|
+
|
11
12
|
class << self
|
12
13
|
attr_accessor :configuration
|
13
14
|
end
|
data/lib/smster/sms.rb
CHANGED
@@ -1,32 +1,50 @@
|
|
1
1
|
class Sms < ActiveRecord::Base
|
2
|
-
self.table_name =
|
3
|
-
attr_accessor :mode
|
2
|
+
self.table_name = 'smsters'
|
4
3
|
|
5
|
-
|
6
|
-
STATUS_CODES = { created: 0, sent: 1, delivered: 2, failed: 3 }
|
4
|
+
attr_accessor :from, :api_message_id
|
7
5
|
|
8
6
|
## Callbacks
|
9
|
-
|
7
|
+
before_validation :assing_status
|
10
8
|
|
11
|
-
##
|
12
|
-
|
9
|
+
## Codes
|
10
|
+
STATUSES = { created: 0, sent: 1, delivered: 2, failed: 3 }
|
13
11
|
|
14
12
|
## Etc.
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
def self.create(attrs = {})
|
14
|
+
sms = new(attrs).send_sms
|
15
|
+
sms.assing_code
|
16
|
+
sms.save
|
17
|
+
|
18
|
+
sms
|
20
19
|
end
|
21
20
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
def assing_status
|
22
|
+
self.status ||= STATUSES[:created]
|
23
|
+
end
|
24
|
+
|
25
|
+
def send_sms
|
26
|
+
send_to_provider
|
27
|
+
|
28
|
+
status_name = api_message_id ? :sent : :failed
|
29
|
+
self.status = STATUSES[status_name]
|
30
|
+
|
31
|
+
self
|
27
32
|
end
|
28
33
|
|
29
34
|
def accept!
|
30
|
-
|
35
|
+
update(status: STATUSES[:delivered])
|
36
|
+
end
|
37
|
+
|
38
|
+
def assing_code
|
39
|
+
self.code = api_message_id
|
31
40
|
end
|
32
|
-
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def send_to_provider
|
45
|
+
modify_params
|
46
|
+
|
47
|
+
response = send_request
|
48
|
+
assign_attrs_by(response)
|
49
|
+
end
|
50
|
+
end
|
data/lib/smster/version.rb
CHANGED
@@ -2,26 +2,35 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class Smster::ClickatellControllerTest < ActionController::TestCase
|
4
4
|
def setup
|
5
|
-
@text =
|
6
|
-
@
|
5
|
+
@text = 'simple text'
|
6
|
+
@to = (9_999_999 * rand).to_i
|
7
7
|
@provider = Sms::Clickatell
|
8
|
+
|
9
|
+
stub_send_request
|
8
10
|
end
|
9
11
|
|
10
12
|
test 'callback' do
|
11
|
-
delivered_code = Sms::
|
12
|
-
sms = @provider.create(text: @text, to: @
|
13
|
-
|
14
|
-
post :callback, {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"apiMessageId" => sms.code
|
20
|
-
}
|
13
|
+
delivered_code = Sms::STATUSES[:delivered]
|
14
|
+
sms = @provider.create(text: @text, to: @to)
|
15
|
+
|
16
|
+
post :callback, 'data' => {
|
17
|
+
'charge' => 1.5,
|
18
|
+
'messageStatus' => 003,
|
19
|
+
'description' => 'Received by recipient',
|
20
|
+
'apiMessageId' => sms.code
|
21
21
|
}
|
22
22
|
|
23
23
|
response = JSON.parse(@response.body)
|
24
24
|
result = { sms.id => delivered_code }
|
25
25
|
assert_equal result.as_json, response
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def stub_send_request
|
31
|
+
body = { data: { message: ['apiMessageId' => 15] } }.to_json
|
32
|
+
|
33
|
+
stub_request(:post, 'https://api.clickatell.com/rest/message')
|
34
|
+
.to_return(status: 200, body: body, headers: {})
|
35
|
+
end
|
36
|
+
end
|
@@ -2,18 +2,31 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class Smster::NexmoControllerTest < ActionController::TestCase
|
4
4
|
def setup
|
5
|
-
@text =
|
6
|
-
@number = (
|
5
|
+
@text = 'simple text'
|
6
|
+
@number = (9_999_999 * rand).to_i
|
7
7
|
@provider = Sms::Nexmo
|
8
|
+
|
9
|
+
stub_send_request
|
8
10
|
end
|
9
11
|
|
10
12
|
test 'callback' do
|
11
|
-
delivered_code = Sms::
|
13
|
+
delivered_code = Sms::STATUSES[:delivered]
|
12
14
|
sms = @provider.create(text: @text, to: @number)
|
13
15
|
|
14
|
-
post :callback,
|
16
|
+
post :callback, 'messageId' => sms.code, 'status' => 'delivered'
|
17
|
+
|
15
18
|
response = JSON.parse(@response.body)
|
16
19
|
result = { sms.id => delivered_code }
|
20
|
+
|
17
21
|
assert_equal result.as_json, response
|
18
22
|
end
|
19
|
-
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def stub_send_request
|
27
|
+
body = { messages: ['message-id' => 15] }.to_json
|
28
|
+
|
29
|
+
stub_request(:post, 'https://rest.nexmo.com/sms/json')
|
30
|
+
.to_return(status: 200, body: body, headers: {})
|
31
|
+
end
|
32
|
+
end
|
@@ -2,22 +2,30 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class Smster::SmsruControllerTest < ActionController::TestCase
|
4
4
|
def setup
|
5
|
-
@text =
|
6
|
-
@
|
5
|
+
@text = 'simple text'
|
6
|
+
@to = (9_999_999 * rand).to_i
|
7
7
|
@provider = Sms::Smsru
|
8
|
+
|
9
|
+
stub_send_request
|
8
10
|
end
|
9
11
|
|
10
12
|
test 'callback' do
|
11
|
-
delivered_code = Sms::
|
12
|
-
sms = @provider.create(text: @text, to: @
|
13
|
+
delivered_code = Sms::STATUSES[:delivered]
|
14
|
+
sms = @provider.create(text: @text, to: @to)
|
13
15
|
|
14
|
-
post :callback, {
|
15
|
-
"data" => ["sms_status\n#{sms.code}\n100"]
|
16
|
-
}
|
16
|
+
post :callback, 'data' => ["sms_status\n#{sms.code}\n100"]
|
17
17
|
|
18
|
-
response = @response.status
|
19
18
|
sms = assigns(:sms)
|
20
19
|
assert_equal 100, @response.status
|
21
20
|
assert_equal delivered_code, sms.status
|
22
21
|
end
|
23
|
-
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def stub_send_request
|
26
|
+
body = "100\n201523-1000007\nbalance=52.54"
|
27
|
+
|
28
|
+
stub_request(:post, 'http://sms.ru/sms/send')
|
29
|
+
.to_return(status: 200, body: body, headers: {})
|
30
|
+
end
|
31
|
+
end
|
data/test/dummy/Rakefile
CHANGED
@@ -7,5 +7,5 @@ Smster.configure do |config|
|
|
7
7
|
config.clickatell_authorization_code = "I._aJiuBBZW6K8A_V6jh34tJLt7eghOlMrgsiCrK3ze63hxFpe8n5.7PY1PNStxLIn"
|
8
8
|
|
9
9
|
## Smsru
|
10
|
-
config.smsru_api_id = "
|
10
|
+
config.smsru_api_id = "b9812ac9-c035-04f4-45e6-2ad22d375cb9"
|
11
11
|
end
|
Binary file
|
@@ -269,3 +269,52 @@ Error Unroutable message - rejected
|
|
269
269
|
[1m[35mSQL (0.4ms)[0m INSERT INTO "smsters" ("type", "status", "to", "text", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["type", "Sms::Nexmo"], ["status", 0], ["to", "79050958806"], ["text", "privet1"], ["created_at", "2015-04-01 05:17:32.611427"], ["updated_at", "2015-04-01 05:17:32.611427"]]
|
270
270
|
[1m[36mSQL (0.4ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "to" = ?, "text" = ?, "created_at" = ?, "updated_at" = ?, "id" = ?, "code" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Nexmo"], ["status", 1], ["to", "79050958806"], ["text", "privet1"], ["created_at", "2015-04-01 05:17:32.611427"], ["updated_at", "2015-04-01 05:17:32.611427"], ["id", 53], ["code", "0200000059FADD5B"], ["id", 53]]
|
271
271
|
[1m[35m (2.6ms)[0m commit transaction
|
272
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
273
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 0], ["text", "Hello"], ["to", "+79050958806"], ["created_at", "2015-05-31 12:09:45.034566"], ["updated_at", "2015-05-31 12:09:45.034566"]]
|
274
|
+
Error 200
|
275
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "created_at" = ?, "updated_at" = ?, "id" = ?, "status_message" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["created_at", "2015-05-31 12:09:45.034566"], ["updated_at", "2015-05-31 12:09:45.034566"], ["id", 54], ["status_message", "200"], ["id", 54]]
|
276
|
+
[1m[35m (2.7ms)[0m commit transaction
|
277
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
278
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 0], ["text", "Hello"], ["to", "79050958806"], ["created_at", "2015-05-31 12:10:16.078787"], ["updated_at", "2015-05-31 12:10:16.078787"]]
|
279
|
+
Error 200
|
280
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "created_at" = ?, "updated_at" = ?, "id" = ?, "status_message" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "79050958806"], ["created_at", "2015-05-31 12:10:16.078787"], ["updated_at", "2015-05-31 12:10:16.078787"], ["id", 55], ["status_message", "200"], ["id", 55]]
|
281
|
+
[1m[35m (2.8ms)[0m commit transaction
|
282
|
+
Error 200
|
283
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
284
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "status_message", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:10:28.340706"], ["updated_at", "2015-05-31 12:10:28.340706"]]
|
285
|
+
Error 200
|
286
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "status_message" = ?, "created_at" = ?, "updated_at" = ?, "id" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:10:28.340706"], ["updated_at", "2015-05-31 12:10:28.340706"], ["id", 56], ["id", 56]]
|
287
|
+
[1m[35m (2.8ms)[0m commit transaction
|
288
|
+
Error 200
|
289
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
290
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "status_message", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:11:01.823444"], ["updated_at", "2015-05-31 12:11:01.823444"]]
|
291
|
+
Error 200
|
292
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "status_message" = ?, "created_at" = ?, "updated_at" = ?, "id" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:11:01.823444"], ["updated_at", "2015-05-31 12:11:01.823444"], ["id", 57], ["id", 57]]
|
293
|
+
[1m[35m (0.9ms)[0m commit transaction
|
294
|
+
Error 200
|
295
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
296
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "status_message", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:11:28.359710"], ["updated_at", "2015-05-31 12:11:28.359710"]]
|
297
|
+
Error 200
|
298
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "status_message" = ?, "created_at" = ?, "updated_at" = ?, "id" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:11:28.359710"], ["updated_at", "2015-05-31 12:11:28.359710"], ["id", 58], ["id", 58]]
|
299
|
+
[1m[35m (2.7ms)[0m commit transaction
|
300
|
+
Error 200
|
301
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
302
|
+
[1m[35mSQL (2.0ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "status_message", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:12:05.400871"], ["updated_at", "2015-05-31 12:12:05.400871"]]
|
303
|
+
Error 200
|
304
|
+
[1m[36mSQL (2.2ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "status_message" = ?, "created_at" = ?, "updated_at" = ?, "id" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:12:05.400871"], ["updated_at", "2015-05-31 12:12:05.400871"], ["id", 59], ["id", 59]]
|
305
|
+
[1m[35m (1.3ms)[0m commit transaction
|
306
|
+
Error 200
|
307
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
308
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "status_message", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:12:18.887816"], ["updated_at", "2015-05-31 12:12:18.887816"]]
|
309
|
+
Error 200
|
310
|
+
[1m[36mSQL (0.6ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "status_message" = ?, "created_at" = ?, "updated_at" = ?, "id" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 3], ["text", "Hello"], ["to", "+79050958806"], ["status_message", "200"], ["created_at", "2015-05-31 12:12:18.887816"], ["updated_at", "2015-05-31 12:12:18.887816"], ["id", 60], ["id", 60]]
|
311
|
+
[1m[35m (1.1ms)[0m commit transaction
|
312
|
+
Mode: production. To: 79050958806, text: Hello
|
313
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
314
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "smsters" ("type", "status", "text", "to", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["status", 0], ["text", "Hello"], ["to", "+79050958806"], ["created_at", "2015-05-31 12:15:32.722614"], ["updated_at", "2015-05-31 12:15:32.722614"]]
|
315
|
+
Mode: production. To: 79050958806, text: Hello
|
316
|
+
[1m[36mSQL (0.6ms)[0m [1mUPDATE "smsters" SET "type" = ?, "status" = ?, "text" = ?, "to" = ?, "created_at" = ?, "updated_at" = ?, "id" = ? WHERE "smsters"."id" = ?[0m [["type", "Sms::Smsru"], ["status", 0], ["text", "Hello"], ["to", "+79050958806"], ["created_at", "2015-05-31 12:15:32.722614"], ["updated_at", "2015-05-31 12:15:32.722614"], ["id", 61], ["id", 61]]
|
317
|
+
[1m[35m (0.9ms)[0m commit transaction
|
318
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
319
|
+
[1m[35mSQL (1.7ms)[0m INSERT INTO "smsters" ("type", "to", "text", "status", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["type", "Sms::Smsru"], ["to", "79050958806"], ["text", "test rails gem"], ["status", 1], ["code", "201525-1000000"], ["created_at", "2015-06-15 17:01:55.748243"], ["updated_at", "2015-06-15 17:01:55.748243"]]
|
320
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|