mockup-rails 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 1.9.2
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
- gem "jquery-rails"
4
+ # gem "jquery-rails"
5
5
  # gem 'debugger'
6
+ gem "sqlite3", platform: :ruby, group: 'develop'
@@ -0,0 +1,4 @@
1
+ module Mockup
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,12 @@
1
+ module Mockup
2
+ class MockupController < ApplicationController
3
+ # unloadable
4
+ def method_missing arg
5
+ render "/mockup/#{arg}"
6
+ rescue
7
+ raise unless Rails.env.production?
8
+ @action = arg
9
+ render "/mockup/todo"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ module Mockup
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,15 @@
1
+ module Mockup
2
+ module MockupHelper
3
+ def link_to_mockup display, name=display, *args
4
+ link_to display, mockup_path(name), *args
5
+ end
6
+
7
+ def current_mockup_page? *names
8
+ # names = [names] unless names.respond_to? :each
9
+ included = names.inject(false) {|ans, name|
10
+ ans ||= (url_for(action: action_name) == mockup_path(name)) }
11
+ included ? "current" : ''
12
+ end
13
+
14
+ end
15
+ end
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.3
@@ -1,3 +1,3 @@
1
- Mockup::Rails::Engine.routes.draw do
2
- match '(:action)' => 'mockup'
1
+ Mockup::Engine.routes.draw do
2
+ match '(:action)' => 'mockup', as: :mockup
3
3
  end
@@ -0,0 +1,13 @@
1
+ module Mockup
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ desc "Add route to your application."
5
+
6
+ def add_route
7
+ route 'root to: "Mockup::Mockup#points"'
8
+ route 'mount Mockup::Engine => "/"'
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -1 +1,2 @@
1
- require 'mockup/rails'
1
+ require "mockup/engine"
2
+ require "mockup/version"
@@ -0,0 +1,5 @@
1
+ module Mockup
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Mockup
4
+ end
5
+ end
@@ -1,6 +1,6 @@
1
- module MockupRails
1
+ module Mockup
2
2
  module Version
3
- MAJOR,MINOR,TINY = File.read(File.join(File.dirname(__FILE__), '../../../build.version')).split('.')
3
+ MAJOR,MINOR,TINY = File.read(File.join(File.dirname(__FILE__), '../../build.version')).split('.')
4
4
  STRING = [MAJOR, MINOR, TINY].join('.')
5
5
  end
6
6
 
@@ -1,12 +1,12 @@
1
1
  $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  # Maintain your gem's version:
4
- require "mockup/rails/version"
4
+ require "mockup/version"
5
5
 
6
6
  # Describe your gem and declare its dependencies:
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "mockup-rails"
9
- s.version = MockupRails.version
9
+ s.version = Mockup.version
10
10
  s.authors = ["Ranmocy Sheng"]
11
11
  s.email = ["ranmocy@gmail.com"]
12
12
  s.homepage = "https://github.com/ranmocy/mockup-rails"
@@ -16,9 +16,9 @@ Gem::Specification.new do |s|
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
19
20
  # s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
20
21
  # s.test_files = Dir["test/**/*"]
21
- # s.require_paths = ["lib"]
22
22
 
23
23
  s.add_dependency "rails", "~> 3.2"
24
24
  # s.add_dependency "jquery-rails"
@@ -5,7 +5,7 @@
5
5
  # gem 'sqlite3'
6
6
  development:
7
7
  adapter: sqlite3
8
- database: db/development.sqlite3
8
+ database: ":memory:"
9
9
  pool: 5
10
10
  timeout: 5000
11
11
 
@@ -14,12 +14,12 @@ development:
14
14
  # Do not set this db to the same as development or production.
15
15
  test:
16
16
  adapter: sqlite3
17
- database: db/test.sqlite3
17
+ database: ":memory:"
18
18
  pool: 5
19
19
  timeout: 5000
20
20
 
21
21
  production:
22
22
  adapter: sqlite3
23
- database: db/production.sqlite3
23
+ database: ":memory:"
24
24
  pool: 5
25
25
  timeout: 5000
@@ -1,3 +1,3 @@
1
1
  Rails.application.routes.draw do
2
- mount Mockup::Rails::Engine => "/mockup"
2
+ mount Mockup::Engine => "/mockup"
3
3
  end
@@ -0,0 +1,16 @@
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 => 0) do
15
+
16
+ end
@@ -2,6 +2,6 @@ require 'test_helper'
2
2
 
3
3
  class MockupRailsTest < ActiveSupport::TestCase
4
4
  test "truth" do
