callback_request_bootstrap 0.0.1 → 0.0.2

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
2
  SHA1:
3
- metadata.gz: da7f2b5124df67e157802bef6a5cb5ed98027daa
4
- data.tar.gz: e956428c089d0af1c3f8fde96b143ab9b0007e40
3
+ metadata.gz: 0d19b38b55eb566b1d6983f229524be21a32bdb6
4
+ data.tar.gz: dc783ea92ffb807f56d9f0ba1f42e76b08303494
5
5
  SHA512:
6
- metadata.gz: 7847e0ee6fbf6367560b9c4d6448827e4f1884833e817f6ce324bb8c39439b5b9b4b8946eee547f79353016cdf6a3296a8c21c2a63a66d25d9a0c13617d9041c
7
- data.tar.gz: d0d9eea6bfb864bc0a7d22530bc9e489adb1edc23d7cd9c182b4d2f3c634a3b7999013738695ee262d83d7fe1c5a809d6b4e819d287442fc57a39980e2244a32
6
+ metadata.gz: 607e0dc223e2e9cbfad39a9c312015d3a4efda963b5f820f7a7781efcf482c74a19294df0521ab171f96625660cb202cfb334b6f165557511893a75e5a6b0efb
7
+ data.tar.gz: 6dd5aee0c831a3530f2b925b9c5effeaa07df32e300a6279853bbf51d3f0bdcf2fe3ee8a17777faea99ea4b4383592c13c1bb7978f31f55069329d0b31b66315
@@ -1,3 +1,3 @@
1
1
  module CallbackRequestBootstrap
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,8 +1,11 @@
1
1
  <div id='wrap'>
2
2
  <div class='container'>
3
3
 
4
+ <br><br>
4
5
 
5
6
  <%=link_to_callback_modal "Show modal", '#', :class=>'btn btn-primary' %>
7
+
8
+ <br><br>
6
9
  <br>
7
10
  Autoclose in 5 sec:<br>
8
11
  <%=link_to "Show modal with autoclose", '#', :class=>'btn btn-default callback_link', :data=>{'autoclose'=>5} %>
@@ -1568,3 +1568,46 @@ Processing by CallbackRequestBootstrap::RequestsController#create as JS
1568
1568
  Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/_create_result.html.erb (0.0ms)
1569
1569
  Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/create.js.erb (4.0ms)
1570
1570
  Completed 200 OK in 17ms (Views: 9.0ms | ActiveRecord: 2.0ms)
1571
+
1572
+
1573
+ Started GET "/debug/index" for 127.0.0.1 at 2015-04-04 02:24:53 +0300
1574
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1575
+ Processing by DebugController#index as HTML
1576
+ Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/_modal.html.erb (18.0ms)
1577
+ Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/_js_modal.html.erb (27.0ms)
1578
+ Rendered debug/index.html.erb within layouts/application (35.0ms)
1579
+ Completed 200 OK in 264ms (Views: 263.0ms | ActiveRecord: 0.0ms)
1580
+
1581
+
1582
+ Started GET "/assets/application-b8186a4a5f2ceafc0e3ec24e6a8769db.css?body=1" for 127.0.0.1 at 2015-04-04 02:24:54 +0300
1583
+
1584
+
1585
+ Started GET "/assets/jquery-2.1.3.min-081439c47c59b5a03e286d1fbbd00553.js?body=1" for 127.0.0.1 at 2015-04-04 02:24:54 +0300
1586
+
1587
+
1588
+ Started GET "/assets/bootstrap/modal-77a0e72df31a788e4f6a3f28370eb69e.js?body=1" for 127.0.0.1 at 2015-04-04 02:24:54 +0300
1589
+
1590
+
1591
+ Started GET "/assets/jquery_ujs-e27bd20a10d28155845a22d71ef94f2f.js?body=1" for 127.0.0.1 at 2015-04-04 02:24:54 +0300
1592
+
1593
+
1594
+ Started GET "/assets/application-cdf0d2fe55534695da80231db2809a80.js?body=1" for 127.0.0.1 at 2015-04-04 02:24:54 +0300
1595
+
1596
+
1597
+ Started GET "/callback/requests/new?modal=1&autoclose=0" for 127.0.0.1 at 2015-04-04 02:25:31 +0300
1598
+ Processing by CallbackRequestBootstrap::RequestsController#new as */*
1599
+ Parameters: {"modal"=>"1", "autoclose"=>"0"}
1600
+ Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/_form.simple_form.html.erb (59.0ms)
1601
+ Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/new.html.erb (71.0ms)
1602
+ Completed 200 OK in 103ms (Views: 82.0ms | ActiveRecord: 10.0ms)
1603
+
1604
+
1605
+ Started POST "/callback/requests" for 127.0.0.1 at 2015-04-04 02:25:46 +0300
1606
+ Processing by CallbackRequestBootstrap::RequestsController#create as JS
1607
+ Parameters: {"utf8"=>"✓", "modal"=>"1", "autoclose"=>"0", "request"=>{"name"=>"hell", "phone"=>"l", "notes"=>"l"}, "commit"=>"Send request"}
1608
+  (0.0ms) BEGIN
1609
+ SQL (34.0ms) INSERT INTO `requests` (`name`, `phone`, `notes`, `created_at`, `updated_at`) VALUES ('hell', 'l', 'l', '2015-04-03 23:25:46', '2015-04-03 23:25:46')
1610
+  (19.0ms) COMMIT
1611
+ Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/_create_result.html.erb (1.0ms)
1612
+ Rendered W:/myrails/mygems/callback_request_bootstrap/app/views/callback_request_bootstrap/requests/create.js.erb (5.0ms)
1613
+ Completed 200 OK in 89ms (Views: 27.0ms | ActiveRecord: 53.0ms)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: callback_request_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Ivak
@@ -14,16 +14,22 @@ dependencies:
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ - - <
18
21
  - !ruby/object:Gem::Version
