virtual_sms 0.2.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9f746f13175d7a032ef7b06e1bf0b8666d8ff9da
4
- data.tar.gz: 0f6d60f78d7cb6df04416fd96094ceff8f69d715
2
+ SHA256:
3
+ metadata.gz: aac4a0b0e9391bfc6a920d8c1f25cec2f17965f7c665e4a903594d67ef8529b6
4
+ data.tar.gz: d580136d15da2d0054ba3b4395de2c7898152f411d87c117f097414740ffd5c4
5
5
  SHA512:
6
- metadata.gz: 48b3523ce23e41befca49c815656caae083d9352c75075b79ad54d53c27bcc30eb031fe722857a7be4ea1140f5b7d581383e76ee9bf1738a72281c4292a53980
7
- data.tar.gz: 6f5301efa9d067f7cf8d6aa8c5f325c637641826bb806a1b8aad505fc76bbabcb4fa777fa3fbc0048bdc02888ab861f6371856fe7a0ac13f4bce9e3459e5aef1
6
+ metadata.gz: ebcb32bd207ec9e498bb12d792ccc92a7880f5ccff8f250681a44ab1301b8656779cd7eae38303d909f304000f07e3021bb93dbd9961bb0f75bed26c26105b7d
7
+ data.tar.gz: 68a1881481d4cfb7fc777c4f05b8e549d9db73bd6babfe9b8e3d346581f674497d2a9e0273284d4401234f026b2b74a649f33e66e82f2deec66f5f1eaa53e4bf
data/CHANGELOG.md CHANGED
@@ -1,8 +1,22 @@
1
- # v0.1.1 / 2015-10-28
1
+ # Change Log
2
2
 
3
- * Prevent delivery_method changed.
4
- * Add date column.
3
+ ## v0.3.1 / 2025-05-23
4
+ ### Fixed
5
+ - clear path
5
6
 
6
- # v0.1.0 / 2015-10-26
7
+ ## v0.3.0 / 2025-05-04
8
+ ### Changed
9
+ - remove assets dependencies.
7
10
 
8
- Create project
11
+ ## v0.2.0 / 2020-06-05
12
+ ### Changed
13
+ - Change cache method to support Rails 5+
14
+
15
+ ## v0.1.1 / 2015-10-28
16
+ ### Fixed
17
+ - Prevent delivery_method changed.
18
+ - Add date column.
19
+
20
+ ## v0.1.0 / 2015-10-26
21
+ ### Added
22
+ - Create project
data/README.md CHANGED
@@ -12,10 +12,6 @@ Add this line to your application's Gemfile:
12
12
  ```ruby
13
13
  gem 'virtual_sms', group: :development
14
14
  ```
15
- Make sure you have:
16
- ```ruby
17
- gem 'jquery-rails'
18
- ```
19
15
 
20
16
  And then execute:
21
17
 
@@ -15,7 +15,7 @@ module VirtualSms
15
15
 
16
16
  def clear
17
17
  VirtualSms::Message.clear
18
- redirect_to messages_path
18
+ head :ok
19
19
  end
20
20
 
21
21
  private
@@ -4,8 +4,7 @@
4
4
  <title>
5
5
  Virtual SMS Box
6
6
  </title>
7
- <%= stylesheet_link_tag "virtual_sms/application", media: "all", "data-turbolinks-track" => true %>
8
- <%= javascript_include_tag "virtual_sms/application", "data-turbolinks-track" => true %>
7
+ <%= render "layouts/virtual_sms/styles/application" %>
9
8
  <%= csrf_meta_tags %>
10
9
  </head>
11
10
  <body>
@@ -13,5 +12,6 @@
13
12
  <%= link_to 'Virtual SMS Box', messages_path %>
14
13
  </h2>
15
14
  <%= yield %>
15
+ <%= render "layouts/virtual_sms/javascripts/application" %>
16
16
  </body>
17
17
  </html>
@@ -0,0 +1,18 @@
1
+ <script>
2
+ function clearMessages() {
3
+ if (!confirm('Are you sure you want to clear all messages?')) {
4
+ return;
5
+ }
6
+
7
+ var csrfTokenElement = document.querySelector('meta[name="csrf-token"]');
8
+ var csrfToken = csrfTokenElement ? csrfTokenElement.content : null;
9
+ fetch(document.querySelector('[data-clear-path]').dataset.clearPath, {
10
+ method: 'DELETE',
11
+ headers: {
12
+ 'X-CSRF-Token': csrfToken
13
+ }
14
+ }).then(function() {
15
+ location.reload();
16
+ });
17
+ }
18
+ </script>
@@ -1,24 +1,4 @@
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
- */
16
-
17
- /* http://meyerweb.com/eric/tools/css/reset/
18
- v2.0 | 20110126
19
- License: none (public domain)
20
- */
21
-
1
+ <style>
22
2
  html, body, div, span, applet, object, iframe,
