mta_json 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.
- data/README.md +17 -9
- data/examples/crud/README.md +13 -16
- data/examples/crud/meta.xml +0 -14
- data/lib/mta_json.rb +7 -6
- data/lib/mta_json/railtie.rb +12 -0
- data/lib/mta_json/version.rb +1 -1
- data/lib/mta_json/wrapper.rb +49 -22
- metadata +2 -133
- data/examples/crud/mta/crud/crud.lua +0 -0
- data/examples/crud/mta/crud/meta.xml +0 -3
- data/examples/crud/rails/.gitignore +0 -15
- data/examples/crud/rails/Gemfile +0 -40
- data/examples/crud/rails/Rakefile +0 -7
- data/examples/crud/rails/app/assets/images/rails.png +0 -0
- data/examples/crud/rails/app/assets/javascripts/application.js +0 -15
- data/examples/crud/rails/app/assets/javascripts/posts.js.coffee +0 -3
- data/examples/crud/rails/app/assets/stylesheets/application.css +0 -13
- data/examples/crud/rails/app/assets/stylesheets/posts.css.scss +0 -3
- data/examples/crud/rails/app/assets/stylesheets/scaffolds.css.scss +0 -69
- data/examples/crud/rails/app/controllers/application_controller.rb +0 -3
- data/examples/crud/rails/app/controllers/posts_controller.rb +0 -83
- data/examples/crud/rails/app/helpers/application_helper.rb +0 -2
- data/examples/crud/rails/app/helpers/posts_helper.rb +0 -2
- data/examples/crud/rails/app/mailers/.gitkeep +0 -0
- data/examples/crud/rails/app/models/.gitkeep +0 -0
- data/examples/crud/rails/app/models/post.rb +0 -3
- data/examples/crud/rails/app/views/layouts/application.html.erb +0 -14
- data/examples/crud/rails/app/views/posts/_form.html.erb +0 -25
- data/examples/crud/rails/app/views/posts/edit.html.erb +0 -6
- data/examples/crud/rails/app/views/posts/index.html.erb +0 -25
- data/examples/crud/rails/app/views/posts/new.html.erb +0 -5
- data/examples/crud/rails/app/views/posts/show.html.erb +0 -15
- data/examples/crud/rails/config.ru +0 -4
- data/examples/crud/rails/config/application.rb +0 -64
- data/examples/crud/rails/config/boot.rb +0 -6
- data/examples/crud/rails/config/database.yml +0 -25
- data/examples/crud/rails/config/environment.rb +0 -5
- data/examples/crud/rails/config/environments/development.rb +0 -37
- data/examples/crud/rails/config/environments/production.rb +0 -67
- data/examples/crud/rails/config/environments/test.rb +0 -37
- data/examples/crud/rails/config/initializers/backtrace_silencers.rb +0 -7
- data/examples/crud/rails/config/initializers/inflections.rb +0 -15
- data/examples/crud/rails/config/initializers/mime_types.rb +0 -5
- data/examples/crud/rails/config/initializers/secret_token.rb +0 -7
- data/examples/crud/rails/config/initializers/session_store.rb +0 -8
- data/examples/crud/rails/config/initializers/wrap_parameters.rb +0 -14
- data/examples/crud/rails/config/locales/en.yml +0 -5
- data/examples/crud/rails/config/routes.rb +0 -61
- data/examples/crud/rails/db/migrate/20130320115007_create_posts.rb +0 -10
- data/examples/crud/rails/db/schema.rb +0 -23
- data/examples/crud/rails/db/seeds.rb +0 -7
- data/examples/crud/rails/lib/assets/.gitkeep +0 -0
- data/examples/crud/rails/lib/tasks/.gitkeep +0 -0
- data/examples/crud/rails/log/.gitkeep +0 -0
- data/examples/crud/rails/public/404.html +0 -26
- data/examples/crud/rails/public/422.html +0 -26
- data/examples/crud/rails/public/500.html +0 -25
- data/examples/crud/rails/public/favicon.ico +0 -0
- data/examples/crud/rails/public/index.html +0 -241
- data/examples/crud/rails/public/robots.txt +0 -5
- data/examples/crud/rails/script/rails +0 -6
- data/examples/crud/rails/test/fixtures/.gitkeep +0 -0
- data/examples/crud/rails/test/fixtures/posts.yml +0 -9
- data/examples/crud/rails/test/functional/.gitkeep +0 -0
- data/examples/crud/rails/test/functional/posts_controller_test.rb +0 -49
- data/examples/crud/rails/test/integration/.gitkeep +0 -0
- data/examples/crud/rails/test/performance/browsing_test.rb +0 -12
- data/examples/crud/rails/test/test_helper.rb +0 -13
- data/examples/crud/rails/test/unit/.gitkeep +0 -0
- data/examples/crud/rails/test/unit/helpers/posts_helper_test.rb +0 -4
- data/examples/crud/rails/test/unit/post_test.rb +0 -7
- data/examples/crud/rails/vendor/assets/javascripts/.gitkeep +0 -0
- data/examples/crud/rails/vendor/assets/stylesheets/.gitkeep +0 -0
- data/examples/crud/rails/vendor/plugins/.gitkeep +0 -0
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby.exe
|
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
|
3
|
-
|
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
|
6
|
-
require 'rails/commands'
|
|
File without changes
|
|
File without changes
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
require 'test_helper'
|
|
2
|
-
|
|
3
|
-
class PostsControllerTest < ActionController::TestCase
|
|
4
|
-
setup do
|
|
5
|
-
@post = posts(:one)
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
test "should get index" do
|
|
9
|
-
get :index
|
|
10
|
-
assert_response :success
|
|
11
|
-
assert_not_nil assigns(:posts)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
test "should get new" do
|
|
15
|
-
get :new
|
|
16
|
-
assert_response :success
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
test "should create post" do
|
|
20
|
-
assert_difference('Post.count') do
|
|
21
|
-
post :create, post: { text: @post.text, title: @post.title }
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
assert_redirected_to post_path(assigns(:post))
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
test "should show post" do
|
|
28
|
-
get :show, id: @post
|
|
29
|
-
assert_response :success
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
test "should get edit" do
|
|
33
|
-
get :edit, id: @post
|
|
34
|
-
assert_response :success
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
test "should update post" do
|
|
38
|
-
put :update, id: @post, post: { text: @post.text, title: @post.title }
|
|
39
|
-
assert_redirected_to post_path(assigns(:post))
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
test "should destroy post" do
|
|
43
|
-
assert_difference('Post.count', -1) do
|
|
44
|
-
delete :destroy, id: @post
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
assert_redirected_to posts_path
|
|
48
|
-
end
|
|
49
|
-
end
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
require 'test_helper'
|
|
2
|
-
require 'rails/performance_test_help'
|
|
3
|
-
|
|
4
|
-
class BrowsingTest < ActionDispatch::PerformanceTest
|
|
5
|
-
# Refer to the documentation for all available options
|
|
6
|
-
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
|
|
7
|
-
# :output => 'tmp/performance', :formats => [:flat] }
|
|
8
|
-
|
|
9
|
-
def test_homepage
|
|
10
|
-
get '/'
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
ENV["RAILS_ENV"] = "test"
|
|
2
|
-
require File.expand_path('../../config/environment', __FILE__)
|
|
3
|
-
require 'rails/test_help'
|
|
4
|
-
|
|
5
|
-
class ActiveSupport::TestCase
|
|
6
|
-
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
|
7
|
-
#
|
|
8
|
-
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
|
9
|
-
# -- they do not yet inherit this setting
|
|
10
|
-
fixtures :all
|
|
11
|
-
|
|
12
|
-
# Add more helper methods to be used by all tests here...
|
|
13
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|