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
| @@ -19,7 +19,7 @@ gem "therubyracer" | @@ -19,7 +19,7 @@ gem "therubyracer" | ||
| 19 | gem "faker" | 19 | gem "faker" |
| 20 | gem "seed-fu" | 20 | gem "seed-fu" |
| 21 | gem "linguist", "~> 1.0.0", :git => "https://github.com/github/linguist.git" | 21 | gem "linguist", "~> 1.0.0", :git => "https://github.com/github/linguist.git" |
| 22 | -gem "pygments.rb", "0.2.7" | 22 | +gem "pygments.rb", "0.2.11" |
| 23 | gem "thin" | 23 | gem "thin" |
| 24 | gem "unicorn" | 24 | gem "unicorn" |
| 25 | gem "git" | 25 | gem "git" |
Gemfile.lock
| @@ -180,7 +180,7 @@ GEM | @@ -180,7 +180,7 @@ GEM | ||
| 180 | coderay (~> 1.0.5) | 180 | coderay (~> 1.0.5) |
| 181 | method_source (~> 0.7) | 181 | method_source (~> 0.7) |
| 182 | slop (>= 2.4.4, < 3) | 182 | slop (>= 2.4.4, < 3) |
| 183 | - pygments.rb (0.2.7) | 183 | + pygments.rb (0.2.11) |
| 184 | rubypython (~> 0.5.3) | 184 | rubypython (~> 0.5.3) |
| 185 | pyu-ruby-sasl (0.0.3.3) | 185 | pyu-ruby-sasl (0.0.3.3) |
| 186 | rack (1.4.1) | 186 | rack (1.4.1) |
| @@ -342,7 +342,7 @@ DEPENDENCIES | @@ -342,7 +342,7 @@ DEPENDENCIES | ||
| 342 | mysql2 | 342 | mysql2 |
| 343 | omniauth-ldap | 343 | omniauth-ldap |
| 344 | pry | 344 | pry |
| 345 | - pygments.rb (= 0.2.7) | 345 | + pygments.rb (= 0.2.11) |
| 346 | rails (= 3.2.1) | 346 | rails (= 3.2.1) |
| 347 | rails-footnotes | 347 | rails-footnotes |
| 348 | rake | 348 | rake |
app/models/snippet.rb
| 1 | class Snippet < ActiveRecord::Base | 1 | class Snippet < ActiveRecord::Base |
| 2 | - include Utils::Colorize | 2 | + include Linguist::BlobHelper |
| 3 | 3 | ||
| 4 | belongs_to :project | 4 | belongs_to :project |
| 5 | belongs_to :author, :class_name => "User" | 5 | belongs_to :author, :class_name => "User" |
| @@ -38,8 +38,20 @@ class Snippet < ActiveRecord::Base | @@ -38,8 +38,20 @@ class Snippet < ActiveRecord::Base | ||
| 38 | ] | 38 | ] |
| 39 | end | 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 | end | 55 | end |
| 44 | 56 | ||
| 45 | def expired? | 57 | def expired? |
app/models/tree.rb