action_smser 3.2.0 → 3.4.0

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: 91f732f9ee0db5d91f7cd6e7fe8bfc808548db1e
4
- data.tar.gz: 1ceb135e6c46e8bb492cfdf2a00bf99c4a13b574
2
+ SHA256:
3
+ metadata.gz: 5425a318eda9666989a41c3b9a2d4fe76d5c74ce94a803958401e3fb7277a564
4
+ data.tar.gz: 90dcfd54c1e8555520e65e546a2a30f536c2dd625b86a15daa4422f1eb00bfd3
5
5
  SHA512:
6
- metadata.gz: 3c0ea769e95fbaf84e3ff77bec6aa913f22fa1cf565d73f029edefaef7038c36b28f9c7e1fa394701ab3e35010d357485066304c1ef0d65a04b8919d7cec712d
7
- data.tar.gz: 16a27a16f6cac9e859e5322f4f58341c35cc79b2697be2d0f5d2cd4bca209f3cc92b09dcaca3062ee8ec120e15ac960fb3bcc5a30adba0aaf4ac0a4e61244230
6
+ metadata.gz: cd1561a68d0805e9f1e4a5b0034a61caa929d481fda243dc067e737aabf7b602d9196f810bba58e3456dee0ab2afcb39c19b7e32e6bfbe20ab5e893861e82881
7
+ data.tar.gz: 0e2c0bd5f27b3a5f90fce5b82ed4b30f84fef21e30154774f82b40f992a43eb637680668786778926e89f568e4abad5441ad060915edb2065e95635318fe6043
data/README.md CHANGED
@@ -3,8 +3,6 @@
3
3
  ActionSmser == SMS && ActionMailer. Simple way to use SMS (Short Message Service) in the same way as ActionMailer.
4
4
  Includes also delivery reports and easy way to add custom gateways. See examples below.
5
5
 
