simple_update_field 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/Gemfile +0 -19
  2. data/Gemfile.lock +0 -150
  3. data/README.creole +102 -0
  4. data/Rakefile +3 -9
  5. data/VERSION +1 -1
  6. data/lib/simple_update_field.rb +0 -8
  7. data/simple_update_field.gemspec +7 -81
  8. data/spec/{lib/simple_update_field_spec.rb → simple_update_field_spec.rb} +2 -1
  9. data/spec/spec_helper.rb +8 -28
  10. metadata +16 -162
  11. data/.rvmrc +0 -1
  12. data/README.rdoc +0 -25
  13. data/app/assets/images/rails.png +0 -0
  14. data/app/assets/javascripts/application.js +0 -14
  15. data/app/assets/stylesheets/application.css +0 -7
  16. data/app/controllers/application_controller.rb +0 -3
  17. data/app/controllers/phrases_controller.rb +0 -12
  18. data/app/helpers/application_helper.rb +0 -2
  19. data/app/mailers/.gitkeep +0 -0
  20. data/app/models/.gitkeep +0 -0
  21. data/app/models/phrase.rb +0 -4
  22. data/app/views/layouts/application.html.erb +0 -14
  23. data/app/views/phrases/_phrase.html.erb +0 -8
  24. data/app/views/phrases/index.html.erb +0 -1
  25. data/config.ru +0 -4
  26. data/config/application.rb +0 -54
  27. data/config/boot.rb +0 -6
  28. data/config/database.yml +0 -25
  29. data/config/environment.rb +0 -5
  30. data/config/environments/development.rb +0 -30
  31. data/config/environments/production.rb +0 -60
  32. data/config/environments/test.rb +0 -42
  33. data/config/initializers/backtrace_silencers.rb +0 -7
  34. data/config/initializers/inflections.rb +0 -10
  35. data/config/initializers/mime_types.rb +0 -5
  36. data/config/initializers/secret_token.rb +0 -7
  37. data/config/initializers/session_store.rb +0 -8
  38. data/config/initializers/wrap_parameters.rb +0 -14
  39. data/config/locales/en.yml +0 -5
  40. data/config/routes.rb +0 -4
  41. data/db/migrate/20120213182817_create_phrases.rb +0 -9
  42. data/db/schema.rb +0 -22
  43. data/db/seeds.rb +0 -7
  44. data/lib/assets/.gitkeep +0 -0
  45. data/lib/tasks/.gitkeep +0 -0
  46. data/lib/tasks/admin.rake +0 -9
  47. data/lib/tasks/jasmine.rake +0 -8
  48. data/script/rails +0 -6
  49. data/spec/controllers/phrases_controller_spec.rb +0 -22
  50. data/spec/javascripts/editable_list_spec.js +0 -411
  51. data/spec/javascripts/helpers/mock-ajax.js +0 -207
  52. data/spec/javascripts/spec.css +0 -3
  53. data/spec/javascripts/spec.js +0 -2
  54. data/spec/models/phrase_spec.rb +0 -11
  55. data/spec/routing/phrase_spec.rb +0 -12
  56. data/spec/routing/root_spec.rb +0 -7
  57. data/spec/views/_phrase.html.erb_spec.rb +0 -9
  58. data/spec/views/index.html.erb_spec.rb +0 -10
@@ -1,4 +1,5 @@
1
- require 'spec_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
2
3
  describe "SimpleUpdateField" do
3
4
  it "should define an engine" do
4
5
  lambda do
data/spec/spec_helper.rb CHANGED
@@ -1,32 +1,12 @@
1
- # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
3
- require File.expand_path("../../config/environment", __FILE__)
4
- require 'rspec/rails'
5
- require 'rspec/autorun'
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'simple_update_field'
6
5
 
7
- # Requires supporting ruby files with custom matchers and macros, etc,
8
- # in spec/support/ and its subdirectories.
9
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
10
9
 
11
10
  RSpec.configure do |config|
