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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/README.md +370 -24
  4. data/Rakefile +2 -3
  5. data/app/controllers/short_message/messages_controller.rb +35 -20
  6. data/app/mailers/short_message/application_mailer.rb +6 -0
  7. data/app/mailers/short_message/mailer.rb +17 -3
  8. data/app/models/short_message/application_record.rb +5 -0
  9. data/app/models/short_message/message.rb +154 -44
  10. data/config/routes.rb +1 -2
  11. data/db/migrate/20130308133457_create_short_message_messages.rb +1 -1
  12. data/db/migrate/20260608090000_add_delivery_metadata_to_short_message_messages.rb +14 -0
  13. data/lib/generators/short_message/templates/config/initializers/short_message.rb +16 -15
  14. data/lib/short_message/config.rb +14 -28
  15. data/lib/short_message/engine.rb +0 -4
  16. data/lib/short_message/version.rb +1 -1
  17. metadata +44 -91
  18. data/test/dummy/README.rdoc +0 -28
  19. data/test/dummy/Rakefile +0 -6
  20. data/test/dummy/app/assets/javascripts/application.js +0 -13
  21. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  22. data/test/dummy/app/controllers/application_controller.rb +0 -5
  23. data/test/dummy/app/helpers/application_helper.rb +0 -2
  24. data/test/dummy/app/views/layouts/application.html.erb +0 -13
  25. data/test/dummy/bin/bundle +0 -3
  26. data/test/dummy/bin/rails +0 -4
  27. data/test/dummy/bin/rake +0 -4
  28. data/test/dummy/bin/setup +0 -29
  29. data/test/dummy/config/application.rb +0 -26
  30. data/test/dummy/config/boot.rb +0 -5
  31. data/test/dummy/config/database.yml +0 -54
  32. data/test/dummy/config/environment.rb +0 -5
  33. data/test/dummy/config/environments/development.rb +0 -41
  34. data/test/dummy/config/environments/production.rb +0 -79
  35. data/test/dummy/config/environments/test.rb +0 -42
  36. data/test/dummy/config/initializers/assets.rb +0 -11
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  38. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  39. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  40. data/test/dummy/config/initializers/inflections.rb +0 -16
  41. data/test/dummy/config/initializers/mime_types.rb +0 -4
  42. data/test/dummy/config/initializers/session_store.rb +0 -3
  43. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  44. data/test/dummy/config/locales/en.yml +0 -23
  45. data/test/dummy/config/routes.rb +0 -4
  46. data/test/dummy/config/secrets.yml +0 -22
  47. data/test/dummy/config.ru +0 -4
  48. data/test/dummy/public/404.html +0 -67
  49. data/test/dummy/public/422.html +0 -67
  50. data/test/dummy/public/500.html +0 -66
  51. data/test/dummy/public/favicon.ico +0 -0
  52. data/test/integration/navigation_test.rb +0 -8
  53. data/test/short_message_test.rb +0 -7
  54. 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 < ActiveRecord::Base
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
- unless self.recipient.blank? and self.text.blank?
8
- http = Net::HTTP.new(ShortMessage.config.gateway_server, ShortMessage.config.gateway_port)
9
- if ShortMessage.config.gateway_port == Net::HTTP.https_default_port()
10
- http.use_ssl = true
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
- if response_code == 200 or response_code == 402
19
- if response_code == 402 and not ShortMessage.config.reload_notification_email.blank?
20
- eval "ShortMessage::Mailer.payment_required_notification().#{deliver_method}"
21
- end
15
+ response = send_v2_request
16
+ parsed = parse_delivery_response(response)
17
+ assign_delivery_metadata(response, parsed)
22
18
 
23
- self.message_key = result_set[2] unless result_set[2].blank?
24
- ActiveSupport::Notifications.instrument('short_message.delivered', options: { key: (result_set[2] unless result_set[2].blank?) })
25
- return self.save
26
- else
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
- end
33
-
34
- def recharge
35
- raise "NOT YET IMPLEMENTED"
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
- def build_deliver_params_string
44
- params = []
45
- params << "user=#{ShortMessage.config.user}"
46
- params << "pass=#{ShortMessage.config.password}"
47
- params << "from=#{CGI.escape(self.sender)}"
48
- params << "to=#{CGI.escape(self.recipient)}"
49
- params << "text=#{CGI.escape(self.text)}"
50
- params.join("&")
51
- end
52
-
53
- def build_recharge_params_string amount
54
- raise "NOT YET IMPLEMENTED"
55
- # params = []
56
- # params << "user=#{ShortMessage.config.user}"
57
- # params << "password=#{ShortMessage.config.password}"
58
- # params << "amount=#{amount}"
59
- # params.join("&")
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
@@ -1,6 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
  namespace :short_message do
3
- get 'messages/status' => "messages#status"
4
- post 'messages/status' => "messages#status"
3
+ match "messages/status", to: "messages#status", via: [:get, :post]
5
4
  end
6
5
  end
@@ -1,4 +1,4 @@
1
- class CreateShortMessageMessages < ActiveRecord::Migration[4.2]
1
+ class CreateShortMessageMessages < ActiveRecord::Migration[6.1]
2
2
  def change
3
3
  create_table :short_message_messages do |t|
4
4
  t.string :message_key
@@ -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
- # Configuration example www.gtx-messaging.com
3
- config.gateway_server = "http.gtx-messaging.net"
4
- config.gateway_port = 443
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
- config.send_file_path = "/smsc.php"
7
- # config.account_functions_path = ""
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
- # enter your details received from provider here
10
- config.user = ""
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
- # config.default_reload_amount = 1000
14
+ config.open_timeout = 5
15
+ config.read_timeout = 30
14
16
 
15
- config.default_mail_sender = "webmaster@your-domain.com"
16
- config.reload_notification_email = "webmaster@your-domain.com" # send a message if payment is required
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
- # set a default sms sender (used if no sender is present)
21
- # config.default_sms_sender = ""
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
@@ -1,7 +1,5 @@
1
- require 'active_support/configurable'
2
-
3
1
  module ShortMessage
4
- def self.configure(&block)
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 #:nodoc:
13
- include ActiveSupport::Configurable
14
- config_accessor :gateway_server
15
- config_accessor :gateway_port
16
- config_accessor :send_file_path
17
- config_accessor :account_functions_path
18
-
19
- config_accessor :user
20
- config_accessor :password
21
-
22
- config_accessor :default_sms_sender
23
- config_accessor :default_reload_amount
24
- config_accessor :reload_notification_email
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ShortMessage
2
- VERSION = "1.1.2"
2
+ VERSION = "2.0.0"
3
3
  end
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: 1.1.2
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: 2019-07-24 00:00:00.000000000 Z
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: 3.2.0
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: 3.2.0
46
+ version: '1.6'
27
47
  - !ruby/object:Gem::Dependency
28
- name: mysql2
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: Send short messages to a specific SMS Gateway
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
- post_install_message:
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: '0'
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
- rubyforge_project:
125
- rubygems_version: 2.7.9
126
- signing_key:
115
+ rubygems_version: 3.5.18
116
+ signing_key:
127
117
  specification_version: 4
128
- summary: Send short messages to a specific SMS Gateway
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: []
@@ -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,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -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
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all' %>
6
- <%= csrf_meta_tags %>
7
- </head>
8
- <body>
9
-
10
- <%= yield %>
11
-
12
- </body>
13
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'