Commit 9c76bd95402dfb4fa49cca4876c9714f408c5122
1 parent
5b6019f3
Exists in
master
and in
4 other branches
Project linguist integration
Showing
5 changed files
with
20 additions
and
7 deletions
Show diff stats
Gemfile
Gemfile.lock
... | ... | @@ -180,7 +180,7 @@ GEM |
180 | 180 | coderay (~> 1.0.5) |
181 | 181 | method_source (~> 0.7) |
182 | 182 | slop (>= 2.4.4, < 3) |
183 | - pygments.rb (0.2.7) | |
183 | + pygments.rb (0.2.11) | |
184 | 184 | rubypython (~> 0.5.3) |
185 | 185 | pyu-ruby-sasl (0.0.3.3) |
186 | 186 | rack (1.4.1) |
... | ... | @@ -342,7 +342,7 @@ DEPENDENCIES |
342 | 342 | mysql2 |
343 | 343 | omniauth-ldap |
344 | 344 | pry |
345 | - pygments.rb (= 0.2.7) | |
345 | + pygments.rb (= 0.2.11) | |
346 | 346 | rails (= 3.2.1) |
347 | 347 | rails-footnotes |
348 | 348 | rake | ... | ... |
app/models/snippet.rb
1 | 1 | class Snippet < ActiveRecord::Base |
2 | - include Utils::Colorize | |
2 | + include Linguist::BlobHelper | |
3 | 3 | |
4 | 4 | belongs_to :project |
5 | 5 | belongs_to :author, :class_name => "User" |
... | ... | @@ -38,8 +38,20 @@ class Snippet < ActiveRecord::Base |
38 | 38 | ] |
39 | 39 | end |
40 | 40 | |
41 | - def colorize | |
42 | - system_colorize(content, file_name) | |
41 | + def data | |
42 | + content | |
43 | + end | |
44 | + | |
45 | + def size | |
46 | + 0 | |
47 | + end | |
48 | + | |
49 | + def name | |
50 | + file_name | |
51 | + end | |
52 | + | |
53 | + def mode | |
54 | + nil | |
43 | 55 | end |
44 | 56 | |
45 | 57 | def expired? | ... | ... |
app/models/tree.rb