12
- # ## Mock Framework
13
- #
14
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
15
- #
16
- # config.mock_with :mocha
17
- # config.mock_with :flexmock
18
- # config.mock_with :rr
19
-
20
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
21
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
22
-
23
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
24
- # examples within a transaction, remove the following line or assign false
25
- # instead of true.
26
- config.use_transactional_fixtures = true
27
-
28
- # If true, the base class of anonymous controllers will be inferred
29
- # automatically. This will be the default behavior in future versions of
30
- # rspec-rails.
31
- config.infer_base_class_for_anonymous_controllers = false
11
+
32
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_update_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-29 00:00:00.000000000Z
12
+ date: 2012-04-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70105491568520 !ruby/object:Gem::Requirement
16
+ requirement: &70352525074880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.8.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70105491568520
24
+ version_requirements: *70352525074880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdoc
27
- requirement: &70105491528520 !ruby/object:Gem::Requirement
27
+ requirement: &70352525072500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.12'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70105491528520
35
+ version_requirements: *70352525072500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70105491523260 !ruby/object:Gem::Requirement
38
+ requirement: &70352525070640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.1.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70105491523260
46
+ version_requirements: *70352525070640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &70105491505920 !ruby/object:Gem::Requirement
49
+ requirement: &70352525067840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,106 +54,7 @@ dependencies:
54
54
  version: 1.8.3
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70105491505920
58
- - !ruby/object:Gem::Dependency
59
- name: rails
60
- requirement: &70105491478960 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - =
64
- - !ruby/object:Gem::Version
65
- version: 3.1.0
66
- type: :development
67
- prerelease: false
68
- version_requirements: *70105491478960
69
- - !ruby/object:Gem::Dependency
70
- name: sqlite3
71
- requirement: &70105491468780 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: *70105491468780
80
- - !ruby/object:Gem::Dependency
81
- name: jquery-rails
82
- requirement: &70105491442300 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
88
- type: :development
89
- prerelease: false
90
- version_requirements: *70105491442300
91
- - !ruby/object:Gem::Dependency
92
- name: rspec-rails
93
- requirement: &70105491398040 !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
99
- type: :development
100
- prerelease: false
101
- version_requirements: *70105491398040
102
- - !ruby/object:Gem::Dependency
103
- name: autotest
104
- requirement: &70105491327080 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :development
111
- prerelease: false
112
- version_requirements: *70105491327080
113
- - !ruby/object:Gem::Dependency
114
- name: capybara
115
- requirement: &70105491282080 !ruby/object:Gem::Requirement
116
- none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
121
- type: :development
122
- prerelease: false
123
- version_requirements: *70105491282080
124
- - !ruby/object:Gem::Dependency
125
- name: jasminerice
126
- requirement: &70105491272440 !ruby/object:Gem::Requirement
127
- none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: *70105491272440
135
- - !ruby/object:Gem::Dependency
136
- name: guard-jasmine
137
- requirement: &70105491232080 !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: '0'
143
- type: :development
144
- prerelease: false
145
- version_requirements: *70105491232080
146
- - !ruby/object:Gem::Dependency
147
- name: faker
148
- requirement: &70105491209800 !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
151
- - - ! '>='
152
- - !ruby/object:Gem::Version
153
- version: '0'
154
- type: :development
155
- prerelease: false
156
- version_requirements: *70105491209800
57
+ version_requirements: *70352525067840
157
58
  description: Your resources text attributes will gain inplace update ability with
158
59
  keybindings for quick editing
159
60
  email: curtis@ram9.cc
@@ -161,69 +62,22 @@ executables: []
161
62
  extensions: []
162
63
  extra_rdoc_files:
163
64
  - LICENSE.txt
164
- - README.rdoc
65
+ - README.creole
165
66
  files:
166
67
  - .document
167
68
  - .rspec
168
- - .rvmrc
169
69
  - Gemfile
170
70
  - Gemfile.lock
171
71
  - LICENSE.txt
172
- - README.rdoc
72
+ - README.creole
173
73
  - Rakefile
174
74
  - VERSION
175
- - app/assets/images/rails.png
176
- - app/assets/javascripts/application.js
177
- - app/assets/stylesheets/application.css
178
- - app/controllers/application_controller.rb
179
- - app/controllers/phrases_controller.rb
180
- - app/helpers/application_helper.rb
181
- - app/mailers/.gitkeep
182
- - app/models/.gitkeep
183
- - app/models/phrase.rb
184
- - app/views/layouts/application.html.erb
185
- - app/views/phrases/_phrase.html.erb
186
- - app/views/phrases/index.html.erb
187
- - config.ru
188
- - config/application.rb
189
- - config/boot.rb
190
- - config/database.yml
191
- - config/environment.rb
192
- - config/environments/development.rb
193
- - config/environments/production.rb
194
- - config/environments/test.rb
195
- - config/initializers/backtrace_silencers.rb
196
- - config/initializers/inflections.rb
197
- - config/initializers/mime_types.rb
198
- - config/initializers/secret_token.rb
199
- - config/initializers/session_store.rb
200
- - config/initializers/wrap_parameters.rb
201
- - config/locales/en.yml
202
- - config/routes.rb
203
- - db/migrate/20120213182817_create_phrases.rb
204
- - db/schema.rb
205
- - db/seeds.rb
206
- - lib/assets/.gitkeep
207
75
  - lib/simple_update_field.rb
208
- - lib/tasks/.gitkeep
209
- - lib/tasks/admin.rake
210
- - lib/tasks/jasmine.rake
211
- - script/rails
212
76
  - simple_update_field.gemspec
213
- - spec/controllers/phrases_controller_spec.rb
214
- - spec/javascripts/editable_list_spec.js
215
- - spec/javascripts/helpers/mock-ajax.js
216
- - spec/javascripts/spec.css
217
- - spec/javascripts/spec.js
218
- - spec/lib/simple_update_field_spec.rb
219
- - spec/models/phrase_spec.rb
220
- - spec/routing/phrase_spec.rb
221
- - spec/routing/root_spec.rb
77
+ - spec/simple_update_field_spec.rb
222
78
  - spec/spec_helper.rb
223
- - spec/views/_phrase.html.erb_spec.rb
224
- - spec/views/index.html.erb_spec.rb
225
79
  - vendor/assets/javascripts/editable_list.js