23
3
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
24
4
  a, abbr, acronym, address, big, cite, code,
@@ -28,8 +8,8 @@ b, u, i, center,
28
8
  dl, dt, dd, ol, ul, li,
29
9
  fieldset, form, label, legend,
30
10
  table, caption, tbody, tfoot, thead, tr, th, td,
31
- article, aside, canvas, details, embed,
32
- figure, figcaption, footer, header, hgroup,
11
+ article, aside, canvas, details, embed,
12
+ figure, figcaption, footer, header, hgroup,
33
13
  menu, nav, output, ruby, section, summary,
34
14
  time, mark, audio, video {
35
15
  margin: 0;
@@ -40,7 +20,7 @@ time, mark, audio, video {
40
20
  vertical-align: baseline;
41
21
  }
42
22
  /* HTML5 display-role reset for older browsers */
43
- article, aside, details, figcaption, figure,
23
+ article, aside, details, figcaption, figure,
44
24
  footer, header, hgroup, menu, nav, section {
45
25
  display: block;
46
26
  }
@@ -111,3 +91,4 @@ a {
111
91
  text-decoration: none;
112
92
  color: #007CFF;
113
93
  }
94
+ </style>
@@ -1,10 +1,10 @@
1
- <%= link_to 'Clear', clear_messages_path, :method => :delete, :data => {:confirm => "Are you sure?"} %>
1
+ <a href="javascript: clearMessages()" data-clear-path="<%= clear_messages_path %>">Clear</a>
2
2
  <table>
3
3
  <colgroup>
4
- <col width="250px"></col>
5
- <col width="300px"></col>
6
- <col></col>
7
- <col width="200px"></col>
4
+ <col width="250px" />
5
+ <col width="300px" />
6
+ <col />
7
+ <col width="200px" />
8
8
  </colgroup>
9
9
  <tr>
10
10
  <th>From</th>
@@ -1,3 +1,3 @@
1
1
  module VirtualSms
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtual_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chen Yi-Cyuan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-05 00:00:00.000000000 Z
11
+ date: 2025-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -39,13 +39,13 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: jquery-rails
42
+ name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
- type: :runtime
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: sqlite3
56
+ name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -66,34 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.10'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.10'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rake
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - "~>"
73
+ - - ">="
88
74
  - !ruby/object:Gem::Version
89
- version: '10.0'
75
+ version: '0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ">="
95
81
  - !ruby/object:Gem::Version
96
- version: '10.0'
82
+ version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: rspec-rails
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -162,16 +148,15 @@ files:
162
148
  - LICENSE.txt
163
149
  - README.md
164
150
  - Rakefile
165
- - app/assets/javascripts/virtual_sms/application.js
166
- - app/assets/stylesheets/virtual_sms/application.css
167
151
  - app/controllers/virtual_sms/application_controller.rb
168
152
  - app/controllers/virtual_sms/messages_controller.rb
169
153
  - app/models/virtual_sms/message.rb
170
154
  - app/views/layouts/virtual_sms/application.erb
155
+ - app/views/layouts/virtual_sms/javascripts/_application.html.erb
156
+ - app/views/layouts/virtual_sms/styles/_application.html.erb
171
157
  - app/views/virtual_sms/messages/index.html.erb
172
158
  - app/views/virtual_sms/messages/show.html.erb
173
159
  - config/routes.rb
174
- - config/spring.rb
175
160
  - lib/virtual_sms.rb
176
161
  - lib/virtual_sms/carrier.rb
177
162
  - lib/virtual_sms/engine.rb
@@ -181,7 +166,7 @@ homepage: https://github.com/emn178/virtual_sms
181
166
  licenses:
182
167
  - MIT
183
168
  metadata: {}
184
- post_install_message:
169
+ post_install_message:
185
170
  rdoc_options: []
186
171
  require_paths:
187
172
  - lib
@@ -196,9 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
181
  - !ruby/object:Gem::Version
197
182
  version: '0'
198
183
  requirements: []
199
- rubyforge_project:
200
- rubygems_version: 2.6.14
201
- signing_key:
184
+ rubygems_version: 3.1.6
185
+ signing_key:
202
186
  specification_version: 4
203
187
  summary: An rails plugin that provides a virtual SMS box and SMS Carrier delivery
204
188
  method.
@@ -1,15 +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 jquery
14
- //= require jquery_ujs
15
- //= require_tree .
data/config/spring.rb DELETED
@@ -1 +0,0 @@
1
- Spring.application_root = './spec/dummy'