best_in_place 2.1.0 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -5
  3. data/.rspec +1 -0
  4. data/.travis.yml +12 -5
  5. data/Appraisals +17 -0
  6. data/CHANGELOG.md +51 -30
  7. data/Gemfile +15 -2
  8. data/README.md +52 -105
  9. data/best_in_place.gemspec +13 -11
  10. data/config.ru +7 -0
  11. data/gemfiles/rails_3.2.gemfile +24 -0
  12. data/gemfiles/rails_4.0.gemfile +23 -0
  13. data/gemfiles/rails_4.1.gemfile +23 -0
  14. data/gemfiles/rails_edge.gemfile +25 -0
  15. data/lib/assets/javascripts/best_in_place.jquery-ui.js +57 -0
  16. data/lib/assets/javascripts/best_in_place.js +551 -650
  17. data/lib/assets/javascripts/best_in_place.purr.js +16 -6
  18. data/lib/best_in_place.rb +29 -9
  19. data/lib/best_in_place/controller_extensions.rb +10 -13
  20. data/lib/best_in_place/display_methods.rb +26 -21
  21. data/lib/best_in_place/engine.rb +2 -2
  22. data/lib/best_in_place/helper.rb +145 -87
  23. data/lib/best_in_place/railtie.rb +5 -2
  24. data/lib/best_in_place/test_helpers.rb +0 -1
  25. data/lib/best_in_place/utils.rb +20 -12
  26. data/lib/best_in_place/version.rb +1 -1
  27. data/spec/{helpers/best_in_place_spec.rb → helper_spec.rb} +134 -99
  28. data/spec/integration/double_init_spec.rb +3 -5
  29. data/spec/integration/js_spec.rb +193 -123
  30. data/spec/integration/live_spec.rb +3 -4
  31. data/spec/integration/text_area_spec.rb +4 -4
  32. data/spec/internal/app/assets/images/info.png +0 -0
  33. data/{test_app → spec/internal}/app/assets/images/no.png +0 -0
  34. data/spec/internal/app/assets/images/purrBottom.png +0 -0
  35. data/spec/internal/app/assets/images/purrClose.png +0 -0
  36. data/spec/internal/app/assets/images/purrTop.png +0 -0
  37. data/{test_app → spec/internal}/app/assets/images/red_pen.png +0 -0
  38. data/{test_app → spec/internal}/app/assets/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  39. data/{test_app → spec/internal}/app/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  40. data/{test_app → spec/internal}/app/assets/images/ui-bg_flat_10_000000_40x100.png +0 -0
  41. data/{test_app → spec/internal}/app/assets/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  42. data/{test_app → spec/internal}/app/assets/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  43. data/{test_app → spec/internal}/app/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  44. data/{test_app → spec/internal}/app/assets/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  45. data/{test_app → spec/internal}/app/assets/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  46. data/{test_app → spec/internal}/app/assets/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  47. data/{test_app → spec/internal}/app/assets/images/ui-icons_222222_256x240.png +0 -0
  48. data/{test_app → spec/internal}/app/assets/images/ui-icons_228ef1_256x240.png +0 -0
  49. data/{test_app → spec/internal}/app/assets/images/ui-icons_ef8c08_256x240.png +0 -0
  50. data/{test_app → spec/internal}/app/assets/images/ui-icons_ffd27a_256x240.png +0 -0
  51. data/{test_app → spec/internal}/app/assets/images/ui-icons_ffffff_256x240.png +0 -0
  52. data/{test_app → spec/internal}/app/assets/images/yes.png +0 -0
  53. data/spec/internal/app/assets/javascripts/application.js +37 -0
  54. data/{test_app → spec/internal}/app/assets/stylesheets/.gitkeep +0 -0
  55. data/{test_app → spec/internal}/app/assets/stylesheets/jquery-ui-1.8.16.custom.css.erb +1 -2
  56. data/{test_app → spec/internal}/app/assets/stylesheets/scaffold.css +1 -1
  57. data/{test_app → spec/internal}/app/assets/stylesheets/style.css.erb +2 -4
  58. data/{test_app → spec/internal}/app/controllers/admin/users_controller.rb +8 -3
  59. data/{test_app → spec/internal}/app/controllers/application_controller.rb +0 -0
  60. data/{test_app → spec/internal}/app/controllers/cuca/cars_controller.rb +0 -0
  61. data/{test_app → spec/internal}/app/controllers/users_controller.rb +8 -40
  62. data/{test_app → spec/internal}/app/helpers/application_helper.rb +0 -0
  63. data/spec/internal/app/helpers/users_helper.rb +29 -0
  64. data/{test_app → spec/internal}/app/models/cuca/car.rb +0 -0
  65. data/{test_app → spec/internal}/app/models/user.rb +5 -1
  66. data/{test_app → spec/internal}/app/views/admin/users/show.html.erb +2 -2
  67. data/{test_app → spec/internal}/app/views/cuca/cars/show.html.erb +0 -0
  68. data/{test_app → spec/internal}/app/views/layouts/application.html.erb +1 -1
  69. data/{test_app → spec/internal}/app/views/users/_form.html.erb +2 -2
  70. data/{test_app → spec/internal}/app/views/users/double_init.html.erb +4 -10
  71. data/spec/internal/app/views/users/edit.html.erb +5 -0
  72. data/{test_app → spec/internal}/app/views/users/email_field.html.erb +0 -0
  73. data/{test_app → spec/internal}/app/views/users/index.html.erb +0 -0
  74. data/{test_app → spec/internal}/app/views/users/new.html.erb +0 -0
  75. data/{test_app → spec/internal}/app/views/users/show.html.erb +32 -24
  76. data/{test_app → spec/internal}/app/views/users/show_ajax.html.erb +0 -0
  77. data/spec/internal/config/database.yml +5 -0
  78. data/{test_app → spec/internal}/config/initializers/countries.rb +0 -0
  79. data/{test_app → spec/internal}/config/initializers/default_date_format.rb +0 -0
  80. data/spec/internal/config/initializers/development.rb +8 -0
  81. data/{test_app → spec/internal}/config/routes.rb +1 -2
  82. data/spec/internal/db/schema.rb +26 -0
  83. data/{test_app → spec/internal}/public/favicon.ico +0 -0
  84. data/spec/rails_helper.rb +21 -0
  85. data/spec/support/retry_on_timeout.rb +4 -7
  86. data/spec/utils_spec.rb +21 -0
  87. data/vendor/assets/javascripts/jquery.autosize.js +272 -0
  88. data/{lib → vendor}/assets/javascripts/jquery.purr.js +1 -1
  89. metadata +92 -175
  90. data/lib/best_in_place/check_version.rb +0 -8
  91. data/spec/spec_helper.rb +0 -23
  92. data/test_app/Gemfile +0 -16
  93. data/test_app/README +0 -256
  94. data/test_app/Rakefile +0 -7
  95. data/test_app/app/assets/javascripts/application.js +0 -35
  96. data/test_app/app/helpers/users_helper.rb +0 -29
  97. data/test_app/config.ru +0 -4
  98. data/test_app/config/application.rb +0 -51
  99. data/test_app/config/boot.rb +0 -13
  100. data/test_app/config/database.yml +0 -22
  101. data/test_app/config/environment.rb +0 -5
  102. data/test_app/config/environments/development.rb +0 -25
  103. data/test_app/config/environments/production.rb +0 -49
  104. data/test_app/config/environments/test.rb +0 -35
  105. data/test_app/config/initializers/backtrace_silencers.rb +0 -7
  106. data/test_app/config/initializers/inflections.rb +0 -10
  107. data/test_app/config/initializers/mime_types.rb +0 -5
  108. data/test_app/config/initializers/secret_token.rb +0 -7
  109. data/test_app/config/initializers/session_store.rb +0 -8
  110. data/test_app/config/locales/en.yml +0 -5
  111. data/test_app/db/migrate/20101206205922_create_users.rb +0 -18
  112. data/test_app/db/migrate/20101212170114_add_receive_email_to_user.rb +0 -9
  113. data/test_app/db/migrate/20110115204441_add_description_to_user.rb +0 -9
  114. data/test_app/db/migrate/20111210084202_add_favorite_color_to_users.rb +0 -5
  115. data/test_app/db/migrate/20111210084251_add_favorite_books_to_users.rb +0 -5
  116. data/test_app/db/migrate/20111217215935_add_birth_date_to_users.rb +0 -5
  117. data/test_app/db/migrate/20111224181356_add_money_to_user.rb +0 -5
  118. data/test_app/db/migrate/20120513003308_create_cars.rb +0 -11
  119. data/test_app/db/migrate/20120607172609_add_favorite_movie_to_users.rb +0 -5
  120. data/test_app/db/migrate/20120616170454_add_money_proc_to_users.rb +0 -6
  121. data/test_app/db/migrate/20120620165212_add_height_to_user.rb +0 -5
  122. data/test_app/db/migrate/20130213224102_add_favorite_locale_to_users.rb +0 -5
  123. data/test_app/db/schema.rb +0 -41
  124. data/test_app/db/seeds.rb +0 -19
  125. data/test_app/doc/README_FOR_APP +0 -2
  126. data/test_app/lib/tasks/.gitkeep +0 -0
  127. data/test_app/lib/tasks/cron.rake +0 -7
  128. data/test_app/public/404.html +0 -26
  129. data/test_app/public/422.html +0 -26
  130. data/test_app/public/500.html +0 -26
  131. data/test_app/public/robots.txt +0 -5
  132. data/test_app/script/rails +0 -6
  133. data/test_app/test/fixtures/users.yml +0 -17
  134. data/test_app/test/functional/users_controller_test.rb +0 -49
  135. data/test_app/test/performance/browsing_test.rb +0 -9
  136. data/test_app/test/test_helper.rb +0 -13
  137. data/test_app/test/unit/helpers/users_helper_test.rb +0 -4
  138. data/test_app/test/unit/user_test.rb +0 -8
  139. data/test_app/vendor/plugins/.gitkeep +0 -0
