Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rvm use 2.0.0@description --create
rvm_trust_rvmrcs_flag=1
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# source 'https://rubygems.org'
source 'http://ruby.taobao.org'

gem 'pry'
gem 'dun'
gem 'ground', git: 'git://github.com/baya/ground.git', ref: 'bd4f89f0073c'
gem 'sexp_path'
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ GIT
GEM
remote: http://ruby.taobao.org/
specs:
coderay (1.1.0)
dun (0.0.1)
json (1.8.0)
method_source (0.8.2)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.5.2)
ruby_parser (3.2.2)
sexp_processor (~> 4.1)
sexp_path (0.5.1)
sexp_processor (~> 4.2)
sexp_processor (4.3.0)
slop (3.6.0)

PLATFORMS
ruby
Expand All @@ -26,5 +33,6 @@ DEPENDENCIES
dun
ground!
json
pry
ruby_parser
sexp_path
4 changes: 2 additions & 2 deletions bin/describle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

require 'pry'
lib_dir = File.join(File.dirname(__FILE__), '..', 'lib')
$: << lib_dir
require 'description'
Expand Down Expand Up @@ -40,7 +40,7 @@ migration_files.each {|file|



Rack::Server.start(app: Description::App,
Rack::Server.start(app: Description::BBpp,
Port: options[:port],
server: options[:server]
)
4 changes: 2 additions & 2 deletions lib/activities/parse_column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def build_column(col)
column[:column_type] = col['column_type'].to_s if col['column_type']

code_line = code_lines.detect {|line|
code, _ = line.split("#")
code, _ = line.split("comment:")
code and code.include?(method_name) and code.include?(col['column_name'].to_s)
}
comment = code_line.split("#")[1] if code_line
comment = code_line.split("comment:")[1] if code_line
column[:comment] = comment if comment

column
Expand Down
4 changes: 2 additions & 2 deletions lib/activities/parse_create_table_with_comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ def call
def build_column(col)
column = super
code_line = code_lines.detect {|line|
code, _ = line.split("#")
code, _ = line.split("comment:")
code and code.include?(col['column_name'].to_s)
}

comment = code_line.split("#")[1] if code_line
comment = code_line.split("comment:")[1] if code_line
column[:comment] = comment if comment

column
Expand Down
2 changes: 1 addition & 1 deletion lib/description.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

module Description
Table_Set = []
App = Ground 'description' do
BBpp = Ground 'description' do
use Rack::ShowExceptions
use Rack::ConditionalGet
use Rack::ETag
Expand Down