tj_bootstrap_helper 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +7 -0
  3. data/Rakefile +38 -0
  4. data/lib/tasks/bootstrap-helper_tasks.rake +4 -0
  5. data/lib/tj-bootstrap-helper/helper.rb +79 -0
  6. data/lib/tj-bootstrap-helper/version.rb +3 -0
  7. data/lib/tj-bootstrap-helper.rb +5 -0
  8. data/test/dummy/README.rdoc +261 -0
  9. data/test/dummy/Rakefile +7 -0
  10. data/test/dummy/app/assets/images/glyphicons-halflings-white.png +0 -0
  11. data/test/dummy/app/assets/images/glyphicons-halflings.png +0 -0
  12. data/test/dummy/app/assets/javascripts/application.js +15 -0
  13. data/test/dummy/app/assets/javascripts/bootstrap.min.js +6 -0
  14. data/test/dummy/app/assets/javascripts/home.js +2 -0
  15. data/test/dummy/app/assets/stylesheets/application.css +23 -0
  16. data/test/dummy/app/assets/stylesheets/bootstrap-responsive.min.css +9 -0
  17. data/test/dummy/app/assets/stylesheets/bootstrap.min.css +9 -0
  18. data/test/dummy/app/assets/stylesheets/home.css +4 -0
  19. data/test/dummy/app/controllers/application_controller.rb +3 -0
  20. data/test/dummy/app/controllers/home_controller.rb +5 -0
  21. data/test/dummy/app/controllers/posts_controller.rb +5 -0
  22. data/test/dummy/app/helpers/application_helper.rb +2 -0
  23. data/test/dummy/app/helpers/home_helper.rb +2 -0
  24. data/test/dummy/app/models/post.rb +3 -0
  25. data/test/dummy/app/views/home/_sidebar.html.erb +8 -0
  26. data/test/dummy/app/views/home/_topbar.html.erb +30 -0
  27. data/test/dummy/app/views/home/about.html.erb +0 -0
  28. data/test/dummy/app/views/home/contact.html.erb +0 -0
  29. data/test/dummy/app/views/home/index.html.erb +24 -0
  30. data/test/dummy/app/views/layouts/application.html.erb +46 -0
  31. data/test/dummy/app/views/posts/show.html.erb +2 -0
  32. data/test/dummy/config/application.rb +59 -0
  33. data/test/dummy/config/boot.rb +10 -0
  34. data/test/dummy/config/database.yml +25 -0
  35. data/test/dummy/config/environment.rb +5 -0
  36. data/test/dummy/config/environments/development.rb +37 -0
  37. data/test/dummy/config/environments/production.rb +67 -0
  38. data/test/dummy/config/environments/test.rb +37 -0
  39. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/dummy/config/initializers/inflections.rb +15 -0
  41. data/test/dummy/config/initializers/mime_types.rb +5 -0
  42. data/test/dummy/config/initializers/secret_token.rb +7 -0
  43. data/test/dummy/config/initializers/session_store.rb +8 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +5 -0
  46. data/test/dummy/config/routes.rb +63 -0
  47. data/test/dummy/config.ru +4 -0
  48. data/test/dummy/db/development.sqlite3 +0 -0
  49. data/test/dummy/db/migrate/20120724024139_create_posts.rb +10 -0
  50. data/test/dummy/db/migrate/20120724035630_add_image_url_to_posts.rb +5 -0
  51. data/test/dummy/db/schema.rb +24 -0
  52. data/test/dummy/db/seeds.rb +7 -0
  53. data/test/dummy/db/test.sqlite3 +0 -0
  54. data/test/dummy/log/development.log +8890 -0
  55. data/test/dummy/log/test.log +3 -0
  56. data/test/dummy/public/404.html +26 -0
  57. data/test/dummy/public/422.html +26 -0
  58. data/test/dummy/public/500.html +25 -0
  59. data/test/dummy/public/favicon.ico +0 -0
  60. data/test/dummy/script/rails +6 -0
  61. data/test/dummy/test/fixtures/posts.yml +9 -0
  62. data/test/dummy/test/functional/home_controller_test.rb +9 -0
  63. data/test/dummy/test/unit/helpers/home_helper_test.rb +4 -0
  64. data/test/dummy/test/unit/post_test.rb +7 -0
  65. data/test/dummy/tmp/cache/assets/C9F/560/sprockets%2F8e5a9738e9bc15478e026d98335454f9 +0 -0
  66. data/test/dummy/tmp/cache/assets/CA5/220/sprockets%2F2b6982ac4f57251707f935056aa20cb1 +0 -0
  67. data/test/dummy/tmp/cache/assets/CC6/680/sprockets%2Fc92f033b739ce130682844ed8e69578f +0 -0
  68. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  69. data/test/dummy/tmp/cache/assets/CDF/870/sprockets%2Fb878faf942403e313a5b103e5d80488e +0 -0
  70. data/test/dummy/tmp/cache/assets/CE7/5A0/sprockets%2Ffc187aee64323fa971aec84932470636 +0 -0
  71. data/test/dummy/tmp/cache/assets/CE8/390/sprockets%2Ffe578741336fbaf17729b0956ca2a492 +0 -0
  72. data/test/dummy/tmp/cache/assets/CF2/010/sprockets%2F7be9086c960bb4384c9d23a52e489f29 +0 -0
  73. data/test/dummy/tmp/cache/assets/D05/D40/sprockets%2F1c9faaf28d05409b88ad3113374d613c +0 -0
  74. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  75. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  76. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  77. data/test/dummy/tmp/cache/assets/D80/5B0/sprockets%2Fb009cc32ee628d995db599b7befc1765 +0 -0
  78. data/test/dummy/tmp/cache/assets/D95/BC0/sprockets%2F4ea33e825e6e38bd22dccab488a0255b +0 -0
  79. data/test/dummy/tmp/cache/assets/DA5/FB0/sprockets%2Ff644fd75cbead0e58c847aa16546e2a8 +0 -0
  80. data/test/dummy/tmp/cache/assets/DA9/140/sprockets%2F73dc01c8c6ecec43d92469f4ce6c44c8 +0 -0
  81. data/test/dummy/tmp/cache/assets/DBD/550/sprockets%2Fbdf81d3b0ebcf47b000e0bd8850ed535 +0 -0
  82. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  83. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  84. data/test/dummy/tmp/cache/assets/E3F/300/sprockets%2F6a9aefa66fb02368e6faf8e5a5d5edd9 +0 -0
  85. data/test/test_helper.rb +15 -0
  86. data/test/tj-bootstrap-helper_test.rb +7 -0
  87. metadata +243 -0
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'e62f72b552f504cb384169349066a3a2bf20fdc6b11fc5aa46bbf9dede44f9938f58fbb0660b7b12381b726b9e2382434fde69d9dc709a33d299e5cae209675c'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,63 @@
1
+ Dummy::Application.routes.draw do
2
+ get "home/index"
3
+ get "home/about"
4
+ get "home/contact"
5
+ resources :posts
6
+
7
+ # The priority is based upon order of creation:
8
+ # first created -> highest priority.
9
+
10
+ # Sample of regular route:
11
+ # match 'products/:id' => 'catalog#view'
12
+ # Keep in mind you can assign values other than :controller and :action
13
+
14
+ # Sample of named route:
15
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
16
+ # This route can be invoked with purchase_url(:id => product.id)
17
+
18
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
19
+ # resources :products
20
+
21
+ # Sample resource route with options:
22
+ # resources :products do
23
+ # member do
24
+ # get 'short'
25
+ # post 'toggle'
26
+ # end
27
+ #
28
+ # collection do
29
+ # get 'sold'
30
+ # end
31
+ # end
32
+
33
+ # Sample resource route with sub-resources:
34
+ # resources :products do
35
+ # resources :comments, :sales
36
+ # resource :seller
37
+ # end
38
+
39
+ # Sample resource route with more complex sub-resources
40
+ # resources :products do
41
+ # resources :comments
42
+ # resources :sales do
43
+ # get 'recent', :on => :collection
44
+ # end
45
+ # end
46
+
47
+ # Sample resource route within a namespace:
48
+ # namespace :admin do
49
+ # # Directs /admin/products/* to Admin::ProductsController
50
+ # # (app/controllers/admin/products_controller.rb)
51
+ # resources :products
52
+ # end
53
+
54
+ # You can have the root of your site routed with "root"
55
+ # just remember to delete public/index.html.
56
+ root :to => 'home#index'
57
+
58
+ # See how all your routes lay out with "rake routes"
59
+
60
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
61
+ # Note: This route will make all actions in every controller accessible via GET requests.
62
+ # match ':controller(/:action(/:id))(.:format)'
63
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
Binary file
@@ -0,0 +1,10 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.string :title
5
+ t.text :content
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ class AddImageUrlToPosts < ActiveRecord::Migration
2
+ def change
3
+ add_column :posts, :image_url, :string
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120724035630) do
15
+
16
+ create_table "posts", :force => true do |t|
17
+ t.string "title"
18
+ t.text "content"
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
21
+ t.string "image_url"
22
+ end
23
+
24
+ end
@@ -0,0 +1,7 @@
1
+ 12.times{
2
+ Post.create(
3
+ :title => Faker::Lorem.sentence,
4
+ :content => Faker::Lorem.paragraphs.join("\n"),
5
+ :image_url => "http://avatars.plurk.com/5874158-big66.jpg"
6
+ )
7
+ }
File without changes