@@ -53,7 +53,7 @@
53
53
  // Set up the close button
54
54
  var close = document.createElement('a');
55
55
  jQuery(close).attr({
56
- className: 'close',
56
+ class: 'close',
57
57
  href: '#close'
58
58
  }).appendTo(notice).click(function() {
59
59
  removeNotice();
metadata CHANGED
@@ -1,119 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: best_in_place
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 2.1.0
4
+ version: 3.0.0.rc1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Bernat Farrero
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
11
+ date: 2014-10-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- prerelease: false
16
- type: :runtime
17
- name: rails
18
- version_requirements: !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: '3.1'
14
+ name: actionpack
24
15
  requirement: !ruby/object:Gem::Requirement
25
- none: false
26
16
  requirements:
27
- - - ~>
17
+ - - ">="
28
18
  - !ruby/object:Gem::Version
29
- version: '3.1'
30
- - !ruby/object:Gem::Dependency
31
- prerelease: false
19
+ version: '3.2'
32
20
  type: :runtime
33
- name: jquery-rails
34
- version_requirements: !ruby/object:Gem::Requirement
35
- none: false
36
- requirements:
37
- - - ! '>='
38
- - !ruby/object:Gem::Version
39
- version: '0'
40
- requirement: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
21
  prerelease: false
48
- type: :development
49
- name: rspec-rails
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
- none: false
52
23
  requirements:
53
- - - ~>
24
+ - - ">="
54
25
  - !ruby/object:Gem::Version
55
- version: 2.8.0
56
- requirement: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 2.8.0
26
+ version: '3.2'
62
27
  - !ruby/object:Gem::Dependency
63
- prerelease: false
64
- type: :development
65
- name: nokogiri
66
- version_requirements: !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ! '>='
70
- - !ruby/object:Gem::Version
71
- version: '0'
28
+ name: railties
72
29
  requirement: !ruby/object:Gem::Requirement
73
- none: false
74
30
  requirements:
75
- - - ! '>='
31
+ - - ">="
76
32
  - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
33
+ version: '3.2'
34
+ type: :runtime
79
35
  prerelease: false
80
- type: :development
81
- name: capybara
82
36
  version_requirements: !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ~>
86
- - !ruby/object:Gem::Version
87
- version: 1.1.2
88
- requirement: !ruby/object:Gem::Requirement
89
- none: false
90
37
  requirements:
91
- - - ~>
38
+ - - ">="
92
39
  - !ruby/object:Gem::Version
93
- version: 1.1.2
94
- description: BestInPlace is a jQuery script and a Rails 3 helper that provide the
95
- method best_in_place to display any object field easily editable for the user by
96
- just clicking on it. It supports input data, text data, boolean data and custom
97
- dropdown data. It works with RESTful controllers.
40
+ version: '3.2'
41
+ description: |2
42
+ BestInPlace is a jQuery script and a Rails helper that provide the method best_in_place to display
43
+ any object field easily editable for the user by just clicking on it. It supports input data,
44
+ text data, boolean data and custom dropdown data. It works with RESTful controllers.
98
45
  email:
99
46
  - bernat@itnig.net
100
47
  executables: []
101
48
  extensions: []
102
49
  extra_rdoc_files: []
103
50
  files:
104
- - .gitignore
105
- - .rspec
106
- - .travis.yml
51
+ - ".gitignore"
52
+ - ".rspec"
53
+ - ".travis.yml"
54
+ - Appraisals
107
55
  - CHANGELOG.md
108
56
  - Gemfile
109
57
  - README.md
110
58
  - Rakefile
111
59
  - best_in_place.gemspec
60
+ - config.ru
61
+ - gemfiles/rails_3.2.gemfile
62
+ - gemfiles/rails_4.0.gemfile
63
+ - gemfiles/rails_4.1.gemfile
64
+ - gemfiles/rails_edge.gemfile
65
+ - lib/assets/javascripts/best_in_place.jquery-ui.js
112
66
  - lib/assets/javascripts/best_in_place.js
113
67
  - lib/assets/javascripts/best_in_place.purr.js
114
- - lib/assets/javascripts/jquery.purr.js
115
68
  - lib/best_in_place.rb
116
- - lib/best_in_place/check_version.rb
117
69
  - lib/best_in_place/controller_extensions.rb
118
70
  - lib/best_in_place/display_methods.rb
119
71
  - lib/best_in_place/engine.rb
@@ -122,126 +74,91 @@ files:
122
74
  - lib/best_in_place/test_helpers.rb
123
75
  - lib/best_in_place/utils.rb
124
76
  - lib/best_in_place/version.rb
125
- - spec/helpers/best_in_place_spec.rb
77
+ - spec/helper_spec.rb
126
78
  - spec/integration/double_init_spec.rb
127
79
  - spec/integration/js_spec.rb
128
80
  - spec/integration/live_spec.rb
129
81
  - spec/integration/text_area_spec.rb
130
- - spec/spec_helper.rb
82
+ - spec/internal/app/assets/images/info.png
83
+ - spec/internal/app/assets/images/no.png
84
+ - spec/internal/app/assets/images/purrBottom.png
85
+ - spec/internal/app/assets/images/purrClose.png
86
+ - spec/internal/app/assets/images/purrTop.png
87
+ - spec/internal/app/assets/images/red_pen.png
88
+ - spec/internal/app/assets/images/ui-bg_diagonals-thick_18_b81900_40x40.png
89
+ - spec/internal/app/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png
90
+ - spec/internal/app/assets/images/ui-bg_flat_10_000000_40x100.png
91
+ - spec/internal/app/assets/images/ui-bg_glass_100_f6f6f6_1x400.png
92
+ - spec/internal/app/assets/images/ui-bg_glass_100_fdf5ce_1x400.png
93
+ - spec/internal/app/assets/images/ui-bg_glass_65_ffffff_1x400.png
94
+ - spec/internal/app/assets/images/ui-bg_gloss-wave_35_f6a828_500x100.png
95
+ - spec/internal/app/assets/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
96
+ - spec/internal/app/assets/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
97
+ - spec/internal/app/assets/images/ui-icons_222222_256x240.png
98
+ - spec/internal/app/assets/images/ui-icons_228ef1_256x240.png
99
+ - spec/internal/app/assets/images/ui-icons_ef8c08_256x240.png
100
+ - spec/internal/app/assets/images/ui-icons_ffd27a_256x240.png
101
+ - spec/internal/app/assets/images/ui-icons_ffffff_256x240.png
102
+ - spec/internal/app/assets/images/yes.png
103
+ - spec/internal/app/assets/javascripts/application.js
104
+ - spec/internal/app/assets/stylesheets/.gitkeep
105
+ - spec/internal/app/assets/stylesheets/jquery-ui-1.8.16.custom.css.erb
106
+ - spec/internal/app/assets/stylesheets/scaffold.css
107
+ - spec/internal/app/assets/stylesheets/style.css.erb
108
+ - spec/internal/app/controllers/admin/users_controller.rb
109
+ - spec/internal/app/controllers/application_controller.rb
110
+ - spec/internal/app/controllers/cuca/cars_controller.rb
111
+ - spec/internal/app/controllers/users_controller.rb
112
+ - spec/internal/app/helpers/application_helper.rb
113
+ - spec/internal/app/helpers/users_helper.rb
114
+ - spec/internal/app/models/cuca/car.rb
115
+ - spec/internal/app/models/user.rb
116
+ - spec/internal/app/views/admin/users/show.html.erb
117
+ - spec/internal/app/views/cuca/cars/show.html.erb
118
+ - spec/internal/app/views/layouts/application.html.erb
119
+ - spec/internal/app/views/users/_form.html.erb
120
+ - spec/internal/app/views/users/double_init.html.erb
121
+ - spec/internal/app/views/users/edit.html.erb
122
+ - spec/internal/app/views/users/email_field.html.erb
123
+ - spec/internal/app/views/users/index.html.erb
124
+ - spec/internal/app/views/users/new.html.erb
125
+ - spec/internal/app/views/users/show.html.erb
126
+ - spec/internal/app/views/users/show_ajax.html.erb
127
+ - spec/internal/config/database.yml
128
+ - spec/internal/config/initializers/countries.rb
129
+ - spec/internal/config/initializers/default_date_format.rb
130
+ - spec/internal/config/initializers/development.rb
131
+ - spec/internal/config/routes.rb
132
+ - spec/internal/db/schema.rb
133
+ - spec/internal/public/favicon.ico
134
+ - spec/rails_helper.rb
131
135
  - spec/support/retry_on_timeout.rb
132
- - test_app/Gemfile
133
- - test_app/README
134
- - test_app/Rakefile
135
- - test_app/app/assets/images/no.png
136
- - test_app/app/assets/images/red_pen.png
137
- - test_app/app/assets/images/ui-bg_diagonals-thick_18_b81900_40x40.png
138
- - test_app/app/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png
139
- - test_app/app/assets/images/ui-bg_flat_10_000000_40x100.png
140
- - test_app/app/assets/images/ui-bg_glass_100_f6f6f6_1x400.png
141
- - test_app/app/assets/images/ui-bg_glass_100_fdf5ce_1x400.png
142
- - test_app/app/assets/images/ui-bg_glass_65_ffffff_1x400.png
143
- - test_app/app/assets/images/ui-bg_gloss-wave_35_f6a828_500x100.png
144
- - test_app/app/assets/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
145
- - test_app/app/assets/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
146
- - test_app/app/assets/images/ui-icons_222222_256x240.png
147
- - test_app/app/assets/images/ui-icons_228ef1_256x240.png
148
- - test_app/app/assets/images/ui-icons_ef8c08_256x240.png
149
- - test_app/app/assets/images/ui-icons_ffd27a_256x240.png
150
- - test_app/app/assets/images/ui-icons_ffffff_256x240.png
151
- - test_app/app/assets/images/yes.png
152
- - test_app/app/assets/javascripts/application.js
153
- - test_app/app/assets/stylesheets/.gitkeep
154
- - test_app/app/assets/stylesheets/jquery-ui-1.8.16.custom.css.erb
155
- - test_app/app/assets/stylesheets/scaffold.css
156
- - test_app/app/assets/stylesheets/style.css.erb
157
- - test_app/app/controllers/admin/users_controller.rb
158
- - test_app/app/controllers/application_controller.rb
159
- - test_app/app/controllers/cuca/cars_controller.rb
160
- - test_app/app/controllers/users_controller.rb
161
- - test_app/app/helpers/application_helper.rb
162
- - test_app/app/helpers/users_helper.rb
163
- - test_app/app/models/cuca/car.rb
164
- - test_app/app/models/user.rb
165
- - test_app/app/views/admin/users/show.html.erb
166
- - test_app/app/views/cuca/cars/show.html.erb
167
- - test_app/app/views/layouts/application.html.erb
168
- - test_app/app/views/users/_form.html.erb
169
- - test_app/app/views/users/double_init.html.erb
170
- - test_app/app/views/users/email_field.html.erb
171
- - test_app/app/views/users/index.html.erb
172
- - test_app/app/views/users/new.html.erb
173
- - test_app/app/views/users/show.html.erb
174
- - test_app/app/views/users/show_ajax.html.erb
175
- - test_app/config.ru
176
- - test_app/config/application.rb
177
- - test_app/config/boot.rb
178
- - test_app/config/database.yml
179
- - test_app/config/environment.rb
180
- - test_app/config/environments/development.rb
181
- - test_app/config/environments/production.rb
182
- - test_app/config/environments/test.rb
183
- - test_app/config/initializers/backtrace_silencers.rb
184
- - test_app/config/initializers/countries.rb
185
- - test_app/config/initializers/default_date_format.rb
186
- - test_app/config/initializers/inflections.rb
187
- - test_app/config/initializers/mime_types.rb
188
- - test_app/config/initializers/secret_token.rb
189
- - test_app/config/initializers/session_store.rb
190
- - test_app/config/locales/en.yml
191
- - test_app/config/routes.rb
192
- - test_app/db/migrate/20101206205922_create_users.rb
193
- - test_app/db/migrate/20101212170114_add_receive_email_to_user.rb
194
- - test_app/db/migrate/20110115204441_add_description_to_user.rb
195
- - test_app/db/migrate/20111210084202_add_favorite_color_to_users.rb
196
- - test_app/db/migrate/20111210084251_add_favorite_books_to_users.rb
197
- - test_app/db/migrate/20111217215935_add_birth_date_to_users.rb
198
- - test_app/db/migrate/20111224181356_add_money_to_user.rb
199
- - test_app/db/migrate/20120513003308_create_cars.rb
200
- - test_app/db/migrate/20120607172609_add_favorite_movie_to_users.rb
201
- - test_app/db/migrate/20120616170454_add_money_proc_to_users.rb
202
- - test_app/db/migrate/20120620165212_add_height_to_user.rb
203
- - test_app/db/migrate/20130213224102_add_favorite_locale_to_users.rb
204
- - test_app/db/schema.rb
205
- - test_app/db/seeds.rb
206
- - test_app/doc/README_FOR_APP
207
- - test_app/lib/tasks/.gitkeep
208
- - test_app/lib/tasks/cron.rake
209
- - test_app/public/404.html
210
- - test_app/public/422.html
211
- - test_app/public/500.html
212
- - test_app/public/favicon.ico
213
- - test_app/public/robots.txt
214
- - test_app/script/rails
215
- - test_app/test/fixtures/users.yml
216
- - test_app/test/functional/users_controller_test.rb
217
- - test_app/test/performance/browsing_test.rb
218
- - test_app/test/test_helper.rb
219
- - test_app/test/unit/helpers/users_helper_test.rb
220
- - test_app/test/unit/user_test.rb
221
- - test_app/vendor/plugins/.gitkeep
136
+ - spec/utils_spec.rb
137
+ - vendor/assets/javascripts/jquery.autosize.js
138
+ - vendor/assets/javascripts/jquery.purr.js
222
139
  homepage: http://github.com/bernat/best_in_place
223
140
  licenses: []
141
+ metadata: {}
224
142
  post_install_message:
225
143
  rdoc_options: []
226
144
  require_paths:
227
145
  - lib
228
146
  required_ruby_version: !ruby/object:Gem::Requirement
229
- none: false
230
147
  requirements:
231
- - - ! '>='
148
+ - - ">="
232
149
  - !ruby/object:Gem::Version
233
150
  version: '0'
234
151
  required_rubygems_version: !ruby/object:Gem::Requirement
235
- none: false
236
152
  requirements:
237
- - - ! '>='
153
+ - - ">"
238
154
  - !ruby/object:Gem::Version
239
- version: '0'
155
+ version: 1.3.1
240
156
  requirements: []
241
- rubyforge_project: best_in_place
242
- rubygems_version: 1.8.25
157
+ rubyforge_project:
158
+ rubygems_version: 2.4.1
243
159
  signing_key:
244
- specification_version: 3
160
+ specification_version: 4
245
161
  summary: It makes any field in place editable by clicking on it, it works for inputs,
246
162
  textareas, select dropdowns and checkboxes
247
163
  test_files: []
164
+ has_rdoc:
@@ -1,8 +0,0 @@
1
- module BestInPlace
2
- module CheckVersion
3
- if Rails::VERSION::STRING < "3.1"
4
- raise "This version of Best in Place is intended to be used for Rails >= 3.1. If you want to use it with Rails 3.0 or lower, please use the rails-3.0 branch."
5
- return
6
- end
7
- end
8
- end
data/spec/spec_helper.rb DELETED
@@ -1,23 +0,0 @@
1
- # Configure Rails Envinronment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require File.expand_path('../../test_app/config/environment', __FILE__)
5
- require "rspec/rails"
6
- require "nokogiri"
7
-
8
- # Load support files
9
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each{|f| require f}
10
-
11
- RSpec.configure do |config|
12
- # Remove this line if you don't want RSpec's should and should_not
13
- # methods or matchers
14
- require 'rspec/expectations'
15
-
16
- config.include RSpec::Matchers
17
- config.include BestInPlace::TestHelpers
18
-
19
- # == Mock Framework
20
- config.mock_with :rspec
21
- end
22
-
23
- Capybara.default_wait_time = 5
data/test_app/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rails', '3.2'
4
- gem 'sqlite3'
5
-
6
- gem 'best_in_place', :path => ".."
7
-
8
- gem 'jquery-rails'
9
-
10
- gem 'rdiscount'
11
-
12
- group :assets do
13
- gem 'sass-rails', '~> 3.2.3'
14
- gem 'coffee-rails', '~> 3.2.1'
15
- gem 'uglifier', '>= 1.0.3'
16
- end
data/test_app/README DELETED
@@ -1,256 +0,0 @@
1
- == Welcome to Rails
2
-
3
- Rails is a web-application framework that includes everything needed to create
4
- database-backed web applications according to the Model-View-Control pattern.
5
-
6
- This pattern splits the view (also called the presentation) into "dumb"
7
- templates that are primarily responsible for inserting pre-built data in between
8
- HTML tags. The model contains the "smart" domain objects (such as Account,
9
- Product, Person, Post) that holds all the business logic and knows how to
10
- persist themselves to a database. The controller handles the incoming requests
11
- (such as Save New Account, Update Product, Show Post) by manipulating the model
12
- and directing data to the view.
13
-
14
- In Rails, the model is handled by what's called an object-relational mapping
15
- layer entitled Active Record. This layer allows you to present the data from
16
- database rows as objects and embellish these data objects with business logic
17
- methods. You can read more about Active Record in
18
- link:files/vendor/rails/activerecord/README.html.
19
-
20
- The controller and view are handled by the Action Pack, which handles both
21
- layers by its two parts: Action View and Action Controller. These two layers
22
- are bundled in a single package due to their heavy interdependence. This is
23
- unlike the relationship between the Active Record and Action Pack that is much
24
- more separate. Each of these packages can be used independently outside of
25
- Rails. You can read more about Action Pack in
26
- link:files/vendor/rails/actionpack/README.html.
27
-
28
-
29
- == Getting Started
30
-
31
- 1. At the command prompt, create a new Rails application:
32
- <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
33
-
34
- 2. Change directory to <tt>myapp</tt> and start the web server:
35
- <tt>cd myapp; rails server</tt> (run with --help for options)
36
-
37
- 3. Go to http://localhost:3000/ and you'll see:
38
- "Welcome aboard: You're riding Ruby on Rails!"
39
-
40
- 4. Follow the guidelines to start developing your application. You can find
41
- the following resources handy:
42
-
43
- * The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
44
- * Ruby on Rails Tutorial Book: http://www.railstutorial.org/
45
-
46
-
47
- == Debugging Rails
48
-
49
- Sometimes your application goes wrong. Fortunately there are a lot of tools that
50
- will help you debug it and get it back on the rails.
51
-
52
- First area to check is the application log files. Have "tail -f" commands
53
- running on the server.log and development.log. Rails will automatically display
54
- debugging and runtime information to these files. Debugging info will also be
55
- shown in the browser on requests from 127.0.0.1.
56
-
57
- You can also log your own messages directly into the log file from your code
58
- using the Ruby logger class from inside your controllers. Example:
59
-
60
- class WeblogController < ActionController::Base
61
- def destroy
62
- @weblog = Weblog.find(params[:id])
63
- @weblog.destroy
64
- logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
65
- end
66
- end
67
-
68
- The result will be a message in your log file along the lines of:
69
-
70
- Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
71
-
72
- More information on how to use the logger is at http://www.ruby-doc.org/core/
73
-
74
- Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
75
- several books available online as well:
76
-
77
- * Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
78
- * Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
79
-
80
- These two books will bring you up to speed on the Ruby language and also on
81
- programming in general.
82
-
83
-
84
- == Debugger
85
-
86
- Debugger support is available through the debugger command when you start your
87
- Mongrel or WEBrick server with --debugger. This means that you can break out of
88
- execution at any point in the code, investigate and change the model, and then,
89
- resume execution! You need to install ruby-debug to run the server in debugging
90
- mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
91
-
92
- class WeblogController < ActionController::Base
93
- def index
94
- @posts = Post.find(:all)
95
- debugger
96
- end
97
- end
98
-
99
- So the controller will accept the action, run the first line, then present you
100
- with a IRB prompt in the server window. Here you can do things like:
101
-
102
- >> @posts.inspect
103
- => "[#<Post:0x14a6be8
104
- @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
105
- #<Post:0x14a6620
106
- @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
107
- >> @posts.first.title = "hello from a debugger"
108
- => "hello from a debugger"
109
-
110
- ...and even better, you can examine how your runtime objects actually work:
111
-
112
- >> f = @posts.first
113
- => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
114
- >> f.
115
- Display all 152 possibilities? (y or n)
116
-
117
- Finally, when you're ready to resume execution, you can enter "cont".
118
-
119
-
120
- == Console
121
-
122
- The console is a Ruby shell, which allows you to interact with your
123
- application's domain model. Here you'll have all parts of the application
124
- configured, just like it is when the application is running. You can inspect
125
- domain models, change values, and save to the database. Starting the script
126
- without arguments will launch it in the development environment.
127
-
128
- To start the console, run <tt>rails console</tt> from the application
129
- directory.
130
-
131
- Options:
132
-
133
- * Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
134
- made to the database.
135
- * Passing an environment name as an argument will load the corresponding
136
- environment. Example: <tt>rails console production</tt>.
137
-
138
- To reload your controllers and models after launching the console run
139
- <tt>reload!</tt>
140
-
141
- More information about irb can be found at:
142
- link:http://www.rubycentral.com/pickaxe/irb.html
143
-
144
-
145
- == dbconsole
146
-
147
- You can go to the command line of your database directly through <tt>rails
148
- dbconsole</tt>. You would be connected to the database with the credentials
149
- defined in database.yml. Starting the script without arguments will connect you
150
- to the development database. Passing an argument will connect you to a different
151
- database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
152
- PostgreSQL and SQLite 3.
153
-
154
- == Description of Contents
155
-
156
- The default directory structure of a generated Ruby on Rails application:
157
-
158
- |-- app
159
- | |-- controllers
160
- | |-- helpers
161
- | |-- models
162
- | `-- views
163
- | `-- layouts
164
- |-- config
165
- | |-- environments
166
- | |-- initializers
167
- | `-- locales
168
- |-- db
169
- |-- doc
170
- |-- lib
171
- | `-- tasks
172
- |-- log
173
- |-- public
174
- | |-- images
175
- | |-- javascripts
176
- | `-- stylesheets
177
- |-- script
178
- | `-- performance
179
- |-- test
180
- | |-- fixtures
181
- | |-- functional
182
- | |-- integration
183
- | |-- performance
184
- | `-- unit
185
- |-- tmp
186
- | |-- cache
187
- | |-- pids
188
- | |-- sessions
189
- | `-- sockets
190
- `-- vendor
191
- `-- plugins
192
-
193
- app
194
- Holds all the code that's specific to this particular application.
195
-
196
- app/controllers
197
- Holds controllers that should be named like weblogs_controller.rb for
198
- automated URL mapping. All controllers should descend from
199
- ApplicationController which itself descends from ActionController::Base.
200
-
201
- app/models
202
- Holds models that should be named like post.rb. Models descend from
203
- ActiveRecord::Base by default.
204
-
205
- app/views
206
- Holds the template files for the view that should be named like
207
- weblogs/index.html.erb for the WeblogsController#index action. All views use
208
- eRuby syntax by default.
209
-
210
- app/views/layouts
211
- Holds the template files for layouts to be used with views. This models the
212
- common header/footer method of wrapping views. In your views, define a layout
213
- using the <tt>layout :default</tt> and create a file named default.html.erb.
214
- Inside default.html.erb, call <% yield %> to render the view using this
215
- layout.
216
-
217
- app/helpers
218
- Holds view helpers that should be named like weblogs_helper.rb. These are
219
- generated for you automatically when using generators for controllers.
220
- Helpers can be used to wrap functionality for your views into methods.
221
-
222
- config
223
- Configuration files for the Rails environment, the routing map, the database,
224
- and other dependencies.
225
-
226
- db
227
- Contains the database schema in schema.rb. db/migrate contains all the
228
- sequence of Migrations for your schema.
229
-
230
- doc
231
- This directory is where your application documentation will be stored when
232
- generated using <tt>rake doc:app</tt>
233
-
234
- lib
235
- Application specific libraries. Basically, any kind of custom code that
236
- doesn't belong under controllers, models, or helpers. This directory is in
237
- the load path.
238
-
239
- public
240
- The directory available for the web server. Contains subdirectories for
241
- images, stylesheets, and javascripts. Also contains the dispatchers and the
242
- default HTML files. This should be set as the DOCUMENT_ROOT of your web
243
- server.
244
-
245
- script
246
- Helper scripts for automation and generation.
247
-
248
- test
249
- Unit and functional tests along with fixtures. When using the rails generate
250
- command, template test files will be generated for you and placed in this
251
- directory.
252
-
253
- vendor
254
- External libraries that the application depends on. Also includes the plugins
255
- subdirectory. If the app has frozen rails, those gems also go here, under
256
- vendor/rails/. This directory is in the load path.