226
- homepage: http://github.com/robotarmy/simple_update_field
80
+ homepage: http://github.com/blazingcloud/simple_update_field
227
81
  licenses:
228
82
  - MIT
229
83
  post_install_message:
@@ -238,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
92
  version: '0'
239
93
  segments:
240
94
  - 0
241
- hash: -3437147205302710675
95
+ hash: -417061757656223822
242
96
  required_rubygems_version: !ruby/object:Gem::Requirement
243
97
  none: false
244
98
  requirements:
@@ -250,5 +104,5 @@ rubyforge_project:
250
104
  rubygems_version: 1.8.10
251
105
  signing_key:
252
106
  specification_version: 3
253
- summary: turn a resource attribute into an inplace editable field
107
+ summary: turn a rails resource's attribute into an inplace editable field
254
108
  test_files: []
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 1.9.2@simple_update_field --create
data/README.rdoc DELETED
@@ -1,25 +0,0 @@
1
- = simple_update_field
2
-
3
- Rails text field helper for inplace-editing of text with keybindings
4
- to move between each simple_update_field.
5
-
6
- simple_update_field is implemented internally with jquery
7
-
8
-
9
-
10
- == Contributing to simple_update_field
11
-
12
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
13
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
14
- * Fork the project.
15
- * Start a feature/bugfix branch.
16
- * Commit and push until you are happy with your contribution.
17
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
18
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
19
-
20
- == Copyright
21
- Authored by Curtis Schofield
22
-
23
- Copyright (c) 2012 Blazing Cloud. See LICENSE.txt for
24
- further details.
25
-
Binary file
@@ -1,14 +0,0 @@
1
- // This is a manifest file that'll be compiled into including all the files listed below.
2
- // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
- // be included in the compiled file accessible from http://example.com/assets/application.js
4
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
- // the compiled file.
6
- //
7
- //= require jquery
8
- //= require editable_list
9
- //= require jquery_ujs
10
- //= require_tree .
11
- //
12
- $(document).ready(function() {
13
- Editable('.phrase .text')
14
- })
@@ -1,7 +0,0 @@
1
- /*
2
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
- * the top of the compiled file, but it's generally better to create a new file per style scope.
5
- *= require_self
6
- *= require_tree .
7
- */
@@ -1,3 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery
3
- end
@@ -1,12 +0,0 @@
1
- class PhrasesController < ApplicationController
2
- def index
3
- @phrases = Phrase.limit(5)
4
- end
5
-
6
- def update
7
- Phrase.
8
- find(params[:id]).
9
- update_attributes(params[:phrase])
10
- head :ok
11
- end
12
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
data/app/mailers/.gitkeep DELETED
File without changes
data/app/models/.gitkeep DELETED
File without changes
data/app/models/phrase.rb DELETED
@@ -1,4 +0,0 @@
1
- class Phrase < ActiveRecord::Base
2
- validates_presence_of :text
3
-
4
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>EditableList</title>
5
- <%= stylesheet_link_tag "application" %>
6
- <%= javascript_include_tag "application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,8 +0,0 @@
1
- <div class="phrase">
2
- <span editable-resource-attribute="text"
3
- editable-resource-model="<%=phrase.class.model_name.downcase%>"
4
- editable-resource-uri="<%=url_for(phrase)%>"
5
- class="text">
6
- <%= phrase.text %>
7
- </span>
8
- </div>
@@ -1 +0,0 @@
1
- <%= render @phrases %>
data/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run EditableList::Application
@@ -1,54 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- require "active_resource/railtie"
8
- require "sprockets/railtie"
9
- # require "rails/test_unit/railtie"
10
-
11
- if defined?(Bundler)
12
- # If you precompile assets before deploying to production, use this line
13
- Bundler.require *Rails.groups(:assets => %w(development test))
14
- # If you want your assets lazily compiled in production, use this line
15
- # Bundler.require(:default, :assets, Rails.env)
16
- end
17
-
18
- module EditableList
19
- class Application < Rails::Application
20
- # Settings in config/environments/* take precedence over those specified here.
21
- # Application configuration should go into files in config/initializers
22
- # -- all .rb files in that directory are automatically loaded.
23
-
24
- # Custom directories with classes and modules you want to be autoloadable.
25
- config.autoload_paths += %W(#{config.root}/lib)
26
-
27
- # Only load the plugins named here, in the order given (default is alphabetical).
28
- # :all can be used as a placeholder for all plugins not explicitly named.
29
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
30
-
31
- # Activate observers that should always be running.
32
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
33
-
34
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
35
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
36
- # config.time_zone = 'Central Time (US & Canada)'
37
-
38
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
39
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
40
- # config.i18n.default_locale = :de
41
-
42
- # Configure the default encoding used in templates for Ruby 1.9.
43
- config.encoding = "utf-8"
44
-
45
- # Configure sensitive parameters which will be filtered from the log file.
46
- config.filter_parameters += [:password]
47
-
48
- # Enable the asset pipeline
49
- config.assets.enabled = true
50
-
51
- # Version of your assets, change this if you want to expire all your assets
52
- config.assets.version = '2.1'
53
- end
54
- end