19
- version: 4.2.1
22
+ version: '5.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: '4.0'
30
+ - - <
25
31
  - !ruby/object:Gem::Version
26
- version: 4.2.1
32
+ version: '5.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: mysql2
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -61,7 +67,6 @@ extensions: []
61
67
  extra_rdoc_files: []
62
68
  files:
63
69
  - MIT-LICENSE
64
- - README.rdoc
65
70
  - Rakefile
66
71
  - app/assets/javascripts/callback_request_bootstrap/application.js
67
72
  - app/assets/stylesheets/callback_request_bootstrap/application.css.scss
@@ -223,7 +228,6 @@ files:
223
228
  - test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
224
229
  - test/dummy/tmp/cache/assets/development/sprockets/e58ed93e38d0c962a358bd32577c8cfe
225
230
  - test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
226
- - test/dummy/tmp/pids/server.pid
227
231
  - test/integration/navigation_test.rb
228
232
  - test/test_helper.rb
229
233
  homepage: http://maxivak.com
@@ -381,6 +385,5 @@ test_files:
381
385
  - test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
382
386
  - test/dummy/tmp/cache/assets/development/sprockets/e58ed93e38d0c962a358bd32577c8cfe
383
387
  - test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
384
- - test/dummy/tmp/pids/server.pid
385
388
  - test/integration/navigation_test.rb
386
389
  - test/test_helper.rb
data/README.rdoc DELETED
@@ -1,100 +0,0 @@
1
- = Callback Request with Bootstrap =
2
-
3
- Rails gem to show a form for callback request in modal.
4
- To be used with Bootstrap 3 and simple_form.
5
-
6
-
7
- Requests for phone callbacks are stored in database.
8
-
9
-
10
- == Installation ==
11
-
12
- Gemfile:
13
- ```ruby
14
- gem 'callback_request_bootstrap'
15
- ```
16
-
17
- ```ruby
18
- bundle install
19
- ```
20
-
21
- install using generator:
22
- ```ruby
23
- rails g request_callback_bootstrap:install
24
- ```
25
- This will add the migrations.
26
-
27
- Migrate the database:
28
- ```ruby
29
- rake db:migrate
30
- ```
31
- It will add table 'requests' to the database.
32
-
33
-
34
- Your application should have jquery, jquery_ujs and bootstrap.js installed.
35
- Your application.js might be:
36
- ```ruby
37
- //= require jquery
38
- //= require jquery_ujs
39
-
40
- //= require bootstrap
41
- or if you want to include only javascript for modal
42
- //= require bootstrap/modal
43
-
44
- ```
45
-
46
- mount engine in config/routes.rb:
47
- ```ruby
48
- Rails.application.routes.draw do
49
-
50
- mount CallbackRequestBootstrap::Engine => "/callback"
51
-
52
- ..
53
- end
54
-
55
- ```
56
-
57
- Link to show form in modal:
58
- ```ruby
59
- <%=link_to_callback_modal "Request callback", '#', :class=>'btn' %>
60
-
61
- ```
62
- This helper generates a link with css class 'callback_link'.
63
-
64
- or add class 'callback_link' to your link:
65
- ```ruby
66
- =link_to 'Request callback', '#', :class=>'btn btn-primary callback_link'
67
- ```
68
-
69
- include on page (usually at the end of the page where you place the link):
70
- ```ruby
71
- <%= render 'callback_request_bootstrap/requests/js_modal'%>
72
- ```
73
- This will add necessary scripts for modal.
74
-
75
-
76
- = Options =
77
-
78
- == Autoclose ==
79
- To close modal after a request is setn, use option 'autoclose' for a link:
80
- ```ruby
81
- <%=link_to "Show modal with autoclose", '#', :class=>'btn btn-default callback_link', :data=>{'autoclose'=>5} %>
82
- ```
83
- This will close modal in 5 seconds.
84
-
85
-
86
-
87
- == Customization ==
88
-
89
- === Form ===
90
-
91
- Use generator to copy views to your application.
92
- Edit views in /app/views/callback_request_bootstrap/.
93
-
94
- If you want to edit fields in the form, then edit view '_form.simple_form.html.erb'.
95
-
96
-
97
- === Localization ===
98
-
99
- Copy file config/locales/callback_request.en.yml to your application in config/locales/callback_request.LANG.yml.
100
- Edit the file.
@@ -1 +0,0 @@
1
- 14020