short_message 1.1.2 → 2.0.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 +4 -4
- data/CHANGELOG.md +32 -0
- data/README.md +370 -24
- data/Rakefile +2 -3
- data/app/controllers/short_message/messages_controller.rb +35 -20
- data/app/mailers/short_message/application_mailer.rb +6 -0
- data/app/mailers/short_message/mailer.rb +17 -3
- data/app/models/short_message/application_record.rb +5 -0
- data/app/models/short_message/message.rb +154 -44
- data/config/routes.rb +1 -2
- data/db/migrate/20130308133457_create_short_message_messages.rb +1 -1
- data/db/migrate/20260608090000_add_delivery_metadata_to_short_message_messages.rb +14 -0
- data/lib/generators/short_message/templates/config/initializers/short_message.rb +16 -15
- data/lib/short_message/config.rb +14 -28
- data/lib/short_message/engine.rb +0 -4
- data/lib/short_message/version.rb +1 -1
- metadata +44 -91
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -13
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -54
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -79
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -4
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config.ru +0 -4
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +0 -8
- data/test/short_message_test.rb +0 -7
- data/test/test_helper.rb +0 -21
|
@@ -1,38 +1,38 @@
|
|
|
1
|
+
require "net/http"
|
|
2
|
+
require "uri"
|
|
3
|
+
require "openssl"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
1
6
|
module ShortMessage
|
|
2
|
-
class Message <
|
|
7
|
+
class Message < ApplicationRecord
|
|
3
8
|
def deliver
|
|
4
|
-
deliver_method = Rails.version.to_f > 4.2 ? "deliver_now" : "deliver"
|
|
5
|
-
|
|
6
9
|
self.sender = ShortMessage.config.default_sms_sender if self.sender.blank?
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
response, data = http.post(ShortMessage.config.send_file_path, build_deliver_params_string)
|
|
15
|
-
result_set = response.body.gsub("(","").gsub(")","").split(" ")
|
|
16
|
-
response_code = result_set[0].to_i
|
|
10
|
+
normalize_addresses!
|
|
11
|
+
return false if errors.any?
|
|
12
|
+
return false if self.recipient.blank? || self.text.blank?
|
|
13
|
+
return false if ShortMessage.config.api_key.to_s.strip.empty?
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
end
|
|
15
|
+
response = send_v2_request
|
|
16
|
+
parsed = parse_delivery_response(response)
|
|
17
|
+
assign_delivery_metadata(response, parsed)
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
eval "ShortMessage::Mailer.error_notification(self, response).#{deliver_method}" unless ShortMessage.config.admin_notification_email.blank?
|
|
28
|
-
end
|
|
19
|
+
if delivery_successful?(response, parsed)
|
|
20
|
+
self.message_key = parsed[:message_key] if parsed[:message_key].present?
|
|
21
|
+
ActiveSupport::Notifications.instrument("short_message.delivered", key: self.message_key)
|
|
22
|
+
return self.save
|
|
29
23
|
else
|
|
24
|
+
if response.code.to_i == 402 && ShortMessage.config.reload_notification_email.present?
|
|
25
|
+
ShortMessage::Mailer.payment_required_notification.deliver_now
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Rails.logger.error("ShortMessage delivery failed: HTTP #{response.code}, body=#{response.body}")
|
|
29
|
+
send_error_notification(response)
|
|
30
30
|
return false
|
|
31
31
|
end
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
Rails.logger.error("ShortMessage delivery raised #{e.class}: #{e.message}")
|
|
34
|
+
send_error_notification(e)
|
|
35
|
+
false
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def status_text
|
|
@@ -40,23 +40,133 @@ module ShortMessage
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
private
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
|
|
44
|
+
def send_v2_request
|
|
45
|
+
format = ShortMessage.config.response_format.to_s.strip
|
|
46
|
+
format = "plain" if format.empty?
|
|
47
|
+
url = "#{ShortMessage.config.api_base_url}/smsc/sendsms/#{ShortMessage.config.api_key}/#{format}"
|
|
48
|
+
|
|
49
|
+
uri = URI.parse(url)
|
|
50
|
+
request = Net::HTTP::Post.new(uri)
|
|
51
|
+
request["Content-Type"] = "application/x-www-form-urlencoded"
|
|
52
|
+
request["Accept"] = accept_header_for(format)
|
|
53
|
+
request.body = URI.encode_www_form(build_deliver_params_hash)
|
|
54
|
+
|
|
55
|
+
perform_http_request(uri, request)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def perform_http_request(uri, request)
|
|
59
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
60
|
+
http.use_ssl = uri.scheme == "https"
|
|
61
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER if http.use_ssl?
|
|
62
|
+
http.open_timeout = (ShortMessage.config.open_timeout || 5).to_i
|
|
63
|
+
http.read_timeout = (ShortMessage.config.read_timeout || 30).to_i
|
|
64
|
+
http.request(request)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def accept_header_for(format)
|
|
68
|
+
return "application/json" if format == "json"
|
|
69
|
+
"application/x-www-form-urlencoded"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def build_deliver_params_hash
|
|
73
|
+
params = {
|
|
74
|
+
from: self.sender,
|
|
75
|
+
to: self.recipient,
|
|
76
|
+
text: self.text
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
params["dlr-mask"] = ShortMessage.config.dlr_mask if ShortMessage.config.dlr_mask.present?
|
|
80
|
+
params["dlr-url"] = ShortMessage.config.dlr_url if ShortMessage.config.dlr_url.present?
|
|
81
|
+
params
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def parse_delivery_response(response)
|
|
85
|
+
body = response.body.to_s.strip
|
|
86
|
+
|
|
87
|
+
if json_response?(body)
|
|
88
|
+
payload = JSON.parse(body)
|
|
89
|
+
return {
|
|
90
|
+
response_code: payload["code"].to_i,
|
|
91
|
+
message_status: payload["status"] || payload["message-status"],
|
|
92
|
+
message_key: payload["message-id"] || payload["message_id"] || payload["messageId"] || payload["id"],
|
|
93
|
+
raw_payload: payload
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
normalized = body.gsub("(", "").gsub(")", "")
|
|
98
|
+
tokens = normalized.include?(",") ? normalized.split(",").map(&:strip) : normalized.split(" ").map(&:strip)
|
|
99
|
+
{
|
|
100
|
+
response_code: response.code.to_i,
|
|
101
|
+
message_status: tokens[0],
|
|
102
|
+
message_key: tokens[1],
|
|
103
|
+
message_count: tokens[2].to_i,
|
|
104
|
+
raw_payload: body
|
|
105
|
+
}
|
|
106
|
+
rescue JSON::ParserError
|
|
107
|
+
{
|
|
108
|
+
response_code: 0,
|
|
109
|
+
message_status: nil,
|
|
110
|
+
message_key: nil,
|
|
111
|
+
raw_payload: body
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def delivery_successful?(response, parsed)
|
|
116
|
+
response.code.to_i == 200 && parsed[:message_key].present?
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def send_error_notification(response_or_error)
|
|
120
|
+
return if ShortMessage.config.admin_notification_email.blank?
|
|
121
|
+
|
|
122
|
+
ShortMessage::Mailer.error_notification(self, response_or_error).deliver_now
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def json_response?(body)
|
|
126
|
+
body.start_with?("{")
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def assign_delivery_metadata(response, parsed)
|
|
130
|
+
self.provider_http_status = response.code.to_i if has_attribute?(:provider_http_status)
|
|
131
|
+
self.provider_status = parsed[:message_status] if has_attribute?(:provider_status)
|
|
132
|
+
if has_attribute?(:provider_response_body)
|
|
133
|
+
self.provider_response_body = parsed[:raw_payload].is_a?(String) ? parsed[:raw_payload] : parsed[:raw_payload].to_json
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def normalize_addresses!
|
|
138
|
+
normalized_recipient = normalize_recipient(self.recipient)
|
|
139
|
+
if normalized_recipient.nil?
|
|
140
|
+
errors.add(:recipient, "must be in international format, e.g. +41791234567")
|
|
141
|
+
else
|
|
142
|
+
self.recipient = normalized_recipient
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
self.sender = normalize_sender(self.sender)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def normalize_recipient(value)
|
|
149
|
+
normalized = sanitize_phone_number(value)
|
|
150
|
+
return nil if normalized.blank?
|
|
151
|
+
|
|
152
|
+
normalized = "+#{normalized[2..]}" if normalized.start_with?("00")
|
|
153
|
+
return normalized if normalized.match?(/\A\+[1-9]\d{6,14}\z/)
|
|
154
|
+
|
|
155
|
+
nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def normalize_sender(value)
|
|
159
|
+
return value if value.blank?
|
|
160
|
+
|
|
161
|
+
normalized = sanitize_phone_number(value)
|
|
162
|
+
normalized = "+#{normalized[2..]}" if normalized.start_with?("00")
|
|
163
|
+
return normalized if normalized.match?(/\A\+[1-9]\d{6,14}\z/)
|
|
164
|
+
|
|
165
|
+
value.to_s.strip
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def sanitize_phone_number(value)
|
|
169
|
+
value.to_s.strip.gsub(/[\s\-\(\)]/, "")
|
|
60
170
|
end
|
|
61
171
|
end
|
|
62
172
|
end
|
data/config/routes.rb
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class AddDeliveryMetadataToShortMessageMessages < ActiveRecord::Migration[6.1]
|
|
2
|
+
def change
|
|
3
|
+
add_column :short_message_messages, :provider_http_status, :integer, after: :text
|
|
4
|
+
add_column :short_message_messages, :provider_status, :string, after: :provider_http_status
|
|
5
|
+
add_column :short_message_messages, :provider_response_body, :text, after: :provider_status
|
|
6
|
+
add_column :short_message_messages, :error_code, :string, after: :provider_response_body
|
|
7
|
+
add_column :short_message_messages, :error_message, :string, after: :error_code
|
|
8
|
+
add_column :short_message_messages, :submitted_at, :datetime, after: :error_message
|
|
9
|
+
add_column :short_message_messages, :delivered_at, :datetime, after: :submitted_at
|
|
10
|
+
|
|
11
|
+
add_index :short_message_messages, :message_key, unique: true
|
|
12
|
+
add_index :short_message_messages, :status_code
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
ShortMessage.configure do |config|
|
|
2
|
-
#
|
|
3
|
-
config.
|
|
4
|
-
config.
|
|
2
|
+
# GTX REST API v2
|
|
3
|
+
config.api_base_url = "https://rest.gtx-messaging.net"
|
|
4
|
+
config.api_key = ENV.fetch("GTX_API_KEY", "")
|
|
5
|
+
config.response_format = "json" # allowed: json, xml, plain
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
# config.
|
|
7
|
+
# Optional: delivery report callbacks — GTX fetches this URL via GET/POST
|
|
8
|
+
# config.dlr_url = "https://example.com/short_message/messages/status?token=SECRET"
|
|
9
|
+
config.dlr_mask = 3
|
|
8
10
|
|
|
9
|
-
#
|
|
10
|
-
config.
|
|
11
|
-
config.password = ""
|
|
11
|
+
# Optional: validate incoming DLR callbacks with a secret token
|
|
12
|
+
# config.callback_token = ENV["SHORT_MESSAGE_CALLBACK_TOKEN"]
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
config.open_timeout = 5
|
|
15
|
+
config.read_timeout = 30
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
config.
|
|
17
|
-
config.admin_notification_email = "webmaster@your-domain.com" # set nil to deactivate error mailing
|
|
18
|
-
# config.voucher_notification_email = "give-me-money@your-domain.com" # set nil to disable voucher mailing
|
|
17
|
+
# Default sender used when message.sender is blank
|
|
18
|
+
# config.default_sms_sender = "MyApp"
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
config.default_mail_sender = "webmaster@your-domain.com"
|
|
21
|
+
config.reload_notification_email = "webmaster@your-domain.com"
|
|
22
|
+
config.admin_notification_email = "webmaster@your-domain.com"
|
|
22
23
|
end
|
data/lib/short_message/config.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
require 'active_support/configurable'
|
|
2
|
-
|
|
3
1
|
module ShortMessage
|
|
4
|
-
def self.configure
|
|
2
|
+
def self.configure
|
|
5
3
|
yield @config ||= ShortMessage::Configuration.new
|
|
6
4
|
end
|
|
7
5
|
|
|
@@ -9,30 +7,18 @@ module ShortMessage
|
|
|
9
7
|
@config
|
|
10
8
|
end
|
|
11
9
|
|
|
12
|
-
class Configuration
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
config_accessor :admin_notification_email
|
|
26
|
-
config_accessor :voucher_notification_email
|
|
27
|
-
config_accessor :default_mail_sender
|
|
28
|
-
|
|
29
|
-
def param_name
|
|
30
|
-
config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# define param_name writer
|
|
34
|
-
writer, line = 'def param_name=(value); config.param_name = value; end', __LINE__
|
|
35
|
-
singleton_class.class_eval writer, __FILE__, line
|
|
36
|
-
class_eval writer, __FILE__, line
|
|
10
|
+
class Configuration
|
|
11
|
+
attr_accessor :api_base_url,
|
|
12
|
+
:api_key,
|
|
13
|
+
:response_format,
|
|
14
|
+
:default_sms_sender,
|
|
15
|
+
:reload_notification_email,
|
|
16
|
+
:admin_notification_email,
|
|
17
|
+
:default_mail_sender,
|
|
18
|
+
:dlr_url,
|
|
19
|
+
:dlr_mask,
|
|
20
|
+
:callback_token,
|
|
21
|
+
:open_timeout,
|
|
22
|
+
:read_timeout
|
|
37
23
|
end
|
|
38
24
|
end
|
data/lib/short_message/engine.rb
CHANGED
|
@@ -2,10 +2,6 @@ module ShortMessage
|
|
|
2
2
|
class Engine < ::Rails::Engine
|
|
3
3
|
isolate_namespace ShortMessage
|
|
4
4
|
|
|
5
|
-
initializer "short_message.migrate_database" do |app|
|
|
6
|
-
Rails.application.config.paths['db/migrate'] << paths["db/migrate"].expanded.join
|
|
7
|
-
end
|
|
8
|
-
|
|
9
5
|
config.generators do |g|
|
|
10
6
|
g.test_framework false
|
|
11
7
|
g.assets false
|
metadata
CHANGED
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: short_message
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andi Saurer
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '6.1'
|
|
20
|
+
- - "<"
|
|
18
21
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
22
|
+
version: '9.0'
|
|
20
23
|
type: :runtime
|
|
21
24
|
prerelease: false
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
26
|
requirements:
|
|
24
|
-
- - "
|
|
27
|
+
- - ">="
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '6.1'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '9.0'
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: sqlite3
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.6'
|
|
40
|
+
type: :development
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
25
45
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
46
|
+
version: '1.6'
|
|
27
47
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
48
|
+
name: webmock
|
|
29
49
|
requirement: !ruby/object:Gem::Requirement
|
|
30
50
|
requirements:
|
|
31
51
|
- - ">="
|
|
@@ -38,13 +58,15 @@ dependencies:
|
|
|
38
58
|
- - ">="
|
|
39
59
|
- !ruby/object:Gem::Version
|
|
40
60
|
version: '0'
|
|
41
|
-
description:
|
|
61
|
+
description: Rails engine for sending SMS via GTX REST API v2, with delivery status
|
|
62
|
+
callbacks and metadata persistence
|
|
42
63
|
email:
|
|
43
64
|
- andreas.saurer@econ.uzh.ch
|
|
44
65
|
executables: []
|
|
45
66
|
extensions: []
|
|
46
67
|
extra_rdoc_files: []
|
|
47
68
|
files:
|
|
69
|
+
- CHANGELOG.md
|
|
48
70
|
- MIT-LICENSE
|
|
49
71
|
- README.md
|
|
50
72
|
- Rakefile
|
|
@@ -52,10 +74,13 @@ files:
|
|
|
52
74
|
- app/controllers/short_message/messages_controller.rb
|
|
53
75
|
- app/helpers/short_message/application_helper.rb
|
|
54
76
|
- app/mailers/application_mailer.rb
|
|
77
|
+
- app/mailers/short_message/application_mailer.rb
|
|
55
78
|
- app/mailers/short_message/mailer.rb
|
|
79
|
+
- app/models/short_message/application_record.rb
|
|
56
80
|
- app/models/short_message/message.rb
|
|
57
81
|
- config/routes.rb
|
|
58
82
|
- db/migrate/20130308133457_create_short_message_messages.rb
|
|
83
|
+
- db/migrate/20260608090000_add_delivery_metadata_to_short_message_messages.rb
|
|
59
84
|
- lib/generators/short_message/install_generator.rb
|
|
60
85
|
- lib/generators/short_message/templates/config/initializers/short_message.rb
|
|
61
86
|
- lib/generators/short_message/templates/config/locales/short_message.de.yml
|
|
@@ -65,48 +90,14 @@ files:
|
|
|
65
90
|
- lib/short_message/engine.rb
|
|
66
91
|
- lib/short_message/version.rb
|
|
67
92
|
- lib/tasks/short_message_tasks.rake
|
|
68
|
-
- test/dummy/README.rdoc
|
|
69
|
-
- test/dummy/Rakefile
|
|
70
|
-
- test/dummy/app/assets/javascripts/application.js
|
|
71
|
-
- test/dummy/app/assets/stylesheets/application.css
|
|
72
|
-
- test/dummy/app/controllers/application_controller.rb
|
|
73
|
-
- test/dummy/app/helpers/application_helper.rb
|
|
74
|
-
- test/dummy/app/views/layouts/application.html.erb
|
|
75
|
-
- test/dummy/bin/bundle
|
|
76
|
-
- test/dummy/bin/rails
|
|
77
|
-
- test/dummy/bin/rake
|
|
78
|
-
- test/dummy/bin/setup
|
|
79
|
-
- test/dummy/config.ru
|
|
80
|
-
- test/dummy/config/application.rb
|
|
81
|
-
- test/dummy/config/boot.rb
|
|
82
|
-
- test/dummy/config/database.yml
|
|
83
|
-
- test/dummy/config/environment.rb
|
|
84
|
-
- test/dummy/config/environments/development.rb
|
|
85
|
-
- test/dummy/config/environments/production.rb
|
|
86
|
-
- test/dummy/config/environments/test.rb
|
|
87
|
-
- test/dummy/config/initializers/assets.rb
|
|
88
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
|
89
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
|
90
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
|
91
|
-
- test/dummy/config/initializers/inflections.rb
|
|
92
|
-
- test/dummy/config/initializers/mime_types.rb
|
|
93
|
-
- test/dummy/config/initializers/session_store.rb
|
|
94
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
|
95
|
-
- test/dummy/config/locales/en.yml
|
|
96
|
-
- test/dummy/config/routes.rb
|
|
97
|
-
- test/dummy/config/secrets.yml
|
|
98
|
-
- test/dummy/public/404.html
|
|
99
|
-
- test/dummy/public/422.html
|
|
100
|
-
- test/dummy/public/500.html
|
|
101
|
-
- test/dummy/public/favicon.ico
|
|
102
|
-
- test/integration/navigation_test.rb
|
|
103
|
-
- test/short_message_test.rb
|
|
104
|
-
- test/test_helper.rb
|
|
105
93
|
homepage: https://github.com/asaurer/short_message
|
|
106
94
|
licenses:
|
|
107
95
|
- MIT
|
|
108
|
-
metadata:
|
|
109
|
-
|
|
96
|
+
metadata:
|
|
97
|
+
homepage_uri: https://github.com/asaurer/short_message
|
|
98
|
+
source_code_uri: https://github.com/asaurer/short_message
|
|
99
|
+
changelog_uri: https://github.com/asaurer/short_message/blob/master/CHANGELOG.md
|
|
100
|
+
post_install_message:
|
|
110
101
|
rdoc_options: []
|
|
111
102
|
require_paths:
|
|
112
103
|
- lib
|
|
@@ -114,53 +105,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
114
105
|
requirements:
|
|
115
106
|
- - ">="
|
|
116
107
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
108
|
+
version: 3.2.0
|
|
118
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
110
|
requirements:
|
|
120
111
|
- - ">="
|
|
121
112
|
- !ruby/object:Gem::Version
|
|
122
113
|
version: '0'
|
|
123
114
|
requirements: []
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
signing_key:
|
|
115
|
+
rubygems_version: 3.5.18
|
|
116
|
+
signing_key:
|
|
127
117
|
specification_version: 4
|
|
128
|
-
summary: Send
|
|
129
|
-
test_files:
|
|
130
|
-
- test/dummy/app/controllers/application_controller.rb
|
|
131
|
-
- test/dummy/app/views/layouts/application.html.erb
|
|
132
|
-
- test/dummy/app/assets/javascripts/application.js
|
|
133
|
-
- test/dummy/app/assets/stylesheets/application.css
|
|
134
|
-
- test/dummy/app/helpers/application_helper.rb
|
|
135
|
-
- test/dummy/bin/rake
|
|
136
|
-
- test/dummy/bin/setup
|
|
137
|
-
- test/dummy/bin/bundle
|
|
138
|
-
- test/dummy/bin/rails
|
|
139
|
-
- test/dummy/config/secrets.yml
|
|
140
|
-
- test/dummy/config/routes.rb
|
|
141
|
-
- test/dummy/config/locales/en.yml
|
|
142
|
-
- test/dummy/config/environments/production.rb
|
|
143
|
-
- test/dummy/config/environments/development.rb
|
|
144
|
-
- test/dummy/config/environments/test.rb
|
|
145
|
-
- test/dummy/config/environment.rb
|
|
146
|
-
- test/dummy/config/application.rb
|
|
147
|
-
- test/dummy/config/database.yml
|
|
148
|
-
- test/dummy/config/boot.rb
|
|
149
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
|
150
|
-
- test/dummy/config/initializers/mime_types.rb
|
|
151
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
|
152
|
-
- test/dummy/config/initializers/session_store.rb
|
|
153
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
|
154
|
-
- test/dummy/config/initializers/assets.rb
|
|
155
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
|
156
|
-
- test/dummy/config/initializers/inflections.rb
|
|
157
|
-
- test/dummy/config.ru
|
|
158
|
-
- test/dummy/Rakefile
|
|
159
|
-
- test/dummy/public/favicon.ico
|
|
160
|
-
- test/dummy/public/422.html
|
|
161
|
-
- test/dummy/public/500.html
|
|
162
|
-
- test/dummy/public/404.html
|
|
163
|
-
- test/dummy/README.rdoc
|
|
164
|
-
- test/short_message_test.rb
|
|
165
|
-
- test/integration/navigation_test.rb
|
|
166
|
-
- test/test_helper.rb
|
|
118
|
+
summary: Send SMS through the GTX REST API v2 from a Rails app
|
|
119
|
+
test_files: []
|
data/test/dummy/README.rdoc
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
== README
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
|
4
|
-
application up and running.
|
|
5
|
-
|
|
6
|
-
Things you may want to cover:
|
|
7
|
-
|
|
8
|
-
* Ruby version
|
|
9
|
-
|
|
10
|
-
* System dependencies
|
|
11
|
-
|
|
12
|
-
* Configuration
|
|
13
|
-
|
|
14
|
-
* Database creation
|
|
15
|
-
|
|
16
|
-
* Database initialization
|
|
17
|
-
|
|
18
|
-
* How to run the test suite
|
|
19
|
-
|
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
-
|
|
22
|
-
* Deployment instructions
|
|
23
|
-
|
|
24
|
-
* ...
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
-
// listed below.
|
|
3
|
-
//
|
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
|
6
|
-
//
|
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
-
// compiled file.
|
|
9
|
-
//
|
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
|
11
|
-
// about supported directives.
|
|
12
|
-
//
|
|
13
|
-
//= require_tree .
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
-
* listed below.
|
|
4
|
-
*
|
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
-
*
|
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
|
11
|
-
* file per style scope.
|
|
12
|
-
*
|
|
13
|
-
*= require_tree .
|
|
14
|
-
*= require_self
|
|
15
|
-
*/
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED