annotator 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -70,7 +70,7 @@ Of course similar thing happens when you remove column or change it's type.
70
70
  require 'annotator'
71
71
  Annotator.run(File.join(Dir.pwd, "lib", "models"))
72
72
  end
73
-
73
+
74
74
 
75
75
  Contributions are very much welcome.
76
76
 
@@ -87,10 +87,10 @@ Kacper Cieśla @ Tech-Angels - http://www.tech-angels.com
87
87
  {Contributions}[https://github.com/tech-angels/annotator/graphs/contributors]:
88
88
 
89
89
  * {Lucas Florio}[https://github.com/lucasefe] - made it working without rails
90
-
90
+ * {vanyak}[https://github.com/vanyak] - re-annotating belongs_to associations
91
91
 
92
92
  == License
93
93
 
94
- Annotator is released under the MIT license.
94
+ Annotator is released under the MIT license.
95
95
 
96
96
 
@@ -37,6 +37,12 @@ module Annotator
37
37
  if row[:type] != type_str(column)
38
38
  puts " M #{@model}##{column.name} [#{row[:type]} -> #{type_str(column)}]"
39
39
  row[:type] = type_str(column)
40
+ elsif row[:desc] == InitialDescription::DEFAULT_DESCRIPTION
41
+ new_desc = InitialDescription.for(@model, column.name)
42
+ if row[:desc] != new_desc
43
+ puts " M #{@model}##{column.name} description updated"
44
+ row[:desc] = new_desc
45
+ end
40
46
  end
41
47
  else
42
48
  puts " A #{@model}##{column.name} [#{type_str(column)}]"
@@ -4,7 +4,8 @@ Dir[File.dirname(__FILE__) + '/initial_description/*.rb'].each {|file| require f
4
4
  module Annotator
5
5
  module InitialDescription
6
6
 
7
- NO_DESCRIPTION_COLUMNS = %w{email name title body}
7
+ DEFAULT_DESCRIPTION = "TODO: document me"
8
+ NO_DESCRIPTION_COLUMNS = %w{email name title body}
8
9
 
9
10
  # Get initial description for given model & column
10
11
  def self.for(model, column)
@@ -16,7 +17,7 @@ module Annotator
16
17
  # Some columns are just too obvious
17
18
  return "" if NO_DESCRIPTION_COLUMNS.include? column
18
19
  # Let user do the work
19
- return "TODO: document me"
20
+ return DEFAULT_DESCRIPTION
20
21
  end
21
22
 
22
23
  end
@@ -1,7 +1,7 @@
1
1
  module Annotator
2
2
  module InitialDescription
3
3
 
4
- # Initila descriptions for devise specific columns
4
+ # Initial descriptions for devise specific columns
5
5
  class Devise < Base
6
6
 
7
7
  def check
@@ -10,6 +10,7 @@ module Annotator
10
10
 
11
11
  def columns
12
12
  {
13
+ :encrypted_password => "Devise encrypted password",
13
14
  :reset_password_token => "Devise Recoverable module",
14
15
  :reset_password_sent_at => "Devise Recoverable module",
15
16
  :remember_created_at => "Devise Rememberable module",
@@ -21,7 +22,7 @@ module Annotator
21
22
  :password_salt => "Devise Encriptable module",
22
23
  :confirmation_token => "Devise Confirmable module",
23
24
  :confirmed_at => "Devise Confirmable module",
24
- :confiramtion_sent_at => "Devise Confirmable module",
25
+ :confirmation_sent_at => "Devise Confirmable module",
25
26
  :unconfirmed_email => "Devise Confirmable module",
26
27
  :failed_attempts => "Devise Lockable module",
27
28
  :unlock_token => "Devise Locakble module",
@@ -5,8 +5,8 @@ module Annotator
5
5
  class Paperclip < Base
6
6
 
7
7
  def check
8
- if @model.respond_to? :attachments_definitions
9
- @model.attachments_definitions.keys.each do |att|
8
+ if @model.respond_to? :attachment_definitions
9
+ @model.attachment_definitions.keys.each do |att|
10
10
  cols = ["#{att}_file_name", "#{att}_content_type", "#{att}_file_size", "#{att}_updated_at"]
11
11
  if cols.include? @column
12
12
  @attachment = att
@@ -1,3 +1,3 @@
1
1
  module Annotator
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -58,6 +58,19 @@ class AnnotatorTest < ActiveSupport::TestCase
58
58
  assert_equal File.read(asset_file 'moo_hoo_annotated.rb' ), File.read(app_file 'moo/hoo.rb' )
59
59
  end
60
60
 
61
+ test "reannotating belongs_to if it had default annotation" do
62
+ assert_equal File.read(asset_file 'roo_reannotated.rb' ), File.read(app_file 'roo.rb' )
63
+ end
64
+
65
+ test "reannotating belongs_to output message" do
66
+ FileUtils.cp asset_file('roo_initially_annotated.rb'), app_file('roo.rb')
67
+ output = execute "rake annotate"
68
+ assert output.include?('M Roo#boo_id description updated')
69
+ assert output.include?('M Roo#poly_id description updated')
70
+ assert output.include?('M Roo#poly_type description updated')
71
+ assert !output.include?('M Roo#foo_id')
72
+ end
73
+
61
74
  def asset_file(name)
62
75
  File.join(File.expand_path("../assets/", __FILE__), name)
63
76
  end
@@ -10,7 +10,7 @@ class Paper < ActiveRecord::Base
10
10
  # has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }
11
11
 
12
12
  # stub for tests
13
- def self.attachments_definitions
13
+ def self.attachment_definitions
14
14
  {:avatar=>{:styles=>{:medium=>"300x300>", :thumb=>"100x100>"}}}
15
15
  end
16
16
  end
@@ -0,0 +1,13 @@
1
+ # Attributes:
2
+ # * id [integer, primary, not null] - primary key
3
+ # * boo_id [integer] - TODO: document me
4
+ # * created_at [datetime, not null] - creation time
5
+ # * foo_id [integer] - my handcrafted description
6
+ # * poly_id [integer] - TODO: document me
7
+ # * poly_type [string] - TODO: document me
8
+ # * updated_at [datetime, not null] - last update time
9
+ class Roo < ActiveRecord::Base
10
+ belongs_to :boo
11
+ belongs_to :poly, :polymorphic => true
12
+ belongs_to :foo
13
+ end
@@ -0,0 +1,13 @@
1
+ # Attributes:
2
+ # * id [integer, primary, not null] - primary key
3
+ # * boo_id [integer] - belongs to :boo
4
+ # * created_at [datetime, not null] - creation time
5
+ # * foo_id [integer] - my handcrafted description
6
+ # * poly_id [integer] - belongs to :poly (polymorphic)
7
+ # * poly_type [string] - belongs to :poly (polymorphic)
8
+ # * updated_at [datetime, not null] - last update time
9
+ class Roo < ActiveRecord::Base
10
+ belongs_to :boo
11
+ belongs_to :poly, :polymorphic => true
12
+ belongs_to :foo
13
+ end
@@ -1,14 +1,14 @@
1
1
  # Attributes:
2
2
  # * id [integer, primary, not null] - primary key
3
3
  # * authentication_token [string] - Devise Token authenticable module
4
- # * confirmation_sent_at [datetime] - TODO: document me
4
+ # * confirmation_sent_at [datetime] - Devise Confirmable module
5
5
  # * confirmation_token [string] - Devise Confirmable module
6
6
  # * confirmed_at [datetime] - Devise Confirmable module
7
7
  # * created_at [datetime, not null] - creation time
8
8
  # * current_sign_in_at [datetime] - Devise Trackable module
9
9
  # * current_sign_in_ip [string] - Devise Trackable module
10
10
  # * email [string, default=, not null]
11
- # * encrypted_password [string, default=, not null] - TODO: document me
11
+ # * encrypted_password [string, default=, not null] - Devise encrypted password
12
12
  # * failed_attempts [integer, default=0] - Devise Lockable module
13
13
  # * last_sign_in_at [datetime] - Devise Trackable module
14
14
  # * last_sign_in_ip [string] - Devise Trackable module
@@ -2,7 +2,7 @@ class Paper < ActiveRecord::Base
2
2
  # has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }
3
3
 
4
4
  # stub for tests
5
- def self.attachments_definitions
5
+ def self.attachment_definitions
6
6
  {:avatar=>{:styles=>{:medium=>"300x300>", :thumb=>"100x100>"}}}
7
7
  end
8
8
  end
@@ -0,0 +1,13 @@
1
+ # Attributes:
2
+ # * id [integer, primary, not null] - primary key
3
+ # * boo_id [integer] - TODO: document me
4
+ # * created_at [datetime, not null] - creation time
5
+ # * foo_id [integer] - my handcrafted description
6
+ # * poly_id [integer] - TODO: document me
7
+ # * poly_type [string] - TODO: document me
8
+ # * updated_at [datetime, not null] - last update time
9
+ class Roo < ActiveRecord::Base
10
+ belongs_to :boo
11
+ belongs_to :poly, :polymorphic => true
12
+ belongs_to :foo
13
+ end
@@ -0,0 +1,11 @@
1
+ class CreateRoos < ActiveRecord::Migration
2
+ def change
3
+ create_table :roos do |t|
4
+ t.integer :boo_id
5
+ t.integer :poly_id
6
+ t.string :poly_type
7
+ t.integer :foo_id
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120527025142) do
14
+ ActiveRecord::Schema.define(:version => 20120708043543) do
15
15
 
16
16
  create_table "boos", :force => true do |t|
17
17
  t.integer "foo_id"
@@ -38,6 +38,14 @@ ActiveRecord::Schema.define(:version => 20120527025142) do
38
38
  t.datetime "avatar_updated_at"
39
39
  end
40
40
 
41
+ create_table "roos", :force => true do |t|
42
+ t.integer "boo_id"
43
+ t.integer "poly_id"
44
+ t.string "poly_type"
45
+ t.datetime "created_at", :null => false
46
+ t.datetime "updated_at", :null => false
47
+ end
48
+
41
49
  create_table "users", :force => true do |t|
42
50
  t.string "email", :default => "", :null => false
43
51
  t.string "encrypted_password", :default => "", :null => false
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class RooTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-15 00:00:00.000000000 Z
13
+ date: 2012-07-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &74193300 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,15 +22,10 @@ dependencies:
22
22
  version: '3.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ~>
29
- - !ruby/object:Gem::Version
30
- version: '3.0'
25
+ version_requirements: *74193300
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: sqlite3
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &74193000 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
31
  - - ! '>='
@@ -38,15 +33,10 @@ dependencies:
38
33
  version: '0'
39
34
  type: :development
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
36
+ version_requirements: *74193000
47
37
  - !ruby/object:Gem::Dependency
48
38
  name: rails
49
- requirement: !ruby/object:Gem::Requirement
39
+ requirement: &74192650 !ruby/object:Gem::Requirement
50
40
  none: false
51
41
  requirements:
52
42
  - - ~>
@@ -54,12 +44,7 @@ dependencies:
54
44
  version: '3.0'
55
45
  type: :development
56
46
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ~>
61
- - !ruby/object:Gem::Version
62
- version: '3.0'
47
+ version_requirements: *74192650
63
48
  description: ''
64
49
  email:
65
50
  - kacper.ciesla@tech-angels.com
@@ -67,87 +52,90 @@ executables: []
67
52
  extensions: []
68
53
  extra_rdoc_files: []
69
54
  files:
70
- - lib/tasks/annotator_tasks.rake
71
55
  - lib/annotator.rb
72
- - lib/annotator/railtie.rb
73
- - lib/annotator/initial_description/devise.rb
56
+ - lib/annotator/model.rb
57
+ - lib/annotator/attributes.rb
58
+ - lib/annotator/version.rb
59
+ - lib/annotator/initial_description.rb
74
60
  - lib/annotator/initial_description/rails.rb
75
- - lib/annotator/initial_description/base.rb
76
- - lib/annotator/initial_description/paperclip.rb
77
61
  - lib/annotator/initial_description/belongs_to.rb
78
- - lib/annotator/initial_description.rb
79
- - lib/annotator/version.rb
80
- - lib/annotator/attributes.rb
81
- - lib/annotator/model.rb
62
+ - lib/annotator/initial_description/devise.rb
63
+ - lib/annotator/initial_description/paperclip.rb
64
+ - lib/annotator/initial_description/base.rb
65
+ - lib/annotator/railtie.rb
66
+ - lib/tasks/annotator_tasks.rake
82
67
  - MIT-LICENSE
83
68
  - Rakefile
84
69
  - README.rdoc
85
- - test/assets/foo_require_first.rb
86
- - test/assets/user_annotated.rb
87
- - test/assets/moo_hoo_annotated.rb
88
- - test/assets/boo_encoding_annotated.rb
89
- - test/assets/boo_encoding.rb
90
- - test/assets/foo_annotated.rb
91
- - test/assets/foo_annotated_with_comments.rb
92
- - test/assets/boo_annotated.rb
93
- - test/assets/foo_annotated_bad_column_nodoc.rb
94
- - test/assets/paper_annotated.rb
95
- - test/assets/foo_annotated_bad_column.rb
96
- - test/assets/foo_annotated_column_fixed.rb
97
- - test/annotator_test.rb
98
- - test/test_helper.rb
99
- - test/dummy/app/helpers/application_helper.rb
100
- - test/dummy/app/assets/stylesheets/application.css
101
- - test/dummy/app/assets/javascripts/application.js
102
- - test/dummy/app/controllers/application_controller.rb
103
- - test/dummy/app/models/user.rb
104
- - test/dummy/app/models/nomodel.rb
105
- - test/dummy/app/models/foo.rb
106
- - test/dummy/app/models/paper.rb
107
- - test/dummy/app/models/moo/hoo.rb
108
- - test/dummy/app/models/boo.rb
109
- - test/dummy/app/views/layouts/application.html.erb
110
- - test/dummy/config/routes.rb
111
- - test/dummy/config/environment.rb
70
+ - test/support/test_app.rb
71
+ - test/dummy/script/rails
72
+ - test/dummy/test/unit/paper_test.rb
73
+ - test/dummy/test/unit/boo_test.rb
74
+ - test/dummy/test/unit/foo_test.rb
75
+ - test/dummy/test/unit/roo_test.rb
76
+ - test/dummy/test/unit/user_test.rb
77
+ - test/dummy/test/fixtures/roos.yml
78
+ - test/dummy/test/fixtures/boos.yml
79
+ - test/dummy/test/fixtures/papers.yml
80
+ - test/dummy/test/fixtures/foos.yml
81
+ - test/dummy/test/fixtures/users.yml
82
+ - test/dummy/Rakefile
83
+ - test/dummy/config/locales/en.yml
84
+ - test/dummy/config/application.rb
112
85
  - test/dummy/config/environments/production.rb
113
- - test/dummy/config/environments/development.rb
114
86
  - test/dummy/config/environments/test.rb
115
- - test/dummy/config/application.rb
116
- - test/dummy/config/locales/en.yml
87
+ - test/dummy/config/environments/development.rb
117
88
  - test/dummy/config/database.yml
118
89
  - test/dummy/config/boot.rb
119
- - test/dummy/config/initializers/wrap_parameters.rb
120
- - test/dummy/config/initializers/mime_types.rb
90
+ - test/dummy/config/environment.rb
121
91
  - test/dummy/config/initializers/session_store.rb
122
92
  - test/dummy/config/initializers/backtrace_silencers.rb
123
- - test/dummy/config/initializers/secret_token.rb
93
+ - test/dummy/config/initializers/mime_types.rb
124
94
  - test/dummy/config/initializers/inflections.rb
125
- - test/dummy/script/rails
126
- - test/dummy/log/development.log
127
- - test/dummy/log/test.log
128
- - test/dummy/config.ru
129
- - test/dummy/Rakefile
130
- - test/dummy/db/development.sqlite3
131
- - test/dummy/db/migrate/20120527023350_create_papers.rb
95
+ - test/dummy/config/initializers/secret_token.rb
96
+ - test/dummy/config/initializers/wrap_parameters.rb
97
+ - test/dummy/config/routes.rb
98
+ - test/dummy/db/migrate/20120527025142_create_boos.rb
99
+ - test/dummy/db/migrate/20120219112425_create_foos.rb
132
100
  - test/dummy/db/migrate/20120527020350_devise_create_users.rb
101
+ - test/dummy/db/migrate/20120708043543_create_roos.rb
102
+ - test/dummy/db/migrate/20120527023350_create_papers.rb
133
103
  - test/dummy/db/migrate/20120527023417_add_attachment_avatar_to_papers.rb
134
- - test/dummy/db/migrate/20120219112425_create_foos.rb
135
- - test/dummy/db/migrate/20120527025142_create_boos.rb
136
104
  - test/dummy/db/schema.rb
137
- - test/dummy/test/fixtures/boos.yml
138
- - test/dummy/test/fixtures/papers.yml
139
- - test/dummy/test/fixtures/users.yml
140
- - test/dummy/test/fixtures/foos.yml
141
- - test/dummy/test/unit/paper_test.rb
142
- - test/dummy/test/unit/boo_test.rb
143
- - test/dummy/test/unit/user_test.rb
144
- - test/dummy/test/unit/foo_test.rb
145
105
  - test/dummy/README.rdoc
146
- - test/dummy/public/favicon.ico
106
+ - test/dummy/app/helpers/application_helper.rb
107
+ - test/dummy/app/views/layouts/application.html.erb
108
+ - test/dummy/app/models/roo.rb
109
+ - test/dummy/app/models/boo.rb
110
+ - test/dummy/app/models/nomodel.rb
111
+ - test/dummy/app/models/foo.rb
112
+ - test/dummy/app/models/user.rb
113
+ - test/dummy/app/models/paper.rb
114
+ - test/dummy/app/models/moo/hoo.rb
115
+ - test/dummy/app/assets/javascripts/application.js
116
+ - test/dummy/app/assets/stylesheets/application.css
117
+ - test/dummy/app/controllers/application_controller.rb
118
+ - test/dummy/config.ru
147
119
  - test/dummy/public/404.html
148
120
  - test/dummy/public/500.html
121
+ - test/dummy/public/favicon.ico
149
122
  - test/dummy/public/422.html
150
- - test/support/test_app.rb
123
+ - test/annotator_test.rb
124
+ - test/assets/roo_reannotated.rb
125
+ - test/assets/user_annotated.rb
126
+ - test/assets/foo_annotated_column_fixed.rb
127
+ - test/assets/foo_annotated_with_comments.rb
128
+ - test/assets/boo_encoding.rb
129
+ - test/assets/roo_initially_annotated.rb
130
+ - test/assets/paper_annotated.rb
131
+ - test/assets/foo_require_first.rb
132
+ - test/assets/boo_encoding_annotated.rb
133
+ - test/assets/boo_annotated.rb
134
+ - test/assets/foo_annotated_bad_column.rb
135
+ - test/assets/moo_hoo_annotated.rb
136
+ - test/assets/foo_annotated.rb
137
+ - test/assets/foo_annotated_bad_column_nodoc.rb
138
+ - test/test_helper.rb
151
139
  homepage: https://github.com/tech-angels/annotator
152
140
  licenses: []
153
141
  post_install_message:
@@ -168,74 +156,77 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
156
  version: '0'
169
157
  requirements: []
170
158
  rubyforge_project:
171
- rubygems_version: 1.8.23
159
+ rubygems_version: 1.8.10
172
160
  signing_key:
173
161
  specification_version: 3
174
162
  summary: Annotate your models and keep your comments about fields.
175
163
  test_files:
176
- - test/assets/foo_require_first.rb
177
- - test/assets/user_annotated.rb
178
- - test/assets/moo_hoo_annotated.rb
179
- - test/assets/boo_encoding_annotated.rb
180
- - test/assets/boo_encoding.rb
181
- - test/assets/foo_annotated.rb
182
- - test/assets/foo_annotated_with_comments.rb
183
- - test/assets/boo_annotated.rb
184
- - test/assets/foo_annotated_bad_column_nodoc.rb
185
- - test/assets/paper_annotated.rb
186
- - test/assets/foo_annotated_bad_column.rb
187
- - test/assets/foo_annotated_column_fixed.rb
188
- - test/annotator_test.rb
189
- - test/test_helper.rb
190
- - test/dummy/app/helpers/application_helper.rb
191
- - test/dummy/app/assets/stylesheets/application.css
192
- - test/dummy/app/assets/javascripts/application.js
193
- - test/dummy/app/controllers/application_controller.rb
194
- - test/dummy/app/models/user.rb
195
- - test/dummy/app/models/nomodel.rb
196
- - test/dummy/app/models/foo.rb
197
- - test/dummy/app/models/paper.rb
198
- - test/dummy/app/models/moo/hoo.rb
199
- - test/dummy/app/models/boo.rb
200
- - test/dummy/app/views/layouts/application.html.erb
201
- - test/dummy/config/routes.rb
202
- - test/dummy/config/environment.rb
164
+ - test/support/test_app.rb
165
+ - test/dummy/script/rails
166
+ - test/dummy/test/unit/paper_test.rb
167
+ - test/dummy/test/unit/boo_test.rb
168
+ - test/dummy/test/unit/foo_test.rb
169
+ - test/dummy/test/unit/roo_test.rb
170
+ - test/dummy/test/unit/user_test.rb
171
+ - test/dummy/test/fixtures/roos.yml
172
+ - test/dummy/test/fixtures/boos.yml
173
+ - test/dummy/test/fixtures/papers.yml
174
+ - test/dummy/test/fixtures/foos.yml
175
+ - test/dummy/test/fixtures/users.yml
176
+ - test/dummy/Rakefile
177
+ - test/dummy/config/locales/en.yml
178
+ - test/dummy/config/application.rb
203
179
  - test/dummy/config/environments/production.rb
204
- - test/dummy/config/environments/development.rb
205
180
  - test/dummy/config/environments/test.rb
206
- - test/dummy/config/application.rb
207
- - test/dummy/config/locales/en.yml
181
+ - test/dummy/config/environments/development.rb
208
182
  - test/dummy/config/database.yml
209
183
  - test/dummy/config/boot.rb
210
- - test/dummy/config/initializers/wrap_parameters.rb
211
- - test/dummy/config/initializers/mime_types.rb
184
+ - test/dummy/config/environment.rb
212
185
  - test/dummy/config/initializers/session_store.rb
213
186
  - test/dummy/config/initializers/backtrace_silencers.rb
214
- - test/dummy/config/initializers/secret_token.rb
187
+ - test/dummy/config/initializers/mime_types.rb
215
188
  - test/dummy/config/initializers/inflections.rb
216
- - test/dummy/script/rails
217
- - test/dummy/log/development.log
218
- - test/dummy/log/test.log
219
- - test/dummy/config.ru
220
- - test/dummy/Rakefile
221
- - test/dummy/db/development.sqlite3
222
- - test/dummy/db/migrate/20120527023350_create_papers.rb
189
+ - test/dummy/config/initializers/secret_token.rb
190
+ - test/dummy/config/initializers/wrap_parameters.rb
191
+ - test/dummy/config/routes.rb
192
+ - test/dummy/db/migrate/20120527025142_create_boos.rb
193
+ - test/dummy/db/migrate/20120219112425_create_foos.rb
223
194
  - test/dummy/db/migrate/20120527020350_devise_create_users.rb
195
+ - test/dummy/db/migrate/20120708043543_create_roos.rb
196
+ - test/dummy/db/migrate/20120527023350_create_papers.rb
224
197
  - test/dummy/db/migrate/20120527023417_add_attachment_avatar_to_papers.rb
225
- - test/dummy/db/migrate/20120219112425_create_foos.rb
226
- - test/dummy/db/migrate/20120527025142_create_boos.rb
227
198
  - test/dummy/db/schema.rb
228
- - test/dummy/test/fixtures/boos.yml
229
- - test/dummy/test/fixtures/papers.yml
230
- - test/dummy/test/fixtures/users.yml
231
- - test/dummy/test/fixtures/foos.yml
232
- - test/dummy/test/unit/paper_test.rb
233
- - test/dummy/test/unit/boo_test.rb
234
- - test/dummy/test/unit/user_test.rb
235
- - test/dummy/test/unit/foo_test.rb
236
199
  - test/dummy/README.rdoc
237
- - test/dummy/public/favicon.ico
200
+ - test/dummy/app/helpers/application_helper.rb
201
+ - test/dummy/app/views/layouts/application.html.erb
202
+ - test/dummy/app/models/roo.rb
203
+ - test/dummy/app/models/boo.rb
204
+ - test/dummy/app/models/nomodel.rb
205
+ - test/dummy/app/models/foo.rb
206
+ - test/dummy/app/models/user.rb
207
+ - test/dummy/app/models/paper.rb
208
+ - test/dummy/app/models/moo/hoo.rb
209
+ - test/dummy/app/assets/javascripts/application.js
210
+ - test/dummy/app/assets/stylesheets/application.css
211
+ - test/dummy/app/controllers/application_controller.rb
212
+ - test/dummy/config.ru
238
213
  - test/dummy/public/404.html
239
214
  - test/dummy/public/500.html
215
+ - test/dummy/public/favicon.ico
240
216
  - test/dummy/public/422.html
241
- - test/support/test_app.rb
217
+ - test/annotator_test.rb
218
+ - test/assets/roo_reannotated.rb
219
+ - test/assets/user_annotated.rb
220
+ - test/assets/foo_annotated_column_fixed.rb
221
+ - test/assets/foo_annotated_with_comments.rb
222
+ - test/assets/boo_encoding.rb
223
+ - test/assets/roo_initially_annotated.rb
224
+ - test/assets/paper_annotated.rb
225
+ - test/assets/foo_require_first.rb
226
+ - test/assets/boo_encoding_annotated.rb
227
+ - test/assets/boo_annotated.rb
228
+ - test/assets/foo_annotated_bad_column.rb
229
+ - test/assets/moo_hoo_annotated.rb
230
+ - test/assets/foo_annotated.rb
231
+ - test/assets/foo_annotated_bad_column_nodoc.rb
232
+ - test/test_helper.rb
@@ -1,170 +0,0 @@
1
-  (0.0ms) select sqlite_version(*)
2
-  (14.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
-  (0.0ms) PRAGMA index_list("schema_migrations")
4
-  (3.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
- Migrating to CreateFoos (20120219112425)
7
-  (0.1ms) begin transaction
8
-  (0.4ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "title" varchar(255), "random_number" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
9
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120219112425')
10
-  (2.8ms) commit transaction
11
-  (0.2ms) select sqlite_version(*)
12
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
13
-  (0.0ms) PRAGMA index_list("foos")
14
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
15
-  (0.2ms) select sqlite_version(*)
16
-  (15.7ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "title" varchar(255), "random_number" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
17
-  (3.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
18
-  (0.0ms) PRAGMA index_list("schema_migrations")
19
-  (3.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
20
-  (0.1ms) SELECT version FROM "schema_migrations"
21
-  (4.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120219112425')
22
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
23
-  (0.1ms) select sqlite_version(*)
24
-  (5.8ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "title" varchar(255), "random_number" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
25
-  (3.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
26
-  (0.0ms) PRAGMA index_list("schema_migrations")
27
-  (3.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
28
-  (0.1ms) SELECT version FROM "schema_migrations"
29
-  (3.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120219112425')
30
-  (0.0ms) select sqlite_version(*)
31
-  (5.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
32
-  (0.0ms) PRAGMA index_list("schema_migrations")
33
-  (4.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
34
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
35
- Migrating to CreateFoos (20120219112425)
36
-  (0.0ms) begin transaction
37
-  (0.4ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "title" varchar(255), "random_number" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
38
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120219112425')
39
-  (3.3ms) commit transaction
40
- Migrating to DeviseCreateUsers (20120527020350)
41
-  (0.0ms) begin transaction
42
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "password_salt" varchar(255), "confirmation_token" varchar(255), "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar(255), "failed_attempts" integer DEFAULT 0, "unlock_token" varchar(255), "locked_at" datetime, "authentication_token" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
43
-  (0.0ms) PRAGMA index_list("users")
44
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
45
-  (0.0ms) PRAGMA index_list("users")
46
-  (0.0ms) PRAGMA index_info('index_users_on_email')
47
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
48
-  (0.0ms) PRAGMA index_list("users")
49
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
50
-  (0.0ms) PRAGMA index_info('index_users_on_email')
51
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token")
52
-  (0.0ms) PRAGMA index_list("users")
53
-  (0.0ms) PRAGMA index_info('index_users_on_confirmation_token')
54
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
55
-  (0.0ms) PRAGMA index_info('index_users_on_email')
56
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_unlock_token" ON "users" ("unlock_token")
57
-  (0.0ms) PRAGMA index_list("users")
58
-  (0.0ms) PRAGMA index_info('index_users_on_unlock_token')
59
-  (0.0ms) PRAGMA index_info('index_users_on_confirmation_token')
60
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
61
-  (0.0ms) PRAGMA index_info('index_users_on_email')
62
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_authentication_token" ON "users" ("authentication_token")
63
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527020350')
64
-  (3.6ms) commit transaction
65
-  (0.2ms) select sqlite_version(*)
66
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
67
-  (0.0ms) PRAGMA index_list("foos")
68
-  (0.0ms) PRAGMA index_list("users")
69
-  (0.0ms) PRAGMA index_info('index_users_on_authentication_token')
70
-  (0.0ms) PRAGMA index_info('index_users_on_unlock_token')
71
-  (0.0ms) PRAGMA index_info('index_users_on_confirmation_token')
72
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
73
-  (0.0ms) PRAGMA index_info('index_users_on_email')
74
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
75
- Migrating to CreateFoos (20120219112425)
76
- Migrating to DeviseCreateUsers (20120527020350)
77
- Migrating to CreatePapers (20120527023350)
78
-  (0.0ms) select sqlite_version(*)
79
-  (0.0ms) begin transaction
80
-  (0.2ms) CREATE TABLE "papers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
81
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527023350')
82
-  (5.4ms) commit transaction
83
- Migrating to AddAttachmentAvatarToPapers (20120527023417)
84
-  (0.0ms) begin transaction
85
-  (0.3ms) ALTER TABLE "papers" ADD "avatar_file_name" varchar(255)
86
-  (0.2ms) ALTER TABLE "papers" ADD "avatar_content_type" varchar(255)
87
-  (0.2ms) ALTER TABLE "papers" ADD "avatar_file_size" integer
88
-  (0.2ms) ALTER TABLE "papers" ADD "avatar_updated_at" datetime
89
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527023417')
90
-  (3.8ms) commit transaction
91
- Migrating to CreateBoos (20120527025142)
92
-  (0.0ms) begin transaction
93
-  (0.4ms) CREATE TABLE "boos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "foo_id" integer, "poly_id" integer, "poly_type" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
94
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527025142')
95
-  (4.0ms) commit transaction
96
-  (0.4ms) select sqlite_version(*)
97
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
98
-  (0.0ms) PRAGMA index_list("boos")
99
-  (0.0ms) PRAGMA index_list("foos")
100
-  (0.0ms) PRAGMA index_list("papers")
101
-  (0.1ms) PRAGMA index_list("users")
102
-  (0.1ms) PRAGMA index_info('index_users_on_authentication_token')
103
-  (0.1ms) PRAGMA index_info('index_users_on_unlock_token')
104
-  (0.0ms) PRAGMA index_info('index_users_on_confirmation_token')
105
-  (0.1ms) PRAGMA index_info('index_users_on_reset_password_token')
106
-  (0.0ms) PRAGMA index_info('index_users_on_email')
107
-  (0.1ms) select sqlite_version(*)
108
-  (14.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
109
-  (0.0ms) PRAGMA index_list("schema_migrations")
110
-  (4.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
111
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
112
- Migrating to CreateFoos (20120219112425)
113
-  (0.0ms) begin transaction
114
-  (0.4ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "title" varchar(255), "random_number" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
115
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120219112425')
116
-  (7.1ms) commit transaction
117
- Migrating to DeviseCreateUsers (20120527020350)
118
-  (0.0ms) begin transaction
119
-  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "password_salt" varchar(255), "confirmation_token" varchar(255), "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar(255), "failed_attempts" integer DEFAULT 0, "unlock_token" varchar(255), "locked_at" datetime, "authentication_token" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
120
-  (0.0ms) PRAGMA index_list("users")
121
-  (0.3ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
122
-  (0.1ms) PRAGMA index_list("users")
123
-  (0.0ms) PRAGMA index_info('index_users_on_email')
124
-  (0.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
125
-  (0.1ms) PRAGMA index_list("users")
126
-  (0.1ms) PRAGMA index_info('index_users_on_reset_password_token')
127
-  (0.0ms) PRAGMA index_info('index_users_on_email')
128
-  (0.2ms) CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token")
129
-  (0.1ms) PRAGMA index_list("users")
130
-  (0.1ms) PRAGMA index_info('index_users_on_confirmation_token')
131
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
132
-  (0.0ms) PRAGMA index_info('index_users_on_email')
133
-  (0.2ms) CREATE UNIQUE INDEX "index_users_on_unlock_token" ON "users" ("unlock_token")
134
-  (0.1ms) PRAGMA index_list("users")
135
-  (0.1ms) PRAGMA index_info('index_users_on_unlock_token')
136
-  (0.0ms) PRAGMA index_info('index_users_on_confirmation_token')
137
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
138
-  (0.0ms) PRAGMA index_info('index_users_on_email')
139
-  (0.2ms) CREATE UNIQUE INDEX "index_users_on_authentication_token" ON "users" ("authentication_token")
140
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527020350')
141
-  (3.8ms) commit transaction
142
- Migrating to CreatePapers (20120527023350)
143
-  (0.0ms) begin transaction
144
-  (0.2ms) CREATE TABLE "papers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
145
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527023350')
146
-  (3.8ms) commit transaction
147
- Migrating to AddAttachmentAvatarToPapers (20120527023417)
148
-  (0.0ms) begin transaction
149
-  (0.3ms) ALTER TABLE "papers" ADD "avatar_file_name" varchar(255)
150
-  (0.1ms) ALTER TABLE "papers" ADD "avatar_content_type" varchar(255)
151
-  (0.2ms) ALTER TABLE "papers" ADD "avatar_file_size" integer
152
-  (0.2ms) ALTER TABLE "papers" ADD "avatar_updated_at" datetime
153
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527023417')
154
-  (3.2ms) commit transaction
155
- Migrating to CreateBoos (20120527025142)
156
-  (0.0ms) begin transaction
157
-  (0.3ms) CREATE TABLE "boos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "foo_id" integer, "poly_id" integer, "poly_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
158
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120527025142')
159
-  (3.7ms) commit transaction
160
-  (0.4ms) select sqlite_version(*)
161
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
162
-  (0.0ms) PRAGMA index_list("boos")
163
-  (0.0ms) PRAGMA index_list("foos")
164
-  (0.0ms) PRAGMA index_list("papers")
165
-  (0.0ms) PRAGMA index_list("users")
166
-  (0.0ms) PRAGMA index_info('index_users_on_authentication_token')
167
-  (0.0ms) PRAGMA index_info('index_users_on_unlock_token')
168
-  (0.0ms) PRAGMA index_info('index_users_on_confirmation_token')
169
-  (0.0ms) PRAGMA index_info('index_users_on_reset_password_token')
170
-  (0.0ms) PRAGMA index_info('index_users_on_email')
@@ -1,2 +0,0 @@
1
-  (0.2ms) begin transaction
2
-  (0.0ms) rollback transaction