6
- [<img src="https://secure.travis-ci.org/holli/action_smser.png" />](http://travis-ci.org/holli/action_smser)
7
-
8
6
  # Install
9
7
 
10
8
 
@@ -83,7 +81,7 @@ end
83
81
 
84
82
  ```
85
83
 
86
- **Nexmo** (http://nexmo.com/) is supported also.
84
+ **Vonage/Nexmo** (http://nexmo.com/) is supported. Nexmo was renamed to Vonage, but naming has not been updated this lib.
87
85
 
88
86
  ```
89
87
  ActionSmser.delivery_options[:delivery_method] = :nexmo
@@ -231,9 +229,9 @@ end
231
229
 
232
230
  Submit suggestions or feature requests as a GitHub Issue or Pull Request. Remember to update tests. Tests are quite extensive.
233
231
 
234
- Check travis for what environments are supported http://travis-ci.org/#!/holli/action_smser
232
+ Check github actions for what environments are supported: https://github.com/holli/action_smser/blob/master/.github/workflows/ci.yaml and
233
+ https://github.com/holli/action_smser/actions
235
234
 
236
- [<img src="https://secure.travis-ci.org/holli/action_smser.png" />](http://travis-ci.org/holli/action_smser)
237
235
 
238
236
 
239
237
  ### Similar gems
@@ -0,0 +1 @@
1
+ // Nothing used
@@ -1,11 +1,11 @@
1
1
  module ActionSmser
2
2
  class DeliveryReportsController < ApplicationController
3
3
 
4
- def gateway_commit
4
+ skip_forgery_protection only: :gateway_commit
5
5
 
6
+ def gateway_commit
6
7
  updated_count = 0
7
8
 
8
-
9
9
  if !ActionSmser.delivery_options[:gateway_commit].blank? &&
10
10
  !ActionSmser.delivery_options[:gateway_commit][params['gateway']].blank?
11
11
 
@@ -63,7 +63,7 @@ module ActionSmser
63
63
  end
64
64
 
65
65
  def list
66
-
66
+
67
67
  end
68
68
 
69
69
 
@@ -3,7 +3,7 @@ if defined?(ActiveRecord)
3
3
  class DeliveryReport < ActiveRecord::Base
4
4
 
5
5
  has_many :re_deliveries, :class_name => self.to_s, :foreign_key => :re_delivery_of_delivery_report_id
6
- belongs_to :re_delivery_of, :class_name => self.to_s, :foreign_key => :re_delivery_of_delivery_report_id
6
+ belongs_to :re_delivery_of, :class_name => self.to_s, :foreign_key => :re_delivery_of_delivery_report_id, :optional => true
7
7
 
8
8
  def self.build_from_sms(sms, to, msg_id)
9
9
  @delivery_report = self.new
@@ -27,7 +27,7 @@ if defined?(ActiveRecord)
27
27
  def status=(stat, skip_log = false)
28
28
  self[:status] = stat
29
29
  self.status_updated_at = Time.now
30
- add_log("#{Time.now.to_s(:db)}: #{stat}") unless skip_log
30
+ add_log("#{Time.now.to_fs(:db)}: #{stat}") unless skip_log
31
31
  end
32
32
 
33
33
  def add_log(str)
@@ -39,7 +39,7 @@
39
39
 
40
40
 
41
41
  <h1>Delivery Reports Summary for
42
- (<span style="font-size: smaller"><%= "#{time_span.first.to_s(:db)} => #{time_span.last.to_s(:db)}" %></span>)
42
+ (<span style="font-size: smaller"><%= "#{time_span.first.to_fs(:db)} => #{time_span.last.to_fs(:db)}" %></span>)
43
43
  <%= "for #{params[:gateway]}" unless params[:gateway].blank? %>
44
44
  </h1>
45
45
 
@@ -53,7 +53,7 @@
53
53
 
54
54
  <p class="selection_links">
55
55
  <strong>Redeliveries:</strong>
56
-
56
+
57
57
  <% ['Include normally', 'Ignore redeliveries', 'Only redeliveries'].each do |key| %>
58
58
  <%= link_to key, dr_summary_url(:redeliveries => key), :class => (key == params['redeliveries'] ? 'selected' : 'not_selected') %>
59
59
  <% end %>
@@ -120,7 +120,7 @@
120
120
  <ul>
121
121
  <%
122
122
  total = ar_gateway.count
123
- grouped_by_status = ar_gateway.group(:status).count.each do |key, val| %>
123
+ ar_gateway.group(:status).count.each do |key, val| %>
124
124
 
125
125
  <li>
126
126
  <strong><%= key %></strong>:
@@ -144,7 +144,7 @@
144
144
 
145
145
  <%
146
146
  total = ar_gateway.count
147
- grouped_by_status = ar_gateway.group(:sms_type).count.each do |key, val| %>
147
+ ar_gateway.group(:sms_type).count.each do |key, val| %>
148
148
  <tr>
149
149
  <td><strong><%= key %></strong></td>
150
150
  <td><%= val %></td>
@@ -46,7 +46,7 @@ class ActionSmser::Base
46
46
 
47
47
  # Delivery methods can use this to save data for debugging, e.g. http responses etc
48
48
  attr_accessor :delivery_info
49
- attr_accessor :delivery_reports
49
+ # attr_accessor :delivery_reports
50
50
  def delivery_reports
51
51
  @delivery_reports ||= []
52
52
  end
@@ -1,5 +1,5 @@
1
1
  begin
2
- require 'delayed_job'
2
+ # require 'delayed_job'
3
3
 
4
4
  module ActionSmser::DeliveryMethods
5
5
 
@@ -33,7 +33,7 @@ begin
33
33
  end
34
34
  end
35
35
 
36
- rescue LoadError => e
36
+ rescue LoadError
37
37
 
38
38
  module ActionSmser::DeliveryMethods
39
39
  class DelayedJob
@@ -46,7 +46,7 @@ module ActionSmser::DeliveryMethods
46
46
  end
47
47
 
48
48
  def self.deliver_path(sms, to, options)
49
- path = "/sms/json?username=#{options[:username]}&password=#{options[:password]}&ttl=#{sms.ttl_to_i*1000}&status-report-req=#{options[:status_report_req]}&from=#{sms.from_encoded}&to=#{to}&text=#{sms.body_escaped}"
49
+ path = "/sms/json?username=#{options[:username]}&password=#{options[:password]}&ttl=#{sms.ttl_to_i*1000}&status-report-req=#{options[:status_report_req]}&from=#{sms.from_escaped}&to=#{to}&text=#{sms.body_escaped}"
50
50
  path += "&type=#{options[:type]}" if options[:type]
51
51
  path
52
52
  end
@@ -1,3 +1,3 @@
1
1
  module ActionSmser
2
- VERSION = "3.2.0"
2
+ VERSION = "3.4.0"
3
3
  end
@@ -0,0 +1 @@
1
+ // Nothing used
@@ -35,13 +35,6 @@ module Dummy
35
35
  # Configure sensitive parameters which will be filtered from the log file.
36
36
  config.filter_parameters += [:password]
37
37
 
38
- # Enable the asset pipeline
39
- config.assets.enabled = true
40
-
41
- # Version of your assets, change this if you want to expire all your assets
42
- config.assets.version = '1.0'
43
-
44
-
45
38
  end
46
39
  end
47
40
 
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ # Rails.application.config.assets.version = "1.0"
5
+
6
+ # Add additional assets to the asset load path.
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in the app/assets
11
+ # folder are already added.
12
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -4,4 +4,4 @@
4
4
  # If you change this key, all old signed cookies will become invalid!
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '344386496a055c097c210dd2598d705e5544f1f3742d54b6413c8c937b33f484e9fdf5dec39ea1b27061e5383d45430ddb159cd7f3d0f5f8087b2288df853bba'
7
+ # Dummy::Application.config.secret_token = '344386496a055c097c210dd2598d705e5544f1f3742d54b6413c8c937b33f484e9fdf5dec39ea1b27061e5383d45430ddb159cd7f3d0f5f8087b2288df853bba'