5
- assert_kind_of Module, MockupRails
5
+ assert_kind_of Module, Mockup
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mockup-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
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-06-10 00:00:00.000000000 Z
12
+ date: 2012-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70360068568240 !ruby/object:Gem::Requirement
16
+ requirement: &70129615066380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70360068568240
24
+ version_requirements: *70129615066380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &70360068567840 !ruby/object:Gem::Requirement
27
+ requirement: &70129615065980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70360068567840
35
+ version_requirements: *70129615065980
36
36
  description: Mockup toolkit for rapidly building visible mockups to showoff your demo
37
37
  by Rails.
38
38
  email:
@@ -42,25 +42,26 @@ extensions: []
42
42
  extra_rdoc_files: []
43
43
  files:
44
44
  - .gitignore
45
+ - .travis.yml
45
46
  - Gemfile
46
47
  - MIT-LICENSE
47
48
  - README.rdoc
48
49
  - Rakefile
49
- - app/assets/images/mockup/rails/.gitkeep
50
- - app/assets/javascripts/mockup/rails/application.js
51
- - app/assets/stylesheets/mockup/rails/application.css
52
- - app/controllers/mockup/rails/application_controller.rb
53
- - app/controllers/mockup/rails/mockup_controller.rb
54
- - app/helpers/mockup/rails/application_helper.rb
55
- - app/helpers/mockup/rails/mockup_helper.rb
56
- - app/views/layouts/mockup/rails/application.html.erb
50
+ - app/assets/images/mockup/.gitkeep
51
+ - app/assets/javascripts/mockup/application.js
52
+ - app/assets/stylesheets/mockup/application.css
53
+ - app/controllers/mockup/application_controller.rb
54
+ - app/controllers/mockup/mockup_controller.rb
55
+ - app/helpers/mockup/application_helper.rb
56
+ - app/helpers/mockup/mockup_helper.rb
57
+ - app/views/layouts/mockup/application.html.erb
57
58
  - app/views/mockup/todo.html.erb
58
59
  - build.version
59
60
  - config/routes.rb
61
+ - lib/generators/mockup/install_generator.rb
60
62
  - lib/mockup-rails.rb
61
- - lib/mockup/rails.rb
62
- - lib/mockup/rails/engine.rb
63
- - lib/mockup/rails/version.rb
63
+ - lib/mockup/engine.rb
64
+ - lib/mockup/version.rb
64
65
  - lib/tasks/mockup-rails_tasks.rake
65
66
  - mockup-rails.gemspec
66
67
  - script/rails
@@ -89,6 +90,7 @@ files:
89
90
  - test/dummy/config/initializers/wrap_parameters.rb
90
91
  - test/dummy/config/locales/en.yml
91
92
  - test/dummy/config/routes.rb
93
+ - test/dummy/db/schema.rb
92
94
  - test/dummy/lib/assets/.gitkeep
93
95
  - test/dummy/log/.gitkeep
94
96
  - test/dummy/public/404.html
@@ -113,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
115
  version: '0'
114
116
  segments:
115
117
  - 0
116
- hash: -2682811024667402886
118
+ hash: 3525196771214788915
117
119
  required_rubygems_version: !ruby/object:Gem::Requirement
118
120
  none: false
119
121
  requirements:
@@ -122,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
124
  version: '0'
123
125
  segments:
124
126
  - 0
125
- hash: -2682811024667402886
127
+ hash: 3525196771214788915
126
128
  requirements: []
127
129
  rubyforge_project:
128
130
  rubygems_version: 1.8.16
@@ -155,6 +157,7 @@ test_files:
155
157
  - test/dummy/config/initializers/wrap_parameters.rb
156
158
  - test/dummy/config/locales/en.yml
157
159
  - test/dummy/config/routes.rb
160
+ - test/dummy/db/schema.rb
158
161
  - test/dummy/lib/assets/.gitkeep
159
162
  - test/dummy/log/.gitkeep
160
163
  - test/dummy/public/404.html
@@ -1,6 +0,0 @@
1
- module Mockup
2
- module Rails
3
- class ApplicationController < ActionController::Base
4
- end
5
- end
6
- end
@@ -1,13 +0,0 @@
1
- module Mockup
2
- module Rails
3
- class MockupController < ApplicationController
4
- # unloadable
5
- def method_missing arg
6
- render "mockup/#{arg}"
7
- rescue
8
- @action = arg
9
- render "mockup/todo"
10
- end
11
- end
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- module Mockup
2
- module Rails
3
- module ApplicationHelper
4
- end
5
- end
6
- end
@@ -1,7 +0,0 @@
1
- module Mockup::Rails
2
- module MockupHelper
3
- def link_to_mockup display, name=display, *args
4
- link_to display, "mockup/#{name}", *args
5
- end
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- require "mockup/rails/engine"
2
- require "mockup/rails/version"
3
-
4
- module Mockup
5
- module Rails
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- module Mockup
2
- module Rails
3
- class Engine < ::Rails::Engine
4
- isolate_namespace Mockup::Rails
5
- end
6
- end
7
- end