Skip to content

Commit

Permalink
Merge github-linguist-grammars into github-linguist
Browse files Browse the repository at this point in the history
Now that all our grammars are licensed (or grandfathered in), we can
distribute them as part of the standard github-linguist gem. This makes
it easier for projects to get up and running with Linguist.
  • Loading branch information
aroben committed Jan 7, 2015
1 parent 470419d commit 0cfdbfb
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 25 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
source 'https://rubygems.org'
gemspec :name => "github-linguist"
gemspec :name => "github-linguist-grammars"
gem 'byebug' if RUBY_VERSION >= '2.0'
8 changes: 2 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,14 @@ task :samples do
end

task :build_gem => :samples do
rm_rf "grammars"
sh "script/convert-grammars"
languages = YAML.load_file("lib/linguist/languages.yml")
File.write("lib/linguist/languages.json", Yajl.dump(languages))
`gem build github-linguist.gemspec`
File.delete("lib/linguist/languages.json")
end

task :build_grammars_gem do
rm_rf "grammars"
sh "script/convert-grammars"
sh "gem", "build", "github-linguist-grammars.gemspec"
end

namespace :benchmark do
benchmark_path = "benchmark/results"

Expand Down
14 changes: 0 additions & 14 deletions github-linguist-grammars.gemspec

This file was deleted.

3 changes: 2 additions & 1 deletion github-linguist.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/github/linguist"
s.license = "MIT"

s.files = Dir['lib/**/*'] - ['lib/linguist/grammars.rb']
s.files = Dir['lib/**/*'] + Dir['grammars/*']
s.executables << 'linguist'

s.add_dependency 'charlock_holmes', '~> 0.7.3'
Expand All @@ -20,6 +20,7 @@ Gem::Specification.new do |s|

s.add_development_dependency 'minitest', '>= 5.0'
s.add_development_dependency 'mocha'
s.add_development_dependency 'plist', '~>3.1'
s.add_development_dependency 'pry'
s.add_development_dependency 'rake'
s.add_development_dependency 'yajl-ruby'
Expand Down
1 change: 1 addition & 0 deletions lib/linguist.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'linguist/blob_helper'
require 'linguist/generated'
require 'linguist/grammars'
require 'linguist/heuristics'
require 'linguist/language'
require 'linguist/repository'
Expand Down
3 changes: 0 additions & 3 deletions lib/linguist/grammars.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Note: This file is included in the github-linguist-grammars gem, not the
# github-linguist gem.

module Linguist
module Grammars
# Get the path to the directory containing the language grammar JSON files.
Expand Down

0 comments on commit 0cfdbfb

Please sign in to comment.